/* home.css: the landing page, including the scroll-linked hero scene.

   The hero reads a single --scroll custom property (0 → 1, written by
   synthexec.js on rAF). Everything that moves is driven off that one number,
   so the whole scene stays in step and there is only ever one listener. */

.hero{position:relative;padding:clamp(2rem,1rem + 4vw,4.5rem) 0 clamp(2.5rem,1.5rem + 4vw,5rem);
      --scroll:0}
/* the light source behind the hero: expands and fades as the page moves */
.hero::before{
  content:"";position:absolute;z-index:0;left:50%;top:clamp(-8rem,-6rem - 6vw,-3rem);
  width:min(115vw,1500px);aspect-ratio:1.5;
  transform:translateX(-50%) scale(calc(1 + var(--scroll) * .35));
  opacity:calc(1 - var(--scroll) * .75);
  background:radial-gradient(closest-side,rgba(20,168,160,.30),rgba(20,168,160,.10) 55%,transparent 76%);
  pointer-events:none;will-change:transform,opacity}
.hero-grid{position:relative;z-index:1;display:grid;grid-template-columns:1.02fr 1.12fr;
           gap:clamp(2rem,1rem + 3.5vw,3.6rem);align-items:center}
.hero h1{font-size:var(--t-h1);max-width:13ch}
.hero h1 .r{color:var(--primary)}
.hero .sub{font-size:var(--t-lede);color:var(--ink-soft);max-width:50ch;
           margin:clamp(1.1rem,.8rem + 1vw,1.6rem) 0 0;line-height:1.45}
.partslist{margin-top:clamp(1.8rem,1.2rem + 1.6vw,2.6rem);border-top:1px solid var(--line);
           padding-top:1rem;font-size:var(--t-sm);color:var(--faint);line-height:1.9}
.partslist b{color:var(--ink);font-weight:600}
@media(max-width:880px){.hero-grid{grid-template-columns:1fr;gap:2.2rem}}

/* ---- recorder readout: the hero's floating product card ---- */
@keyframes blink{50%{opacity:.25}}
.recorder{position:relative;background:var(--surface);border:1px solid var(--line);
          border-radius:var(--r-lg);padding:clamp(1.1rem,.85rem + 1vw,1.6rem);
          box-shadow:var(--sh-lg);
          transform:translateY(calc(var(--scroll) * -22px));
          transition:box-shadow .5s var(--ease);will-change:transform}
.rec-head{display:flex;justify-content:space-between;align-items:center;gap:.8rem;
          font-family:var(--mono);font-size:var(--t-xs);color:var(--faint);
          border-bottom:1px solid var(--line);padding-bottom:.75rem;margin-bottom:1rem}
.rec-head .clamp{color:var(--bad);display:inline-flex;align-items:center;gap:.45em;margin-right:.4em}
.rec-head .clamp i{width:7px;height:7px;background:var(--bad);border-radius:50%;animation:blink 1.4s steps(2) infinite}

/* level meter */
.meter{display:flex;align-items:center;gap:3px;height:64px;padding:0 2px 1rem;margin-bottom:1rem;
       border-bottom:1px solid var(--line);overflow:hidden}
.meter .bar{flex:1 1 0;border-radius:var(--r-pill);background:var(--primary-2);
            transform:scaleY(0);transform-origin:center;
            transition:transform .7s var(--ease)}
.meter .bar.f{background:var(--accent)}
.recorder.in .meter .bar{transform:scaleY(1)}

/* log lines: stagger in on reveal */
.rec-log{display:flex;flex-direction:column;gap:.55rem;margin-bottom:1rem}
.lg{display:grid;grid-template-columns:3.4rem 12px 1fr;align-items:center;gap:.75rem;
    opacity:0;transform:translateX(-8px);
    transition:opacity .5s var(--ease),transform .5s var(--ease)}
.recorder.in .lg{opacity:1;transform:none}
.recorder.in .lg:nth-child(1){transition-delay:.05s}
.recorder.in .lg:nth-child(2){transition-delay:.13s}
.recorder.in .lg:nth-child(3){transition-delay:.21s}
.recorder.in .lg:nth-child(4){transition-delay:.29s}
.recorder.in .lg:nth-child(5){transition-delay:.37s}
.lg .t{font-family:var(--mono);font-size:var(--t-xs);color:var(--faint)}
.lg .m{width:10px;height:10px;border-radius:50%;border:2px solid var(--primary-2);background:transparent}
.lg.warn .m{border-color:var(--warn);background:var(--accent-soft)}
.lg.bad .m{border-color:var(--bad);background:var(--bad-soft)}
.lg .e{font-size:var(--t-sm);color:var(--ink-soft)}
.lg.fire .e{color:var(--bad);font-weight:600}
.lg.fire .e b{color:var(--bad);font-weight:700}

/* root cause strip */
.rec-fix{background:var(--primary-soft);border-radius:var(--r-sm);padding:.8rem 1rem;
         font-size:var(--t-sm);color:var(--ink-soft);line-height:1.5}
.rec-fix .fk{color:var(--primary);font-weight:600;margin-right:.3em}
.rec-fix b{color:var(--primary);font-weight:600}

/* ---- running note under a grid ---- */
.gap-note{margin-top:clamp(1.1rem,.9rem + .8vw,1.6rem);max-width:64ch;
          font-size:var(--t-lede);color:var(--ink-soft);line-height:1.5}
.gap-note i{font-style:italic;color:var(--ink)}

/* ---- manifesto: the one inverted band on the page ---- */
.manifesto{background:var(--primary-deep);color:#fff;border-radius:var(--r-lg);
           max-width:var(--bandw);margin:var(--pad-sec) auto;position:relative;z-index:1;overflow:hidden;
           padding:clamp(2.6rem,1.6rem + 4vw,5rem) clamp(1.4rem,.8rem + 2.4vw,3rem)}
.manifesto::after{content:"";position:absolute;inset:0;pointer-events:none;
                  background:radial-gradient(680px 460px at 12% 108%,rgba(255,176,58,.20),transparent 60%)}
.manifesto .wrap{max-width:min(var(--maxw),58rem);padding:0;position:relative;z-index:1}
.manifesto .stamp-line{font-weight:700;font-size:clamp(1.9rem,1.2rem + 3.2vw,3.6rem);
                       line-height:1.0;letter-spacing:var(--track-tight);max-width:19ch}
.manifesto .stamp-line .r{color:var(--accent)}
.manifesto p{font-size:var(--t-lede);color:#A8C4C2;max-width:56ch;
             margin:clamp(1.1rem,.9rem + .8vw,1.6rem) 0 0;line-height:1.55}

/* ---- operating procedure ---- */
.proc{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--gap)}
.pstep{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);
       padding:clamp(1.2rem,.9rem + 1vw,1.7rem);box-shadow:var(--sh-sm);
       transition:transform .4s var(--ease),box-shadow .4s var(--ease)}
.pstep:hover{transform:translateY(-3px);box-shadow:var(--sh-md)}
.pstep .pn{display:inline-flex;align-items:center;gap:.5em;font-size:var(--t-xs);font-weight:600;
           color:var(--primary);background:var(--primary-soft);border-radius:var(--r-pill);padding:.35em .85em}
.pstep .pn .box{width:1.15em;height:1.15em;border-radius:50%;background:var(--primary-2);color:#fff;
                display:inline-flex;align-items:center;justify-content:center;font-size:.7em}
.pstep h3{font-size:clamp(1.05rem,.98rem + .4vw,1.28rem);margin-top:.85rem}
.pstep p{color:var(--ink-soft);margin-top:.55rem;font-size:var(--t-sm);line-height:1.5}
@media(max-width:820px){.proc{grid-template-columns:1fr}}

/* ---- renewal scoreboard ---- */
.score{display:grid;grid-template-columns:repeat(5,1fr);gap:var(--gap)}
.sc{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);
    padding:clamp(1rem,.85rem + .7vw,1.4rem);box-shadow:var(--sh-sm);
    transition:transform .4s var(--ease),box-shadow .4s var(--ease)}
.sc:hover{transform:translateY(-3px);box-shadow:var(--sh-md)}
.sc .n{font-family:var(--mono);font-size:var(--t-xs);color:var(--accent-ink)}
.sc h3{font-size:clamp(.98rem,.94rem + .25vw,1.12rem);margin-top:.7rem;line-height:1.2}
@media(max-width:1000px){.score{grid-template-columns:repeat(3,1fr)}}
@media(max-width:640px){.score{grid-template-columns:repeat(2,1fr)}}

@media(prefers-reduced-motion:reduce){
  .hero::before,.recorder{transform:none!important}
  .meter .bar{transform:scaleY(1)!important}
  .lg{opacity:1!important;transform:none!important}
}
