/* VTA Farm site styles. Shared by every page. */

/* ── Tokens ── */
:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f0ede7;
  --ink: #0d0d0d;
  --ink-2: #3a3a36;
  --ink-3: #6e6c66;
  --line: #e3e0d6;
  --line-2: #e3e0d6;
  --accent: #9d0105;
  --accent-em: #9d0105;
  --btn: #9d0105;
  --btn-hover: #7f0104;
  --link: #9d0105;
  --link-hover: #7f0104;
  --step: #0d0d0d;
  --step-ink: #ffffff;
  --pill-accent-bg: #f4c7c8;
  --pill-accent-ink: #7f0104;
  --warn-bg: #fbeded;
  --warn-line: #f4c7c8;
  --warn-title: #7f0104;
  --warn-ink: #3a3a36;
  --glow: rgba(110, 34, 36, 0);
  --band: #efebe3;
  --band-surface: #faf8f4;
  --band-line: #e0dbd0;
  --summary-bg: #ece7dd;
  --summary-line: #ded6c9;
  color-scheme: light;
}

html.dark {
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-2: #212121;
  --ink: #f5f5f2;
  --ink-2: #b5b3ae;
  --ink-3: #918e88;
  --line: #2a2825;
  --line-2: #3a3632;
  --accent: #da4346;
  --accent-em: #f4c7c8;
  --btn: #c73a3d;
  --btn-hover: #b03235;
  --link: #f4c7c8;
  --link-hover: #ffffff;
  --step: #f5f5f2;
  --step-ink: #0a0a0a;
  --pill-accent-bg: #3a1a1b;
  --pill-accent-ink: #f4c7c8;
  --warn-bg: #261414;
  --warn-line: #5a2626;
  --warn-title: #f4c7c8;
  --warn-ink: #d9cfcc;
  --glow: rgba(110, 34, 36, 0.45);
  --band: #161413;
  --band-surface: #1e1b1a;
  --band-line: #2e2a27;
  --summary-bg: #2f2622;
  --summary-line: #4a3c35;
  color-scheme: dark;
}

:root {
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Three corner sizes: controls, cards, and the larger panels. */
  --radius-control: 10px;
  --radius-card: 14px;
  --radius-panel: 18px;
  --radius-pill: 999px;

  /* Every hover and state change moves at the same speed. */
  --ease: 180ms;

  /* Vertical rhythm. Sections sit --space-section apart. The hero uses the
     smaller --space-hero above and below, and so does anything that reads
     as a continuation of it. Both shrink on phones. */
  --space-section: 88px;
  --space-hero: 72px;
}
@media (max-width: 600px) {
  :root {
    --space-section: 64px;
    --space-hero: 48px;
  }
}

/* ── Base ── */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  font: 17px/1.6 var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }

code {
  font-family: var(--font-mono);
  font-size: 15px;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }

img { max-width: 100%; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-section) 24px;
}

.stack { display: flex; flex-direction: column; }

/* A section's heading block and its content sit this far apart unless the
   section says otherwise. */
.wrap.stack { gap: 40px; }

.split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.split-main { flex: 1 1 520px; min-width: 0; }
.split-art {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.split-art figcaption { font-size: 14px; color: var(--ink-3); }

/* Sections are separated by space, not rules. Every section carries the gap
   below it, so a plain section that follows another plain one needs no
   padding of its own on top. A tinted band and the cross-link strip are
   edges in their own right: a section after either keeps its top padding. */
section:not(.band):not(.crosslink) + section:not(.band):not(.crosslink) > .wrap { padding-top: 0; }

/* A band is a gently tinted stretch of the page in the same theme. */
.band {
  --bg: var(--band);
  --surface: var(--band-surface);
  --line: var(--band-line);
  background: var(--bg);
  color: var(--ink);
}

/* Every illustration comes in a light-background and a dark-background version. */
html.dark .art-light,
html:not(.dark) .art-dark { display: none; }

/* ── Brand mark ── */
.brand-mark { flex: none; }
.brand-mark .antenna { fill: var(--accent); }

/* ── Header and nav ── */
.site-header {
  position: relative;
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 19px;
}
.brand:hover { color: var(--ink); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  font-size: 15px;
}
.nav-link {
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.audience {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-pill);
  font-size: 14px;
}
.audience-link {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease), background var(--ease);
}
.audience-link:hover { color: var(--ink); }
.audience-link[aria-current="true"] {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-control);
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease);
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-sun { display: none; }
html.dark .icon-sun { display: block; }
html.dark .icon-moon { display: none; }
.menu-toggle { display: none; }
.menu-toggle svg { width: 20px; height: 20px; }
.icon-close { display: none; }
.site-header.menu-open .icon-close { display: block; }
.site-header.menu-open .icon-menu { display: none; }

/* On narrow screens the page links move into a menu under the header. */
@media (max-width: 1040px) {
  .nav { padding: 12px 16px; }
  .nav-actions { margin-left: auto; }
  .menu-toggle { display: inline-grid; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 10;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 16px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    font-size: 17px;
  }
  .site-header.menu-open .nav-links { display: flex; }
  .nav-links .audience {
    align-self: flex-start;
    margin: 8px 0 8px;
    font-size: 15px;
  }
  .nav-links .nav-link {
    padding: 14px 8px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links .nav-link[aria-current="page"] {
    border-left: 3px solid var(--accent);
    padding-left: 12px;
  }
  .nav-links .nav-link:last-child { border-bottom-color: transparent; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--radius-control);
  text-decoration: none;
  font-weight: 500;
  transition: background var(--ease), color var(--ease);
}
.btn-sm { min-height: 44px; padding: 0 18px; }
.btn-primary { background: var(--btn); color: #ffffff; }
.btn-primary:hover { background: var(--btn-hover); color: #ffffff; }
.btn-secondary { border: 1px solid var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Type ── */
/* The small uppercase label above a heading or inside a callout. */
.eyebrow,
.summary .label,
.page-next .label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
/* Every heading shares one upright sans-serif face, one weight and one color.
   Hierarchy comes from size and spacing alone. The two callout lines
   (.summary .line and .page-next .title) are set the same way. */
h1, h2, h3,
.summary .line,
.page-next .title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
:is(h1, h2, h3, .summary .line, .page-next .title) em {
  font-style: inherit;
  color: inherit;
}
.display {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.page-title {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.section-head { gap: 12px; }
.section-head .lede { max-width: 44em; }
.lede,
.explainer-head .sub { font-size: 19px; color: var(--ink-2); }

/* Links that lead somewhere next. Links inside running text use --link. */
.summary .next,
.door .go,
.page-next .go,
.crosslink a {
  color: var(--accent);
  font-weight: 500;
}
.muted { color: var(--ink-2); }

/* ── Hero ── */
.hero {
  background: radial-gradient(circle at 0% 0%, var(--glow), rgba(10, 10, 10, 0) 40%), var(--bg);
}
.hero .wrap { padding-top: var(--space-hero); padding-bottom: var(--space-hero); gap: 48px; }
.hero .hero-copy { gap: 24px; }
.hero-lede { max-width: 34em; font-size: 20px; color: var(--ink-2); }
.hero .split-art img { width: 100%; max-width: 440px; height: auto; }
/* A quiet line of text under the hero buttons. */
.hero-note { font-size: 16px; color: var(--ink-2); }

/* ── Explainer sections (from the Trust Agent explainer pack) ── */
.explainer .wrap { gap: clamp(28px, 3vw, 40px); }
.explainer-head { gap: 12px; }
.explainer-head .sub { max-width: 60ch; }
/* Each panel stands alone: three across on desktop, one per row on phones. */
.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 24px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.panel img { width: 100%; height: auto; display: block; }
.panel .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}
.panel h3 {
  font-size: clamp(21px, 1.8vw, 24px);
  line-height: 1.2;
}
.panel .body { font-size: 17px; color: var(--ink-2); }
.summary {
  background: var(--summary-bg);
  border: 1px solid var(--summary-line);
  border-radius: var(--radius-panel);
  padding: 24px 32px;
  /* The label sits on its own row. Below it the line takes the space and the
     link keeps to the right, so a long line wraps beside the link instead of
     pushing it onto a row of its own. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 32px;
}
.summary .label { grid-column: 1 / -1; }
.summary .line {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.25;
}
.summary .next {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}
.summary .next:hover { text-decoration: underline; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card h3 { font-size: 18px; }
.card p { color: var(--ink-2); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}

/* ── Where things stand ── */
.status {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.status h2, .status h3 { font-size: 20px; }
.status p { color: var(--ink-2); }
.status ul {
  padding-left: 20px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── Three doors (Home) ── */
.door {
  color: var(--ink);
  text-decoration: none;
  padding: 30px;
  gap: 12px;
  transition: border-color var(--ease);
}
.door:hover { color: var(--ink); border-color: var(--ink-3); }
.door .eyebrow { margin-bottom: 4px; }
.door h3 {
  font-size: 24px;
  line-height: 1.2;
}
.door .go {
  margin-top: auto;
  padding-top: 8px;
}

/* ── VTA Farm is a host (Hosts) ── */
.farm .grid { grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }

/* ── Steps (Get started) ── */
.how .wrap { gap: 56px; }
.how .split-main { gap: 32px; }
.steps {
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
/* Get started splits its steps into two parts, each with its own short heading. */
.part { gap: 20px; }
.part-head { gap: 6px; }
.part-head h3 { font-size: 22px; }
.part + .part { margin-top: 16px; }
.steps li { display: flex; gap: 18px; }
.steps h3 { font-size: 18px; }
.step-body { gap: 4px; }
.steps strong { color: var(--ink); font-weight: 600; }
.step-num {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--step);
  color: var(--step-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
}
.how .split-art img { width: 100%; max-width: 420px; height: auto; }

/* ── Security (tinted band) ── */
.security .split { gap: 40px; }
.security .split img { flex: 0 1 300px; width: 300px; max-width: 100%; height: auto; margin: 0 auto; }
.security .split-main { flex-basis: 480px; gap: 14px; }
.security .lede { max-width: 36em; }
.security .grid { grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }
.card.warn {
  padding: 26px 28px;
  background: var(--warn-bg);
  border-color: var(--warn-line);
}
.warn h3 { color: var(--warn-title); }
.warn p { color: var(--warn-ink); }

/* ── Repositories ── */
.repo {
  color: var(--ink);
  text-decoration: none;
  gap: 6px;
  transition: border-color var(--ease);
}
.repo:hover { color: var(--ink); border-color: var(--ink-3); }
.repo-name { font-family: var(--font-mono); font-size: 15px; color: var(--accent-em); }
.repo-title { font-weight: 600; font-size: 18px; }
.repo-desc { color: var(--ink-2); }

/* ── Page-level "next" link ── */
.page-next .wrap { padding-top: 0; }
.page-next a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 32px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--ease);
}
.page-next a:hover { color: var(--ink); border-color: var(--ink-3); }
.page-next .label { grid-column: 1 / -1; }
.page-next .go { white-space: nowrap; }
.page-next .title {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.25;
}
.band + .page-next .wrap { padding-top: var(--space-section); }

/* ── Reading page (New to VTCs?) ── */
/* The blocks continue the hero, so they sit as far from each other as the
   first one sits from the hero text. */
.reading .wrap { gap: var(--space-hero); }
.reading .status,
.reading-part { max-width: 46em; }
.reading-part { gap: 14px; scroll-margin-top: 24px; }
.reading-part h2 {
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.2;
}
.reading-part p,
.reading-part li { font-size: 18px; color: var(--ink-2); }
.reading-part ul,
.reading-part ol {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reading-part strong { color: var(--ink); font-weight: 600; }
.reading-more h2 { font-size: 20px; }
.reading-more p,
.reading-more li { font-size: 16px; }

/* ── Closing CTA ── */
.cta {
  background: radial-gradient(circle at 50% 100%, var(--glow), rgba(10, 10, 10, 0) 55%), var(--bg);
}
.cta .wrap {
  max-width: 900px;
  padding: 0 24px var(--space-section);
  align-items: center;
  gap: 22px;
  text-align: center;
}
.cta h2 { font-size: clamp(30px, 3.8vw, 48px); line-height: 1.1; }
.cta p { max-width: 34em; color: var(--ink-2); }
.cta .btn-row { justify-content: center; }

/* ── Footer ── */
footer {
  background: var(--band);
  color: var(--ink-2);
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 40px;
  font-size: 14px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; flex: 1 1 420px; max-width: 60ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--link); text-decoration: underline; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* Plain links get a soft corner on the ring; anything with its own radius keeps it. */
:where(a, button):focus-visible { border-radius: 6px; }

/* ── Not found ── */
.notfound .wrap { min-height: 50vh; justify-content: center; gap: 20px; }

@media (max-width: 600px) {
  /* Hero text is left-aligned, so its buttons fill the row instead of
     floating in the middle: side by side when both fit, stacked when not. */
  .hero .btn-row .btn { flex: 1 1 auto; justify-content: center; }
  .panel { padding: 20px 20px 26px; }
  .summary { padding: 20px 22px; }
  .page-next a { padding: 22px; }
}

/* Below this width there is no room for a link beside the line, so the
   summary and the next-page card stack, everything aligned left. */
@media (max-width: 760px) {
  .summary,
  .page-next a { grid-template-columns: minmax(0, 1fr); }
}

/* ── Text-only panels (Home) ── */
.panel.no-art { padding-top: 30px; }

/* ── Cross-link strip between the two front doors ── */
/* The one place a rule is kept: the strip is a bar, and it needs its edges.
   It sits the same distance from the hero above as from the section below. */
.crosslink {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.crosslink .wrap { padding: 18px 24px; }
.crosslink + section > .wrap { padding-top: var(--space-hero); }
.crosslink p { margin: 0; text-align: center; font-size: 16px; color: var(--ink-2); }
.crosslink a:hover { color: var(--link-hover); }
