/* Valteva: shared tokens, base, layout, nav, footer, buttons, labels and the instrument chrome.
   Section-specific rules live in assets/sections/NN-name.css (one per partial, owned by that section's builder).
   Change this file only for things every section shares; say so in the README's change log. */

/* ===== Tokens ===== */
:root {
  /* brand palette: Valteva Brand Guidelines V2 "Final Warm Tone" (2026-11-11), p. 8. Source: brand/guidelines/.
     Summit Blue + Charcoal lead; Sandstone + Oatmeal support; Sage is a sparing accent. Use one dominant colour per
     layout. Instruments read these through ValtevaMotion.color()/rgba(): keep them as #rrggbb. */
  --summit: #2c6781;         /* primary: accent words, links, primary buttons, live lines, the mark's right stroke */
  --charcoal: #49504d;       /* primary: body text, dark bands, the wordmark, the mark's left stroke */
  --sandstone: #c0aa89;      /* secondary: blooms, rules, the full stop on dark, fills behind dark text */
  --oatmeal: #e2dbce;        /* secondary: bands, the elevation pattern's ground, the mark's top arm */
  --sage: #a5ac93;           /* accent, sparingly: icon circles, a third series */

  /* derived from the palette (the book gives no tints, states or text greys) */
  --summit-deep: #24566c;    /* primary button hover */
  --summit-soft: #e8eff2;    /* pale Summit panel */
  --charcoal-deep: #313836;  /* headings; dark inset panels */
  --charcoal-night: #262b29; /* the darkest inset (screens on a Charcoal band) */
  --sandstone-soft: #efe7da; /* pale Sandstone fill */
  --oatmeal-soft: #f3efe8;   /* panel band */
  /* TODO(human): the CTA shade. White text on --sandstone is 2.25:1 (WCAG AA needs 4.5:1 for button text). */
  --cta: #856c47;            /* "Get a proposal" fill, white text 4.96:1 */
  --cta-hover: #715c3c;      /* 6.37:1 */

  /* roles */
  --ink: #313836;            /* headings */
  --text: #49504d;           /* body = Charcoal (8.27:1 on white) */
  --muted: #5f6662;          /* labels (5.22:1 on --page) */
  --faint: #a5aaa4;          /* empty-cell dashes, disabled days (decoration only) */
  --page: #faf8f4;           /* page ground: warm white */
  --panel: #f3efe8;          /* panel band */
  --white: #ffffff;
  --line: #e4ddd0;
  --line-soft: #ece7dd;
  --line-scale: #cfc6b6;
  --line-strong: #b3aa9a;
  --line-btn: #b3aa9a;
  --on-dark-line: rgba(255, 255, 255, .14);


  /* type: Lato only (guidelines p. 6-7). Bold for headlines, nav, CTAs, stats and labels; Regular for body. */
  --font-head: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-label: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif; /* tracked caps */
  --fs-body: 17px;
  --fs-small: 15.5px;
  --fs-mono: 11.5px;
  --fs-h2: clamp(32px, 3.5vw, 50px);
  --fs-h2-xl: clamp(34px, 4.2vw, 58px);
  --fs-h3: 20px;

  /* layout */
  --container: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-y: clamp(72px, 9vw, 112px);
  --section-y-lg: clamp(72px, 9vw, 120px);
  --r-sm: 6px;
  --r: 8px;
  --r-panel: 16px;           /* the book's rounded white cards */
  --r-grid: 18px;
  --r-pill: 999px;           /* buttons */
  --shadow-panel: 0 30px 60px -36px rgba(49, 56, 54, .30);
  --shadow-card: 0 14px 34px -22px rgba(49, 56, 54, .28);

  /* motion grammar (obatpa): reference values for builders; motion.js exposes the same numbers */
  --ease-smooth: cubic-bezier(.45, 0, .55, 1);
  --ease-out: cubic-bezier(.33, 1, .68, 1);
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main { display: block; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg, canvas { max-width: 100%; }
a { color: var(--summit); }
a:hover { color: var(--summit-deep); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--summit); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--oatmeal); }
[id] { scroll-margin-top: 16px; }

.visually-hidden {
  position: absolute !important; 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: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; background: var(--white); color: var(--summit); font-weight: 700; border-radius: var(--r);
}
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { position: relative; padding-block: var(--section-y); }
.section--lg { padding-block: var(--section-y-lg); }
.section--rule { border-top: 1px solid var(--line); }
.section--panel { background: var(--panel); border-block: 1px solid var(--line); }
.section--oatmeal { background: var(--oatmeal); }
.section--white { background: var(--white); }
.section--charcoal { background: var(--charcoal); color: var(--white); }   /* the book: dark backgrounds = Charcoal */
.section--summit { background: var(--summit); color: var(--white); }

/* The elevation pattern (guidelines p. 17): topographic contours, low contrast, behind a section's content.
   Add .topo to any positioned box. Colour and strength come from --topo-ink / --topo-alpha, so one SVG (a mask)
   serves every ground: white lines on Oatmeal, Oatmeal on white, faint white on Charcoal or Summit. */
.topo { position: relative; isolation: isolate; }
.topo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--topo-ink, var(--white));
  opacity: var(--topo-alpha, .8);
  -webkit-mask: url("elevation.svg") center / cover no-repeat;
  mask: url("elevation.svg") center / cover no-repeat;
}
.section--white.topo, .section--panel.topo { --topo-ink: var(--oatmeal); --topo-alpha: .9; }
.on-dark.topo, .section--charcoal.topo, .section--summit.topo { --topo-ink: var(--white); --topo-alpha: .09; }

/* heading on the left, lede on the right, bottoms aligned */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 48px;
}
/* :where() keeps these at one-class specificity so a section's own rule (later file) overrides them */
.section-head > :where(:first-child) { flex: 1 1 420px; min-width: 0; }
.section-head > :where(.lede) { flex: 0 1 460px; }

/* ===== Type ===== */
.h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -.012em;
  color: var(--ink);
}
.h2--xl { font-size: var(--fs-h2-xl); line-height: 1.06; letter-spacing: -.015em; }
.accent { color: var(--summit); }              /* the book's accent words ("Built For Stronger Businesses") */
.on-dark .accent { color: var(--sandstone); }
.on-dark .h2 { color: var(--white); }
.h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink);
}
.stop { color: var(--summit); }               /* the coloured full stop */
.on-dark .stop { color: var(--sandstone); }
.lede { font-size: var(--fs-body); line-height: 1.6; color: var(--text); }
.on-dark .lede { color: rgba(255, 255, 255, .84); }

/* label: Lato Bold caps, tracked (the book's small-caps style) */
.label {
  font-family: var(--font-label);
  font-size: var(--fs-mono);
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted);
}
.label--accent { color: var(--summit); }
.on-dark .label { color: rgba(255, 255, 255, .7); }

/* eyebrow above a heading: tracked Lato caps after a short Sandstone rule (or a square) */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .2em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--summit);
}
.eyebrow::before {
  content: "";
  flex: 0 0 22px;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: var(--sandstone);
}
.eyebrow--square::before { flex-basis: 7px; width: 7px; height: 7px; border-radius: 1px; background: var(--sandstone); }
.on-dark .eyebrow { color: var(--oatmeal); }

/* bordered caps tag: SAMPLE / ILLUSTRATIVE */
.tag {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--line-scale);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: .18em;
  line-height: 1.4;
  text-transform: uppercase;
}
.on-dark .tag { background: transparent; border-color: rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .86); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .12em;
  text-transform: uppercase;          /* the book's "SCHEDULE A CONSULTATION" button */
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn svg { flex: none; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 12px; }
.btn--md { min-height: 48px; padding: 0 24px; font-size: 12.5px; }
.btn--primary { background: var(--summit); color: var(--white); }
.btn--primary:hover { background: var(--summit-deep); color: var(--white); }
.btn--secondary { background: var(--white); border-color: var(--line-btn); color: var(--charcoal-deep); }
.btn--secondary:hover { border-color: var(--summit); color: var(--summit); }
/* the main call to action ("Get a proposal"): Sandstone, deepened so white text passes AA */
.btn--cta { background: var(--cta); color: var(--white); }
.btn--cta:hover { background: var(--cta-hover); color: var(--white); }
.btn--ghost-light { background: transparent; border-color: rgba(255, 255, 255, .62); color: var(--white); }
.btn--ghost-light:hover { border-color: var(--white); background: rgba(255, 255, 255, .06); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* text link with a trailing arrow icon */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--summit);
  text-decoration: none;
}
.link-arrow:hover { color: var(--summit-deep); }

/* ===== Instrument chrome (shared by every animated panel) =====
   Root: <figure class="instrument" data-instrument id="anim-…"> holding the panel and its controls, so the
   [data-motion-toggle] button is inside the root (motion.js contract). */
.instrument { position: relative; margin: 0; }
.is-replayable { cursor: pointer; }  /* motion.js sets it while a click on the root would replay */
.js [data-instrument]:not([data-motion-ready]) { visibility: hidden; }
/* "Click to replay" only while a click would replay (not under reduced motion before Play, nor while paused). */
.js [data-instrument]:not(.is-replayable) .replay-hint { visibility: hidden; }

.instrument__panel { position: relative; border-radius: var(--r-panel); }
.instrument__panel--light { background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-panel); }
.instrument__panel--dark { background: var(--charcoal-deep); border: 1px solid color-mix(in srgb, var(--sandstone) 26%, transparent); }

/* header strip inside a panel: tag + caption on the left, HUD on the right */
.instrument__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.instrument__panel--dark .instrument__bar { border-bottom-color: rgba(255, 255, 255, .09); }
.instrument__caption {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: var(--fs-mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.on-dark .instrument__caption { color: rgba(255, 255, 255, .66); }

/* HUD: the live readout (≤ 2 lines, mono caps) */
.hud {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: var(--fs-mono);
  letter-spacing: .18em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--summit);
}
.on-dark .hud { color: var(--sandstone); }
.hud__dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sandstone);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sandstone) 30%, transparent);
}

/* controls under a panel: CLICK TO REPLAY on the left, the bordered mono PAUSE/PLAY button on the right */
.instrument__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.instrument__controls--end { justify-content: flex-end; }
.replay-hint {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: var(--fs-mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.on-dark .replay-hint { color: rgba(255, 255, 255, .7); }
.motion-toggle {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-scale);
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-label);
  font-size: var(--fs-mono);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s;
}
.motion-toggle:hover { border-color: var(--summit); }
.on-dark .motion-toggle { background: transparent; border-color: rgba(255, 255, 255, .42); color: var(--white); }
.on-dark .motion-toggle:hover { border-color: rgba(255, 255, 255, .85); }

/* a wide diagram that keeps its size and scrolls inside its own box on small screens */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.scroll-x:focus-visible { outline-offset: -2px; }
.scroll-hint { display: none; }
@media (max-width: 900px) {
  .scroll-hint {
    display: block;
    padding: 10px 22px 0;
    font-family: var(--font-label);
    font-weight: 700;
    font-size: var(--fs-mono);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .on-dark .scroll-hint { color: rgba(255, 255, 255, .66); }
}

/* ===== Nav: white bar, full-colour logo (guidelines p. 21 website mock) ===== */
.site-header {
  position: relative;
  z-index: 20;
  background: var(--white);
  color: var(--charcoal);
  border-bottom: 1px solid var(--line);
}
.site-header__bar { display: flex; align-items: center; gap: 28px; height: 80px; }
.site-header__logo { display: flex; flex: none; color: var(--charcoal); }
.site-header__logo svg { display: block; width: clamp(140px, 36vw, 180px); height: auto; }
.site-nav { display: flex; gap: 30px; margin-left: 28px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.site-nav a { color: var(--charcoal); text-decoration: none; padding-block: 10px; }
.site-nav a:hover { color: var(--summit); }
.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.site-header__login { color: var(--muted); text-decoration: none; font-size: 14.5px; padding-block: 12px; }
.site-header__login:hover { color: var(--summit); }

/* phone/tablet menu: a native disclosure, no script */
.site-menu { display: none; position: relative; }
.site-menu__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-btn);
  border-radius: var(--r);
  color: var(--charcoal);
  cursor: pointer;
  list-style: none;
}
.site-menu__button::-webkit-details-marker { display: none; }
.site-menu[open] .site-menu__button { background: var(--panel); }
.site-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 240px;
  padding: 8px 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: 0 24px 48px -24px rgba(49, 56, 54, .45);
}
.site-menu__panel a { display: block; padding: 12px 20px; color: var(--ink); text-decoration: none; font-size: 16px; }
.site-menu__panel a:hover { background: var(--panel); color: var(--summit); }

@media (max-width: 1100px) {
  .site-nav, .site-header__login { display: none; }
  .site-menu { display: block; }
  .site-header__actions { gap: 10px; }
}
@media (max-width: 640px) {
  .site-header__bar { height: 68px; gap: 12px; }
  .site-header__book { display: none; }
  .site-header__actions .btn { padding: 0 14px; }
}
.site-menu__panel .site-menu__proposal { display: none; }  /* shown only when the bar's button is hidden */
@media (max-width: 359px) {
  .site-header__proposal { display: none; }
  .site-menu__panel .site-menu__proposal { display: block; }
}

/* ===== Footer (owner's §14), on Oatmeal with the elevation pattern ===== */
.site-footer { background: var(--oatmeal); padding: 72px 0 40px; --topo-ink: var(--white); --topo-alpha: .55; }
.site-footer__cols { display: flex; flex-wrap: wrap; gap: 40px 48px; }
.site-footer__brand { flex: 1.4 1 260px; min-width: 0; }
.site-footer__brand svg { display: block; color: var(--charcoal); }
.site-footer__tagline {
  margin: 10px 0 0 40px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--charcoal);
}
.site-footer__blurb { margin-top: 22px; max-width: 22em; font-size: 15px; color: var(--text); }
.site-footer__login { margin-top: 18px; }
.site-footer__col { flex: 1 1 150px; min-width: 0; }
.site-footer__col--wide { flex-basis: 170px; }
.site-footer__head { margin-bottom: 14px; }
.site-footer .label { color: var(--charcoal); }   /* --muted is 4.28:1 on Oatmeal; Charcoal is 6.01:1 */
.site-footer__col ul { margin: 0; padding: 0; list-style: none; font-size: 15px; line-height: 2.1; }
.site-footer__col a { color: var(--ink); text-decoration: none; }
.site-footer__col a:hover { color: var(--summit); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__col a.site-footer__cta { color: var(--summit); font-weight: 700; }
.site-footer__muted { color: var(--text); }
.site-footer__legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-scale); }
.site-footer__disclosure { max-width: 88ch; font-size: 13px; line-height: 1.65; color: var(--text); }
.site-footer__base {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 13px;
  color: var(--text);
}
.site-footer__links { display: flex; gap: 22px; }
.site-footer__links a { color: var(--text); text-decoration: none; padding-block: 12px; }
.site-footer__links a:hover { color: var(--summit); text-decoration: underline; text-underline-offset: 3px; }
