/* Synopton site layer. Tokens first, then shared chrome and components.
   The engine (scrollcraft.css) is the mechanism; this file is the brand. */

:root {
  --sc-canvas:     #EEF1F3;
  --sc-surface:    #FFFFFF;
  --sc-ink:        #121A26;
  --sc-ink-soft:   #485264;
  --sc-accent:     #C2410C;
  --sc-accent-ink: #FFFFFF;

  /* The twin's own line colour. Used for drawings, data labels and the
     divider, never for buttons: the accent stays the only call to act. */
  --twin:      #1D3663;
  --twin-soft: #5B6E92;
  --paper:     #EEF1F3;
  --paper-2:   #E4E9EF;

  --sc-font-display: "Archivo", "Geist", system-ui, sans-serif;
  --sc-font-text:    "Geist", system-ui, sans-serif;
  --sc-font-mono:    "Geist Mono", ui-monospace, monospace;

  --sc-hairline: color-mix(in oklab, var(--sc-ink) 13%, transparent);
  --sc-hairline-strong: color-mix(in oklab, var(--sc-ink) 24%, transparent);
  --sc-shadow-color: 214 30% 30%;
  --sc-e1: 0 1px 2px hsl(var(--sc-shadow-color) / 0.10), 0 1px 1px hsl(var(--sc-shadow-color) / 0.06);
  --sc-e2: 0 2px 4px hsl(var(--sc-shadow-color) / 0.08), 0 8px 18px hsl(var(--sc-shadow-color) / 0.10);
  --sc-e3: 0 6px 12px hsl(var(--sc-shadow-color) / 0.08), 0 24px 48px hsl(var(--sc-shadow-color) / 0.14);
  --sc-edge: inset 0 1px 0 rgba(255,255,255,0.9);

  --split: 0.5;          /* the divider, 0 = all twin, 1 = all reality */
  --knob-h: 52px;
  --r: 10px;
}

html { background: var(--sc-canvas); }
body { color: var(--sc-ink); background: var(--sc-canvas); }
.sc-display { font-weight: 600; font-stretch: 104%; }
h1, h2, h3 { font-family: var(--sc-font-display); }

/* ------------------------------------------------------------ the knob --
   The page's chrome is the top of the divider. It carries the wordmark, the
   pages and the one action, and it rides wherever the split currently is. */
.knob {
  position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 0; z-index: 80;
  display: flex; align-items: center; gap: 4px;
  height: var(--knob-h); padding: 6px 6px 6px 14px;
  background: color-mix(in oklab, var(--sc-surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border: 1px solid var(--sc-hairline);
  border-radius: 999px;
  box-shadow: var(--sc-e2), var(--sc-edge);
  transform: translate3d(var(--knob-x, 50vw), 0, 0) translateX(-50%);
  will-change: transform;
  white-space: nowrap;
}
.knob::after { /* the stem: the divider's top, dropping out of the knob */
  content: ""; position: absolute; left: 50%; top: 100%;
  width: 1px; height: 14px; background: var(--twin); opacity: var(--stem, 0.7);
}
.mark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--sc-ink);
  font: 650 17px/1 var(--sc-font-display); font-stretch: 108%; letter-spacing: -0.02em; margin-right: 10px; }
.mark svg { width: 22px; height: 22px; flex: none; }
.knob nav { display: flex; gap: 2px; }
.knob nav a, .menu-btn {
  font: 500 14px/1 var(--sc-font-text); color: var(--sc-ink-soft); text-decoration: none;
  padding: 10px 12px; border-radius: 999px; border: 0; background: none; cursor: pointer;
  transition: color 140ms var(--sc-ease-out), background-color 140ms var(--sc-ease-out);
}
.knob nav a:hover, .menu-btn:hover { color: var(--sc-ink); background: var(--paper-2); }
.knob nav a[aria-current="page"] { color: var(--sc-ink); }
.menu-btn { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--sc-font-text); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  background: var(--sc-accent); color: var(--sc-accent-ink); cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 2px 6px hsl(18 80% 30% / 0.25);
  transition: background-color 140ms var(--sc-ease-out), transform 120ms var(--sc-ease-out), box-shadow 140ms var(--sc-ease-out);
}
.btn:hover { background: #A8380A; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn--ghost { background: transparent; color: var(--sc-ink); border-color: var(--sc-hairline-strong); box-shadow: none; }
.btn--ghost:hover { background: var(--sc-surface); }
.link { color: var(--sc-ink); font-weight: 550; text-decoration: underline; text-decoration-color: var(--sc-accent);
  text-decoration-thickness: 1.5px; text-underline-offset: 0.25em; }
.link:hover { color: var(--sc-accent); }

/* mobile menu sheet */
.sheet { position: fixed; inset: 0; z-index: 90; display: none; }
.sheet[data-open] { display: block; }
.sheet__scrim { position: absolute; inset: 0; background: color-mix(in oklab, var(--sc-ink) 32%, transparent); }
.sheet__panel { position: absolute; top: 12px; right: 12px; left: 12px; background: var(--sc-surface); border-radius: 18px;
  padding: 18px; box-shadow: var(--sc-e3); display: grid; gap: 4px; animation: sheetIn 220ms var(--sc-ease-out); }
.sheet__panel a { padding: 14px 10px; font: 600 20px/1.1 var(--sc-font-display); color: var(--sc-ink); text-decoration: none; border-bottom: 1px solid var(--sc-hairline); }
.sheet__panel .btn { margin-top: 12px; height: 52px; font-size: 16px; }
.sheet__close { justify-self: end; border: 0; background: var(--paper-2); width: 44px; height: 44px; border-radius: 999px; cursor: pointer; font-size: 20px; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .knob nav { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 860px) {
  .knob { top: calc(10px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; transform: none; justify-content: space-between; height: 56px; }
  .knob::after { display: none; }
  .knob .mark { margin-right: auto; }
}

/* --------------------------------------------------------- shared type -- */
.label {
  font: 500 11.5px/1.2 var(--sc-font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sc-ink-soft);
}
.label--twin { color: var(--twin); }
.fine { font-size: 13px; line-height: 1.5; color: var(--sc-ink-soft); }
.h2 { font: 600 var(--sc-t-2xl)/1.02 var(--sc-font-display); font-stretch: 104%; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.h3 { font: 600 var(--sc-t-xl)/1.1 var(--sc-font-display); letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.lede { font-size: var(--sc-t-lg); line-height: 1.45; letter-spacing: -0.01em; color: var(--sc-ink); margin: 0; max-width: 46ch; text-wrap: pretty; }
.body { color: var(--sc-ink-soft); max-width: 60ch; margin: 0; text-wrap: pretty; }

/* provenance chip, borrowed straight from the product */
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 5px;
  font: 600 10.5px/1 var(--sc-font-mono); letter-spacing: 0.07em; border: 1px solid; white-space: nowrap; }
.chip--measured  { color: #1F6B44; background: #E6F3EB; border-color: #B9DCC7; }
.chip--modelled  { color: #8A4B0B; background: #FDF1E4; border-color: #F0CFA8; }
.chip--published { color: #23408E; background: #E8EDF8; border-color: #BFCBEA; }
.chip--assumed   { color: #5C5F70; background: #F1F2F5; border-color: #D5D8E0; }
.chip--forecast  { color: #6A3E95; background: #F2EBF8; border-color: #D8C7EA; }

/* ---------------------------------------------------- lead form -------- */
.lead { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.lead .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field label { font: 500 13px/1.2 var(--sc-font-text); color: var(--sc-ink); }
.field label span { color: var(--sc-ink-soft); font-weight: 400; }
.field input, .field select, .field textarea {
  height: 46px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--sc-hairline-strong);
  background: var(--sc-surface); font-size: 15px; color: var(--sc-ink);
  transition: border-color 140ms var(--sc-ease-out), box-shadow 140ms var(--sc-ease-out);
}
.field textarea { height: 76px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--twin); box-shadow: 0 0 0 3px color-mix(in oklab, var(--twin) 18%, transparent); }
.field input:user-invalid { border-color: #B23A3A; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--sc-ink-soft); line-height: 1.45; }
.consent input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.lead__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lead__status { font-size: 14px; color: var(--sc-ink-soft); min-height: 1.4em; }
.lead__status[data-kind="error"] { color: #9F2F2F; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .lead { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- footer -- */
.foot { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 13px; color: var(--sc-ink-soft); }
.foot a { color: inherit; }
.foot .mark { font-size: 15px; }

/* split image: half photograph, half twin, a hairline between */
.splitimg { position: relative; overflow: hidden; border-radius: var(--r); background: var(--paper-2); aspect-ratio: 16 / 9; }
.splitimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.splitimg .tw { clip-path: inset(0 0 0 var(--at, 50%)); }
.splitimg::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--at, 50%); width: 1px; background: var(--twin); }

/* skip link */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--sc-ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .sheet__panel { animation: none; }
}
