/* main.css — GetSmart Injury Network · homepage visual system.
   DESIGN.md §5–7: editorial warmth, anti-billboard, mobile-first.
   Tokens in tokens.css. Section order in HTML is a compliance artifact. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); }
h1, h2, h3 { font-family: var(--font-serif); color: inherit; margin: 0 0 var(--s-2); }
h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); font-weight: 650; line-height: 1.18; }
h3 { font-size: var(--fs-h3); font-weight: 640; line-height: 1.3; }
p { margin: 0 0 var(--s-2); max-width: 68ch; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: 1380px; }
.section { padding-block: var(--section-pad); }
.section-tint { background: var(--teal-100); }
.section-lede { color: var(--ink-500); margin-top: -4px; margin-bottom: var(--s-4); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy-900); color: #fff; padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; border-radius: 2px; }

/* Visible unresolved tokens — intentional (never invent facts) */
.token {
  font-family: var(--font-sans); font-size: var(--fs-micro); font-weight: 500;
  background: var(--amber-100); color: var(--amber-700);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-sans); font-weight: 600;
  font-size: 1rem; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
  padding: 16px 28px; border-radius: 999px; border: 1.5px solid transparent;
  transition: background-color 180ms var(--ease-out), transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.btn-primary { background: var(--teal-700); color: #fff; }
.btn-primary:hover { background: var(--teal-800); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-soft { background: transparent; color: var(--navy-900); border-color: var(--line); }
.btn-soft:hover { border-color: var(--teal-700); color: var(--teal-700); }
.btn-sm { padding: 10px 18px; font-size: var(--fs-small); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: var(--hairline);
}
.header-row { display: flex; align-items: center; gap: var(--s-3); min-height: 72px; }
.brand img { width: 164px; height: auto; mix-blend-mode: multiply; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--ink-900); text-decoration: none; font-weight: 500; font-size: var(--fs-small);
  padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: border-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.site-nav a:hover { color: var(--teal-700); border-bottom-color: var(--teal-500); }
.header-actions { display: flex; align-items: center; gap: var(--s-2); }
.nav-toggle { display: none; }

/* ---------- H1 Hero ---------- */
.hero {
  position: relative; min-height: min(86svh, 900px);
  display: flex; align-items: center; isolation: isolate;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% center; z-index: 0; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    /* readable field behind the text, dissolving rightward */
    linear-gradient(97deg, rgba(20,32,58,0.78) 0%, rgba(20,32,58,0.55) 34%, rgba(27,42,74,0.10) 62%, rgba(27,42,74,0) 78%),
    /* gentle grounding at the base */
    linear-gradient(180deg, rgba(27,42,74,0) 55%, rgba(27,42,74,0.45) 100%);
}
/* soft editorial hand-off from photo into the paper page */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72px; z-index: 1;
  background: linear-gradient(180deg, rgba(250,249,246,0) 0%, rgba(250,249,246,0.9) 82%, var(--paper) 100%);
}
.hero-content {
  position: relative; z-index: 2; padding-block: clamp(96px, 15vh, 150px); color: #fff;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 420px);
  gap: clamp(var(--s-4), 5vw, var(--s-12)); align-items: center; width: 100%;
}
.hero-rule {
  display: block; width: 56px; height: 3px; border-radius: 2px;
  background: var(--teal-500); margin-bottom: var(--s-3);
}
.hero-content h1 {
  max-width: 15ch; color: #fff;
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  line-height: 1.06; letter-spacing: -0.015em; font-weight: 680;
  margin-bottom: var(--s-3);
  text-wrap: balance;
  text-shadow: 0 1px 24px rgba(20,32,58,0.35);
}
.hero .lede {
  font-size: clamp(1.1rem, 1.9vw, 1.35rem); line-height: 1.6;
  max-width: 42ch; color: rgba(255,255,255,0.92); margin-bottom: var(--s-5);
  text-shadow: 0 1px 16px rgba(20,32,58,0.35);
}
.hero .btn-primary { padding: 19px 36px; font-size: 1.0625rem; }
.hero-trust {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px var(--s-3);
  margin: var(--s-4) 0 0; padding: 0;
}
.hero-trust li {
  color: rgba(255,255,255,0.88); font-size: var(--fs-small); font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  text-shadow: 0 1px 12px rgba(20,32,58,0.4);
}
.hero-trust li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-500); flex: none;
}
/* Quick checklist card */
.hero-card {
  background: rgba(17,28,52,0.62);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(var(--s-3), 3vw, var(--s-5));
  box-shadow: 0 28px 70px -30px rgba(10,18,36,0.7);
}
.hero-card-kicker {
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal-500); margin: 0 0 var(--s-1);
  display: flex; align-items: center; gap: 10px;
}
.hero-card-kicker::before { content: ""; width: 22px; height: 2px; background: var(--teal-500); border-radius: 1px; }
.hero-card h2 { color: #fff; font-size: 1.45rem; line-height: 1.25; margin-bottom: var(--s-2); }
.hero-card-list { margin: 0 0 var(--s-3); padding: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.hero-card-list li {
  counter-increment: step; display: flex; gap: 14px; align-items: baseline;
  color: rgba(255,255,255,0.92); font-size: var(--fs-small); line-height: 1.55;
}
.hero-card-list li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-serif); font-weight: 700; font-size: 1rem;
  color: var(--teal-500); flex: none;
}
.hero-card-link {
  display: inline-block; color: #fff; font-weight: 600; font-size: var(--fs-small);
  text-decoration: none; padding-bottom: 5px; border-bottom: 2px solid var(--teal-500);
  transition: border-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.hero-card-link::after { content: " \2192"; }
.hero-card-link:hover { color: var(--teal-100); }

/* calm entrance — disabled under prefers-reduced-motion below */
@keyframes hero-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-rule, .hero-content h1, .hero .lede, .hero .btn-primary, .hero-trust, .hero-card {
  animation: hero-rise 620ms var(--ease-out) both;
}
.hero-trust { animation-delay: 400ms; }
.hero-card { animation-delay: 480ms; }
.hero-content h1 { animation-delay: 90ms; }
.hero .lede { animation-delay: 190ms; }
.hero .btn-primary { animation-delay: 300ms; }

/* ---------- Section header pattern ---------- */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-3); margin-bottom: var(--s-5);
}
.section-head .section-lede { margin-bottom: 0; }
.section-head h2 { margin-bottom: var(--s-1); }
.view-all {
  flex: none; font-weight: 600; font-size: var(--fs-small); text-decoration: none;
  color: var(--teal-700); padding-bottom: 6px; border-bottom: 2px solid var(--teal-100);
  transition: border-color 180ms var(--ease-out);
  white-space: nowrap;
}
.view-all::after { content: " \2192"; }
.view-all:hover { border-bottom-color: var(--teal-500); }

/* ---------- H2 Featured guide ---------- */
.featured-card {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch;
  background: #fff; border: var(--hairline); border-radius: calc(var(--radius) + 4px);
  overflow: hidden; box-shadow: 0 24px 60px -24px rgba(27,42,74,0.18);
}
.featured-media { min-height: 100%; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: clamp(var(--s-4), 4vw, var(--s-8)); }
.kicker {
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal-700); margin-bottom: var(--s-1);
}
.featured-body h2 { color: var(--navy-900); }
.teaser { color: var(--ink-500); margin-bottom: var(--s-3); }
.guide-preview { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: 14px; }
.guide-preview li {
  display: flex; gap: 14px; align-items: baseline;
  font-size: var(--fs-small); line-height: 1.55; color: var(--ink-900);
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.guide-preview li:last-child { border-bottom: 0; padding-bottom: 0; }
.guide-preview span {
  font-family: var(--font-serif); font-weight: 700; font-size: 1rem;
  color: var(--teal-700); flex: none;
}
.featured-meta { color: var(--ink-500); font-size: var(--fs-micro); margin: var(--s-2) 0 0; }

/* ---------- H3 Topics ---------- */
.topics h2, .blog h2, .videos h2 { color: var(--navy-900); }
.topic-grid {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.topic-card {
  display: block; background: #fff; border: var(--hairline); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink-900);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.topic-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.topic-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.topic-card h3 {
  color: var(--navy-900); margin: var(--s-2) var(--s-2) 4px;
  background-image: linear-gradient(var(--teal-500), var(--teal-500));
  background-repeat: no-repeat; background-size: 0% 2px; background-position: 0 100%;
  transition: background-size 220ms var(--ease-out);
  display: inline-block; padding-bottom: 3px;
}
.topic-card:hover h3 { background-size: 100% 2px; }
.topic-card p { color: var(--ink-500); font-size: var(--fs-small); margin: 0 var(--s-2) var(--s-2); }

/* ---------- H4 Watch & learn ---------- */
.video-row {
  display: flex; gap: var(--s-2); overflow-x: auto; padding: var(--s-1) var(--gutter) var(--s-2);
  scroll-snap-type: x mandatory; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.video-card {
  position: relative; flex: 0 0 220px; scroll-snap-align: start;
  border-radius: var(--radius); overflow: hidden; text-decoration: none;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.video-card img { aspect-ratio: 9 / 16; object-fit: cover; width: 100%; }
.video-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27,42,74,0) 45%, rgba(27,42,74,0.78) 100%);
}
.video-chip {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  background: rgba(27,42,74,0.82); color: #fff; font-size: var(--fs-micro); font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
}
.video-play {
  position: absolute; left: 50%; top: 44%; translate: -50% -50%; z-index: 1;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  transition: transform 180ms var(--ease-out);
}
.video-play::before {
  content: ""; position: absolute; left: 55%; top: 50%; translate: -50% -50%;
  border-style: solid; border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--teal-700);
}
.video-card:hover .video-play { transform: scale(1.08); }
.video-title {
  position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1;
  color: #fff; font-family: var(--font-serif); font-size: 1.05rem; font-weight: 640; line-height: 1.3;
}

/* ---------- H5 Blog ---------- */
.blog-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.blog-card {
  display: block; background: #fff; border: var(--hairline); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink-900);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.blog-card img { aspect-ratio: 8 / 5; object-fit: cover; width: 100%; }
.blog-card h3 { color: var(--navy-900); font-size: 1.1rem; margin: var(--s-2) var(--s-2) 4px; }
.blog-card p { color: var(--ink-500); font-size: var(--fs-small); margin: 0 var(--s-2) 6px; }
.blog-card time { display: block; color: var(--ink-500); font-size: var(--fs-micro); margin: 0 var(--s-2) var(--s-2); }

/* ---------- Values strip ---------- */
.values { padding-block: var(--section-pad); border-top: var(--hairline); }
.values-title {
  color: var(--navy-900); text-align: center;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: var(--s-8);
}
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(var(--s-4), 4vw, var(--s-8)); }
.value h3 { color: var(--navy-900); font-size: 1.3rem; margin-bottom: var(--s-1); }
.value p { color: var(--ink-500); font-size: var(--fs-small); line-height: 1.7; margin: 0; }
.value-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: var(--s-2);
  background: var(--teal-100); color: var(--teal-700);
  font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem;
}

/* ---------- Newsletter (light — the navy stage is reserved for the connect band) ---------- */
.newsletter { background: var(--teal-100); }
.newsletter-inner {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(var(--s-4), 5vw, var(--s-12));
  align-items: center;
}
.newsletter h2 { color: var(--navy-900); }
.newsletter .section-lede { margin-bottom: 0; }
.newsletter-form { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1); align-items: start; }
.newsletter-form input {
  height: 56px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink-900); font: 500 1rem var(--font-sans);
  min-width: 0;
}
.newsletter-form input::placeholder { color: var(--ink-500); }
.newsletter-form input:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; }
.newsletter-form .btn { height: 56px; padding-block: 0; line-height: 56px; padding-inline: 30px; }
.newsletter-consent {
  grid-column: 1 / -1; color: var(--ink-500); font-size: var(--fs-micro);
  line-height: 1.6; margin: 6px 0 0;
}
.newsletter-done { grid-column: 1 / -1; color: var(--teal-800); font-weight: 600; margin: 6px 0 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- H6 Connect band ---------- */
.connect-band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(90rem 40rem at 50% 130%, rgba(47,166,160,0.22), rgba(47,166,160,0) 60%),
    linear-gradient(180deg, var(--navy-900), #16223D);
  color: #fff; padding-block: var(--section-pad-lg);
  border-top: 4px solid var(--teal-500);
}
.connect-inner { text-align: center; }
.connect-rule {
  display: block; width: 56px; height: 3px; border-radius: 2px;
  background: var(--teal-500); margin: 0 auto var(--s-3);
}
.connect-band h2 {
  color: #fff; max-width: 22ch; margin-inline: auto;
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12;
}
.connect-copy {
  color: rgba(255,255,255,0.88); max-width: 52ch; margin: 0 auto var(--s-4);
  font-size: 1.05rem; line-height: 1.7;
}
.connect-microline {
  color: var(--on-navy-muted); font-size: var(--fs-micro); max-width: 60ch;
  margin: var(--s-3) auto 0;
}

/* ---------- H7 Footer ---------- */
.site-footer { background: #131E36; color: rgba(255,255,255,0.88); padding-block: var(--s-8) var(--s-4); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: var(--s-4); padding-bottom: var(--s-4); }
.footer-logo { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 700; color: #fff; margin-bottom: 2px; }
.footer-logo span { color: var(--teal-500); font-weight: 600; }
.footer-tagline { color: var(--on-navy-muted); font-size: var(--fs-small); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-nav a, .footer-social a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: var(--fs-small); }
.footer-nav a:hover, .footer-social a:hover { color: #fff; text-decoration: underline; }
.footer-social { display: grid; gap: 6px; align-content: start; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.14); padding-top: var(--s-3); }
.footer-disclosure { color: rgba(255,255,255,0.92); font-size: var(--fs-small); max-width: 90ch; }
.legal-links { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin: 0 0 var(--s-2); padding: 0; }
.legal-links a { color: var(--on-navy-muted); font-size: var(--fs-micro); }
.legal-links a:hover { color: #fff; }
.footer-copy { color: var(--on-navy-muted); font-size: var(--fs-micro); margin: 0; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: var(--s-2); right: var(--s-2); bottom: var(--s-2); z-index: 60;
  max-width: 560px; margin-inline: auto;
  background: #fff; border: var(--hairline); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(27,42,74,0.18);
  padding: var(--s-2) var(--s-3);
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: var(--fs-small); color: var(--ink-900); flex: 1 1 260px; }
.cookie-actions { display: flex; gap: var(--s-1); }

/* ---------- Reveal motion (JS adds .revealed; reduced-motion handled in JS + here) ---------- */
[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }
[data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .topic-card, .blog-card, .video-card, .video-play { transition: none; }
  .hero-rule, .hero-content h1, .hero .lede, .hero .btn-primary, .hero-trust, .hero-card { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .hero-content { grid-template-columns: 1fr; align-items: end; }
  .hero-card { max-width: 560px; }
}
@media (max-width: 900px) {
  .featured-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: var(--s-2); }
  .newsletter-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .newsletter-form { grid-template-columns: 1fr; }
  .newsletter-form .btn { width: 100%; }
}
@media (max-width: 760px) {
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: var(--hairline); padding: var(--s-2) var(--gutter) var(--s-3);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: var(--s-1); }
  .site-nav a { display: block; padding: 10px 0; font-size: 1.05rem; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px; background: none; border: none; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--navy-900); border-radius: 2px; transition: transform 180ms var(--ease-out), opacity 180ms var(--ease-out); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .brand img { width: 132px; }
  .header-actions .btn-soft { padding: 10px 16px; font-size: var(--fs-small); }
  .hero { min-height: 0; }
  .hero-img { object-position: 78% center; }
  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(20,32,58,0.28) 0%, rgba(20,32,58,0.62) 78%),
      linear-gradient(97deg, rgba(20,32,58,0.45) 0%, rgba(27,42,74,0) 90%);
  }
  .hero-content { padding-block: var(--s-8); }
  .hero .btn-primary { padding: 17px 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-3); }
}
