/* ============================================================================
   Innovide
   Charcoal + amber. Light and dark. No external requests of any kind.
   ========================================================================= */

/* Inter, self-hosted. Deliberately NOT loaded from Google's CDN: that would ship
   every visitor's IP to a third party, contradict the privacy notice, and force
   two extra origins into the CSP — an awkward look for a firm selling privacy
   and governance. Same font, same OFL licence, served from our own edge.
   Licence text ships alongside at /fonts/inter-LICENSE.txt. */
@font-face {
  font-family: "Inter Variable";
  /* Plain "woff2", not the older "woff2-variations": a browser that does not
     recognise the format string skips the source entirely and falls back
     silently. The variable axis is declared by the font-weight range below. */
  src: url("/fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  /* Latin only. Anything outside this range falls to the system stack rather
     than blocking on a font that could not render it anyway. */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand */
  --charcoal: #16181D;
  --amber: #F0A202;
  --paper: #FAF8F5;
  --stone: #6B6355;

  /* Semantic — light mode */
  --bg: var(--paper);
  --bg-tint: #F3EFE9;
  --surface: #FFFFFF;
  --ink: var(--charcoal);
  --ink-muted: var(--stone);
  --border: #E5DFD6;
  --border-strong: #D6CDBF;
  --accent: var(--amber);
  /* Amber is 3.7:1 on paper — too low for body copy, so link text uses this
     darkened tone (5.3:1) while the pure amber stays for large marks and rules. */
  --accent-ink: #8F5D00;
  --accent-soft: #FDF3DF;
  --danger: #A3231A;
  --danger-soft: #FBEDEC;

  --logo-accent: var(--amber);

  /* Inter throughout, with the system stack as the fallback while the font
     loads and for anyone it fails to reach. The variable axis is what makes the
     in-between weights below (550, 650) render as drawn rather than snapping. */
  --font: "Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1140px;
  --radius: 10px;
  --radius-lg: 16px;

  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --step-1: clamp(1.15rem, 1.09rem + 0.3vw, 1.35rem);
  --step-2: clamp(1.45rem, 1.32rem + 0.6vw, 1.85rem);
  --step-3: clamp(1.85rem, 1.6rem + 1.2vw, 2.65rem);
  --step-4: clamp(2.4rem, 1.85rem + 2.6vw, 4.15rem);

  --space-section: clamp(4.5rem, 3rem + 6vw, 7.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --bg-tint: #16191F;
    --surface: #1A1D24;
    --ink: #EDEAE4;
    --ink-muted: #A79F92;
    --border: #2A2E37;
    --border-strong: #3A3F4A;
    --accent-ink: var(--amber);
    --accent-soft: #2A2314;
    --danger: #F0857B;
    --danger-soft: #2A1917;
  }
}

/* --------------------------------------------------------------- reset --- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 650;
  text-wrap: balance;
}

/* Inter needs progressively tighter tracking as size increases — at display
   sizes its default spacing reads loose and the words stop holding together. */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 640;
  line-height: 1.06;
}

h1 { font-size: var(--step-4); letter-spacing: -0.038em; }
h2 { font-size: var(--step-3); letter-spacing: -0.028em; }
h3 { font-size: var(--step-1); letter-spacing: -0.016em; }

/* Belt and braces: if --font-display is ever pointed at a different face, these
   labels and numerals stay in the UI font. */
.eyebrow, .card-flag, .model-basis, .service-shape span,
.service-deliverables h4, .framework h3, .footer-nav h3,
.practice-nav-title, .lifecycle-num, .phase-number { font-family: var(--font); }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: 0.4em; }

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ------------------------------------------------------------ utilities --- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.visually-hidden {
  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: -100%;
  z-index: 100; padding: 0.75rem 1.25rem;
  background: var(--charcoal); color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 0; }

.muted { color: var(--ink-muted); }

.eyebrow {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-ink);
}

.chevron { width: 0.34em; height: auto; color: var(--accent); flex: none; }

/* ----------------------------------------------------------------- logo --- */

.wordmark { width: 148px; height: auto; display: block; color: var(--ink); }
.wordmark-accent { fill: var(--accent); }

.brand { display: inline-flex; color: inherit; }
.brand:focus-visible { outline-offset: 6px; }

/* -------------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--charcoal); color: #fff;
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
  font: inherit; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: #000; border-color: #000; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 0.55rem 1rem; font-size: 0.92rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

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

.btn-invert { background: var(--amber); color: var(--charcoal); border-color: var(--amber); }
.btn-invert:hover { background: #FFB524; border-color: #FFB524; color: var(--charcoal); }

@media (prefers-color-scheme: dark) {
  .btn { background: var(--amber); color: var(--charcoal); border-color: var(--amber); }
  .btn:hover { background: #FFB524; border-color: #FFB524; color: var(--charcoal); }
  .btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
  .btn-ghost:hover { background: var(--surface); border-color: var(--ink); }
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}
.link-arrow::after { content: "→"; transition: transform 0.15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }
.link-arrow-invert { color: var(--amber); }

/* --------------------------------------------------------------- header --- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 74px;
}

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
/* Scoped away from .btn: this rule's padding shorthand outranks .btn-sm on
   specificity and was flattening the CTA's horizontal padding to zero. */
.site-nav a:not(.btn) {
  color: var(--ink); text-decoration: none;
  font-weight: 550; font-size: 0.96rem;
  padding: 0.35rem 0; position: relative;
}
.site-nav a:not(.btn):hover { color: var(--accent-ink); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent);
}
/* The header CTA sits against the viewport edge, so it carries a little more
   horizontal padding than a standard small button. */
.site-nav .btn { color: #fff; padding: 0.6rem 1.35rem; }
@media (prefers-color-scheme: dark) { .site-nav .btn { color: var(--charcoal); } }

.nav-toggle {
  display: none;
  padding: 0.6rem; background: transparent;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  cursor: pointer; color: var(--ink);
}
.nav-toggle-bars { display: grid; gap: 4px; width: 20px; }
.nav-toggle-bars span { height: 2px; background: currentColor; border-radius: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem clamp(1.25rem, 5vw, 2.5rem) 1.5rem;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
  .site-nav a[aria-current="page"]::after { display: none; }
  .site-nav a[aria-current="page"] { color: var(--accent-ink); }
  .site-nav .btn { margin-top: 1rem; border-bottom: none; justify-content: center; }
}

/* -------------------------------------------------------------- section --- */

.section { padding-block: var(--space-section); }

.section-tint { background: var(--bg-tint); }

.section-dark {
  background: var(--charcoal);
  color: #EDEAE4;
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { color: var(--amber); }
.section-dark a { color: var(--amber); }

.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 4vw, 3.5rem); }
.section-head p { color: var(--ink-muted); font-size: var(--step-1); margin-bottom: 0; }

.section-more { margin-top: 2.5rem; }

/* -------------------------------------------------------------- texture --- */

/* A field of the brand chevron, drawn as an inline SVG data URI. No request,
   no image file, and it recolors itself with the accent variable. */
.chevron-field {
  position: relative;
  isolation: isolate;
}
.chevron-field::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='48'%3E%3Cpath d='M4 4 18.4 24 4 44V32.36L10.02 24 4 15.64Z' fill='%23F0A202'/%3E%3C/svg%3E");
  background-size: 40px 48px;
  opacity: 0.05;
  /* Fade the field out so it never competes with the text sitting on it. */
  mask-image: linear-gradient(115deg, transparent 30%, #000 100%);
  -webkit-mask-image: linear-gradient(115deg, transparent 30%, #000 100%);
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .chevron-field::before { opacity: 0.07; }
}

/* ------------------------------------------------------------ pullquote --- */

.pull-quote {
  max-width: 38rem;
  margin: clamp(2.5rem, 5vw, 4rem) 0;
  padding-left: clamp(1.25rem, 3vw, 2rem);
  border-left: 4px solid var(--accent);
  font-size: var(--step-2);
  line-height: 1.3;
  letter-spacing: -0.022em;
  font-weight: 550;
  text-wrap: balance;
  color: var(--ink) !important;
}
.pull-quote-invert { color: #fff !important; }

.section-dark .pull-quote { color: #fff !important; }

/* ----------------------------------------------------------------- hero --- */

/* Permanently dark, in both themes. Half the audience would otherwise meet the
   brand in a pale, quiet register; this makes the first impression consistent. */
.hero {
  padding-block: clamp(4rem, 3rem + 8vw, 8.5rem) clamp(3.5rem, 3rem + 5vw, 6rem);
  background: var(--charcoal);
  color: #EDEAE4;
  border-bottom: none;
}
.hero.chevron-field::before { opacity: 0.08; }

.hero h1 { max-width: 20ch; color: #fff; }
.hero .eyebrow { color: var(--amber); }
.hero-lede {
  max-width: 46rem; margin-top: 1.5rem;
  font-size: var(--step-1); color: #C4BFB6;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.25rem; }
.hero-note {
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid #2E323C;
  max-width: 46rem; font-size: 0.94rem; color: #A29B90;
}

/* The default charcoal button would vanish here, so the hero CTA is amber. */
.hero .btn {
  background: var(--amber); color: var(--charcoal); border-color: var(--amber);
}
.hero .btn:hover { background: #FFB524; border-color: #FFB524; }
.hero .btn-ghost {
  background: transparent; color: #EDEAE4; border-color: #454B57;
}
.hero .btn-ghost:hover { background: #1F232B; border-color: #EDEAE4; color: #fff; }

/* ------------------------------------------------------- chevron divider --- */

/* A row of brand chevrons marking a major section boundary. Purely decorative. */
.divider {
  height: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cpath d='M9 7 16.6 13 9 19V15.6L12.2 13 9 10.4Z' fill='%23F0A202'/%3E%3C/svg%3E");
  background-size: 26px 26px;
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.5;
}
.divider-on-dark { opacity: 0.65; }

/* --------------------------------------------------------- accent band --- */

.band-accent {
  background: var(--amber);
  color: #4A3600;
  padding-block: clamp(3rem, 2rem + 4vw, 4.75rem);
}
.band-statement {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--charcoal);
  max-width: 22ch;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.band-support {
  max-width: 44rem;
  font-size: var(--step-1);
  color: #4A3600;
  margin-bottom: 0;
}

/* ------------------------------------------------------------ page head --- */

.page-head {
  padding-block: clamp(3.5rem, 3rem + 5vw, 6rem) clamp(2.5rem, 2rem + 3vw, 4rem);
  border-bottom: 1px solid var(--border);
}
.page-head h1 { max-width: 18ch; }
.page-lede {
  max-width: 46rem; margin-top: 1.4rem;
  font-size: var(--step-1); color: var(--ink-muted);
}
.page-head-feature { background: var(--bg-tint); }
.page-head .hero-actions { margin-top: 2rem; }

/* ---------------------------------------------------------------- cards --- */

.card-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card h3 { margin-bottom: 0.5rem; }
.card h3 a { color: inherit; text-decoration: none; }
/* Stretch the heading link across the whole card. */
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card:hover h3 { color: var(--accent-ink); }
.card p { color: var(--ink-muted); margin-bottom: 0; }
/* Pinned to the bottom so cards in a row share a baseline for this label. */
.card-practice {
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-muted);
}
.card-practice::before { content: "› "; color: var(--accent); font-weight: 700; }

.card-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.card-flag {
  /* align-self stops the flex column from stretching the pill full width. */
  display: inline-block; align-self: flex-start; margin-bottom: 0.85rem;
  padding: 0.2rem 0.6rem;
  background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 100px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}

/* -------------------------------------------------------- feature split --- */

.feature-split {
  display: grid; gap: clamp(2.5rem, 5vw, 4.5rem);
  grid-template-columns: 1.15fr 1fr;
  align-items: start;
}
.feature-copy p { color: #C9C4BB; }
.feature-copy h2 { max-width: 18ch; }

.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li {
  padding: 1rem 0 1rem 1.75rem;
  border-bottom: 1px solid #2C2F37;
  position: relative;
}
.feature-list li:first-child { padding-top: 0; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 1.5rem;
  width: 8px; height: 12px;
  background: var(--amber);
  clip-path: polygon(0 0, 100% 50%, 0 100%, 0 72%, 45% 50%, 0 28%);
}
.feature-list li:first-child::before { top: 0.5rem; }

@media (max-width: 860px) {
  .feature-split { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------- models --- */

.model-grid {
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.model {
  padding-top: 1.25rem;
  border-top: 3px solid var(--accent);
}
.model-basis {
  margin-bottom: 0.5rem !important;
  font-size: 0.7rem !important; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink) !important;
}
.model h3 { margin-bottom: 0.4rem; }
.model p { color: var(--ink-muted); font-size: 0.96rem; margin-bottom: 0; }

/* ------------------------------------------------------------ tick list --- */

.tick-list { list-style: none; margin: 0; padding: 0; }
.tick-list li {
  position: relative; padding-left: 1.9rem; margin-bottom: 0.8rem;
  color: var(--ink-muted);
}
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 11px; height: 6px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

.numbered-list { padding-left: 1.2rem; color: var(--ink-muted); }
.numbered-list li::marker { color: var(--accent-ink); font-weight: 700; }

.audience-split {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr 1fr; align-items: start;
}
@media (max-width: 800px) { .audience-split { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- services --- */

.jump-nav { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.jump-nav a {
  padding: 0.45rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--ink); text-decoration: none;
  font-size: 0.88rem; font-weight: 550;
}
.jump-nav a:hover { border-color: var(--accent); color: var(--accent-ink); }

.service-block { scroll-margin-top: 90px; }
.service-name { font-size: var(--step-2); letter-spacing: -0.02em; margin-bottom: 0.35rem; }

/* Practice grouping ------------------------------------------------------- */

.practice { scroll-margin-top: 90px; }

.practice-head {
  padding-block: clamp(3rem, 2rem + 4vw, 4.5rem) 0;
  border-top: 3px solid var(--accent);
}
.practice-head h2 { font-size: var(--step-3); }
.practice-head .page-lede { font-size: var(--step-1); margin-top: 0.9rem; }

.practice-nav {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 800px) { .practice-nav { grid-template-columns: 1fr; } }

.practice-nav-group > p { color: var(--ink-muted); margin-bottom: 1.1rem; }
.practice-nav-title { font-size: var(--step-1); margin-bottom: 0.4rem; }
.practice-nav-title a { color: inherit; text-decoration: none; }
.practice-nav-title a:hover { color: var(--accent-ink); }

.service-split {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1.25fr 1fr;
  align-items: start;
}
@media (max-width: 900px) { .service-split { grid-template-columns: 1fr; } }

.service-copy p { color: var(--ink-muted); }
.service-lede {
  font-size: var(--step-1);
  color: var(--ink) !important;
  font-weight: 500;
  margin-bottom: 1.2em;
}
.service-shape {
  margin-top: 1.6rem; padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}
.service-shape span {
  display: block;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 0.3rem;
}

.service-deliverables {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.service-deliverables h4 {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 1.1rem;
}
.service-deliverables .btn { margin-top: 0.75rem; }

/* ---------------------------------------------------------------- prose --- */

.prose { max-width: 42rem; }
.prose h2 { margin-top: 2.5rem; font-size: var(--step-2); }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-muted); }
.prose ul { color: var(--ink-muted); }
.prose strong { color: var(--ink); font-weight: 650; }

.prose-legal { max-width: 44rem; }
.prose-legal h2 { font-size: var(--step-1); margin-top: 2.25rem; }
.legal-meta {
  font-size: 0.85rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-muted);
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}

.two-col {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr 1fr; align-items: start;
}
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- phases --- */

.phase-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.phase {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
  margin: 0;
}
.phase:last-child { border-bottom: 1px solid var(--border); }
.phase-number {
  font-size: 1.5rem; font-weight: 700;
  color: var(--accent); font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.phase h3 { margin-bottom: 0.35rem; }
.phase p { color: var(--ink-muted); margin-bottom: 0; }

@media (max-width: 640px) {
  .phase { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ----------------------------------------------------------- principles --- */

.principle-grid {
  display: grid; gap: clamp(1.75rem, 3vw, 2.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.principle h3 { margin-bottom: 0.45rem; }
.principle p { color: var(--ink-muted); font-size: 0.96rem; margin-bottom: 0; }

/* ----------------------------------------------------- practice marks --- */

.practice-mark {
  width: 2.25rem; height: 2.25rem;
  display: block; margin-bottom: 0.9rem;
  color: var(--accent);
}
.practice-nav-title .practice-mark { width: 1.75rem; height: 1.75rem; margin-bottom: 0.5rem; }

/* ------------------------------------------------------------ lifecycle --- */

.lifecycle {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.lifecycle-step {
  position: relative;
  margin: 0;
  padding: 1.5rem 2rem 0 0;
}
/* The rail. Stops short of the step edge to leave room for the connector. */
.lifecycle-step::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 2rem;
  height: 3px; background: var(--accent);
}
.lifecycle-step:last-child { padding-right: 0; }
.lifecycle-step:last-child::before { right: 0; }

/* Chevron connector, sitting in the gap on the rail. */
.lifecycle-step:not(:last-child)::after {
  content: "";
  position: absolute; top: -4px; right: 1.1rem;
  width: 8px; height: 11px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 50%, 0 100%, 0 72%, 45% 50%, 0 28%);
}

.lifecycle-num {
  display: block;
  font-size: 1.35rem; font-weight: 700;
  color: var(--accent); font-variant-numeric: tabular-nums;
  line-height: 1; margin-bottom: 0.5rem;
}
.lifecycle-step h3 { font-size: var(--step-1); margin-bottom: 0.4rem; }
.lifecycle-step p { color: var(--ink-muted); font-size: 0.94rem; margin: 0; }

@media (max-width: 900px) {
  .lifecycle { grid-template-columns: 1fr 1fr; }
  /* Only the last item in each row loses its connector. */
  .lifecycle-step:nth-child(2n)::after { display: none; }
  .lifecycle-step:nth-child(2n) { padding-right: 0; }
  .lifecycle-step:nth-child(2n)::before { right: 0; }
  .lifecycle-step:nth-child(n + 3) { margin-top: 2.5rem; }
}
@media (max-width: 560px) {
  .lifecycle { grid-template-columns: 1fr; }
  .lifecycle-step { padding-right: 0; }
  .lifecycle-step::before { right: 0; }
  .lifecycle-step::after { display: none; }
  .lifecycle-step + .lifecycle-step { margin-top: 2.25rem; }
}

/* --------------------------------------------------------- flow diagram --- */

.flow { margin-top: clamp(2rem, 4vw, 3rem); }

.flow-sources {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.flow-source {
  position: relative;
  padding: 1.4rem 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-bottom: 3px solid var(--accent);
}
.flow-source h3 {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 0.6rem;
}
.flow-source p { font-size: 0.94rem; color: var(--ink-muted); margin: 0; }

/* The converging arrows. Hidden from assistive tech — the prose already says it. */
.flow-converge {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  height: 2.25rem;
}
.flow-converge span {
  justify-self: center; align-self: center;
  width: 2px; height: 100%;
  background: linear-gradient(to bottom, var(--border-strong), var(--accent));
}

/* Amber in both themes: it is the payoff of the diagram and needs to land.
   Charcoal on amber is 8.4:1; the deeper tone below keeps the sub-line at AA. */
.flow-target {
  padding: 1.5rem 1.75rem;
  background: var(--amber);
  border-radius: var(--radius);
  text-align: center;
}
.flow-target strong {
  display: block; color: var(--charcoal);
  font-size: var(--step-1); letter-spacing: -0.015em;
}
.flow-target span { font-size: 0.94rem; color: #4A3600; }

.section-dark .flow-source { background: #1F232B; border-color: #2E323C; }
.section-dark .flow-source p { color: #C9C4BB; }
.section-dark .flow-source h3 { color: var(--amber); }

.flow-caption {
  margin-top: 1.25rem;
  font-size: 0.88rem; color: var(--ink-muted);
}

/* ----------------------------------------------------------- frameworks --- */

.framework-grid {
  display: grid; gap: clamp(1.75rem, 3vw, 2.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.framework h3 {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 1rem;
}

.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list li {
  margin: 0;
  padding: 0.4rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.88rem; font-weight: 500;
}

.framework-note {
  max-width: 46rem; margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--ink-muted); font-size: 0.96rem;
}

/* Unfinished placeholder copy — impossible to miss, trivially greppable. */
.todo {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-bottom: 2px dashed var(--accent);
  padding: 0 0.2em;
  font-style: italic;
}

/* --------------------------------------------------------------- contact --- */

.contact-split {
  display: grid; gap: clamp(2.5rem, 5vw, 4.5rem);
  grid-template-columns: 1.4fr 1fr; align-items: start;
}
@media (max-width: 900px) { .contact-split { grid-template-columns: 1fr; } }

.contact-form { display: grid; gap: 1.4rem; }

.field { display: grid; gap: 0.45rem; }
.field label { font-weight: 600; font-size: 0.94rem; }
.req { color: var(--accent-ink); }

.field-row { display: grid; gap: 1.4rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font: inherit; font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; min-height: 9rem; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }

::placeholder { color: var(--ink-muted); opacity: 0.75; }

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.75rem;
}

.field-error { margin: 0; font-size: 0.9rem; color: var(--danger); font-weight: 550; }

.form-banner {
  padding: 1rem 1.25rem; margin-bottom: 1.75rem;
  border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 550;
}
.form-banner-error { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* Honeypot. Hidden from people without hiding it from bots that read styles. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-fineprint { font-size: 0.88rem; color: var(--ink-muted); margin-bottom: 0; }

.contact-aside h2 { font-size: var(--step-1); margin-top: 2.25rem; }
.contact-aside h2:first-child { margin-top: 0; }
.contact-aside p { color: var(--ink-muted); font-size: 0.96rem; }
/* Obfuscated email. The span holds the encoded address; app.js injects the
   real <a>. Style both so the no-JS fallback does not look broken. */
.email { word-break: break-word; }
.email a { color: var(--accent-ink); font-weight: inherit; }
.email[data-email] { color: var(--ink-muted); }

.contact-email { font-size: var(--step-1); font-weight: 600; }
.contact-email a { font-weight: 600; }

/* ------------------------------------------------------------- cta band --- */

.cta-band { background: var(--charcoal); color: #EDEAE4; padding-block: clamp(3rem, 2rem + 5vw, 5rem); }
.cta-band h2 { color: #fff; font-size: var(--step-2); max-width: 20ch; }
.cta-band p { color: #B8B2A8; max-width: 46ch; margin-bottom: 0; }
.cta-band-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2.5rem; flex-wrap: wrap;
}
.cta-band .btn { flex: none; }

/* --------------------------------------------------------------- footer --- */

.site-footer {
  background: var(--bg-tint);
  border-top: 1px solid var(--border);
  padding-block: clamp(3rem, 2rem + 4vw, 4.5rem) 2rem;
}
.footer-inner {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr 1.8fr; align-items: start;
}
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand .wordmark { width: 132px; }
.footer-tagline {
  margin-top: 0.9rem; font-size: 0.88rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-muted);
}

.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 560px) { .footer-nav { grid-template-columns: 1fr 1fr; } }
.footer-nav h3 {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 0.9rem;
}
.footer-nav a {
  display: block; padding: 0.28rem 0;
  color: var(--ink); text-decoration: none; font-size: 0.94rem;
}
.footer-nav a:hover { color: var(--accent-ink); text-decoration: underline; }

.footer-legal {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  margin-top: 3rem; padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--ink-muted);
}
.footer-legal p { margin: 0; }

/* --------------------------------------------------------- scroll reveal --- */

/* `reveal-pending` is added by app.js and never present in the served HTML, so
   if the script is blocked nothing is hidden. See public/app.js. */
.reveal-target {
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal-pending { opacity: 0; transform: translateY(14px); }

/* Stagger siblings within a grid so a row arrives as a sequence, not a block. */
.reveal-target:nth-child(2) { transition-delay: 0.07s; }
.reveal-target:nth-child(3) { transition-delay: 0.14s; }
.reveal-target:nth-child(4) { transition-delay: 0.21s; }
.reveal-target:nth-child(5) { transition-delay: 0.1s; }
.reveal-target:nth-child(6) { transition-delay: 0.17s; }

@media print {
  .reveal-pending { opacity: 1 !important; transform: none !important; }
}

/* ---------------------------------------------------------------- print --- */

@media print {
  .site-header, .cta-band, .site-footer, .skip-link, .jump-nav { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .page-head, .hero { padding-block: 1.5rem; border: 0; }
  a { color: #000; }
}
