/* 0xWills homepage — scroll chapters (on top of site.css) */

.ch { position: relative; z-index: 1; }
.stage { position: relative; height: 100vh; height: 100svh; overflow: hidden;
  background-color: var(--bg);
  background-image: var(--noise), radial-gradient(60% 55% at 12% 0%, rgba(127,214,200,.13), transparent 70%), radial-gradient(50% 50% at 100% 60%, rgba(180,151,238,.10), transparent 70%); }
#nav { position: fixed; inset: 0 0 auto 0; background: transparent; box-shadow: none; transition: background .3s, box-shadow .3s; }
#nav.solid { background: rgba(14,14,17,.92); box-shadow: 0 1px 0 var(--line); }
.stage svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.layer { position: absolute; inset: 0; will-change: transform, opacity; }
.layer svg { width: 100%; height: 100%; display: block; }

/* starfield + grid floor (built by JS) */
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stars b { position: absolute; width: 16px; height: 16px; opacity: .85; animation: tw 4s ease-in-out infinite; }
.stars b::before, .stars b::after { content: ""; position: absolute; left: 50%; top: 50%; background: #F1EEF7; transform: translate(-50%, -50%); }
.stars b::before { width: 2px; height: 16px; } .stars b::after { width: 16px; height: 2px; }
@keyframes tw { 50% { opacity: .12; } }
/* decorative loops rest while you scroll, so every frame goes to the story */
html.is-scrolling .stars b, html.is-scrolling .badge .ring, html.is-scrolling .badge .core * { animation-play-state: paused; }
.floor { position: absolute; left: -10%; right: -10%; bottom: 0; height: 42%; pointer-events: none; }
.floor svg { width: 100%; height: 100%; }

/* display titles */
.px { font-family: var(--pixel); font-weight: 750; letter-spacing: -.035em; line-height: 1.02; color: var(--ink); }
.px em { font-style: normal; background: var(--lav); color: var(--lav-ink); padding: 0 .12em; box-shadow: 0 0 0 .04em var(--lav); }
.px .o { -webkit-text-stroke: 1.5px var(--lav); color: transparent; }
.label-row { position: absolute; left: clamp(16px, 3.5vw, 44px); right: clamp(16px, 3.5vw, 44px); top: 84px; display: flex; justify-content: space-between; gap: 16px; z-index: 3; }
.label-row .lft { font-size: .86rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); max-width: 220px; line-height: 1.3; }
.label-row .arrow { font-family: var(--pixel); color: var(--ink-2); }
@media (max-width: 760px) { .label-row .br { display: none; } }

/* ---------- 1 · hero ---------- */
#hero .stage { display: block; }
.hero-copy { position: absolute; z-index: 3; left: clamp(16px, 3.5vw, 44px); right: clamp(16px, 3.5vw, 44px); top: clamp(92px, 12vh, 128px); --badge: min(50vh, 38vw); }
.hero-title { font-size: clamp(2.4rem, 6.2vw, 6.4rem); line-height: 1.1; text-align: center; }
.hero-title .ln { display: block; }
.hero-title .ln + .ln { margin-top: .08em; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: clamp(14px, 3vh, 34px); }
.badge-slot { flex: 0 0 var(--badge); width: var(--badge); aspect-ratio: 1; }
.hero-side { flex: 1 1 0; min-width: 0; max-width: 360px; }
.hero-r { display: flex; flex-direction: column; align-items: stretch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.hero-side p { margin: 10px 0 0; font-size: .98rem; }
.hero-side .note { margin-top: 10px; font-size: .78rem; color: var(--muted); }
.badge { position: absolute; z-index: 2; left: 50%; top: 60%; width: min(50vh, 38vw); aspect-ratio: 1; transform: translateX(-50%); will-change: transform; }
/* the family inside the badge */
.badge .core .heart, .badge .core .mom, .badge .core .kid { transform-box: fill-box; }
.badge .core .heart { transform-origin: 50% 60%; animation: beat 1.8s ease-in-out infinite; }
.badge .core .mom { transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite; }
.badge .core .kid { transform-origin: 50% 100%; animation: hop 1.8s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.1); } 30% { transform: scale(1.02); } 45% { transform: scale(1.07); } }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes hop { 0%, 55%, 100% { transform: translateY(0); } 25% { transform: translateY(-7px); } }
.badge > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.badge .ring { transform-origin: 50% 50%; animation: spin 26s linear infinite; }
.badge .ring.rev { animation-direction: reverse; animation-duration: 20s; }
@keyframes spin { to { transform: rotate(360deg); } }
.scroll-hint { position: absolute; z-index: 3; left: clamp(16px, 3.5vw, 44px); bottom: 26px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) {
  .hero-copy { --badge: min(60vw, 36vh); }
  .hero-title { font-size: clamp(2.2rem, 9.4vw, 3.6rem); }
  .hero-row { flex-direction: column; gap: 18px; }
  .badge-slot { order: -1; }
  .hero-side { max-width: 480px; width: 100%; flex: none; text-align: center; }
  .hero-r { align-items: stretch; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-side p { font-size: .9rem; margin-top: 6px; }
  .badge { width: min(60vw, 36vh); }
}
@media (max-width: 900px) and (max-height: 760px) { .hero-l p { display: none; } .hero-copy { --badge: min(54vw, 30vh); } .badge { width: min(54vw, 30vh); } .hero-row { gap: 12px; } #hero .scroll-hint { display: none; } }

/* pixel dissolve overlay */
#dissolve { position: fixed; inset: 0; z-index: 70; pointer-events: none; width: 100vw; height: 100vh; }

/* ---------- 2 · home collage ---------- */
#home .stage { background: var(--bg); }
.portal { position: absolute; inset: 9% 6% 13% 6%; border: 14px solid var(--lav); box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 30px 80px -20px rgba(180,151,238,.35); overflow: hidden; background: #241B38; z-index: 1; will-change: transform; }
.portal .layer { inset: 0; }
/* phones: keep the whole collage in view (a landscape window above the caption) */
@media (max-width: 760px) and (orientation: portrait) {
  .portal { inset: auto; left: 4%; right: 4%; top: 18%; aspect-ratio: 16 / 11; border-width: 10px; }
}
.cap-card {
  position: absolute; z-index: 4; left: clamp(16px, 3.5vw, 44px); bottom: 28px; width: min(440px, calc(100% - 32px));
  background: rgba(14,14,17,.86); border: 1px solid var(--line); padding: 18px 20px; will-change: transform, opacity;
}
.cap-card .br { display: block; margin-bottom: 8px; }
.cap-card h2 { font-family: var(--pixel); font-size: clamp(1.25rem, 2.3vw, 1.75rem); margin: 0 0 8px; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
.cap-card p { margin: 0; font-size: .93rem; }

.chip {
  position: absolute; z-index: 4; background: rgba(22,22,27,.94); border: 1px solid rgba(205,180,245,.4);
  padding: 11px 14px; font-size: .84rem; line-height: 1.35; min-width: 220px; max-width: 320px;
  box-shadow: 5px 5px 0 rgba(205,180,245,.16); will-change: transform, opacity;
}
.chip .k { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.chip .k::before { content: "[ "; } .chip .k::after { content: " ]"; }
.chip .row { display: flex; align-items: center; gap: 9px; }
.chip .sub { margin-top: 5px; font-family: var(--mono); font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .ok { color: var(--ok); }
.dot { width: 8px; height: 8px; background: var(--ok); flex: none; }
.dot.warn { background: var(--warn); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pill { font-size: .7rem; padding: 3px 7px; border: 1px solid var(--line); color: var(--ink-2); }
.bar { height: 6px; background: var(--bg-3); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--lav); transform-origin: left; transform: scaleX(0); }

/* ---------- 3 · question marquee ---------- */
#question .stage { display: flex; align-items: center; }
.marquee { position: absolute; left: 0; top: 50%; transform: translateY(-50%); white-space: nowrap; will-change: transform; font-size: clamp(3rem, 11vw, 10rem); }
.marchers { position: absolute; left: 0; top: calc(50% - clamp(3rem, 11vw, 10rem) * .62 - 72px); height: 64px; white-space: nowrap; will-change: transform; display: flex; gap: 46px; }
.marchers.low { top: calc(50% + clamp(3rem, 11vw, 10rem) * .62 + 50px); }
.sprite { width: 56px; height: 56px; image-rendering: pixelated; }

/* ---------- 4 · ways ---------- */
#ways { padding: clamp(90px, 12vw, 150px) clamp(16px, 3.5vw, 44px); overflow: hidden; } /* cards slide in from the sides */
.ways-head { max-width: 1200px; margin: 0 auto 54px; display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; flex-wrap: wrap; }
.ways-head h2 { font-family: var(--pixel); font-weight: 750; font-size: clamp(2rem, 4.6vw, 3.8rem); line-height: 1.04; letter-spacing: -.035em; max-width: 14ch; }
.ways-head p { max-width: 380px; margin: 0; }
.ways { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; perspective: 1200px; }
.way {
  position: relative; min-height: 420px; padding: 26px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(160deg, rgba(241,238,247,.07), rgba(241,238,247,.015)); border: 1px solid rgba(241,238,247,.16);
  border-radius: 22px 22px 60px 60px; overflow: hidden; will-change: transform, opacity;
}
.way::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -40%; height: 70%; background: radial-gradient(closest-side, rgba(205,180,245,.16), transparent); pointer-events: none; }
.way .ico { width: 120px; height: 120px; margin: 10px auto 0; }
.way h3 { font-family: var(--pixel); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; margin: 0 0 10px; }
.way p { margin: 0; font-size: .93rem; }
.way .verdict { display: inline-block; margin-top: 14px; font-family: var(--pixel); font-weight: 600; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; padding: 5px 8px; border: 1px solid var(--warn); color: var(--warn); }
.way.good { border-color: var(--lav); box-shadow: 0 0 0 1px var(--lav), 0 30px 80px -30px rgba(205,180,245,.5); }
.way.good .verdict { border-color: var(--ok); color: var(--ok); }
@media (max-width: 900px) { .ways { grid-template-columns: 1fr; } .way { min-height: 0; } }

/* ---------- 5/6 · pedestal stages ---------- */
.ped-text { position: absolute; z-index: 4; left: clamp(16px, 3.5vw, 44px); top: 50%; transform: translateY(-50%); width: min(430px, 40vw); }
.ped-step { position: absolute; left: 0; top: 0; transform: translateY(-50%); opacity: 0; will-change: transform, opacity; }
.ped-step .px { font-size: clamp(2rem, 4.6vw, 4.4rem); margin-bottom: 14px; }
.ped-step .br { display: inline-block; margin-bottom: 14px; color: var(--lav); }
.ped-step p { font-size: .98rem; margin: 0; max-width: 34ch; }
.ped-chips { position: absolute; z-index: 4; right: clamp(16px, 3.5vw, 44px); bottom: 70px; display: grid; gap: 10px; justify-items: end; }
.ped-chips .chip { position: relative; }
.ped-chips .chip, #cSafe { opacity: 0; }
@media (max-width: 900px) {
  .ped-text { top: auto; bottom: 26px; transform: none; width: auto; right: 16px; height: 210px; }
  .ped-step { top: auto; bottom: 0; transform: none; }
  .ped-step .px { font-size: 2rem; margin-bottom: 8px; }
  .ped-step p { font-size: .88rem; }
  .ped-chips { top: 72px; bottom: auto; right: 12px; left: 12px; display: block; height: 76px; }
  .ped-chips .chip { position: absolute; top: 0; left: 0; right: 0; max-width: none; min-width: 0; padding: 8px 11px; }
  #cSafe { top: 84px; bottom: auto !important; right: 12px !important; left: 12px; max-width: none; }
  #home .label-row { display: none; }
}

/* ---------- 7 · legacy ---------- */
.legacy-copy { position: absolute; z-index: 4; left: clamp(16px, 3.5vw, 44px); top: clamp(100px, 16vh, 160px); width: min(560px, 46vw); }
.legacy-copy .px { font-size: clamp(2rem, 4.8vw, 4.6rem); margin-bottom: 18px; }
.legacy-copy p { max-width: 40ch; }
@media (max-width: 900px) { .legacy-copy { width: auto; right: 16px; top: 80px; } .legacy-copy .px { font-size: clamp(1.6rem, 7.6vw, 2rem); } }

/* ---------- regular sections ---------- */
section.block { position: relative; z-index: 1; padding: clamp(90px, 11vw, 140px) clamp(16px, 3.5vw, 44px); }
.wrap { max-width: 1200px; margin: 0 auto; }
.sec-head { max-width: 760px; margin-bottom: 56px; }
.sec-head .br { display: block; margin-bottom: 18px; }
.sec-head h2 { font-family: var(--pixel); font-weight: 750; font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.05; letter-spacing: -.035em; }
.sec-head p { margin-top: 18px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { border: 1px solid var(--line); padding: 22px; background: var(--bg-2); }
.step .n { font-family: var(--mono); font-weight: 400; font-size: 1.6rem; color: var(--lav); line-height: 1; }
.step h3 { font-family: var(--pixel-2); font-weight: 700; font-size: 1.15rem; margin: 14px 0 8px; }
.step p { font-size: .93rem; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.trust > div { border: 1px solid var(--line); padding: 22px; background: linear-gradient(180deg, rgba(241,238,247,.04), transparent); }
.trust h3 { font-family: var(--pixel-2); font-weight: 700; font-size: 1.1rem; margin: 0 0 8px; color: var(--ink); }
.trust p { font-size: .93rem; margin: 0; }
.trust .br { display: inline-block; margin-bottom: 14px; color: var(--lav); }
@media (max-width: 900px) { .trust { grid-template-columns: 1fr; } }

.code-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: center; }
.facts { list-style: none; margin: 26px 0 0; border-top: 1px solid var(--line); }
.facts li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; margin: 0; }
.facts b { display: inline-block; min-width: 76px; color: var(--lav); font-family: var(--pixel); font-weight: 650; }
.small-note { margin-top: 16px; font-size: .85rem; color: var(--muted); }
.code { background: #0A0A0D; color: #E5E0EE; border: 1.5px solid var(--lav); box-shadow: 10px 10px 0 rgba(205,180,245,.15); padding: 28px 30px; overflow-x: auto; font: 400 .84rem/1.75 var(--mono); }
.code .c { color: #77728A; } .code .k { color: var(--lav); } .code .f { color: var(--butter); } .code .t { color: var(--mint); }
@media (max-width: 900px) { .code-grid { grid-template-columns: 1fr; gap: 32px; } .code { font-size: .72rem; padding: 18px; } }


.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--line); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--pixel-2); font-weight: 600; font-size: 1.12rem; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--pixel); color: var(--lav); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; max-width: 48em; }

.cta { text-align: center; }
.cta .px { font-size: clamp(2.2rem, 6vw, 5.4rem); }
.cta p { margin: 18px auto 0; max-width: 34em; }
.cta-actions { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- progress (bottom-right pixel blocks) ---------- */
.progress { position: fixed; z-index: 85; right: clamp(12px, 2.5vw, 30px); bottom: 18px; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: right; pointer-events: none; }
.progress .blocks { display: flex; gap: 3px; margin-top: 5px; }
.progress .blocks i { width: 9px; height: 9px; border: 1px solid rgba(205,180,245,.5); }
.progress .blocks i.on { background: var(--lav); border-color: var(--lav); }

@media (prefers-reduced-motion: reduce) {
  .stars i, .stars b { animation: none; }
  .badge .ring { animation-duration: 60s; }
  .badge .ring.rev { animation-duration: 48s; }
}
