/* ═══════════════════════════════════════════════════════
   COBIT · AGAI — "Organic Editorial Luxury"
   Deep forest immersive 3D ✕ warm paper editorial panels
   Fraunces (organic serif) · Inter (body) · Plex Mono (labels)
   ═══════════════════════════════════════════════════════ */

:root {
  /* forest (dark world) */
  --bg: #0f1c14;
  --bg-deep: #0b1510;
  --ink: #ece7d8;
  --ink-dim: #97a89a;
  --line: rgba(233, 180, 76, 0.16);

  /* paper (editorial world) */
  --paper: #f2eee3;
  --paper-card: #faf7ee;
  --paper-ink: #16261b;
  --paper-dim: #5e6f60;
  --line-paper: rgba(22, 38, 27, 0.14);

  /* accents */
  --gold: #e9b44c;
  --gold-deep: #b98a2e;
  --leaf: #2e7a40;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: initial; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: #161003; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #243828; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ═══════════ PRELOADER ═══════════ */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
}
.preloader__inner { text-align: center; width: min(420px, 80vw); }
.preloader__logo {
  margin-bottom: 2.4rem; color: var(--ink);
  display: flex; justify-content: center;
}
.preloader__logo svg { width: min(230px, 54vw); height: auto; display: block; }
.preloader__bar {
  height: 1px; background: rgba(233,180,76,.18);
  overflow: hidden; margin-bottom: 1rem;
}
.preloader__bar span { display: block; height: 100%; width: 0%; background: var(--gold); }
.preloader__pct {
  font-family: var(--font-mono);
  font-size: .76rem; letter-spacing: .3em; color: var(--ink-dim);
}

/* ═══════════ CURSOR ═══════════ */
.cursor, .cursor-dot { pointer-events: none; position: fixed; top: 0; left: 0; z-index: 999; border-radius: 50%; }
.cursor {
  width: 38px; height: 38px;
  border: 1px solid rgba(233,180,76,.55);
  transform: translate(-50%, -50%);
  transition: width .35s, height .35s, background .35s, opacity .3s;
}
.cursor.is-hover { width: 64px; height: 64px; background: rgba(233,180,76,.1); }
.cursor-dot { width: 5px; height: 5px; background: var(--gold); transform: translate(-50%, -50%); }
@media (hover: none) { .cursor, .cursor-dot { display: none; } }

/* ═══════════ CANVAS + GRAIN ═══════════ */
#webgl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.grain {
  position: fixed; inset: -100%;
  z-index: 2; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(8) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  25% { transform: translate(-3%,2%); }
  50% { transform: translate(2%,-3%); }
  75% { transform: translate(-2%,-2%); }
}

/* ═══════════ NAV ═══════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem clamp(1.4rem, 4vw, 3.4rem);
  transition: background .5s, backdrop-filter .5s, padding .5s;
}
.nav.is-scrolled {
  background: rgba(11,21,16,.7);
  backdrop-filter: blur(18px);
  padding-top: 1rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.nav__logo {
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center;
  transition: color .3s;
}
.nav__logo:hover { color: var(--gold); }
.nav__logo .logo-svg { width: 94px; height: auto; display: block; }
.nav__logo-mark { color: var(--gold); }
.nav__links { display: flex; gap: 2.2rem; }
.nav__links a {
  color: var(--ink-dim); text-decoration: none;
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  position: relative; transition: color .3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s cubic-bezier(.77,0,.18,1);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: #1c1305; background: var(--gold);
  padding: .75rem 1.5rem; border-radius: 99px; text-decoration: none;
  transition: transform .3s, box-shadow .3s, background .3s;
}
.nav__cta:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(233,180,76,.35); background: #f3c45f; }
/* hamburger — hidden on desktop, shown ≤760px */
.nav__burger {
  display: none; width: 44px; height: 44px; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: none; border: 0; cursor: pointer;
}
.nav__burger span {
  display: block; width: 24px; height: 2px; border-radius: 2px;
  background: var(--ink);
  transition: transform .35s cubic-bezier(.77,0,.18,1), opacity .25s;
}
.nav__burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-active span:nth-child(2) { opacity: 0; }
.nav__burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* full-screen overlay menu — sits below the fixed nav bar (z<nav) so the
   logo and the close (X) stay tappable while it's open */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2.4rem; padding: 5rem 1.5rem; overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-100%);
  transition: transform .55s cubic-bezier(.77,0,.18,1), opacity .4s ease, visibility .55s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu__links { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.mobile-menu__links a {
  color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.8rem, 8vw, 2.6rem); letter-spacing: .01em;
  transition: color .3s;
}
.mobile-menu__links a:hover, .mobile-menu__links a:active { color: var(--gold); }
.mobile-menu__cta { margin-top: 1rem; }

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav .nav__cta { display: none; } /* beat the later touch-target rule */
  .nav__burger { display: flex; }
}

/* ═══════════ LAYOUT BASE ═══════════ */
main { position: relative; z-index: 3; }
.section { position: relative; z-index: 3; }

/* paper sheets — editorial panels floating over the 3D world */
.section--paper {
  background: var(--paper);
  color: var(--paper-ink);
  margin: clamp(.8rem, 2vw, 1.6rem);
  border-radius: clamp(20px, 3vw, 40px);
  box-shadow: 0 40px 120px rgba(0,0,0,.45);
}

.section-head { margin-bottom: clamp(3rem, 7vw, 5.5rem); }
.section-head__index {
  font-family: var(--font-mono); color: var(--gold);
  letter-spacing: .34em; font-size: .72rem; text-transform: uppercase;
  display: block; margin-bottom: 1.4rem;
}
.section--paper .section-head__index { color: var(--gold-deep); }
.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.6vw, 5.4rem);
  font-weight: 600; line-height: 1.04; letter-spacing: -0.015em;
  color: var(--ink);
}
.section--paper .section-head__title { color: var(--paper-ink); }
.section-head__title em, .fs__takeaway h3 em, .contact__title em {
  font-style: italic; font-weight: 500; color: var(--gold);
}
.section--paper .section-head__title em { color: var(--leaf); }
.section-head__sub {
  max-width: 48ch; margin-top: 1.6rem;
  color: var(--ink-dim); font-size: clamp(.95rem, 1.4vw, 1.08rem);
  line-height: 1.75;
}
.section--paper .section-head__sub { color: var(--paper-dim); }

/* ═══════════ BUTTONS ═══════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 1.05rem 2.2rem; border-radius: 99px;
  text-decoration: none; position: relative; overflow: hidden;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s, color .35s, border-color .35s, background .35s;
}
.btn span { position: relative; z-index: 1; }
.btn--primary { background: var(--gold); color: #1c1305; }
.btn--primary::before {
  content: ""; position: absolute; inset: 0;
  background: var(--paper); transform: translateY(101%);
  transition: transform .45s cubic-bezier(.77,0,.18,1);
}
.btn--primary:hover::before { transform: translateY(0); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(233,180,76,.3); }
.btn--ghost { color: var(--ink); border: 1px solid rgba(236,231,216,.3); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px); }
.section--paper .btn--ghost { color: var(--paper-ink); border-color: rgba(22,38,27,.3); }
.section--paper .btn--ghost:hover { border-color: var(--leaf); color: var(--leaf); }
.btn--xl { padding: 1.4rem 3.2rem; font-size: .86rem; }

/* ═══════════ HERO ═══════════ */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(1.4rem, 5vw, 4.5rem);
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 2.2rem;
  display: flex; align-items: center; gap: 1rem;
}
.hero__eyebrow::before { content: ""; width: 44px; height: 1px; background: var(--gold); }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10.5vw, 8.8rem);
  font-weight: 600; line-height: .98; letter-spacing: -0.02em;
}
/* padding keeps serif descenders (g, y) visible inside the reveal mask */
.hero__line { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.16em; }
.hero__line .word { display: inline-block; }
.hero__line--accent .word {
  font-style: italic; font-weight: 500; color: var(--gold);
}
.hero__sub {
  max-width: 44ch; margin-top: 2.4rem;
  color: var(--ink-dim); font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.78;
}
.hero__actions { display: flex; gap: 1.1rem; margin-top: 2.8rem; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 3rem; left: clamp(1.4rem, 5vw, 4.5rem);
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  font-family: var(--font-mono);
  font-size: .62rem; letter-spacing: .34em; text-transform: uppercase; color: var(--ink-dim);
}
.hero__scroll-line {
  width: 1px; height: 64px; background: rgba(236,231,216,.2);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0; background: var(--gold);
  animation: scrollLine 2.2s cubic-bezier(.77,0,.18,1) infinite;
}
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}
.hero__stats {
  position: absolute; bottom: 3rem; right: clamp(1.4rem, 5vw, 4.5rem);
  display: flex; gap: clamp(1.4rem, 3vw, 3rem);
}
.hero__stat { text-align: right; }
.hero__stat b {
  display: block; font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 2.1rem); font-weight: 600; color: var(--gold);
}
.hero__stat i {
  font-style: normal; font-family: var(--font-mono);
  font-size: .62rem; letter-spacing: .26em;
  text-transform: uppercase; color: var(--ink-dim);
}
@media (max-width: 760px) { .hero__stats { display: none; } }
@media (max-width: 1100px), (max-height: 860px) { .hero__scroll { display: none; } }

/* ═══════════ MARQUEE ═══════════ */
.marquee {
  position: relative; z-index: 3;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.3rem 0; overflow: hidden;
  background: rgba(11,21,16,.5); backdrop-filter: blur(6px);
}
.marquee__track {
  display: flex; white-space: nowrap; will-change: transform;
  font-family: var(--font-mono);
  font-size: clamp(.8rem, 1.3vw, 1rem);
  letter-spacing: .22em; text-transform: uppercase; color: var(--ink-dim);
}

/* ═══════════ MANIFESTO ═══════════ */
.manifesto {
  padding: clamp(7rem, 16vw, 13rem) clamp(1.4rem, 8vw, 9rem);
  display: flex; justify-content: center;
}
.manifesto__text {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.8vw, 3.3rem);
  font-weight: 500; line-height: 1.32; max-width: 26ch;
  letter-spacing: -0.01em;
}
.manifesto__text .w { opacity: .12; transition: opacity .3s; }

/* ═══════════ PLATFORM (paper) ═══════════ */
.platform { padding: clamp(5rem, 9vw, 8rem) clamp(1.4rem, 5vw, 4.5rem); }
.cards {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-paper); border-radius: 22px;
  padding: 2.4rem 2rem 2.6rem;
  background: var(--paper-card);
  transition: border-color .4s, transform .4s, box-shadow .4s;
  transform-style: preserve-3d;
}
.card:hover {
  border-color: rgba(46,122,64,.5);
  box-shadow: 0 24px 60px rgba(22,38,27,.12);
}
.card__num {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .32em; color: var(--paper-dim); margin-bottom: 2.4rem;
}
.card__icon { font-size: 2rem; color: var(--leaf); margin-bottom: 1.2rem; }
.card h3 {
  font-family: var(--font-display); font-size: 1.5rem;
  font-weight: 600; margin-bottom: .9rem; color: var(--paper-ink);
}
.card p { color: var(--paper-dim); font-size: .92rem; line-height: 1.7; }
.card__glow {
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,180,76,.22), transparent 65%);
  top: var(--gy, 50%); left: var(--gx, 50%);
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.card:hover .card__glow { opacity: 1; }

/* — bento layout — */
.bento { grid-template-columns: repeat(12, 1fr); }
.card--cc { grid-column: span 7; grid-row: span 2; display: flex; flex-direction: column; }
.card--ai { grid-column: span 5; display: flex; flex-direction: column; }
.card--sched { grid-column: span 5; }
.card--scada, .card--edge, .card--cruise {
  grid-column: span 4;
  display: flex; flex-direction: column;
}
.card--scada .card__viz, .card--edge .card__viz, .card--cruise .card__viz {
  margin-top: auto;
}
.card--scada p, .card--edge p, .card--cruise p { margin-bottom: 1.6rem; }
@media (max-width: 1100px) {
  .card--cc { grid-column: span 12; grid-row: auto; }
  .card--ai, .card--sched { grid-column: span 12; }
  .card--scada, .card--edge { grid-column: span 6; }
  .card--cruise { grid-column: span 12; }
  .card--cruise .card__viz svg { max-width: 560px; margin: 0 auto; }
}
@media (max-width: 700px) {
  .card--scada, .card--edge { grid-column: span 12; }
}
.bento .card__num { margin-bottom: 1.4rem; }
.bento h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }

/* dark instrument insets on paper cards */
.card__viz {
  margin-top: 1.6rem;
  background: linear-gradient(170deg, #14241a, #0c1812);
  border-radius: 16px;
  padding: .7rem .8rem;
}
.card__viz svg { display: block; width: 100%; height: auto; }

/* — command center mini app — */
.cc {
  margin-top: 1.8rem; flex: 1;
  background: linear-gradient(170deg, #14241a, #0b1510);
  border-radius: 18px;
  display: flex; flex-direction: column;
  overflow: hidden;
  min-height: 320px;
}
.cc__bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .8rem 1.1rem;
  border-bottom: 1px solid rgba(233,180,76,.14);
}
.cc__bar i {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(242,238,227,.18);
}
.cc__bar i:first-child { background: rgba(233,180,76,.7); }
.cc__title {
  margin-left: .6rem;
  font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .22em; color: var(--ink-dim);
}
.cc__live {
  margin-left: auto;
  font-family: var(--font-mono); font-size: .56rem;
  letter-spacing: .2em; color: var(--gold);
  display: inline-flex; align-items: center; gap: .4rem;
}
.cc__live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.cc__grid {
  flex: 1; display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 1rem; padding: 1.1rem; align-items: center;
}
@media (max-width: 520px) { .cc__grid { grid-template-columns: 1fr; } }
.cc__fieldsvg { width: 100%; height: auto; max-height: 270px; }
.cc__side { display: flex; flex-direction: column; gap: .85rem; min-width: 0; }
.cc__metric { display: flex; align-items: baseline; gap: .7rem; }
.cc__metric b {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.4rem, 2vw, 1.9rem); color: var(--ink);
  font-variant-numeric: tabular-nums; min-width: 3.2ch;
}
.cc__metric > span:last-child {
  font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-dim);
}
.cc__feed {
  margin-top: .4rem; padding-top: .8rem;
  border-top: 1px solid rgba(233,180,76,.14);
  font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .06em; color: var(--ink-dim);
  line-height: 1.9; min-height: 5.7em;
}
.cc__feed div:first-child { color: var(--gold); }
.cc__feed .is-new { animation: feedIn .45s ease both; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* — AI reasoning feed — */
.aiviz { flex: 1; padding: 1rem 1.1rem; min-height: 170px; display: flex; flex-direction: column; }
.aiviz__head { margin-bottom: .7rem; }
.aiviz__lines {
  font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .04em; color: var(--ink-dim); line-height: 2.05;
}
.aiviz__lines div:first-child { color: var(--gold); }
.aiviz__lines .is-new { animation: feedIn .45s ease both; }

/* ═══════════ AUTONOMY (dark, horizontal) ═══════════ */
.autonomy { position: relative; z-index: 3; }
.autonomy__pin {
  height: 100vh; display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; padding-left: clamp(1.4rem, 5vw, 4.5rem);
}
.autonomy__head { margin-bottom: clamp(2rem, 5vh, 4rem); }
.autonomy__track {
  display: flex; gap: clamp(1.2rem, 3vw, 2.4rem);
  will-change: transform; width: max-content;
  padding-right: clamp(1.4rem, 5vw, 4.5rem);
}
.a-step {
  width: clamp(300px, 36vw, 460px);
  border: 1px solid var(--line); border-radius: 26px;
  padding: 2rem 2rem 2.6rem;
  background: linear-gradient(165deg, rgba(20,34,24,.85), rgba(10,18,13,.92));
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}
.a-step__viz {
  background: rgba(8,15,11,.7);
  border: 1px solid rgba(233,180,76,.12);
  border-radius: 16px;
  padding: .5rem .7rem;
  margin-bottom: 1.5rem;
}
.a-step__viz svg { display: block; width: 100%; height: auto; }
.a-step__n {
  font-family: var(--font-mono); color: var(--gold);
  letter-spacing: .3em; font-size: .68rem; text-transform: uppercase;
}
.a-step h3 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 600;
  margin: 1rem 0 .9rem; color: var(--ink);
}
.a-step p { color: var(--ink-dim); line-height: 1.75; font-size: .94rem; }

/* ═══════════ RESULTS (dark, satellite view behind) ═══════════ */
.results { padding: clamp(5rem, 10vw, 9rem) clamp(1.4rem, 5vw, 4.5rem); }
.results__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem; margin-bottom: clamp(3.5rem, 7vw, 6rem);
}
.stat {
  border: 1px solid var(--line); border-radius: 22px;
  padding: 2.6rem 2rem;
  background: rgba(11,21,16,.66); backdrop-filter: blur(10px);
}
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.5vw, 5.2rem); font-weight: 600;
  color: var(--gold); line-height: 1;
}
.stat__value sup { font-size: .45em; }
.stat__label {
  margin-top: 1.1rem; color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
}
.results__quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  font-weight: 500; line-height: 1.4; max-width: 30ch;
}
.results__quote em { font-style: italic; color: var(--gold); }
.results__quote cite {
  display: block; margin-top: 1.6rem;
  font-family: var(--font-mono); font-style: normal;
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-dim);
}

/* ═══════════ FIELD STUDY (paper — like the printed study) ═══════════ */
.fieldstudy { padding: clamp(5rem, 9vw, 8rem) clamp(1.4rem, 5vw, 4.5rem); }

.fs {
  display: grid; gap: clamp(1.4rem, 3vw, 2.6rem);
  grid-template-columns: minmax(300px, 5fr) minmax(320px, 7fr);
  align-items: start;
}
@media (max-width: 980px) { .fs { grid-template-columns: 1fr; } }

.fs__pivots { display: flex; gap: .8rem; margin-bottom: 1.6rem; }
.fs__pivot {
  flex: 1; text-align: left; cursor: none;
  background: var(--paper-card); color: var(--paper-ink);
  border: 1px solid var(--line-paper); border-radius: 16px;
  padding: 1.1rem 1.3rem;
  transition: border-color .35s, background .35s, transform .35s, color .35s;
}
.fs__pivot:hover { transform: translateY(-2px); }
.fs__pivot.is-active {
  border-color: var(--paper-ink);
  background: var(--paper-ink);
  color: var(--paper);
}
.fs__pivot b {
  display: block; font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600; letter-spacing: .01em;
}
.fs__pivot i {
  display: block; font-style: normal; margin-top: .4rem;
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .1em; color: var(--paper-dim);
}
.fs__pivot.is-active i { color: var(--gold); }

.fs__indices { display: flex; flex-direction: column; gap: .7rem; }
.fs__index {
  position: relative; text-align: left; cursor: none;
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  column-gap: 1rem;
  background: var(--paper-card); color: var(--paper-ink);
  border: 1px solid var(--line-paper); border-radius: 16px;
  padding: 1.05rem 1.3rem;
  transition: border-color .35s, background .35s;
}
.fs__index:hover { border-color: rgba(46,122,64,.45); }
.fs__index.is-active { border-color: var(--leaf); background: #fffdf6; box-shadow: 0 14px 40px rgba(22,38,27,.1); }
.fs__index-name {
  font-family: var(--font-mono); font-weight: 600;
  font-size: .95rem; letter-spacing: .14em;
}
.fs__index-pct {
  font-family: var(--font-display); font-weight: 600;
  color: var(--leaf); font-size: 1.15rem;
}
.fs__index-desc {
  grid-column: 1 / -1; margin-top: .4rem;
  font-family: var(--font-body); font-size: .8rem;
  line-height: 1.55; color: var(--paper-dim);
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .45s cubic-bezier(.77,0,.18,1), opacity .45s, margin-top .45s;
}
.fs__index:not(.is-active) .fs__index-desc { margin-top: 0; }
.fs__index.is-active .fs__index-desc { max-height: 5em; opacity: 1; }

/* comparison viewer — printed-study look on paper */
.fs__visual {
  min-width: 0;
  background: var(--paper-card);
  border: 1px solid var(--line-paper);
  border-radius: 28px;
  padding: clamp(1.6rem, 3vw, 2.6rem);
}
.fs__compare {
  position: relative; width: min(100%, 500px);
  aspect-ratio: 1; margin: 0 auto;
  border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(22,38,27,.5);
  outline: 1px solid rgba(22,38,27,.18);
  outline-offset: 10px;
  box-shadow: 0 30px 70px rgba(22,38,27,.18);
  touch-action: none; user-select: none;
}
.fs__img { position: absolute; inset: 0; }
.fs__img img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  filter: saturate(1.08);
  display: block; pointer-events: none;
}
.fs__img--after { clip-path: inset(0 0 0 var(--split, 50%)); }
.fs__divider {
  position: absolute; top: 0; bottom: 0; left: var(--split, 50%);
  width: 2px; background: var(--gold);
  transform: translateX(-1px);
  box-shadow: 0 0 14px rgba(233,180,76,.8);
}
/* Handle centered with the absolute + auto-margin technique, anchored to
   .fs__compare (its square aspect-ratio size renders identically in every
   engine). Avoids percentage-height / flex cross-axis sizing, which Firefox
   resolved differently from Chromium and left the handle above center. */
.fs__handle {
  position: absolute;
  top: 0; bottom: 0;                 /* span the circle's height */
  left: var(--split, 50%);           /* follow the split line */
  margin: auto 0;                    /* auto top+bottom → exact vertical center */
  transform: translateX(-50%);       /* center the handle on the line */
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gold); color: #1c1305;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(22,38,27,.35);
}
.fs__handle svg { display: block; }
/* labels live BELOW the circle so they are never clipped by it */
.fs__taglabels {
  display: flex; justify-content: space-between; gap: .8rem;
  width: min(100%, 500px); margin: 1.3rem auto 0;
  flex-wrap: wrap;
}
.fs__tag {
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .14em; text-transform: uppercase;
  padding: .55rem 1rem; border-radius: 99px;
  background: rgba(22,38,27,.88);
  border: 1px solid rgba(242,238,227,.2); color: var(--paper);
  white-space: nowrap;
}
.fs__tag--after { border-color: rgba(233,180,76,.6); color: var(--gold); }
@media (max-width: 480px) {
  .fs__taglabels { justify-content: center; }
}

.fs__readout {
  display: flex; align-items: baseline; justify-content: center;
  gap: 1.6rem; margin-top: 2rem; flex-wrap: wrap;
}
.fs__delta {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(3.4rem, 7vw, 5.4rem); line-height: 1; color: var(--leaf);
}
.fs__delta sup { font-size: .42em; }
.fs__values { display: flex; flex-direction: column; gap: .35rem; }
.fs__values span {
  font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 600; letter-spacing: .02em; color: var(--paper-ink);
}
.fs__values i {
  font-style: normal; color: var(--paper-dim);
  font-family: var(--font-mono);
  font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
}

/* takeaway — the dark closing slide of the study */
.fs__takeaway {
  margin-top: clamp(3.5rem, 7vw, 6rem);
  border-radius: 28px;
  padding: clamp(2.4rem, 5vw, 4.5rem);
  background:
    radial-gradient(800px 320px at 12% 0%, rgba(233,180,76,.1), transparent 60%),
    linear-gradient(165deg, #14241a, #0b1510);
  color: var(--ink);
}
.fs__takeaway h3 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.7rem); font-weight: 600; line-height: 1.08;
}
.fs__takeaway p { color: var(--ink-dim); margin-top: 1.1rem; max-width: 52ch; line-height: 1.7; }
.fs__summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem; margin-top: 2.2rem;
}
.fs__sum {
  border-top: 1px solid rgba(233,180,76,.3);
  padding-top: .9rem;
  display: flex; justify-content: space-between; align-items: baseline; gap: .6rem;
}
.fs__sum b {
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .2em; color: var(--ink);
}
.fs__sum span { font-family: var(--font-display); color: var(--gold); font-weight: 600; }
.fs__note {
  display: block; margin-top: 2rem;
  color: var(--ink-dim); font-size: .72rem; letter-spacing: .06em; line-height: 1.6;
  font-family: var(--font-mono);
}

/* ═══════════ OEM (dark) ═══════════ */
.oem { padding: clamp(5rem, 10vw, 9rem) clamp(1.4rem, 5vw, 4.5rem); }
.oem__inner {
  border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(2.6rem, 7vw, 6rem);
  background:
    radial-gradient(900px 380px at 85% 0%, rgba(233,180,76,.1), transparent 60%),
    linear-gradient(165deg, rgba(18,31,22,.88), rgba(10,18,13,.94));
  backdrop-filter: blur(10px);
}
.oem .btn { margin-top: 2.4rem; }

/* ═══════════ PRICING (paper) ═══════════ */
.pricing { padding: clamp(5rem, 9vw, 8rem) clamp(1.4rem, 5vw, 4.5rem); }
.pricing__grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  align-items: stretch;
}
.price-card {
  position: relative;
  border: 1px solid var(--line-paper); border-radius: 26px;
  padding: 2.8rem 2.3rem;
  background: var(--paper-card);
  display: flex; flex-direction: column;
  transition: transform .4s, border-color .4s, box-shadow .4s;
}
.price-card:hover { border-color: rgba(46,122,64,.45); box-shadow: 0 24px 60px rgba(22,38,27,.12); }
.price-card h3 {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 600;
  color: var(--paper-ink);
}
.price-card__desc { color: var(--paper-dim); font-size: .92rem; line-height: 1.65; margin: 1rem 0 1.8rem; }
.price-card ul { list-style: none; margin-bottom: 2.4rem; flex: 1; }
.price-card li {
  padding: .65rem 0; color: var(--paper-dim); font-size: .92rem;
  border-bottom: 1px solid rgba(22,38,27,.08);
  display: flex; align-items: center; gap: .7rem;
}
.price-card li::before { content: "✦"; color: var(--gold-deep); font-size: .7rem; }

/* featured tier — inverted: deep forest on paper */
.price-card--featured {
  background: linear-gradient(170deg, #16281c, #0b1510);
  border-color: #16281c;
  box-shadow: 0 30px 80px rgba(22,38,27,.35);
}
.price-card--featured h3 { color: var(--ink); }
.price-card--featured .price-card__desc { color: var(--ink-dim); }
.price-card--featured li { color: var(--ink-dim); border-bottom-color: rgba(233,180,76,.14); }
.price-card--featured li::before { color: var(--gold); }
.price-card__badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #1c1305;
  font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .2em; text-transform: uppercase;
  padding: .45rem 1.2rem; border-radius: 99px; white-space: nowrap;
}

/* ═══════════ CONTACT (dark) ═══════════ */
.contact {
  min-height: 92vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6rem clamp(1.4rem, 5vw, 4.5rem);
}
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7.6vw, 6.6rem);
  font-weight: 600; line-height: 1.06; letter-spacing: -0.015em;
  margin-bottom: 2.6rem;
}
.contact__line { display: block; overflow: hidden; }
.contact__mail {
  color: var(--ink-dim); text-decoration: none;
  font-family: var(--font-mono);
  font-size: clamp(.9rem, 1.8vw, 1.15rem); letter-spacing: .1em;
  margin-bottom: 2.8rem; transition: color .3s;
}
.contact__mail:hover { color: var(--gold); }

/* ═══════════ FOOTER ═══════════ */
.footer {
  position: relative; z-index: 3;
  border-top: 1px solid var(--line);
  background: rgba(9,17,12,.88); backdrop-filter: blur(12px);
  padding: clamp(3rem, 6vw, 5rem) clamp(1.4rem, 5vw, 4.5rem) 2rem;
}
.footer__top {
  display: grid; gap: 2.5rem;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  margin-bottom: 3.5rem;
}
@media (max-width: 1100px) { .footer__top { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 700px) { .footer__top { grid-template-columns: 1fr 1fr; } }
.footer__brand { color: var(--ink); }
.footer__brand .logo-svg--footer { width: 108px; height: auto; display: block; }
.footer__brand p {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  color: var(--ink-dim); margin-top: 1.1rem; font-size: 1rem;
}
.footer__addr {
  margin-top: 1.3rem;
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .05em; line-height: 1.9; color: var(--ink-dim);
}
.footer__sectors {
  display: flex; flex-direction: column; gap: .7rem;
  margin-top: 1.6rem; max-width: 260px;
}
.sector-card {
  display: block; text-decoration: none;
  background: rgba(20, 34, 24, .7);
  border: 1px solid var(--line); border-radius: 14px;
  padding: .85rem 1.1rem;
  transition: border-color .3s, transform .3s;
}
.sector-card:hover { border-color: var(--gold); transform: translateX(4px); }
.sector-card b {
  display: block;
  font-family: var(--font-mono); font-weight: 500;
  font-size: .6rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: .3rem;
}
.sector-card span {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.02rem; color: var(--ink);
}
.footer__col h4 {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem;
}
.footer__col a {
  display: block; color: var(--ink-dim); text-decoration: none;
  font-size: .9rem; padding: .35rem 0; transition: color .3s, transform .3s;
}
.footer__col a:hover { color: var(--ink); transform: translateX(4px); }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding-top: 2rem; border-top: 1px solid rgba(233,180,76,.1);
  color: var(--ink-dim); font-family: var(--font-mono);
  font-size: .66rem; letter-spacing: .12em;
}

/* ═══════════ CONTACT MODAL ═══════════ */
.modal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(8, 15, 11, .65);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem;
  opacity: 0; pointer-events: none;
  transition: opacity .35s cubic-bezier(.2,0,0,1);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 2.4rem);
  overflow-y: auto;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 28px;
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: 0 50px 140px rgba(0,0,0,.55);
  transform: translateY(26px) scale(.97);
  transition: transform .45s cubic-bezier(.34,1.3,.5,1);
}
.modal.is-open .modal__card { transform: none; }
.modal__close {
  position: absolute; top: 1.1rem; right: 1.1rem;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-paper); background: var(--paper-card);
  color: var(--paper-ink); font-size: 1rem; cursor: pointer;
  transition: background .3s, transform .3s;
}
.modal__close:hover { background: var(--paper-ink); color: var(--paper); transform: rotate(90deg); }
.modal__eyebrow {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .3em; text-transform: uppercase; color: var(--gold-deep);
}
.modal__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.05;
  margin: .7rem 0 .6rem;
}
.modal__title em { font-style: italic; font-weight: 500; color: var(--leaf); }
.modal__desc { color: var(--paper-dim); font-size: .92rem; line-height: 1.65; margin-bottom: 1.8rem; }
.field { position: relative; margin-bottom: 1rem; }
.field input, .field textarea {
  width: 100%; min-height: 52px;
  background: var(--paper-card);
  border: 1px solid var(--line-paper); border-radius: 14px;
  padding: 1.35rem 1.1rem .55rem;
  font-family: var(--font-body); font-size: .95rem; color: var(--paper-ink);
  transition: border-color .3s, background .3s;
  resize: none;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--leaf); background: #fffdf6;
}
.field label {
  position: absolute; left: 1.1rem; top: 1rem;
  font-family: var(--font-mono); font-size: .8rem;
  letter-spacing: .06em; color: var(--paper-dim);
  pointer-events: none; transition: all .25s ease;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: .45rem; font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--leaf);
}
.modal__submit { width: 100%; margin-top: .6rem; border: none; cursor: pointer; font-size: .8rem; }
.modal__status {
  margin-top: .9rem; text-align: center;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em;
  min-height: 1.2em;
}
.modal__status.is-ok { color: var(--leaf); }
.modal__status.is-err { color: #b3473b; }

/* ═══════════ REVEALS ═══════════ */
.reveal-line { opacity: 0; }

/* ═══════════════════════════════════════════
   APPLE HIG REFINEMENTS
   clarity · deference · depth · accessibility
   ═══════════════════════════════════════════ */

/* — Legibility floor: no text below ~11pt — */
.cc__title { font-size: .68rem; }
.cc__live { font-size: .66rem; }
.cc__metric > span:last-child { font-size: .68rem; }
.cc__feed { font-size: .72rem; line-height: 1.85; }
.aiviz__lines { font-size: .74rem; }
.fs__tag { font-size: .66rem; }
.fs__pivot i { font-size: .7rem; }
.fs__values i { font-size: .7rem; }
.fs__note { font-size: .76rem; }
.fs__sum b { font-size: .74rem; }
.price-card__badge { font-size: .66rem; }
.footer__bottom { font-size: .72rem; }
.stat__label { font-size: .72rem; }
.a-step__n { font-size: .7rem; }
.card__num { font-size: .72rem; }
.hero__stat i { font-size: .66rem; }
.hero__scroll { font-size: .66rem; }
.preloader__pct { font-size: .78rem; }

/* — Touch targets: minimum 44pt — */
.btn { min-height: 44px; }
.nav__cta { min-height: 44px; display: inline-flex; align-items: center; }
.fs__pivot, .fs__index { min-height: 48px; }
.nav__links a { padding: .6rem 0; }

/* — Pointer affordance: never hide the system cursor on controls — */
.fs__pivot, .fs__index { cursor: pointer; }
a, button { cursor: pointer; }

/* — Focus visibility (keyboard navigation) — */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
.section--paper :focus-visible { outline-color: var(--leaf); }
.btn:focus-visible, .nav__cta:focus-visible,
.fs__pivot:focus-visible, .fs__index:focus-visible { border-radius: 99px; }
.fs__pivot:focus-visible, .fs__index:focus-visible { border-radius: 16px; }

/* — Materials: translucency with vibrancy (blur + saturate) — */
.nav.is-scrolled {
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
}
.marquee {
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

/* — Safe areas (notched devices) — */
.nav {
  padding-left: max(clamp(1.4rem, 4vw, 3.4rem), env(safe-area-inset-left));
  padding-right: max(clamp(1.4rem, 4vw, 3.4rem), env(safe-area-inset-right));
}
.footer {
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

/* — Reduced motion: honor the user's setting — */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .grain { animation: none !important; opacity: .03; }
  .hero__scroll-line::after { animation: none !important; }
  .cursor, .cursor-dot { display: none; }
}

/* — Contact form: reCAPTCHA widget placement — */
.field--captcha { display: flex; justify-content: center; margin-bottom: 1rem; }
@media (max-width: 360px) {
  .field--captcha { transform: scale(.86); transform-origin: center; }
}
