/* ==========================================================================
   Grentis landing — "The market as a living landscape"
   A printed research journal about the Turkish power market that happens
   to be alive. Warm paper, editorial serif, hairline rules, live data as
   printed artifacts. No framework; this file IS the design system.
   ========================================================================== */

/* ---------- fonts (self-hosted, latin + latin-ext for ğşıİçöü) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-var-latinext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-italic-var-latinext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-italic-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-var-latinext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/plexmono-regular-latinext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/plexmono-regular-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/plexmono-medium-latinext.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/plexmono-medium-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------- tokens --------------------------------- */
:root {
  /* paper spine */
  --paper: #f7f4ef;
  --paper-2: #fbfaf6;
  --paper-sink: #f0ece3;
  --ink: #1a1c1a;
  --ink-2: #4a4e49;
  --ink-3: #8a8e85;
  --rule: #ded8cc;

  /* semantic accents */
  --emerald: #0e7a5a;
  --emerald-deep: #0a5c44;
  --emerald-tint: #e4efe8;
  --amber: #c9711b;
  --amber-tint: #f5e9da;
  --signal: #b23a48;

  /* the one dark passage */
  --night: #12140f;
  --night-2: #1c1f17;
  --night-ink: #ede7d9;
  --night-ink-2: #a8a695;
  --night-rule: #33362b;
  --night-emerald: #3fae86;
  --night-amber: #e19b4e;

  /* type */
  --serif: "Fraunces", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);

  --rail: 96px;
  --measure: 62ch;
}

/* ------------------------------- reset ---------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,
svg,
canvas {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
ul,
ol {
  list-style: none;
}
strong {
  font-weight: 600;
}

/* utility contract shared with app pages (lang toggle relies on this) */
.hidden {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------ paper grain ----------------------------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.54 0 0 0 0 0.50 0 0 0 0.05 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

/* ------------------------------ typography ------------------------------ */
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 420;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.display {
  font-size: clamp(3rem, 6.6vw, 6.25rem);
  font-weight: 360;
  font-variation-settings: "opsz" 144;
  line-height: 0.98;
}
.h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400;
  font-variation-settings: "opsz" 100;
}
.h3 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 480;
}
.serif-i {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 430;
}
.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  color: var(--ink-2);
  max-width: var(--measure);
  text-wrap: pretty;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mono {
  font-family: var(--mono);
  font-feature-settings: "tnum";
}
.caption {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
::selection {
  background: var(--emerald);
  color: var(--paper);
}

/* ------------------------------- layout --------------------------------- */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}
.section {
  padding-block: clamp(5rem, 11vh, 9rem);
  position: relative;
}
.section + .section {
  border-top: 1px solid var(--rule);
}

/* the signature left margin rail */
.rail-grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 3rem);
}
.rail {
  position: relative;
}
.rail-no {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}
.rail-no::after {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--rule);
  margin-top: 0.25rem;
}
.rail-note {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-3);
  line-height: 1.6;
  max-width: 12rem;
}
@media (max-width: 860px) {
  .rail-grid {
    grid-template-columns: 1fr;
  }
  .rail-no {
    position: static;
    flex-direction: row;
    align-items: center;
  }
  .rail-no::after {
    margin-top: 0;
  }
}

/* hairline rules that can draw in */
.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
}
html.js .rule-draw {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease-out);
}
html.js .rule-draw.is-in {
  transform: scaleX(1);
}

/* ------------------------------ masthead -------------------------------- */
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  /* near-opaque: content must never ghost through, blur or no blur;
     plain fallback first for engines without color-mix */
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.4s var(--ease-out);
}
.masthead.is-scrolled {
  box-shadow: 0 14px 34px -26px rgba(26, 28, 26, 0.45);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
  transition: height 0.4s var(--ease-out);
}
.masthead.is-scrolled .masthead-inner {
  height: 52px;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
  transition: font-size 0.4s var(--ease-out);
}
.masthead.is-scrolled .wordmark {
  font-size: 1.2rem;
}
.wordmark::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  align-self: center;
  margin-left: 2px;
  margin-top: 8px;
}
/* nav entries set like the journal's eyebrows — mono, spaced, deliberate */
.masthead-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.1rem);
}
.masthead-nav a {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: relative;
  padding-block: 0.35rem;
}
.masthead-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.masthead-nav a:hover {
  color: var(--ink);
}
.masthead-nav a:hover::after,
.masthead-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.masthead-nav a.is-active {
  color: var(--emerald-deep);
}
.masthead-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.lang-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  color: var(--ink-2);
  transition: border-color 0.2s, color 0.2s;
}
.lang-btn:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
    background-color 0.2s;
  will-change: transform;
}
.btn-sm {
  padding: 0.5rem 1.05rem;
  font-size: 0.85rem;
  border-radius: 8px;
}
.btn-primary {
  background: var(--emerald);
  color: var(--paper);
  box-shadow: 0 1px 0 rgba(26, 28, 26, 0.12), 0 8px 24px -12px rgba(14, 122, 90, 0.55);
}
.btn-primary:hover {
  background: var(--emerald-deep);
  box-shadow: 0 1px 0 rgba(26, 28, 26, 0.12), 0 12px 28px -12px rgba(14, 122, 90, 0.65);
}
.btn-ghost {
  border: 1px solid var(--rule);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--ink-3);
  background: var(--paper-2);
}
.btn-paper {
  background: var(--paper);
  color: var(--emerald-deep);
}
.btn-paper:hover {
  background: var(--paper-2);
}

/* mobile menu — a full page of the journal, not a dropdown */
.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
  overflow-y: auto;
}
.menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.menu-overlay-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 0.9rem;
  padding-bottom: 2rem;
}
.menu-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}
.menu-overlay-nav {
  display: flex;
  flex-direction: column;
}
.menu-overlay-nav a {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 8vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  padding: 1.05rem 0.1rem;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s;
}
.menu-overlay-nav a:active,
.menu-overlay-nav a:hover {
  color: var(--emerald-deep);
}
.menu-overlay-nav .idx {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
html.js .menu-overlay-nav a {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), color 0.2s;
}
html.js .menu-overlay.is-open .menu-overlay-nav a {
  opacity: 1;
  transform: none;
}
html.js .menu-overlay.is-open .menu-overlay-nav a:nth-child(2) { transition-delay: 0.05s; }
html.js .menu-overlay.is-open .menu-overlay-nav a:nth-child(3) { transition-delay: 0.1s; }
html.js .menu-overlay.is-open .menu-overlay-nav a:nth-child(4) { transition-delay: 0.15s; }
html.js .menu-overlay.is-open .menu-overlay-nav a:nth-child(5) { transition-delay: 0.2s; }
.menu-overlay-cta {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.menu-overlay-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
html.menu-open,
html.menu-open body {
  overflow: hidden;
}
@media (max-width: 860px) {
  .masthead-nav,
  .masthead-actions .btn,
  .masthead-actions .nav-backtest {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }
}

/* ------------------------ market brief ribbon ---------------------------- */
/* A rotating terminal channel: each frame owns a color of the system —
   today emerald (live) · yesterday night (settled tape) · tomorrow amber
   (the Grentis forecast) · week ink (the ledger). */
.pulse {
  --pulse-bg: var(--emerald-deep);
  --pulse-fg: var(--paper);
  --pulse-dim: rgba(247, 244, 239, 0.66);
  border-bottom: 1px solid var(--rule);
  background: var(--pulse-bg);
  overflow: hidden;
  transition: background-color 0.8s var(--ease-out);
}
.pulse[data-tone="yesterday"] {
  --pulse-bg: var(--night);
  --pulse-fg: var(--night-ink);
  --pulse-dim: var(--night-ink-2);
}
.pulse[data-tone="tomorrow"] {
  --pulse-bg: var(--amber);
  --pulse-fg: #241503;
  --pulse-dim: rgba(36, 21, 3, 0.68);
}
.pulse[data-tone="week"] {
  --pulse-bg: var(--ink);
  --pulse-fg: var(--paper);
  --pulse-dim: rgba(247, 244, 239, 0.6);
}
.pulse-frames {
  position: relative;
  height: 34px;
}
.pulse-frame {
  display: none;
  align-items: center;
  gap: 1.75rem;
  height: 34px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--pulse-dim);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.pulse-frame:first-child {
  display: flex; /* no-JS: the live channel, statically */
}
.pulse-frame::-webkit-scrollbar {
  display: none;
}
html.js .pulse-frame {
  display: flex;
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
  pointer-events: none;
}
html.js .pulse-frame.is-live {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.pulse-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.pulse-item b {
  color: var(--pulse-fg);
  font-weight: 500;
}
.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pulse-fg);
}
html.js .pulse-dot {
  animation: pulse-breathe 3.2s ease-in-out infinite;
}
@keyframes pulse-breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}
/* deltas only appear in the today frame (emerald band) */
.pulse .delta-up {
  color: #a9e8cb;
}
.pulse .delta-down {
  color: #f4b9c1;
}
.delta-up {
  color: var(--emerald);
}
.delta-down {
  color: var(--signal);
}

/* -------------------------------- hero ---------------------------------- */
/* Full-bleed: the data-thread weave is the fabric of the whole section;
   copy sits on a paper scrim, the caption is a plate note bottom-right. */
.hero {
  position: relative;
  min-height: calc(100svh - 98px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(3.5rem, 8vh, 6rem) 4.5rem;
  overflow: hidden;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, var(--paper) 0%, transparent 16%),
    linear-gradient(97deg,
      var(--paper) 30%,
      color-mix(in srgb, var(--paper) 72%, transparent) 52%,
      transparent 76%);
}
.hero-copy {
  position: relative;
  z-index: 3;
  width: 100%;
  margin-block: auto;
}
.hero-copy > * {
  max-width: 46rem;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 2rem;
}
.hero-eyebrow .rule {
  width: 2.5rem;
}
.hero h1 em {
  font-style: italic;
  font-weight: 430;
  color: var(--amber);
}
.hero-sub {
  margin-top: 1.75rem;
  max-width: 34rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.5rem;
}
.hero-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--ink-3);
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2.75rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.hero-chips span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.7rem 1.1rem 0.7rem 0;
  margin-right: 1.1rem;
  position: relative;
}
.hero-chips span + span::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 55%;
  background: var(--rule);
}

/* the living landscape — a full-bleed layer behind the hero copy */
.terrain-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.terrain-frame > img.poster,
.terrain-frame > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 58%;
}
.terrain-frame > canvas {
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}
.terrain-frame.webgl-on > canvas {
  opacity: 1;
}
/* the canvas is transparent around the mesh — the poster must yield fully,
   or its ridgeline bleeds through the live scene. The transition lives on
   the webgl-on state only: fade-out animates, but if the class is removed
   (context loss -> dispose) the poster snaps back instantly instead of
   leaving 1.2s of blank paper. */
.terrain-frame.webgl-on > img.poster {
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}
/* the plate note pins to the hero's bottom-right corner — it annotates the
   weave at the point where the front threads leave the frame */
.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.1rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  text-align: right;
  pointer-events: none;
}

@media (max-width: 980px) {
  .hero {
    min-height: 0;
  }
  /* small screens: the weave recedes to texture behind a stronger veil */
  .hero-scrim {
    background:
      linear-gradient(180deg, var(--paper) 0%, transparent 18%),
      linear-gradient(180deg,
        color-mix(in srgb, var(--paper) 82%, transparent) 0%,
        color-mix(in srgb, var(--paper) 55%, transparent) 60%,
        transparent 100%);
  }
}

/* ------------------------- decision-moments triptych --------------------- */
.triptych-timeline {
  position: relative;
  height: 2px;
  margin-bottom: 3rem;
  background: linear-gradient(
    90deg,
    rgba(14, 122, 90, 0.55),
    rgba(201, 113, 27, 0.5) 55%,
    rgba(18, 20, 15, 0.55)
  );
  border-radius: 2px;
}
.triptych-timeline i {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper);
  border: 2px solid currentColor;
}
.triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.triptych article {
  padding: 0.5rem clamp(1.25rem, 2.5vw, 2.5rem) 0.75rem;
  border-left: 1px solid var(--rule);
}
.triptych article:first-child {
  border-left: 0;
  padding-left: 0;
}
.moment-glyph {
  width: 44px;
  height: 44px;
  margin-bottom: 1.4rem;
  color: var(--emerald);
}
.triptych article:nth-child(2) .moment-glyph {
  color: var(--amber);
}
.triptych article:nth-child(3) .moment-glyph {
  color: var(--ink-2);
}
.moment-glyph svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html.js .glyph-draw path,
html.js .glyph-draw circle,
html.js .glyph-draw line,
html.js .glyph-draw polyline,
html.js .glyph-draw rect {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
}
html.js .is-in .glyph-draw path,
html.js .is-in .glyph-draw circle,
html.js .is-in .glyph-draw line,
html.js .is-in .glyph-draw polyline,
html.js .is-in .glyph-draw rect {
  animation: glyph-draw 1.1s var(--ease-out) forwards;
}
@keyframes glyph-draw {
  to {
    stroke-dashoffset: 0;
  }
}
.triptych h3 {
  margin-bottom: 0.65rem;
}
.triptych p {
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 30ch;
}
@media (max-width: 860px) {
  .triptych {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .triptych article {
    border-left: 0;
    padding-inline: 0;
    border-top: 1px solid var(--rule);
    padding-top: 1.75rem;
  }
  .triptych article:first-child {
    border-top: 0;
    padding-top: 0;
  }
}

/* ---------------------------- frictions ledger --------------------------- */
.ledger {
  border-top: 1px solid var(--rule);
}
.ledger-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 17rem) 1fr;
  gap: clamp(1rem, 3vw, 3rem);
  padding-block: 2rem;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.ledger-idx {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-3);
}
.ledger-row h3 {
  font-size: 1.3rem;
}
.ledger-row ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.ledger-row li {
  padding-left: 1.1rem;
  position: relative;
}
.ledger-row li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-3);
}
.ledger-row .stat {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 480;
  color: var(--ink);
  font-size: 1.05em;
  padding: 0 0.1em;
}
@media (max-width: 860px) {
  .ledger-row {
    grid-template-columns: 2.6rem 1fr;
  }
  .ledger-row ul {
    grid-column: 2;
  }
}

/* ------------------------------ value tiles ------------------------------ */
.tiles-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.tile {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 2rem 1.9rem 1.9rem;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 44px -32px rgba(26, 28, 26, 0.35);
}
.tile:hover::before {
  transform: scaleX(1);
}
.tile-art {
  height: 120px;
  margin-bottom: 1.6rem;
  color: var(--emerald);
}
.tile:nth-child(2) .tile-art {
  color: var(--ink-2);
}
.tile:nth-child(3) .tile-art {
  color: var(--amber);
}
.tile-art svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile h3 {
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
}
.tile p {
  color: var(--ink-2);
  font-size: 0.93rem;
}
@media (max-width: 980px) {
  .tiles-3 {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------- process rail ------------------------------ */
.process {
  position: relative;
}
.process-spine {
  position: absolute;
  left: 0;
  right: 0;
  top: 22px;
  height: 1px;
  background: var(--rule);
}
.process-spine .spine-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--emerald);
  transition: width 0.2s linear;
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  position: relative;
}
.step {
  position: relative;
  padding-top: 3.4rem;
}
.step-node {
  position: absolute;
  top: 8px;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.step.is-lit .step-node {
  border-color: var(--emerald);
  color: var(--paper);
  background: var(--emerald);
}
.step h3 {
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
}
.step .step-kicker {
  font-size: 0.88rem;
  font-weight: 550;
  font-family: var(--sans);
  color: var(--emerald-deep);
  margin-bottom: 0.6rem;
  display: block;
}
.step p {
  font-size: 0.88rem;
  color: var(--ink-2);
}
@media (max-width: 860px) {
  .process-spine {
    left: 13px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 1px;
    height: auto;
  }
  .process-spine .spine-fill {
    width: 100%;
    height: 0%;
  }
  .process-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .step {
    padding-top: 0;
    padding-left: 3.2rem;
  }
  .step-node {
    top: 0;
  }
}

/* ------------------------------ OptiGren bento --------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}
.bento-card {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 2.1rem 2rem;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 48px -34px rgba(26, 28, 26, 0.4);
}
.bento-core {
  grid-column: span 5;
}
.bento-flex {
  grid-column: span 7;
  background: linear-gradient(160deg, var(--emerald-tint), var(--paper-2) 70%);
  border-color: color-mix(in srgb, var(--emerald) 28%, var(--rule));
}
.bento-hive {
  grid-column: span 7;
  background: linear-gradient(200deg, var(--amber-tint), var(--paper-2) 70%);
  border-color: color-mix(in srgb, var(--amber) 26%, var(--rule));
}
.bento-prime {
  grid-column: span 5;
  background: var(--night);
  border-color: var(--night-rule);
  color: var(--night-ink);
}
.bento-kicker {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.9rem;
}
.bento-prime .bento-kicker {
  color: var(--night-ink-2);
}
.bento-card h3 {
  font-size: 1.75rem;
  margin-bottom: 0.9rem;
}
.bento-card h3 .prod {
  font-style: italic;
  font-weight: 430;
}
.bento-core h3 .prod {
  color: var(--emerald);
}
.bento-flex h3 .prod {
  color: var(--emerald-deep);
}
.bento-hive h3 .prod {
  color: var(--amber);
}
.bento-prime h3 .prod {
  color: var(--night-amber);
}
.bento-card > p {
  font-size: 0.93rem;
  color: var(--ink-2);
  margin-bottom: 1.5rem;
}
.bento-prime > p {
  color: var(--night-ink-2);
}
.bento-feats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.9rem;
  font-size: 0.83rem;
  color: var(--ink-2);
}
.bento-prime .bento-feats {
  color: var(--night-ink-2);
}
.bento-feats li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}
.bento-feats li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
  flex-shrink: 0;
  transform: translateY(-2px);
}
.bento-cta {
  margin-top: auto;
  align-self: flex-start;
}
.bento-chart {
  margin: 0 0 1.5rem;
  border: 1px solid color-mix(in srgb, var(--emerald) 18%, var(--rule));
  border-radius: 10px;
  background: var(--paper);
  padding: 0.9rem 0.9rem 0.4rem;
}
.bento-chart svg {
  width: 100%;
  height: auto;
}
.bento-chart .caption {
  padding: 0.4rem 0.1rem 0.3rem;
  display: block;
}
.integration-note {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 2.25rem;
  color: var(--ink-3);
  font-size: 0.88rem;
}
.integration-note .pulse-dot {
  background: var(--emerald);
}
@media (max-width: 980px) {
  .bento-core,
  .bento-flex,
  .bento-hive,
  .bento-prime {
    grid-column: span 12;
  }
}

/* --------------------------- IntraGren gatefold -------------------------- */
.gatefold {
  background: var(--night);
  color: var(--night-ink);
  position: relative;
  overflow: hidden;
}
.section.gatefold + .section {
  border-top: 0;
}
.gatefold .eyebrow,
.gatefold .caption {
  color: var(--night-ink-2);
}
.gatefold .rail-no {
  color: var(--night-ink-2);
}
.gatefold .rail-no::after {
  background: var(--night-rule);
}
.gatefold-head p.lead {
  color: var(--night-ink-2);
}
.gatefold h2 em {
  color: var(--night-amber);
  font-style: italic;
}
.night-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
}
.gatefold-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 3rem;
  position: relative;
  z-index: 2;
}
.night-card {
  border: 1px solid var(--night-rule);
  border-radius: 16px;
  padding: 2.1rem 2rem;
  background: color-mix(in srgb, var(--night-2) 82%, transparent);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
}
.night-card h3 {
  font-size: 1.7rem;
  margin-bottom: 0.35rem;
}
.night-card h3 .prod {
  font-style: italic;
  font-weight: 430;
}
.night-card.radar h3 .prod {
  color: var(--night-emerald);
}
.night-card.autopilot h3 .prod {
  color: var(--night-amber);
}
.night-kicker {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--night-ink-2);
  margin-bottom: 1.4rem;
  display: block;
}
.night-card > p {
  color: var(--night-ink-2);
  font-size: 0.95rem;
  margin-bottom: 1.6rem;
}
.night-feats {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  margin-bottom: 1.9rem;
  flex-grow: 1;
}
.night-feats li {
  font-size: 0.9rem;
  color: var(--night-ink-2);
  padding-left: 1.15rem;
  position: relative;
}
.night-feats li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--night-emerald);
}
.night-card.autopilot .night-feats li::before {
  background: var(--night-amber);
}
.night-feats strong {
  color: var(--night-ink);
  display: block;
  margin-bottom: 0.15rem;
}
.night-quote {
  border-top: 1px solid var(--night-rule);
  padding-top: 1.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--night-ink);
}
.night-quote .accent {
  color: var(--night-amber);
}
.night-card.radar .night-quote .accent {
  color: var(--night-emerald);
}
.night-fig {
  height: 130px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--night-rule);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.night-fig canvas,
.night-fig svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.night-fig .caption {
  position: absolute;
  bottom: 0.45rem;
  left: 0.7rem;
  z-index: 2;
  font-size: 0.6rem;
}
.gatefold .btn-night {
  border: 1px solid var(--night-rule);
  color: var(--night-ink);
  background: transparent;
}
.gatefold .btn-night:hover {
  border-color: var(--night-ink-2);
  background: rgba(237, 231, 217, 0.06);
}
.gatefold-note {
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--night-ink-2);
}
@media (max-width: 980px) {
  .gatefold-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------ proof spread ----------------------------- */
.proof-quote {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.15;
  max-width: 24ch;
}
.proof-quote .dim {
  color: var(--ink-3);
  font-style: italic;
  font-weight: 380;
}
.proof-quote .hard {
  font-style: italic;
  color: var(--emerald-deep);
  position: relative;
  white-space: nowrap;
}
.proof-quote .hard::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.09em;
  background: color-mix(in srgb, var(--emerald) 30%, transparent);
  transform: rotate(-0.6deg);
}
.proof-sub {
  margin-top: 1.4rem;
}
.proof-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: 3.5rem;
}
.proof-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.2rem;
}
.proof-head .idx {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.9rem;
  color: var(--ink-3);
  font-weight: 380;
}
.proof-head .rule {
  flex: 1;
}
.metrics {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  align-items: flex-end;
  flex-wrap: wrap;
}
.metric {
  min-width: 5.5rem;
}
.metric-value {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 460;
  font-size: clamp(3.2rem, 5.5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 0.1em;
}
.metric-value .unit {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.32em;
  color: var(--ink-3);
  letter-spacing: 0;
}
.metric-value.pos {
  color: var(--emerald-deep);
}
.metric-value.neg {
  color: var(--ink);
}
.metric-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 0.6rem;
  display: block;
}
.metric-label sup {
  color: var(--amber);
}
.proof-foot {
  margin-top: 1.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.spark {
  margin-top: 2.2rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper-2);
  padding: 1rem 1rem 0.6rem;
}
.spark svg {
  width: 100%;
  height: auto;
  display: block;
}
.spark svg text {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--ink-3);
  letter-spacing: 0.08em;
}
.spark-axis {
  stroke: var(--rule);
  stroke-width: 1;
}
.spark-area {
  fill: rgba(14, 122, 90, 0.08);
  stroke: none;
}
.spark-peak-dot {
  fill: var(--amber);
}
.spark-peak-label {
  fill: var(--ink-2);
}
/* draw-in choreography: realized line inks itself first, the forecast and
   area follow, the peak annotation lands last (gated on the reveal system) */
html.js .spark-line-actual {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.5s var(--ease-inout) 0.25s;
}
html.js .reveal.is-in .spark-line-actual {
  stroke-dashoffset: 0;
}
html.js .spark-line-forecast,
html.js .spark-area {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out) 1s;
}
html.js .reveal.is-in .spark-line-forecast,
html.js .reveal.is-in .spark-area {
  opacity: 1;
}
html.js .spark-peak-dot,
html.js .spark-peak-label {
  opacity: 0;
  transition: opacity 0.5s var(--ease-out) 1.5s;
}
html.js .reveal.is-in .spark-peak-dot,
html.js .reveal.is-in .spark-peak-label {
  opacity: 1;
}
.seal {
  width: 132px;
  margin-top: 2rem;
  color: var(--emerald-deep);
}
@media (max-width: 980px) {
  .proof-groups {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------- FAQ ----------------------------------- */
.faq-list {
  border-top: 1px solid var(--rule);
  max-width: 56rem;
}
.faq-item {
  border-bottom: 1px solid var(--rule);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: left;
  padding: 1.35rem 0.25rem;
  font-weight: 550;
  font-size: 1.02rem;
  transition: color 0.2s;
}
.faq-q:hover {
  color: var(--emerald-deep);
}
.faq-q .faq-mark {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--ink-3);
  transition: transform 0.35s var(--ease-out), color 0.2s;
  flex-shrink: 0;
}
.faq-item.is-open .faq-mark {
  transform: rotate(45deg);
  color: var(--emerald);
}
.faq-a {
  overflow: hidden;
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: var(--measure);
}
html.js .faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}
html.js .faq-a > div {
  overflow: hidden;
}
html.js .faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
}
.faq-a p {
  padding: 0 0.25rem 1.5rem;
}

/* ----------------------------- CTA insert -------------------------------- */
.cta-insert {
  position: relative;
  border-radius: 18px;
  background: linear-gradient(165deg, var(--emerald-deep), var(--emerald) 80%);
  color: var(--paper);
  padding: clamp(2.75rem, 6vw, 4.5rem);
  overflow: hidden;
}
.cta-insert::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(247, 244, 239, 0.25);
  border-radius: 12px;
  pointer-events: none;
}
.cta-terrain-echo {
  position: absolute;
  right: -4%;
  bottom: -12%;
  width: 55%;
  opacity: 0.14;
  pointer-events: none;
}
.cta-insert h2 {
  color: var(--paper);
  max-width: 18ch;
}
.cta-insert .lead {
  color: rgba(247, 244, 239, 0.8);
  margin-top: 1.1rem;
}
.cta-insert .hero-ctas {
  margin-top: 2.25rem;
}
.cta-insert .btn-ghost {
  border-color: rgba(247, 244, 239, 0.4);
  color: var(--paper);
}
.cta-insert .btn-ghost:hover {
  background: rgba(247, 244, 239, 0.1);
  border-color: rgba(247, 244, 239, 0.7);
}
.cta-note {
  margin-top: 1.4rem;
  font-size: 0.8rem;
  color: rgba(247, 244, 239, 0.65);
}

/* ------------------------------- contact --------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
}
.contact-aside p {
  color: var(--ink-2);
  margin-top: 1.1rem;
  max-width: 30rem;
}
.contact-facts {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
}
.contact-facts a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-2);
  padding: 0.85rem 0.1rem;
  border-top: 1px solid var(--rule);
  transition: color 0.2s;
}
.contact-facts a:last-child {
  border-bottom: 1px solid var(--rule);
}
.contact-facts a:hover {
  color: var(--emerald-deep);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.4rem;
}
.field label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field label .req {
  color: var(--signal);
}
.well {
  background: var(--paper-sink);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
  width: 100%;
}
.well::placeholder {
  color: var(--ink-3);
}
.well:focus {
  outline: none;
  border-color: var(--emerald);
  background: var(--paper-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--emerald) 14%, transparent);
}
textarea.well {
  resize: vertical;
  min-height: 8.5rem;
}
.hp-field {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

/* ------------------------------- footer ---------------------------------- */
.footer {
  background: var(--night);
  color: var(--night-ink-2);
  padding: clamp(3.5rem, 7vh, 5.5rem) 0 2.25rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--night-rule);
}
.footer .wordmark {
  color: var(--night-ink);
}
.footer-tag {
  margin-top: 1rem;
  max-width: 30rem;
  font-size: 0.93rem;
}
.footer a:hover {
  color: var(--night-ink);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  text-align: right;
}
.footer-colophon {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}
@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-links {
    text-align: left;
  }
}

/* -------------------------------- modals --------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(26, 28, 26, 0.45);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  width: 100%;
  max-width: 30rem;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 40px 80px -40px rgba(26, 28, 26, 0.5);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.35s var(--ease-out);
}
.modal.is-open .modal-card {
  transform: none;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
}
.modal-head h3 {
  font-size: 1.3rem;
}
.modal-x {
  width: 34px;
  height: 34px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  color: var(--ink-3);
  transition: color 0.2s, border-color 0.2s, transform 0.3s var(--ease-out);
}
.modal-x:hover {
  color: var(--ink);
  border-color: var(--ink-3);
  transform: rotate(90deg);
}
.modal-body {
  padding: 1.5rem;
}
.radio-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.radio-card input {
  position: absolute;
  opacity: 0;
}
.radio-card > div {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.85rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.radio-card span.name {
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
}
.radio-card span.sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 0.3rem;
  display: block;
}
.radio-card input:checked + div {
  border-color: var(--emerald);
  background: var(--emerald-tint);
}
.radio-card input:focus-visible + div {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--emerald) 18%, transparent);
}
.radio-card.hive input:checked + div {
  border-color: var(--amber);
  background: var(--amber-tint);
}
.hive-note {
  font-size: 0.78rem;
  color: var(--amber);
  margin-top: 0.5rem;
}
.legal-note {
  font-size: 0.72rem;
  color: var(--ink-3);
  text-align: center;
  margin: 0.75rem 0 1.1rem;
}
.feedback-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feedback-icon.ok {
  background: var(--emerald-tint);
  color: var(--emerald-deep);
}
.feedback-icon.err {
  background: color-mix(in srgb, var(--signal) 14%, transparent);
  color: var(--signal);
}

/* ------------------------- motion / reveal system ------------------------ */
/* Content is fully visible without JS; html.js gates all hidden states. */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
}
html.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
html.js [data-stagger] > * {
  opacity: 0;
  transform: translateY(22px);
}
html.js [data-stagger].is-in > * {
  opacity: 1;
  transform: none;
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
html.js [data-stagger].is-in > *:nth-child(2) {
  transition-delay: 0.08s;
}
html.js [data-stagger].is-in > *:nth-child(3) {
  transition-delay: 0.16s;
}
html.js [data-stagger].is-in > *:nth-child(4) {
  transition-delay: 0.24s;
}
html.js [data-stagger].is-in > *:nth-child(5) {
  transition-delay: 0.32s;
}
html.js [data-stagger].is-in > *:nth-child(6) {
  transition-delay: 0.4s;
}

/* magnetic buttons get transform from JS; keep transitions off while dragging */
.btn.is-magnet {
  transition: box-shadow 0.25s var(--ease-out), background-color 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js .reveal,
  html.js [data-stagger] > * {
    opacity: 1;
    transform: none;
  }
  html.js .rule-draw {
    transform: none;
  }
  html.js .spark-line-actual {
    stroke-dashoffset: 0;
  }
  html.js .spark-line-forecast,
  html.js .spark-area,
  html.js .spark-peak-dot,
  html.js .spark-peak-label {
    opacity: 1;
  }
  html.js .glyph-draw path,
  html.js .glyph-draw circle,
  html.js .glyph-draw line,
  html.js .glyph-draw polyline,
  html.js .glyph-draw rect {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }
}

/* ------------------------------ small screens ---------------------------- */
@media (max-width: 640px) {
  .hero-ctas .btn {
    width: 100%;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    gap: 1.5rem;
  }
}
