/* ==========================================================================
   RUSTIC HERITAGE FARMS LLC — styles.css
   Order: 1 Tokens · 2 Reset · 3 Typography · 4 Buttons · 5 Header/Nav
          6 Hero · 7 Sections · 8 Contact · 9 Forms · 10 Footer
          11 Floating UI · 12 Pop-up · 13 Motion · 14 Responsive
   --------------------------------------------------------------------------
   BRAND COLOURS: every colour is defined once, in section 1.
   When the client's logo/brand colours arrive, replace those values only.
   ========================================================================== */

/* ===== 1. TOKENS ========================================================= */
:root {
  /* Core brand palette (placeholders until final brand colours are supplied) */
  --color-primary: #22392C;        /* deep pasture green */
  --color-primary-deep: #13221A;   /* darkest green, for dark sections */
  --color-secondary: #7C8B6A;      /* muted sage */
  --color-accent: #A8762F;         /* harvest ochre */
  --color-accent-soft: #E0BC74;    /* wheat, for rules + highlights on dark */
  --color-background: #F4F0E6;     /* warm cream */
  --color-surface: #FCFAF4;        /* off-white card surface */
  --color-text: #201C16;           /* warm near-black */
  --color-muted: #6B6155;          /* secondary text */
  --color-line: #E1D8C6;           /* hairline borders */
  --color-line-strong: #CFC3AA;
  --color-earth: #6B4B2E;          /* earth brown */
  --color-on-dark: #F0EADC;
  --color-on-dark-muted: #B4AC98;

  /* Typography */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.8rem, 0.77rem + 0.15vw, 0.88rem);
  --step-0:  clamp(1rem, 0.96rem + 0.22vw, 1.09rem);
  --step-1:  clamp(1.18rem, 1.08rem + 0.42vw, 1.42rem);
  --step-2:  clamp(1.5rem, 1.3rem + 0.9vw, 2.1rem);
  --step-3:  clamp(1.95rem, 1.55rem + 1.9vw, 3.25rem);
  --step-4:  clamp(2.6rem, 1.7rem + 4.2vw, 5.4rem);

  /* Space + shape */
  --shell: 1200px;
  --gutter: clamp(1.15rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 1px 2px rgba(32, 28, 22, .04), 0 18px 40px -30px rgba(32, 28, 22, .55);
  --shadow-lift: 0 2px 4px rgba(32, 28, 22, .05), 0 28px 55px -32px rgba(32, 28, 22, .6);
  --transition: 240ms cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, .84, .34, 1);
}

/* ===== 2. RESET ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Fine paper grain — gives flat colour a bit of tooth. Purely decorative. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
}

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure, dl, dd { margin: 0; }

.shell { width: min(100% - (var(--gutter) * 2), var(--shell)); margin-inline: auto; }

.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;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--color-primary-deep); color: var(--color-on-dark);
  padding: .7rem 1.1rem; border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }
.section-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--color-accent-soft); }

/* ===== 3. TYPOGRAPHY ===================================================== */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0 0 .6em;
  font-variation-settings: "SOFT" 0, "WONK" 1;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; letter-spacing: -0.012em; }
p { margin: 0 0 1.1em; max-width: 68ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lede { font-size: var(--step-1); line-height: 1.5; }
.section-dark .lede { color: var(--color-on-dark); }

.section-head { max-width: 48rem; margin-bottom: clamp(2.25rem, 4.5vw, 3.75rem); }
.section-head h2 { margin-bottom: .3em; }
.section-head p { color: var(--color-muted); margin: 0; font-size: var(--step-1); line-height: 1.5; }
.section-dark .section-head p { color: var(--color-on-dark-muted); }

.status-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--step--1);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 1.35rem;
  padding: .5rem .95rem;
  border-radius: 100px;
}
.status-pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: .9;
}
.status-pill-light { background: rgba(255, 255, 255, .14); color: #F7F2E6; border: 1px solid rgba(247, 242, 230, .3); backdrop-filter: blur(6px); }
.status-pill-outline { color: var(--color-accent-soft); border: 1px solid rgba(224, 188, 116, .45); background: rgba(224, 188, 116, .07); }
.status-pill-dark { background: rgba(34, 57, 44, .07); color: var(--color-primary); border: 1px solid rgba(34, 57, 44, .14); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 0; padding: 0 0 3px; cursor: pointer;
  font-weight: 600; text-decoration: none;
  color: var(--color-earth);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: color var(--transition), background-size var(--transition);
}
.link-arrow:hover { color: var(--color-accent); background-size: 40% 1px; }
.section-dark .link-arrow { color: var(--color-accent-soft); }

/* ===== 4. BUTTONS ======================================================== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 50px;
  padding: .85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 20px; height: 20px; flex: none; }

.btn-primary { background: var(--color-primary); color: #F7F3E9; }
.btn-primary:hover { background: var(--color-primary-deep); box-shadow: 0 12px 24px -14px rgba(19, 34, 26, .9); }

.btn-accent { background: var(--color-accent); color: #FFF9EE; }
.btn-accent:hover { background: #8D6021; box-shadow: 0 12px 24px -14px rgba(141, 96, 33, .9); }

.btn-ghost { background: rgba(255, 255, 255, .1); color: #F7F3E9; border-color: rgba(247, 243, 233, .5); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(247, 243, 233, .94); color: var(--color-primary-deep); }

.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-line-strong); }
.btn-outline:hover { border-color: var(--color-primary); background: var(--color-surface); }

.btn-block { width: 100%; }
.btn-sm { min-height: 46px; padding: .6rem 1.1rem; font-size: var(--step--1); }

/* ===== 5. HEADER / NAV =================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  padding: clamp(.6rem, 1.6vw, 1.15rem) 0;
  transition: padding var(--transition);
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem .65rem .55rem 1.1rem;
  border-radius: 100px;
  border: 1px solid rgba(247, 243, 233, .18);
  background: rgba(19, 34, 26, .28);
  backdrop-filter: blur(14px) saturate(140%);
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.site-header.is-solid { padding: .5rem 0; }
.site-header.is-solid .header-bar {
  background: rgba(252, 250, 244, .88);
  border-color: var(--color-line);
  box-shadow: 0 14px 34px -26px rgba(32, 28, 22, .8);
}

.scroll-progress {
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  opacity: 0; transition: opacity var(--transition);
}
.site-header.is-solid .scroll-progress { opacity: 1; }
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-soft));
}

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: #F7F3E9; }
.site-header.is-solid .brand { color: var(--color-primary); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-words { display: grid; }
.brand-name { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.15; letter-spacing: -0.015em; }
.brand-sub { font-size: .64rem; letter-spacing: .3em; text-transform: uppercase; opacity: .7; margin-top: 2px; }

.nav { display: flex; align-items: center; gap: clamp(.5rem, 2vw, 1.25rem); }
.nav-list { display: flex; align-items: center; gap: clamp(.15rem, 1vw, .5rem); }
.nav-link {
  position: relative; display: block;
  text-decoration: none;
  font-size: .94rem; font-weight: 500;
  color: #EFE9DC;
  padding: .5rem .8rem;
  border-radius: 100px;
  transition: background-color var(--transition), color var(--transition);
}
.nav-link:hover { background: rgba(255, 255, 255, .12); }
.site-header.is-solid .nav-link { color: var(--color-text); }
.site-header.is-solid .nav-link:hover { background: rgba(34, 57, 44, .07); }
.nav-link.is-active { color: var(--color-accent-soft); background: rgba(224, 188, 116, .14); }
.site-header.is-solid .nav-link.is-active { color: var(--color-accent); background: rgba(168, 118, 47, .1); }

.nav-cta { min-height: 44px; padding: .6rem 1.2rem; background: var(--color-accent); color: #FFF9EE; }
.nav-cta:hover { background: #8D6021; }

.nav-toggle {
  display: none; align-items: center; gap: .55rem;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(247, 243, 233, .32);
  color: #F7F3E9;
  border-radius: 100px;
  padding: .55rem 1rem;
  min-height: 46px;
  cursor: pointer;
}
.site-header.is-solid .nav-toggle { background: transparent; border-color: var(--color-line-strong); color: var(--color-text); }
.nav-toggle-label { font-size: .85rem; letter-spacing: .05em; font-weight: 500; }
.nav-toggle-bars { display: grid; gap: 5px; width: 18px; }
.nav-toggle-bars span { display: block; height: 1.5px; background: currentColor; transition: transform var(--transition); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ===== 6. HERO =========================================================== */
.hero {
  position: relative;
  min-height: min(100svh, 900px);
  display: flex; align-items: flex-end;
  padding: clamp(8rem, 18vh, 11rem) 0 clamp(4rem, 9vh, 6rem);
  color: #F7F3E9;
  isolation: isolate;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(90% 70% at 12% 78%, rgba(11, 20, 14, .82) 0%, rgba(11, 20, 14, 0) 62%),
    linear-gradient(180deg, rgba(11, 20, 14, .72) 0%, rgba(11, 20, 14, .12) 34%, rgba(11, 20, 14, .5) 70%, rgba(11, 20, 14, .9) 100%);
}
.hero-inner { position: relative; }
.hero-title { max-width: 16ch; margin-bottom: .4em; }
.hero-title em { color: var(--color-accent-soft); font-style: italic; }
.hero-copy { max-width: 44ch; font-size: var(--step-1); color: #E6DFCF; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

.hero-meta {
  display: flex; flex-wrap: wrap;
  gap: clamp(1.25rem, 4vw, 3.25rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247, 243, 233, .22);
}
.hero-meta li {
  display: grid; gap: .15rem;
  font-size: var(--step--1);
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(240, 234, 220, .62);
}
.hero-meta span {
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: -0.01em; text-transform: none;
  color: #F7F3E9;
}

.scroll-cue {
  position: absolute; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  display: grid; justify-items: center; gap: .6rem;
  text-decoration: none; color: rgba(247, 243, 233, .7);
  font-size: .68rem; letter-spacing: .24em; text-transform: uppercase;
}
.scroll-cue-line { width: 1px; height: 46px; background: linear-gradient(180deg, rgba(247,243,233,.75), rgba(247,243,233,0)); }
.scroll-cue:hover { color: #fff; }

/* ===== 7. SECTIONS ======================================================= */
.section { padding: var(--section-y) 0; }
.section-dark {
  position: relative;
  padding: var(--section-y) 0;
  background: var(--color-primary-deep);
  color: var(--color-on-dark);
  overflow: hidden;
}
.section-dark::before {
  content: ""; position: absolute; inset: auto -10% -40% 40%;
  height: 70%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 188, 116, .12), transparent);
  pointer-events: none;
}
.section-dark h2, .section-dark h3 { color: #F5F0E2; }
.section-dark p { color: var(--color-on-dark-muted); }
.section-dark .shell { position: relative; z-index: 1; }

/* Pre-launch band */
.root-band {
  position: relative;
  background: var(--color-primary);
  color: var(--color-on-dark);
  padding: clamp(3rem, 6.5vw, 5rem) 0;
  overflow: hidden;
}
.root-band::before {
  content: ""; position: absolute; inset: -60% 55% auto -10%;
  height: 180%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 188, 116, .16), transparent);
}
.root-grid {
  position: relative;
  display: grid; grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3.25rem); align-items: center;
}
.root-seal { width: clamp(76px, 9vw, 112px); color: var(--color-accent-soft); }
.root-seal svg { width: 100%; height: auto; }
.root-text h2 { color: #F5F0E2; margin-bottom: .35em; }
.root-text p { color: #D3CCB9; max-width: 58ch; margin-bottom: 1.15rem; }

/* Story */
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(2rem, 5.5vw, 5rem);
  align-items: start;
}
.story-body h2 { margin-bottom: .45em; }
.story-body p { color: var(--color-muted); }
.story-body .lede { color: var(--color-text); margin-bottom: 1.15em; }
.story-facts {
  display: flex; flex-wrap: wrap; gap: clamp(1.25rem, 4vw, 3rem);
  margin-top: 2.25rem; padding-top: 1.65rem;
  border-top: 1px solid var(--color-line);
}
.story-facts dt {
  font-size: var(--step--1); letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-muted); margin-bottom: .2rem;
}
.story-facts dd { font-family: var(--font-display); font-size: var(--step-1); }

.framed { position: relative; isolation: isolate; }
.framed img { position: relative; z-index: 1; width: 100%; border-radius: var(--radius-lg); }
.framed::before {
  content: ""; position: absolute; inset: 16px -16px -16px 16px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  opacity: .4; z-index: 0;
}
.framed-dark::before { border-color: var(--color-accent-soft); opacity: .45; }
.figure-note { margin-top: .85rem; font-size: var(--step--1); color: var(--color-muted); letter-spacing: .04em; }
.section-dark .figure-note { color: var(--color-on-dark-muted); }

/* Farm life — bento */
.farm-life { background: var(--color-surface); border-block: 1px solid var(--color-line); }
.life-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(.75rem, 1.6vw, 1.15rem);
}
.life-card {
  grid-column: span 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 210px;
  padding: clamp(1.5rem, 3vw, 2.15rem);
  background: var(--color-background);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.life-card:hover { border-color: var(--color-line-strong); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.life-card h3 { margin-bottom: .45em; }
.life-card h3::after {
  content: ""; display: block; width: 26px; height: 2px;
  background: var(--color-accent); margin-top: .6rem; border-radius: 2px;
}
.life-card p { color: var(--color-muted); font-size: .98rem; margin: 0; }
.life-card-feature {
  grid-column: span 4;
  min-height: 300px;
  background: var(--color-primary);
  border-color: transparent;
}
.life-card-feature h3 { color: #F5F0E2; font-size: var(--step-2); }
.life-card-feature p { color: #CDC6B3; max-width: 40ch; }
.life-card-feature h3::after { background: var(--color-accent-soft); }
.life-card-wide { grid-column: span 4; }

/* Future visits */
.visits-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.visits-notes { margin: 1.85rem 0; display: grid; gap: .8rem; }
.visits-notes li { position: relative; padding-left: 1.7rem; color: var(--color-on-dark-muted); }
.visits-notes li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--color-accent-soft); box-shadow: 0 0 0 4px rgba(224, 188, 116, .14);
}

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.25rem); }
.timeline-step { position: relative; padding-top: 3rem; border-top: 2px solid var(--color-line); }
.timeline-step.is-current { border-top-color: var(--color-accent); }
.timeline-index {
  position: absolute; top: -20px; left: 0;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--color-background);
  border: 2px solid var(--color-line);
  font-family: var(--font-display); font-size: .95rem;
}
.timeline-step.is-current .timeline-index { border-color: var(--color-accent); color: var(--color-accent); }
.timeline-step h3 { margin-bottom: .35em; }
.timeline-step p { color: var(--color-muted); font-size: .98rem; }
.timeline-tag {
  display: inline-block; margin-top: 1rem;
  font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-earth);
}
.timeline-step.is-current .timeline-tag { color: var(--color-accent); font-weight: 600; }

/* Platforms */
.platforms { background: var(--color-surface); border-block: 1px solid var(--color-line); }
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.platform-card {
  display: flex; flex-direction: column; gap: .65rem;
  padding: clamp(1.6rem, 3vw, 2.25rem);
  background: var(--color-background);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.platform-card:hover { border-color: var(--color-line-strong); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.platform-card h3 { margin: 0; }
.platform-card p { color: var(--color-muted); font-size: .96rem; margin: 0 0 .6rem; }
.platform-card .btn { align-self: flex-start; }
.platform-pending {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.2rem;
  border: 1px dashed var(--color-line-strong);
  border-radius: 100px;
  color: var(--color-muted);
  font-size: .92rem; font-weight: 600;
}
.external-icon { width: 16px; height: 16px; flex: none; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(.65rem, 1.5vw, 1.15rem); }
.gallery-item {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  border: 1px solid var(--color-line);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.gallery-item:hover img { transform: scale(1.045); }
.gallery-item span {
  position: absolute; left: .85rem; bottom: .85rem;
  background: rgba(19, 34, 26, .72);
  backdrop-filter: blur(6px);
  color: #EDE6D7;
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .4rem .7rem; border-radius: 100px;
}
.gallery-item:nth-child(1) { grid-column: span 4; aspect-ratio: 16 / 10; }
.gallery-item:nth-child(2) { grid-column: span 2; aspect-ratio: 4 / 5; }
.gallery-item:nth-child(3) { grid-column: span 2; aspect-ratio: 1 / 1; }
.gallery-item:nth-child(4) { grid-column: span 2; aspect-ratio: 1 / 1; }
.gallery-item:nth-child(5) { grid-column: span 2; aspect-ratio: 1 / 1; }
.gallery-item:nth-child(6) { grid-column: span 6; aspect-ratio: 21 / 8; }

/* FAQ */
.faq-shell { max-width: 62rem; }
.faq { border-top: 1px solid var(--color-line); }
.faq-item { border-bottom: 1px solid var(--color-line); }
.faq-item h3 { margin: 0; font-size: inherit; }
.faq-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 1.5rem 0;
  font-family: var(--font-display);
  font-size: var(--step-1); line-height: 1.3;
  color: var(--color-text);
  transition: color var(--transition);
}
.faq-trigger:hover { color: var(--color-earth); }
.faq-icon {
  position: relative; width: 34px; height: 34px; flex: none;
  border: 1px solid var(--color-line); border-radius: 50%;
  transition: border-color var(--transition), background-color var(--transition);
}
.faq-trigger:hover .faq-icon { border-color: var(--color-accent); }
.faq-trigger[aria-expanded="true"] .faq-icon { background: var(--color-accent); border-color: var(--color-accent); }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 13px; height: 1.5px; margin: -.75px 0 0 -6.5px;
  background: var(--color-accent);
  transition: transform var(--transition), background-color var(--transition);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-trigger[aria-expanded="true"] .faq-icon::before,
.faq-trigger[aria-expanded="true"] .faq-icon::after { background: #FFF9EE; }
.faq-trigger[aria-expanded="true"] .faq-icon::after { transform: rotate(0deg); }
.faq-panel { padding-bottom: 1.6rem; }
.faq-panel p { color: var(--color-muted); max-width: 64ch; margin: 0; }

/* ===== 8. INQUIRY + CONTACT ============================================== */
.inquiry-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.25rem);
  align-items: start;
}
.inquiry-aside { position: sticky; top: 130px; }
.inquiry-notice {
  margin-top: 1.6rem; padding: 1.1rem 1.25rem;
  border: 1px solid rgba(224, 188, 116, .28);
  border-radius: var(--radius);
  background: rgba(224, 188, 116, .08);
  font-size: .95rem;
  color: #D8D1BE;
}
.inquiry-aside-list { margin-top: 1.75rem; display: grid; gap: .55rem; font-size: .95rem; color: var(--color-on-dark-muted); }
.inquiry-aside-list a { color: var(--color-accent-soft); text-decoration: none; border-bottom: 1px solid rgba(224,188,116,.35); }
.inquiry-aside-list a:hover { border-color: currentColor; }

.inquiry-card {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3.5vw, 3rem);
  box-shadow: var(--shadow-lift);
}

.contact-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.contact-block p { color: var(--color-muted); }
.social-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.85rem; }
.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  padding: clamp(1.6rem, 3vw, 2.4rem);
}
.contact-card h3 { margin-bottom: 1.35rem; }
.contact-list { display: grid; gap: 1.05rem; }
.contact-list dt {
  font-size: var(--step--1); letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-muted); margin-bottom: .15rem;
}
.contact-list dd a { text-decoration: none; border-bottom: 1px solid var(--color-line); word-break: break-word; }
.contact-list dd a:hover { border-color: var(--color-accent); color: var(--color-earth); }
.contact-note {
  margin-top: 1.6rem; padding-top: 1.3rem;
  border-top: 1px solid var(--color-line);
  font-size: .92rem; color: var(--color-muted);
}

/* ===== 9. FORMS ========================================================== */
.field { display: grid; margin-bottom: 1.15rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
label { font-size: .92rem; font-weight: 600; margin-bottom: .4rem; }
.field-legend { font-size: .92rem; font-weight: 600; margin-bottom: .4rem; display: block; }
.optional, .req { font-weight: 400; color: var(--color-muted); font-size: .82rem; margin-left: .3rem; }
.req { color: var(--color-accent); }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%;
  min-height: 52px;
  padding: .8rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
textarea { min-height: 130px; resize: vertical; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236B6155' stroke-width='1.5' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 12px;
  padding-right: 2.5rem;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(168, 118, 47, .14);
  outline: none;
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #A33A22; }
.field-error { margin: .4rem 0 0; font-size: .85rem; color: #A33A22; font-weight: 500; }

.radio-row { display: flex; gap: .6rem; align-items: center; min-height: 52px; }
.radio {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-bottom: 0; font-weight: 500; cursor: pointer;
  padding: .55rem 1rem; min-height: 46px;
  border: 1px solid var(--color-line); border-radius: 100px;
  background: #fff;
  transition: border-color var(--transition), background-color var(--transition);
}
.radio:hover { border-color: var(--color-line-strong); }
.radio:has(input:checked) { border-color: var(--color-accent); background: rgba(168, 118, 47, .07); }
.checkbox {
  display: flex; align-items: flex-start; gap: .6rem;
  margin: .25rem 0 1.6rem; font-weight: 400; font-size: .95rem; line-height: 1.45; cursor: pointer;
}
.radio input, .checkbox input { width: 20px; height: 20px; accent-color: var(--color-accent); flex: none; margin: 0; }
.checkbox input { margin-top: 2px; }

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-footnote { margin: 1rem 0 0; font-size: .85rem; color: var(--color-muted); text-align: center; }

.form-success h3 { margin-bottom: .5em; color: var(--color-primary); }
.form-success p { color: var(--color-muted); margin-bottom: 1.25rem; }

/* ===== 10. FOOTER ======================================================== */
.site-footer {
  position: relative;
  background: var(--color-primary-deep);
  color: var(--color-on-dark);
  padding: clamp(3.25rem, 6vw, 5rem) 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}
.footer-mark { color: var(--color-accent-soft); margin-bottom: 1rem; }
.footer-name { font-family: var(--font-display); font-size: var(--step-1); margin: 0 0 .3rem; }
.footer-tagline { color: var(--color-on-dark-muted); margin: 0 0 1rem; max-width: 34ch; }
.footer-status {
  display: inline-block; margin: 0;
  font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-accent-soft);
}
.footer-subscribe {
  display: inline-flex; align-items: center; gap: .6rem;
  margin-top: 1.5rem; padding: .8rem 1.3rem;
  background: rgba(224, 188, 116, .1);
  border: 1px solid rgba(224, 188, 116, .38);
  border-radius: 100px;
  color: var(--color-accent-soft);
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}
.footer-subscribe:hover { background: var(--color-accent-soft); color: var(--color-primary-deep); }
.footer-subscribe svg { width: 18px; height: 18px; }
.footer-heading {
  font-family: var(--font-body);
  font-size: var(--step--1); letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; color: #EDE6D7; margin: 0 0 1rem;
}
.footer-heading-spaced { margin-top: 1.75rem; }
.footer-nav ul, .footer-contact ul { display: grid; gap: .55rem; }
.footer-nav a, .footer-contact a {
  text-decoration: none; color: var(--color-on-dark-muted);
  word-break: break-word; transition: color var(--transition);
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--color-accent-soft); }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(237, 230, 215, .13);
  font-size: .85rem; color: var(--color-on-dark-muted);
}
.footer-base p { margin: 0; }

/* ===== 11. FLOATING UI =================================================== */
.mobile-cta {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  gap: .6rem; padding: .65rem var(--gutter) calc(.65rem + env(safe-area-inset-bottom));
  background: rgba(252, 250, 244, .92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--color-line);
}
.mobile-cta .btn { flex: 1; }
.mobile-cta .btn-outline { flex: 0 0 30%; }

.to-top {
  position: fixed; right: 1.35rem; bottom: 1.6rem; z-index: 75;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--color-primary); color: #F7F3E9;
  border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: 0 14px 28px -14px rgba(19, 34, 26, .9);
  transition: background-color var(--transition), transform var(--transition);
}
.to-top:hover { background: var(--color-primary-deep); transform: translateY(-2px); }
.to-top svg { width: 20px; height: 20px; }

/* Persistent way back to the pop-up once it has been dismissed */
.subscribe-tab {
  position: fixed; left: 1.35rem; bottom: 1.6rem; z-index: 75;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.25rem;
  background: var(--color-accent); color: #FFF9EE;
  border: 0; border-radius: 100px; cursor: pointer;
  font-size: .92rem; font-weight: 600;
  box-shadow: 0 16px 32px -16px rgba(141, 96, 33, .95);
  transition: background-color var(--transition), transform var(--transition);
}
.subscribe-tab:hover { background: #8D6021; transform: translateY(-2px); }
.subscribe-tab svg { width: 18px; height: 18px; }

/* ===== 12. NEWSLETTER POP-UP ============================================= */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1.25rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(12, 21, 15, .6); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative;
  display: grid;
  grid-template-columns: 210px 1fr;
  /* minmax(0, 1fr) lets the row shrink under max-height so .modal-body scrolls
     rather than overflowing a clipped panel. */
  grid-template-rows: minmax(0, 1fr);
  width: min(100%, 720px);
  max-height: min(90svh, 660px);
  overflow: hidden;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 40px 90px -40px rgba(12, 21, 15, .8);
  animation: modal-in 420ms var(--ease-out) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.modal-visual { position: relative; background: var(--color-primary); overflow: hidden; }
.modal-visual img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.modal-seal {
  position: absolute; inset: auto auto 1.25rem 1.25rem;
  width: 58px; color: var(--color-accent-soft);
}
.modal-seal svg { width: 100%; height: auto; }
/* min-height:0 lets this grid child shrink below its content so it can
   actually scroll. Without it the form overflows a capped panel and the
   submit button gets clipped on short screens. */
.modal-body {
  padding: clamp(1.6rem, 3.5vw, 2.5rem);
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-panel h2 { font-size: var(--step-2); margin-bottom: .35em; }
.modal-body > p { color: var(--color-muted); font-size: .96rem; margin-bottom: 1.5rem; }
.modal-close {
  position: absolute; top: .8rem; right: .8rem; z-index: 2;
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(252, 250, 244, .92); border: 1px solid var(--color-line);
  border-radius: 50%; cursor: pointer; color: var(--color-muted);
  transition: background-color var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--color-background); color: var(--color-text); }
.modal-close svg { width: 18px; height: 18px; }
.modal-dismiss {
  display: block; width: 100%; margin-top: .85rem;
  background: none; border: 0; cursor: pointer;
  font-size: .9rem; color: var(--color-muted); text-decoration: underline;
  padding: .5rem;
}
body.is-locked { overflow: hidden; }

/* ===== 13. MOTION ======================================================== */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity 750ms ease, transform 750ms var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .gallery-item:hover img, .btn:hover, .life-card:hover, .platform-card:hover { transform: none; }
}

/* ===== 14. RESPONSIVE ==================================================== */
@media (max-width: 1024px) {
  .story-grid, .visits-grid, .inquiry-grid, .contact-grid { grid-template-columns: 1fr; }
  .inquiry-aside { position: static; }
  .story-figure, .visits-figure { max-width: 470px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .life-card, .life-card-feature, .life-card-wide { grid-column: span 3; }
  .life-card-feature { min-height: 260px; }
}

@media (max-width: 880px) {
  html { scroll-padding-top: 92px; }

  .nav {
    position: fixed; inset: 0 0 0 auto;
    width: min(90vw, 400px);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 0;
    padding: 6rem 1.75rem 2.5rem;
    background: var(--color-primary-deep);
    transform: translateX(100%);
    transition: transform 340ms var(--ease-out);
    overflow-y: auto;
    visibility: hidden;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list li { border-bottom: 1px solid rgba(237, 230, 215, .1); }
  .nav-link, .site-header.is-solid .nav-link {
    display: block; padding: 1.05rem .25rem;
    border-radius: 0; background: none;
    font-family: var(--font-display); font-size: 1.4rem;
    color: #EDE6D7;
  }
  .nav-link.is-active, .site-header.is-solid .nav-link.is-active { color: var(--color-accent-soft); background: none; }
  .nav-cta { margin-top: 1.85rem; width: 100%; }
  .nav-toggle { display: inline-flex; }

  .hero { min-height: 90svh; align-items: center; padding-top: 8rem; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-meta { gap: 1.25rem 2rem; }
  .scroll-cue { display: none; }

  .root-grid { grid-template-columns: 1fr; }
  .root-seal { width: 68px; }

  .life-card, .life-card-feature, .life-card-wide { grid-column: span 6; min-height: 0; }

  .timeline { grid-template-columns: 1fr; gap: 2.5rem; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(n) { grid-column: span 1; aspect-ratio: 1 / 1; }
  .gallery-item:nth-child(1) { grid-column: span 2; aspect-ratio: 16 / 10; }
  .gallery-item:nth-child(6) { grid-column: span 2; aspect-ratio: 16 / 9; }

  .mobile-cta { display: flex; }
  body { padding-bottom: 80px; }
  .to-top { bottom: 96px; right: 1rem; width: 44px; height: 44px; }
  /* Mobile already has the sticky CTA bar + footer subscribe button — keep it uncluttered */
  .subscribe-tab { display: none !important; }

  /* Pop-up becomes a bottom sheet */
  .modal { place-items: end center; padding: 0; }
  .modal-panel {
    grid-template-columns: 1fr;
    /* image row sizes to content; form row absorbs the rest and scrolls */
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    max-height: 92svh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    animation: sheet-in 380ms var(--ease-out) both;
  }
  @keyframes sheet-in {
    from { transform: translateY(100%); }
    to { transform: none; }
  }
  .modal-visual { height: 128px; }
  .modal-seal { width: 46px; bottom: .85rem; left: .95rem; }

  /* Short phones (iPhone SE and similar): trade image height for form room
     so "Keep me posted" stays above the fold. */
  @media (max-height: 720px) {
    .modal-visual { height: 76px; }
    .modal-seal { width: 36px; bottom: .6rem; left: .8rem; }
    .modal-panel h2 { font-size: var(--step-1); }
    .modal-body { padding-top: 1.15rem; }
    .modal-body > p { margin-bottom: 1.15rem; }
  }

  /* Very short phones: drop the decorative image and status pill entirely so
     the form itself fits. The sheet still scrolls if anything overflows. */
  @media (max-height: 620px) {
    .modal-visual { display: none; }
    .modal-panel { grid-template-rows: minmax(0, 1fr); }
    .modal-panel .status-pill { display: none; }
    .modal-body { padding-top: 1.5rem; }
    .modal-body > p { margin-bottom: 1rem; }
    .modal-dismiss { margin-top: .5rem; }
  }
  .modal-body { padding-bottom: calc(1.75rem + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .brand-sub { display: none; }
  .brand-name { font-size: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .story-facts { gap: 1.25rem 2rem; }
  .hero-title { max-width: 100%; }
  .header-bar { padding: .45rem .5rem .45rem .8rem; }
}

@media (min-width: 1600px) {
  :root { --shell: 1320px; }
}
