/* ============================================================
   SERAPHIN — design system (LIGHT)
   White ground, carbon ink, one signal red, engineering precision.
   No shadows. No gradients. No radius.

   Inverted from the original carbon build: the near-black that was
   the ground is now the ink, so the brand's core colour is retained
   as the thing you actually read.
   ============================================================ */

:root{
  --bg:#FFFFFF;         /* the ground */
  --surface:#F4F5F7;    /* raised / recessed sections */
  --surface-2:#EAECF0;  /* hover */
  --well:#F0F1F3;       /* image wells */
  --ink:#0B0C0E;        /* was the ground, now the ink */
  --muted:#6B7178;      /* 4.9:1 on white — above AA, verified */
  --line:#DEE1E6;       /* every rule */
  --red:#ED1C24;        /* the signal — fills only */
  --red-ink:#C41219;    /* text-safe red, 6.1:1 on white */
  --red-hi:#FF2F36;

  --display:"Archivo","Helvetica Neue",system-ui,sans-serif;
  --body:"Manrope","Helvetica Neue",system-ui,sans-serif;

  --wrap:1180px;
  --bleed:clamp(1.5rem,4.5vw,3.5rem);

  --s-eyebrow:.7rem;
  --s-small:.86rem;
  --s-body:1.02rem;
  --s-lead:clamp(1.1rem,1.5vw,1.35rem);
  --s-h3:clamp(1.2rem,2vw,1.45rem);
  --s-h2:clamp(1.9rem,3.6vw,3rem);
  --s-h1:clamp(2.6rem,7vw,6.4rem);

  /* Interior rhythm — scaled up across the board. Section padding was
     already generous (Apple runs 144/216px); what read as cramped was
     the space *inside* components, so these move furthest. */
  --gap-sm:20px;
  --gap-md:40px;
  --gap-lg:80px;
  --gap-xl:clamp(120px,15vw,224px);
  --gap-2xl:clamp(160px,21vw,320px);

  /* Header */
  --top-h:104px;
}

/* ---------- surface texture ----------
   HOOK: the carbon twill lived here. Neutralised pending the new
   background reference. Set --tex-image and --tex-opacity to bring a
   texture back — every .tex / .tex-weave surface reads from these two
   tokens, so it is a one-place change. */
:root{
  --tex-image:url("../img/carbon-weave2.webp");
  --tex-opacity:.05;
  --tex-size:cover;
}

*{box-sizing:border-box}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--body);
  font-size:var(--s-body);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

h1,h2,h3,h4{
  font-family:var(--display);
  font-weight:800;
  line-height:1.0;
  letter-spacing:-.025em;
  margin:0;
}
h1{font-size:var(--s-h1);line-height:.95;letter-spacing:-.035em}
h2{font-size:var(--s-h2)}
h3{font-size:var(--s-h3);letter-spacing:-.015em}
p{margin:0}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

:focus-visible{outline:2px solid var(--red);outline-offset:3px}

.sr-skip{position:absolute;left:-9999px}
.sr-skip:focus{left:0;top:0;background:var(--red);color:#fff;padding:.85rem 1.4rem;z-index:200;font-weight:700}

.wrap{max-width:var(--wrap);margin-inline:auto;padding-inline:var(--bleed)}

/* ---------- texture helpers ---------- */
.tex{position:relative;isolation:isolate}
.tex::before{
  content:"";position:absolute;inset:0;z-index:-1;
  background-image:var(--tex-image);
  background-size:var(--tex-size);
  opacity:var(--tex-opacity);
  pointer-events:none;
}
.tex-strong::before{opacity:calc(var(--tex-opacity) * 2)}

/* Panel that should read as a distinct material surface. */
.tex-weave{position:relative;isolation:isolate;background:var(--surface)}
.tex-weave::before{
  content:"";position:absolute;inset:0;z-index:-1;
  background-image:var(--tex-image);
  background-size:var(--tex-size);
  opacity:var(--tex-opacity);
}

/* ---------- type helpers ---------- */
.eyebrow{
  font-family:var(--display);
  font-size:var(--s-eyebrow);
  font-weight:700;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--red-ink);
  margin:0 0 1.9rem;
}
.eyebrow-muted{color:var(--muted)}
.lead{font-size:var(--s-lead);color:var(--muted);line-height:1.5;max-width:46ch}
.measure{max-width:52ch}
.muted{color:var(--muted)}

/* the signature: italic spec figure */
.fig{
  font-family:var(--display);
  font-weight:800;
  font-style:italic;
  letter-spacing:-.03em;
  line-height:1;
  display:block;
}
.fig .unit{
  font-family:var(--body);
  font-style:normal;
  font-weight:400;
  font-size:.34em;
  color:var(--muted);
  margin-left:.28rem;
  letter-spacing:0;
}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:56px;padding:0 2rem;
  font-family:var(--display);
  font-size:.78rem;font-weight:800;
  letter-spacing:.1em;text-transform:uppercase;
  border:1px solid transparent;border-radius:0;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,color .18s ease;
}
.btn-primary{background:var(--red);color:#fff}
.btn-primary:hover{background:var(--red-hi)}
.btn-ghost{border-color:var(--ink);color:var(--ink);background:transparent}
.btn-ghost:hover{background:var(--ink);color:#fff}
.btn-sm{min-height:44px;padding:0 1.25rem;font-size:.72rem}

/* ---------- header ----------
   Homepage: 100% transparent and stuck to the top for the whole scroll —
   no glass, no fill, no texture, ever (user call, 2 Aug). The footage runs
   under it and the nav floats on top.
   Inner pages: NOT sticky (.s-static) — the bar scrolls away with the page
   and carries the solid carbon fill so the white nav stays legible. */
.s-top{
  position:fixed;top:0;left:0;right:0;z-index:50;
  background:transparent;
  border-bottom:1px solid transparent;
  isolation:isolate;
  transition:background .3s ease,border-color .3s ease;
}
body.admin-bar .s-top{ top:32px }
.s-top::before{
  content:"";position:absolute;inset:0;z-index:-1;
  background-image:var(--tex-image);
  background-size:cover;background-position:50% 32%;
  opacity:0;pointer-events:none;
  transition:opacity .3s ease;
}
/* Homepage: fully transparent at EVERY scroll depth. .is-scrolled is still
   set by chrome.js for other consumers, but it must not paint the bar. */
.s-top.is-scrolled{
  background:transparent;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  border-bottom-color:transparent;
}
.s-top.is-scrolled::before{ opacity:0 }
/* Inner pages: static (scrolls away) + solid bar. */
.s-top.s-static{
  position:static;
  background:rgba(11,12,14,.94);
  border-bottom-color:rgba(242,243,244,.1);
}
.s-top.s-static::before{ opacity:.16 }
.s-top.s-solid{
  background:rgba(11,12,14,.88);
  backdrop-filter:saturate(160%) blur(14px);
  -webkit-backdrop-filter:saturate(160%) blur(14px);
  border-bottom-color:rgba(242,243,244,.1);
}
.s-top.s-solid::before{ opacity:.16 }
.s-top .wrap{
  display:flex;align-items:center;
  gap:clamp(2rem,5vw,4rem);
  min-height:var(--top-h);
}
.s-logo{display:flex;align-items:center}
.s-logo img{height:26px;width:auto}
.s-nav{display:none;gap:clamp(1.9rem,2.9vw,2.75rem);margin-left:auto}
@media(min-width:980px){.s-nav{display:flex}}
.s-nav a{
  font-family:var(--display);
  font-size:.76rem;font-weight:700;
  letter-spacing:.1em;text-transform:uppercase;
  color:rgba(242,243,244,.78);
  padding:.7rem 0;border-bottom:2px solid transparent;
  transition:color .15s,border-color .15s;
}
.s-nav a:hover,.s-nav a[aria-current="page"]{color:#fff;border-bottom-color:var(--red)}

/* content clears the fixed bar — except cinematic-first pages, which run under it */
body:not(.home) #main{ padding-top:var(--top-h) }
body.page-template-page-cinematic #main{ padding-top:0 }

/* mobile nav, no JS */
.s-mnav{position:relative;margin-left:auto}
@media(min-width:980px){.s-mnav{display:none}}
.s-mnav summary{
  list-style:none;cursor:pointer;
  display:inline-flex;align-items:center;gap:.6rem;
  min-height:48px;padding:.5rem 1.1rem;
  border:1px solid rgba(242,243,244,.3);
  color:#F2F3F4;
  font-family:var(--display);font-size:.72rem;font-weight:700;
  letter-spacing:.1em;text-transform:uppercase;
  user-select:none;
}
.s-mnav summary::-webkit-details-marker{display:none}
.s-mnav[open] summary{border-color:#F2F3F4}
.s-mnav-ic{width:15px;height:11px;position:relative;display:inline-block}
.s-mnav-ic::before,.s-mnav-ic::after,.s-mnav-ic i{content:"";position:absolute;left:0;right:0;height:1.5px;background:currentColor}
.s-mnav-ic::before{top:0}.s-mnav-ic i{top:5px}.s-mnav-ic::after{bottom:0}
.s-mnav-panel{
  position:absolute;right:0;top:calc(100% + .7rem);min-width:240px;
  background:var(--bg);border:1px solid var(--line);z-index:60;
}
.s-mnav-panel a{display:block;padding:1.05rem 1.35rem;border-bottom:1px solid var(--line);font-size:.95rem}
.s-mnav-panel a:last-child{border-bottom:0}
.s-mnav-panel a:hover{background:var(--surface)}

/* ---------- sections ---------- */
.sec{padding:var(--gap-xl) 0}
.sec-air{padding:var(--gap-2xl) 0}
.sec-line{border-top:1px solid var(--line)}
.sec-surface{background:var(--surface)}
.head{max-width:52ch;margin-bottom:clamp(5.5rem,9.5vw,9rem)}
.head h2{margin-bottom:2.25rem}
.head p{color:var(--muted)}

/* ---------- spec strip ---------- */
.strip{background:var(--surface);border-block:1px solid var(--line);position:relative;isolation:isolate}
.strip::before{
  content:"";position:absolute;inset:0;z-index:-1;
  background-image:var(--tex-image);background-size:cover;
  opacity:.05;pointer-events:none;
}
.strip-grid{display:grid;grid-template-columns:repeat(2,1fr)}
@media(min-width:880px){.strip-grid{grid-template-columns:repeat(3,1fr)}}
.strip .cell{padding:clamp(3.25rem,5.5vw,5rem) clamp(2rem,3.4vw,3.25rem) clamp(3.25rem,5.5vw,5rem) 0;border-right:1px solid var(--line)}
.strip .cell:last-child{border-right:0}
@media(max-width:879px){
  .strip .cell:nth-child(2n){border-right:0}
  .strip .cell:nth-child(-n+2){border-bottom:1px solid var(--line)}
}
.strip .fig{font-size:clamp(2rem,3.8vw,3.1rem)}
.strip .cap{display:block;margin-top:1.15rem;font-size:var(--s-small);color:var(--muted);max-width:24ch;line-height:1.5}

/* ---------- range grid ---------- */
.range{display:grid;gap:1px;background:var(--line);border:1px solid var(--line)}
@media(min-width:700px){.range{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1040px){.range{grid-template-columns:repeat(3,1fr)}}
.card{background:var(--bg);padding:clamp(2.5rem,3.6vw,3.75rem);display:flex;flex-direction:column;transition:background .2s}
.card:hover{background:var(--surface)}
.card-img{
  aspect-ratio:5/4;
  background:var(--well);
  margin-bottom:2.4rem;overflow:hidden;
}
.card-img img{width:100%;height:100%;object-fit:cover}
.card h3{margin-bottom:.6rem}
.card .line{font-size:var(--s-small);color:var(--muted);margin-bottom:2rem}
.card dl{display:flex;gap:2.5rem;margin:0 0 2rem}
.card dt{font-size:.62rem;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-bottom:.35rem}
.card dd{margin:0;font-family:var(--display);font-weight:700;font-style:italic;font-size:1.22rem;letter-spacing:-.02em}
.card .price{margin-top:auto;font-family:var(--display);font-size:.82rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}

/* ---------- feature rows ----------
   One main system per full-width row (user call, 2 Aug — replaces the 4-up
   box grid). NO dark carbon well and no border (user call, 2 Aug): the
   component sits directly on the page, and each one animates — current
   flowing through the battery, the motor spinning, the wheel turning, the
   joystick rocking. Sides alternate per row.
   Reveal still rides .feat-box -> .in from chrome.js. */
.feat-rows{display:grid;gap:clamp(6rem,11vw,10.5rem)}
.feat-box{
  margin:0;
  display:grid;gap:clamp(2.75rem,5vw,4.5rem);align-items:center;
  opacity:0;transform:translateY(28px);
  transition:opacity .7s ease,transform .7s ease;
}
.feat-box.in{opacity:1;transform:none}
@media(min-width:900px){
  .feat-box{grid-template-columns:1.08fr 1fr}
  .feat-box:nth-child(even) .feat-box-img{order:2}
}
.feat-box-img{
  position:relative;isolation:isolate;
  background:none;border:0;
  display:flex;align-items:center;justify-content:center;
  min-height:clamp(320px,42vw,520px);padding:clamp(1.5rem,3vw,3rem);
}
.feat-box-img img{
  position:relative;z-index:1;
  max-height:clamp(260px,34vw,420px);width:auto;max-width:100%;
}

/* --- component animations ---------------------------------------------
   Each runs only while the row is in view (.in) so they are not burning
   frames off-screen, and all of them stop under prefers-reduced-motion. */

/* Wheel + motor: continuous rotation. */
.feat-box.in .feat-spin img{ animation:feat-spin 9s linear infinite }
.feat-box.in .feat-spin-fast img{ animation:feat-spin 3.2s linear infinite }
@keyframes feat-spin{ to{ transform:rotate(360deg) } }

/* Joystick: rocks forward and back, pivoting at its base. */
.feat-box.in .feat-rock img{
  transform-origin:50% 88%;
  animation:feat-rock 3.4s ease-in-out infinite;
}
@keyframes feat-rock{
  0%,100%{ transform:rotate(0deg) }
  25%{ transform:rotate(-9deg) }
  75%{ transform:rotate(9deg) }
}

/* Battery: a charge pulse sweeps up the pack, plus a soft glow breathing. */
.feat-charge{ overflow:hidden }
.feat-charge::after{
  content:"";position:absolute;z-index:2;left:0;right:0;height:38%;
  background:linear-gradient(180deg,
    rgba(120,220,255,0) 0%,
    rgba(120,220,255,.30) 45%,
    rgba(190,240,255,.55) 50%,
    rgba(120,220,255,.30) 55%,
    rgba(120,220,255,0) 100%);
  mix-blend-mode:screen;pointer-events:none;opacity:0;
}
.feat-box.in .feat-charge::after{ animation:feat-charge 2.6s ease-in-out infinite }
@keyframes feat-charge{
  0%{ top:100%;opacity:0 }
  12%{ opacity:1 }
  88%{ opacity:1 }
  100%{ top:-40%;opacity:0 }
}
@media(prefers-reduced-motion:reduce){
  .feat-box.in .feat-spin img,
  .feat-box.in .feat-spin-fast img,
  .feat-box.in .feat-rock img,
  .feat-box.in .feat-charge::after{ animation:none }
}
.feat-box figcaption{max-width:44ch}
.feat-box .fig{
  display:block;
  font-family:var(--display);font-weight:800;font-style:italic;
  font-size:clamp(2.6rem,5.2vw,4.25rem);letter-spacing:-.03em;line-height:1;
}
.feat-box .fig .unit{
  font-family:var(--body);font-weight:400;font-style:normal;
  font-size:.35em;color:var(--muted);margin-left:.35em;letter-spacing:0;
}
.feat-box .cap{display:block;margin-top:1rem;font-size:var(--s-small);color:var(--muted)}
.feat-box h3{margin:2.4rem 0 1rem}
.feat-box-line{color:var(--muted);line-height:1.65;margin:0}
@media (prefers-reduced-motion: reduce){
  .feat-box{opacity:1;transform:none}
}

/* ---------- document cards (the moat) ---------- */
.docs{display:grid;gap:clamp(3rem,5.5vw,5.5rem)}
@media(min-width:820px){.docs{grid-template-columns:repeat(3,1fr)}}
.doc{border-top:2px solid var(--red);padding-top:2.5rem}
.doc h3{margin-bottom:.75rem}
.doc p{font-size:var(--s-small);color:var(--muted)}

/* ---------- footer ---------- */
.s-foot{
  border-top:0;
  padding:var(--gap-xl) 0 var(--gap-md);
  font-size:var(--s-small);
  position:relative;
  isolation:isolate;
  background:var(--ink);
}
.s-foot::before{
  content:"";position:absolute;inset:0;z-index:0;
  background-image:var(--tex-image);
  background-size:cover;background-position:50% 62%;
  opacity:.5;pointer-events:none;
}
.s-foot .wrap{position:relative;z-index:1}
.s-fgrid{display:grid;gap:4.5rem;margin-bottom:5.5rem}
@media(min-width:800px){.s-fgrid{grid-template-columns:1.5fr 1fr 1fr 1fr}}
.s-foot h4{font-family:var(--display);font-size:.68rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:rgba(242,243,244,.48);margin:0 0 1.35rem}
.s-foot ul{list-style:none;padding:0;margin:0;display:grid;gap:.85rem}
.s-foot a{color:rgba(242,243,244,.68)}
.s-foot a:hover{color:#fff}
.s-fbase{border-top:1px solid rgba(242,243,244,.16);padding-top:2.75rem;color:rgba(242,243,244,.55);font-size:.8rem;display:flex;flex-wrap:wrap;gap:1.5rem;justify-content:space-between}

/* ---------- motion ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}
