/* ==========================================================================
   Dodge County Dairy Association — Custom Stylesheet
   No frameworks. No shadows. No radius beyond 4px. No animations.
   ========================================================================== */

/* --- Design Tokens ---------------------------------------------------- */
:root {
  --bg: #f8f9fa;
  --bg-alt: #f1f3f5;
  --bg-card: #ffffff;
  --bg-dark: #272d35;
  --text: #181c22;
  --text-muted: #5a6370;
  --text-faint: #7c8694;
  --primary: #a0522d;
  --primary-rgb: 160, 82, 45;
  --primary-light: #c4795a;
  --accent: #a0522d;
  --accent-light: #dfc4b5;
  --border: #e1e5e9;
  --border-light: #f1f3f5;
  --info: #4a7fb5;
  --success: #3a7d44;
  --error: #c0392b;
}

html.dark {
  --bg: #151820;
  --bg-alt: #1a1d22;
  --bg-card: #21252b;
  --bg-dark: #0f1115;
  --text: #f1f3f5;
  --text-muted: #a3adb8;
  --text-faint: #7c8694;
  --primary: #c4795a;
  --primary-rgb: 196, 121, 90;
  --primary-light: #dfa88e;
  --accent: #c4795a;
  --accent-light: #3a2a20;
  --border: #2c3139;
  --border-light: #21252b;
  --info: #6a9fd5;
  --success: #5ab368;
  --error: #e74c3c;
}

/* --- Reset & Base ----------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
  font-size: clamp(0.938rem, 0.9rem + 0.2vw, 1rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color 0.3s, color 0.3s;
  padding-bottom: 2.25rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul, ol {
  list-style: none;
}

ul ul, ul ol, ol ul, ol ol {
  list-style: none;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-light);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* --- Typography ------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  text-wrap: balance;
  color: var(--text);
}

h1 {
  font-size: clamp(2.1rem, 1.75rem + 1.75vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.4rem, 1.25rem + 0.75vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.375rem);
  font-weight: 600;
  line-height: 1.3;
}

.overline {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* Accent rule under h2 */
h2.accent-rule::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--accent);
  margin-top: 0.75rem;
}

/* --- Layout ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  section {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

/* --- Hung Photo Frame ------------------------------------------------- */
.hung-photo {
  background: var(--bg-card);
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: background-color 0.3s, border-color 0.3s;
}

.hung-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 1px;
}

/* --- Navigation ------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s, border-color 0.3s;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}

.nav-brand {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.2;
  flex-shrink: 0;
}

.nav-brand:hover {
  color: var(--text);
}

.nav-brand span {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-right {
  display: none;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .nav-right {
    display: flex;
  }
}

.nav-phone {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Dark mode toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
  min-width: 44px;
  min-height: 44px;
}

.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
html.dark .theme-toggle .icon-moon { display: none; }
html.dark .theme-toggle .icon-sun  { display: block; }

/* Hamburger */
.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
  min-width: 44px;
  min-height: 44px;
}

@media (min-width: 768px) {
  .nav-hamburger {
    display: none;
  }
}

.nav-hamburger svg {
  width: 24px;
  height: 24px;
}

.nav-hamburger .icon-close { display: none; }
.nav-hamburger[aria-expanded="true"] .icon-menu { display: none; }
.nav-hamburger[aria-expanded="true"] .icon-close { display: block; }

/* Mobile menu */
.mobile-menu {
  display: none;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem 1.25rem;
  transition: background-color 0.3s;
}

.mobile-menu.open {
  display: block;
}

@media (min-width: 768px) {
  .mobile-menu {
    display: none !important;
  }
}

.mobile-menu a,
.mobile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
}

.mobile-menu a:hover,
.mobile-menu a[aria-current="page"] {
  color: var(--text);
}

.mobile-menu .mobile-phone-link {
  margin-top: 0.75rem;
  padding: 0.65rem 1.25rem;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
}

.mobile-menu .mobile-phone-link:hover {
  color: #fff;
  background: var(--primary-light);
}

.mobile-menu .mobile-divider {
  border-top: 1px solid var(--border);
  margin: 0.5rem 0;
}

/* --- Hero ------------------------------------------------------------- */
.hero {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .hero {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 58fr 42fr;
    gap: 3.5rem;
  }
}

.hero-text .overline {
  margin-bottom: 0.75rem;
}

.hero-text h1 {
  margin-bottom: 1.25rem;
}

.hero-text p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 36rem;
}

.hero-phone {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.hero-cta {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s;
  min-height: 44px;
  line-height: 1.4;
}

.hero-cta:hover {
  background: var(--primary-light);
  color: #fff;
}

.hero-image {
  max-width: 400px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero-image {
    max-width: none;
    margin: 0;
  }
}

.hero-image .hung-photo {
  aspect-ratio: 4 / 5;
}

/* --- Stat Band -------------------------------------------------------- */
.stat-band {
  background: var(--bg-alt);
  border-top: 3px solid var(--accent);
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  transition: background-color 0.3s;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item strong {
  display: block;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.stat-item span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Services --------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
  }
}

.service-card {
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 4px 4px 0;
  transition: background-color 0.3s, border-color 0.3s;
}

.service-card h3 {
  margin-bottom: 0.5rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.938rem;
}

/* --- Local Narrative -------------------------------------------------- */
.narrative-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .narrative-row {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.narrative-row + .narrative-row {
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .narrative-row + .narrative-row {
    margin-top: 4rem;
  }
}

.narrative-text h3 {
  margin-bottom: 0.75rem;
}

.narrative-text p {
  color: var(--text-muted);
}

.narrative-image .hung-photo {
  aspect-ratio: 4 / 3;
  max-width: 480px;
}

/* Reverse order for row 2 on desktop */
@media (min-width: 768px) {
  .narrative-row.reverse .narrative-image {
    order: -1;
  }
}

/* --- Pull Quote ------------------------------------------------------- */
.pull-quote {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s, border-color 0.3s;
}

.pull-quote blockquote {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}

.pull-quote blockquote p {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  font-style: italic;
}

.pull-quote blockquote p::before {
  content: '\201C';
}

.pull-quote blockquote p::after {
  content: '\201D';
}

.pull-quote cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Membership ------------------------------------------------------- */
.membership {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2.5rem 2rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  transition: background-color 0.3s, border-color 0.3s;
}

.membership h2 {
  margin-bottom: 1rem;
}

.membership p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.membership .secondary-note {
  font-size: 0.9rem;
  color: var(--text-faint);
  margin-top: 1rem;
}

/* --- Buttons ---------------------------------------------------------- */
.btn-primary {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s;
  min-height: 44px;
  line-height: 1.4;
}

.btn-primary:hover {
  background: var(--primary-light);
  color: #fff;
}

/* --- Contact Section -------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-detail svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 0.15rem;
}

.contact-detail span,
.contact-detail a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-detail a:hover {
  color: var(--primary);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.938rem;
  transition: border-color 0.2s, background-color 0.3s;
  min-height: 44px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 480px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-feedback {
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}

.form-feedback.error {
  color: var(--error);
}

.form-feedback.success {
  color: var(--success);
}

.form-feedback.visible {
  display: block;
}

.turnstile-wrap {
  display: flex;
}

/* --- Footer ----------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  transition: border-color 0.3s;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-org {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.footer-org span {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-credit {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.footer-credit a {
  color: var(--text-faint);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-credit a:hover {
  color: var(--primary);
}

/* --- Disclaimer Bar --------------------------------------------------- */
.disclaimer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 101;
  background: var(--bg-dark);
  color: #d1d5db;
  font-size: 0.75rem;
  text-align: center;
  padding: 0.5rem 1rem;
  line-height: 1.4;
  transition: background-color 0.3s;
}

.disclaimer-bar a {
  color: #d1d5db;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- About Page ------------------------------------------------------- */
.about-content {
  max-width: 44rem;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.about-content p:last-child {
  margin-bottom: 0;
}

.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .values-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  background: var(--bg-card);
  transition: background-color 0.3s, border-color 0.3s;
}

.value-card h3 {
  margin-bottom: 0.5rem;
}

.value-card p {
  color: var(--text-muted);
  font-size: 0.938rem;
  margin-bottom: 0;
}

/* --- Service Detail Pages --------------------------------------------- */
.service-intro {
  max-width: 44rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.test-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 44rem;
}

.test-item h3 {
  margin-bottom: 0.5rem;
}

.test-item p {
  color: var(--text-muted);
}

/* Process steps */
.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
  max-width: 44rem;
}

@media (min-width: 600px) {
  .process-steps {
    grid-template-columns: 1fr 1fr;
  }
}

.process-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  transition: background-color 0.3s, border-color 0.3s;
}

.step-number {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.step-text {
  font-size: 0.938rem;
  color: var(--text-muted);
  padding-top: 0.25rem;
}

/* Included list */
.included-list {
  margin-top: 1.5rem;
  max-width: 44rem;
}

.included-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.included-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border: 2px solid var(--primary);
  border-radius: 2px;
}

/* FAQ */
.faq-list {
  margin-top: 1.5rem;
  max-width: 44rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--bg-card);
  transition: background-color 0.3s, border-color 0.3s;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  min-height: 44px;
}

.faq-question svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-faint);
  transition: transform 0.2s;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  color: var(--text-muted);
  font-size: 0.938rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Service CTA band */
.service-cta-band {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  transition: background-color 0.3s, border-color 0.3s;
}

.service-cta-band p {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: clamp(1.1rem, 1rem + 0.3vw, 1.25rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.service-cta-band .phone-link {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
}

/* --- Contact Page (full page) ----------------------------------------- */
.contact-page-intro {
  max-width: 44rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* --- Utility ---------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
