/* =================================================================
   iSage Global styles
   Mobile-first. Design tokens live in :root.
   Sections: header, hero, generic section, cards, compare, coverage,
   contact form, footer, motion, responsive.
   ================================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette */
  --ink:        #1F1E1D;  /* near-black text and dark sections */
  --sand:       #F0EEE6;  /* warm light background / text on dark */
  --clay:       #C96442;  /* accent: rules, the initial i, icon marks */
  --clay-btn:   #B85235;  /* deepened clay for solid buttons, for AA contrast */
  --stone:      #6E6A63;  /* muted text */
  --line:       #DDD9CF;  /* light hairline borders */
  --paper:      #FFFFFF;  /* clean light background */

  /* Tints derived from the palette */
  --sand-2:     #E7E4DA;  /* slightly deeper sand for chips / hovers */
  --ink-soft:   #2B2926;  /* raised surface on ink sections */
  --sand-dim:   rgba(240, 238, 230, 0.72); /* muted text on dark */
  --line-dark:  rgba(240, 238, 230, 0.16); /* hairline on dark */

  /* Type */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", "Segoe UI Emoji", sans-serif;

  /* Shape & rhythm */
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1120px;
  --gap: clamp(1rem, 3vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);

  --shadow: 0 1px 2px rgba(31, 30, 29, 0.04), 0 8px 28px rgba(31, 30, 29, 0.06);
}

/* ---------- Reset-ish base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* offset anchor scrolling so the sticky header does not cover headings */
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;      /* 17px */
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }
ul, ol { margin: 0; }

a { color: inherit; text-decoration: none; }

/* Visible, consistent focus for keyboard users */
:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--sand);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 5vw, 2.5rem);
}

.section { padding-block: var(--section-y); }
.section-paper { background: var(--paper); }
.section-sand  { background: var(--sand); }
.section-ink   { background: var(--ink); color: var(--sand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease,
              color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--clay-btn);
  color: var(--paper);
}
.btn-primary:hover { background: var(--ink); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }

/* Ghost button sits on dark sections too */
.section-ink .btn-ghost { color: var(--sand); border-color: var(--line-dark); }
.section-ink .btn-ghost:hover { border-color: var(--sand); }

.btn-sm { padding: 0.6rem 1.05rem; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ---------- Eyebrow + section heads ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 1.1rem;
}
.section-ink .eyebrow { color: var(--sand-dim); }

/* Tag-line variant (hero "iINSTANT iSIGHT"). No uppercasing, so the
   lowercase clay "i" of the brand survives. Slightly larger and darker
   than a plain eyebrow because it carries the tag line, not a label. */
.eyebrow-tagline {
  text-transform: none;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--ink);
}
/* Wrapping the text keeps it a single flex item, so the .eyebrow gap
   only applies between the tag line and the accent rule. */
.eyebrow-text { white-space: nowrap; }

/* the thin clay accent rule after each eyebrow */
.eyebrow-rule {
  height: 2px;
  width: 34px;
  background: var(--clay);
  border-radius: 2px;
  flex: none;
}

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.25rem); }

.section-title {
  font-size: clamp(1.65rem, 4.6vw, 2.6rem);
}
.section-intro {
  margin-top: 1.15rem;
  font-size: 1.1rem;
  color: var(--stone);
  max-width: 42rem;
}
.section-ink .section-intro { color: var(--sand-dim); }

/* Closing line under a section. Defaults to light backgrounds; the
   ink override below handles the dark sections. */
.section-note {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
  color: var(--stone);
  max-width: 48rem;
}
.section-ink .section-note {
  border-top-color: var(--line-dark);
  color: var(--sand-dim);
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(240, 238, 230, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-i { color: var(--clay); }

.nav { display: flex; align-items: center; }

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.6vw, 2rem);
  padding: 0;
}
.nav-menu a:not(.btn) {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-menu a:not(.btn):hover { border-color: var(--clay); }

/* Hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-box {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
}
.nav-toggle-bar {
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--sand);
  padding-block: clamp(3rem, 9vw, 6rem);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
.hero-title {
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 0.25rem;
}
.hero-lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 4.2vw, 1.7rem);
  color: var(--clay);
  margin-top: 1.15rem;
  font-weight: 400;
}
.hero-sub {
  margin-top: 1.35rem;
  font-size: 1.1rem;
  color: var(--stone);
  max-width: 38rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* Screen-reader-only text */
.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;
}

/* HAi proprietary-engine badge */
.hai-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.6rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(201, 100, 66, 0.05);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--stone);
}
.hai-mark {
  width: 11px; height: 11px;
  background: var(--clay);
  border-radius: 3px;
  transform: rotate(45deg);
  flex: none;
}

/* ---------- Hero: smart-glasses POV demo ---------- */
.hero-visual {
  justify-self: center;
  width: 100%;
  max-width: 560px;
  margin: 0;
}
.pov {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* HUD bar */
.pov-hud {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--ink);
  color: var(--sand-dim);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hud-rec { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--clay); }
.hud-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--clay); animation: livePulse 1.6s ease-in-out infinite; }
/* text-transform is cleared so the brand keeps its casing: "iSage . HAi" */
.hud-brand { color: var(--sand); letter-spacing: 0.12em; text-transform: none; }
.hud-sep { color: var(--clay); }
.hud-device { margin-left: auto; color: var(--sand-dim); }
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.25; transform: scale(0.7); } }

/* the view through the glasses (kept at 4:3 so detection boxes line up) */
.pov-scene {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(170deg, #EAE7DE 0%, #F6F4EE 55%, #FFFFFF 100%);
}
.pov-drift {
  position: absolute; inset: 0;
  /* The corridor photo. Swap assets/pov.jpg to change it. Gradient is the fallback.
     Kept static so the detection boxes stay locked to the features. */
  background: #E9E6DD url('pov.jpg') center / cover no-repeat;
}
@keyframes drift {
  0%   { transform: scale(1.04) translate(0, 0); }
  50%  { transform: scale(1.08) translate(-1.5%, 0.5%); }
  100% { transform: scale(1.04) translate(0, 0); }
}
.pov-building { width: 100%; height: 100%; display: block; }
.pov-building .ln { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pov-building .soft { opacity: 0.32; stroke-width: 1.5; }
.pov-building .fillp { fill: #FCFBF7; }
.pov-building .fills { fill: var(--sand); opacity: 0.9; }
.pov-building .accent { stroke: var(--clay); }
.pov-building .fillaccent { fill: rgba(201, 100, 66, 0.16); }

/* AR scan sweep + lens vignette */
.pov-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 38%;
  background: linear-gradient(rgba(201,100,66,0) 0%, rgba(201,100,66,0.14) 50%, rgba(201,100,66,0) 100%);
  animation: sweep 3.8s linear infinite;
  pointer-events: none;
}
@keyframes sweep { 0% { transform: translateY(-100%); } 100% { transform: translateY(320%); } }
.pov-vignette {
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 46px rgba(31,30,29,0.16), inset 0 0 0 1px rgba(31,30,29,0.05);
}

/* detection boxes */
.det {
  position: absolute;
  border: 1.4px solid rgba(201, 100, 66, 0.55);
  border-radius: 5px;
  opacity: 0;
  transform: scale(1.14);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.det::before, .det::after {
  content: ""; position: absolute; width: 11px; height: 11px;
  border: 2.4px solid var(--clay);
}
.det::before { top: -1.4px; left: -1.4px; border-right: 0; border-bottom: 0; border-radius: 5px 0 0 0; }
.det::after  { bottom: -1.4px; right: -1.4px; border-left: 0; border-top: 0; border-radius: 0 0 5px 0; }
.det.in { opacity: 1; transform: scale(1); animation: lock 0.55s ease; }
@keyframes lock {
  0%   { box-shadow: 0 0 0 0 rgba(201,100,66,0.45); }
  100% { box-shadow: 0 0 0 9px rgba(201,100,66,0); }
}
.det-label {
  position: absolute; left: -1.4px; bottom: 100%; margin-bottom: 4px;
  background: var(--clay); color: var(--paper);
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 2px 6px; border-radius: 5px; white-space: nowrap;
}
/* positions tuned to assets/pov.jpg (corridor photo) */
.det-1 { left: 57%;   top: 12%; width: 13%;   height: 15%; }   /* exit sign */
.det-2 { left: 56%;   top: 21%; width: 16.5%; height: 52%; }   /* fire door */
.det-3 { left: 75.5%; top: 50%; width: 12%;   height: 36%; }   /* extinguisher */

/* label placements that keep the three labels from colliding */
.det--right .det-label { left: auto; right: -1.4px; }          /* label anchored to the right */
.det--left .det-label {                                        /* label sits to the left of the box */
  left: auto; right: 100%; top: 50%; bottom: auto;
  transform: translateY(-50%);
  margin: 0 6px 0 0;
}

/* tracking reticle */
.reticle {
  position: absolute; left: 50%; top: 50%;
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border: 1.5px solid rgba(201, 100, 66, 0.8);
  border-radius: 50%;
  transition: left 0.55s cubic-bezier(0.5, 0.1, 0.2, 1), top 0.55s cubic-bezier(0.5, 0.1, 0.2, 1);
}
.reticle::before, .reticle::after { content: ""; position: absolute; background: var(--clay); }
.reticle::before { left: 50%; top: -5px; width: 1.5px; height: 8px; margin-left: -0.75px; }
.reticle::after  { left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; }

/* status chip */
.pov-status {
  position: absolute; left: 10px; bottom: 10px;
  display: inline-flex; align-items: center;
  background: rgba(31, 30, 29, 0.82);
  color: var(--sand);
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 4px 9px; border-radius: 999px;
}
.pov-dots { display: inline-flex; margin-left: 1px; }
.pov-dots i { width: 3px; height: 3px; margin-left: 2px; border-radius: 50%; background: var(--clay); opacity: 0.3; animation: dots 1.4s infinite; }
.pov-dots i:nth-child(2) { animation-delay: 0.2s; }
.pov-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes dots { 0%,60%,100% { opacity: 0.3; } 30% { opacity: 1; } }

/* report HUD readout */
.pov-report {
  background: var(--ink);
  color: var(--sand);
  padding: 0.9rem 1.05rem 1rem;
  border-top: 1px solid var(--line-dark);
}
.pov-report-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.7rem;
}
.pov-report-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sand-dim);
}
.pov-report-prog {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--clay);
}
.pov-report-list { list-style: none; padding: 0; display: grid; gap: 0.45rem; }
.pov-report-list li {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--sand-dim);
  opacity: 0.4;
  transition: opacity 0.4s ease, color 0.4s ease;
}
.pov-report-list li.in { opacity: 1; color: var(--sand); }
.tick {
  position: relative;
  width: 18px; height: 18px; flex: none;
  border: 1.5px solid var(--line-dark);
  border-radius: 50%;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.pov-report-list li.in .tick { background: var(--clay); border-color: var(--clay); }
.tick::after {
  content: "";
  position: absolute; left: 5.5px; top: 2.5px;
  width: 4px; height: 8px;
  border: solid var(--paper); border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.25s ease 0.05s;
}
.pov-report-list li.in .tick::after { transform: rotate(45deg) scale(1); }
.pov-report-foot {
  margin-top: 0.8rem; padding-top: 0.7rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.78rem;
  color: var(--sand-dim);
  opacity: 0.5;
  transition: opacity 0.4s ease, color 0.4s ease;
}
.pov-report.done .pov-report-foot { opacity: 1; color: var(--clay); }

/* ---------- Problem: numbered stat cards ---------- */
.stat-card {
  padding: 1.75rem 0 0;
  border-top: 2px solid var(--ink);
}
.stat-index {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--clay);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.stat-card h3 {
  font-size: 1.35rem;
  margin-top: 0.5rem;
}
.stat-card p {
  margin-top: 0.7rem;
  color: var(--stone);
  font-size: 1rem;
}

/* ---------- Shared icon badge ---------- */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(201, 100, 66, 0.10);
  color: var(--clay);
  margin-bottom: 1.15rem;
}
.icon-badge svg { width: 24px; height: 24px; }
.section-ink .icon-badge { background: rgba(240, 238, 230, 0.08); }

/* ---------- How it works: steps ---------- */
.steps { list-style: none; padding: 0; counter-reset: step; }
.step-card {
  position: relative;
  background: var(--ink-soft);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.step-num {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--sand-dim);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
}
.step-card h3 { font-size: 1.3rem; }
.step-card p { margin-top: 0.6rem; color: var(--sand-dim); font-size: 1rem; }

/* ---------- Cards (What's shipped) ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.grid-cards .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(31,30,29,0.05), 0 16px 40px rgba(31,30,29,0.10);
}
.card h3 { font-size: 1.2rem; }
.card p { margin-top: 0.55rem; color: var(--stone); font-size: 1rem; }

/* ---------- Why iSage: comparison ---------- */
.compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.compare-col {
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--line);
}
.compare-them { background: var(--sand); }
.compare-us {
  background: var(--ink);
  color: var(--sand);
  border-color: var(--ink);
}
.compare-label {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 1.1rem;
}
.compare-us .compare-label { color: var(--clay); }
.compare-list { list-style: none; padding: 0; display: grid; gap: 0.85rem; }
.compare-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 1.05rem;
}
.compare-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.compare-them .compare-list li::before { background: var(--stone); opacity: 0.5; }
.compare-us .compare-list li::before { background: var(--clay); }

/* ---------- Who it's for ---------- */
.who-item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.who-item h3 { font-size: 1.3rem; }
.who-item p { margin-top: 0.5rem; color: var(--stone); }

/* ---------- Coverage ---------- */
.coverage-groups { display: grid; gap: clamp(1.75rem, 4vw, 2.75rem); }
.coverage-heading {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand-dim);
  margin-bottom: 1.1rem;
}
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.7rem; }
.chip {
  font-family: var(--serif);
  font-size: 1.05rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  color: var(--sand);
}
.chip-next {
  border-style: dashed;
  color: var(--sand-dim);
}

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.contact-aside {
  margin-top: 1.35rem;
  font-size: 0.95rem;
  color: var(--stone);
}
.contact-form { display: grid; gap: 1.1rem; padding: clamp(1.5rem, 4vw, 2.25rem); }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.field input,
.field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.95rem;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.18);
}
.field input:user-invalid { border-color: #b3402a; }

.form-status {
  font-size: 0.95rem;
  color: var(--stone);
  min-height: 1.2em;
}
.form-status.is-success { color: #2f6b3a; }
.form-status.is-error { color: #b3402a; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--sand);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand .brand-name { color: var(--sand); font-size: 1.4rem; }
.footer-tagline {
  font-family: var(--serif);
  color: var(--sand-dim);
  margin-top: 0.35rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem 1.75rem; }
.footer-links a {
  font-size: 0.98rem;
  color: var(--sand-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.footer-links a:hover { color: var(--sand); border-color: var(--clay); }

.footer-fine {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  padding-top: 1.75rem;
}
.footer-disclaimer { font-size: 0.85rem; color: var(--sand-dim); max-width: 40rem; }
.footer-copy { font-size: 0.85rem; color: var(--sand-dim); }

/* =================================================================
   Reveal-on-scroll animation
   ================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* =================================================================
   Responsive: tablet and up
   ================================================================= */
@media (min-width: 620px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr 1fr; }
  .coverage-groups { grid-template-columns: 1fr 1fr; align-items: start; }
  .contact-form { grid-template-columns: 1fr 1fr; }
  .contact-form .field:nth-child(4),   /* message */
  .contact-form .btn,
  .contact-form .form-status { grid-column: 1 / -1; }
}

@media (min-width: 860px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; }
  .contact-wrap { grid-template-columns: 0.9fr 1.1fr; }
}

/* =================================================================
   Responsive: mobile nav (collapse to hamburger)
   ================================================================= */
@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--sand);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem clamp(1.15rem, 5vw, 2.5rem) 1.25rem;
    box-shadow: var(--shadow);

    /* hidden state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-menu li { width: 100%; }
  .nav-menu a:not(.btn) {
    display: block;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-menu a:not(.btn):hover { border-color: var(--line); color: var(--clay); }
  .nav-menu .btn { margin-top: 0.6rem; width: 100%; }

  /* animate hamburger into an X when open */
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
}

/* keep nav positioned for the mobile dropdown */
@media (max-width: 780px) {
  .nav { position: static; }
  .nav-wrap { position: relative; }
}

/* =================================================================
   Motion preferences
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * , *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  /* show the demo in its finished state, no looping */
  .det, .pov-report-list li { opacity: 1; transform: none; }
  .pov-report-foot { opacity: 1; }
}
