/* pipsly.app: the cinematic landing. A dark stage with the chrome monument (js/stage.js), four editorial
   slides while the camera orbits, then the content on solid black. Monochrome; green/red never appear here.
   Motion is transform / opacity (plus the title letters' blur-up); all of it stops with reduced motion. */
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--fs-body)/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; }
a { color: inherit; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--white); color: var(--black); text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.btn { --btn-h: 48px; --btn-px: 22px; --btn-fs: 15px; border-radius: var(--r-pill); }
.btn.ghost { border-color: var(--line-2); color: var(--fg); background: rgba(255, 255, 255, .03); backdrop-filter: blur(8px); }

/* ---------- the stage ---------- */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: radial-gradient(110% 80% at 50% 40%, #16171a 0%, #0a0a0a 62%); }
.stage-poster { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity 900ms var(--ease-out); }
.stage-poster img { width: min(86vmin, 760px); height: auto; transform: translate3d(0, -2vh, 0);
  -webkit-mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); }
#stageCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1200ms var(--ease-out); }
.stage.live #stageCanvas { opacity: 1; }
.stage.live .stage-poster { opacity: 0; }
.stage-vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, .7) 100%), linear-gradient(180deg, rgba(10, 10, 10, .55), transparent 20%, transparent 70%, rgba(10, 10, 10, .9)); }
/* the still is sized and placed where the 3D monument first appears, so the switch is seamless */
@media (max-width: 767px) { .stage-poster img { position: absolute; left: 50%; top: 50%; width: 125vw; max-width: none; transform: translate3d(-50%, calc(-50% - 19vh), 0); } }
@media (min-width: 900px) { .stage-poster img { width: min(98vh, 980px); transform: translate3d(17vw, 0, 0); } }

/* five vertical lines with drifting dots */
.grid5 { position: fixed; inset: 0; z-index: 1; pointer-events: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 0 4vw; }
.grid5 i { position: relative; border-left: 1px solid rgba(255, 255, 255, .045); }
.grid5 i::after { content: ""; position: absolute; left: -2px; top: -10vh; width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, .55);
  box-shadow: 0 0 8px rgba(255, 255, 255, .5); animation: pp-drift 14s linear infinite; }
.grid5 i:nth-child(2)::after { animation-duration: 19s; animation-delay: -6s; } .grid5 i:nth-child(3)::after { animation-duration: 23s; animation-delay: -11s; }
.grid5 i:nth-child(4)::after { animation-duration: 17s; animation-delay: -3s; } .grid5 i:nth-child(5)::after { animation-duration: 21s; animation-delay: -15s; }
@keyframes pp-drift { to { transform: translate3d(0, 120vh, 0); } }

/* ---------- nav + ticker ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: calc(12px + var(--safe-t)) clamp(16px, 4vw, 48px) 12px;
  background: linear-gradient(180deg, rgba(10, 10, 10, .78), rgba(10, 10, 10, 0)); }
.nav.solid { background: rgba(10, 10, 10, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-brand img { display: block; height: 34px; width: auto; }
.nav-links { display: none; gap: 28px; margin-left: auto; font-size: 14px; color: var(--fg-2); }
.nav-links a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav-links a:hover { color: var(--white); }
.nav-cta { margin-left: auto; --btn-h: 44px; --btn-px: 18px; --btn-fs: 14px; }
@media (min-width: 900px) { .nav-links { display: flex; } .nav-cta { margin-left: 0; } }
.ticker { position: fixed; top: calc(68px + var(--safe-t)); left: 0; right: 0; z-index: 19; height: 46px; overflow: hidden; opacity: 0; transition: opacity 600ms var(--ease-out);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(10, 10, 10, .55); backdrop-filter: blur(10px); }
.ticker.on { opacity: 1; }
.ticker iframe { width: 100%; height: 46px; border: 0; display: block; filter: grayscale(.35); }
.nav.solid ~ .ticker { opacity: 0; pointer-events: none; }

/* ---------- the story: 4 slides pinned while the camera orbits ---------- */
.story { position: relative; z-index: 2; height: 460vh; }
.story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.stories { position: absolute; top: calc(124px + var(--safe-t)); left: clamp(16px, 4vw, 48px); right: clamp(16px, 4vw, 48px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stories i { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.stories b { display: block; height: 100%; background: var(--white); transform-origin: left; transform: scaleX(var(--p, 0)); }
.slide { position: absolute; left: clamp(16px, 6vw, 96px); bottom: clamp(56px, 12vh, 140px); width: min(600px, calc(100% - 32px)); pointer-events: none;
  opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.slide.on { opacity: 1; transform: none; pointer-events: auto; }
.kicker { margin: 0 0 14px; font: 500 12px/1 var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--fg-2); }
.title { margin: 0 0 18px; font: italic 400 var(--fs-h1)/.98 var(--font-display); letter-spacing: -.015em; color: var(--white); text-wrap: balance; }
.title em, .h2 em { font-style: italic; color: var(--white); text-shadow: 0 0 28px rgba(255, 255, 255, .55); }
.lede { margin: 0 0 10px; max-width: 34em; font-size: var(--fs-lead); line-height: 1.5; color: var(--fg); }
.lede.soft { color: var(--fg-2); font-size: var(--fs-body); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.cta-row.center { justify-content: center; }
.rule-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.rule-list li { padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--r-pill); font-size: 13px; color: var(--fg-2); background: rgba(10, 10, 10, .4); }
/* per-letter blur-up (js wraps each letter in .ch) */
.ch { display: inline-block; opacity: 0; filter: blur(14px); transform: translate3d(0, .35em, 0);
  transition: opacity 700ms var(--ease-out), filter 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--ci) * 22ms); }
.w { display: inline-block; white-space: nowrap; }
.on .ch, .in .ch { opacity: 1; filter: none; transform: none; }
/* slide 2: the app screenshot wipes in */
.shot { position: absolute; right: clamp(-200px, -20vw, 0px); bottom: -40px; width: 220px; margin: 0; border-radius: 30px; overflow: hidden; border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6); clip-path: inset(100% 0 0 0 round 30px); transition: clip-path 1100ms var(--ease-out) 200ms; background: #0d0d0e; }
.on .shot { clip-path: inset(0 0 0 0 round 30px); }
.shot img { display: block; width: 100%; height: auto; }
@media (min-width: 900px) {
  .slide { bottom: auto; top: 50%; transform: translate3d(0, calc(-50% + 16px), 0); }
  .slide.on { transform: translate3d(0, -50%, 0); }
  /* slide 2: the phone sits beside the words, clear of the sculpture */
  .slide[data-slide="1"] { width: min(780px, 56vw); display: grid; grid-template-columns: minmax(0, 1fr) 220px; grid-template-rows: 1fr auto auto auto 1fr; column-gap: 40px; }
  .slide[data-slide="1"] .kicker { grid-area: 2 / 1; } .slide[data-slide="1"] .title { grid-area: 3 / 1; } .slide[data-slide="1"] .lede { grid-area: 4 / 1; }
  .shot { position: relative; right: auto; bottom: auto; grid-column: 2; grid-row: 1 / -1; align-self: center; width: 220px; }
}
@media (max-width: 899px) { .shot { display: none; } }
.scroll-cue { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); margin: 0; display: grid; justify-items: center; gap: 6px;
  font: 500 11px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); transition: opacity 400ms; }
.scroll-cue i { width: 1px; height: 34px; background: linear-gradient(var(--white), transparent); transform-origin: top; animation: pp-cue 2.2s var(--ease-in-out) infinite; }
@keyframes pp-cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.story.past .scroll-cue { opacity: 0; }

/* ---------- content on black ---------- */
.after { position: relative; z-index: 3; background: var(--bg); box-shadow: 0 -120px 120px 20px var(--bg); }
.section { padding: clamp(80px, 12vw, 150px) clamp(16px, 6vw, 96px) 0; max-width: 1240px; margin: 0 auto; }
.eyebrow { margin: 0 0 14px; font: 500 12px/1 var(--font-mono); letter-spacing: .18em; color: var(--fg-2); }
.h2 { margin: 0 0 24px; font: italic 400 var(--fs-h2)/1.02 var(--font-display); letter-spacing: -.01em; color: var(--white); text-wrap: balance; }
.sub { margin: -8px 0 32px; color: var(--fg-2); max-width: 40em; }
.reveal { opacity: 0; transform: translate3d(0, var(--rise), 0); transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out);
  transition-delay: calc(var(--d, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

.how-steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
@media (min-width: 820px) { .how-steps { grid-template-columns: repeat(3, 1fr); } }
.how-steps li { padding: 34px 28px 38px; background: var(--bg); }
.how-steps .num { display: block; margin-bottom: 30px; font: 400 14px var(--font-mono); color: var(--muted); }
.how-steps h3 { margin: 0 0 10px; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.how-steps p { margin: 0; color: var(--fg-2); }

.tool-grid { display: grid; gap: 14px; margin-top: 40px; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .tool-grid { grid-template-columns: repeat(4, 1fr); } }
.tool { padding: 26px 24px 28px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, #141517, #0d0d0f);
  transition: border-color var(--t-base), transform var(--t-base) var(--ease-out); }
.tool:hover { border-color: var(--line-2); transform: translate3d(0, -3px, 0); }
.tool svg { width: 28px; height: 28px; fill: none; stroke: var(--chrome); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.tool h3 { margin: 22px 0 8px; font-size: 17px; font-weight: 600; }
.tool p { margin: 0; color: var(--fg-2); font-size: 14.5px; line-height: 1.55; }

.calc-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .calc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .calc-grid { grid-template-columns: repeat(3, 1fr); } }
.calc { display: grid; gap: 12px; align-content: start; padding: 24px; border-radius: 20px; --card-pad: 24px; }
.calc h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--fg-2); }
.field input, .field select { min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-sunk); color: var(--fg);
  font: 500 16px var(--font-mono); appearance: none; }
.field select { font-family: var(--font); background-image: linear-gradient(45deg, transparent 50%, var(--fg-2) 50%), linear-gradient(135deg, var(--fg-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus { outline: none; border-color: var(--chrome); box-shadow: 0 0 0 3px rgba(201, 204, 209, .14); }
.result { display: block; min-height: 64px; padding-top: 6px; border-top: 1px solid var(--line); }
.result .big { font: 500 30px/1.1 var(--font-mono); color: var(--white); }
.result .big small { margin-left: 8px; font: 400 13px var(--font); color: var(--fg-2); }
.result .rows { display: grid; gap: 2px; margin-top: 6px; font-size: 13px; color: var(--fg-2); }
.result .hint, .result .err { font-size: 13.5px; color: var(--muted); }
.result .err { color: var(--fg); }
.meter { position: relative; height: 10px; border-radius: 10px; background: linear-gradient(90deg, #2a2c30, #6b6f75 40%, #c9ccd1 70%, #fff); overflow: hidden; }
.meter-fill { position: absolute; inset: 0; background: rgba(10, 10, 10, .78); transform-origin: right; transform: scaleX(calc(1 - var(--m, 0))); transition: transform 500ms var(--ease-out); }
.meter-needle { position: absolute; top: -3px; bottom: -3px; left: 0; width: 2px; background: var(--white); box-shadow: 0 0 8px #fff; transform: translateX(calc(var(--m, 0) * 100cqw)); }
.meter { container-type: inline-size; }
.tl { position: relative; height: 62px; margin: 6px 0 4px; border-radius: 10px; background: var(--bg-sunk); border: 1px solid var(--line); }
.tl-row { position: absolute; left: 0; right: 0; height: 7px; }
.tl-seg { position: absolute; top: 0; height: 7px; border-radius: 4px; background: #3a3d42; }
.tl-seg.open { background: var(--white); box-shadow: 0 0 10px rgba(255, 255, 255, .45); }
.tl-now { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--white); }
.tl-labels { position: relative; height: 16px; font: 11px var(--font-mono); color: var(--muted); }
.tl-labels span { position: absolute; transform: translateX(-50%); }
.tl-labels span:first-child { transform: none; } .tl-labels span:last-child { transform: translateX(-100%); }
.sessions { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.sessions li { display: grid; grid-template-columns: 10px 90px 1fr; gap: 8px; align-items: center; color: var(--fg-2); }
.sessions .dot { width: 7px; height: 7px; border-radius: 50%; background: #3a3d42; }
.sessions li.open { color: var(--fg); } .sessions li.open .dot { background: var(--white); box-shadow: 0 0 8px #fff; }
.fine { margin: 20px 0 0; font-size: 12.5px; color: var(--muted); }

.faq-list { display: grid; gap: 10px; margin-top: 36px; max-width: 860px; }
.faq-list details { border: 1px solid var(--line); border-radius: 18px; background: #0e0f11; }
.faq-list summary { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; cursor: pointer; font-weight: 600; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font: 300 22px var(--font); color: var(--fg-2); transition: transform var(--t-base) var(--ease-out); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { margin: 0; padding: 0 22px 20px; color: var(--fg-2); }

.final { text-align: center; padding-bottom: clamp(90px, 12vw, 160px); }
.final-title { font-size: clamp(2.6rem, 1.4rem + 6vw, 6rem); }

.foot { position: relative; z-index: 3; padding: 40px clamp(16px, 6vw, 96px) calc(40px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.foot-top img { height: 30px; width: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot nav a { color: var(--fg-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot .risk { color: var(--fg-2); margin: 0 0 8px; } .foot .legal { margin: 0 0 6px; } .foot .legal a { color: var(--fg-2); }

/* ---------- the access-code step ---------- */
.access { width: min(420px, calc(100vw - 32px)); padding: 0; border: 0; background: transparent; color: var(--fg); }
.access::backdrop { background: rgba(5, 5, 6, .72); backdrop-filter: blur(10px); }
.access[open] .access-card { animation: pp-pop 420ms var(--ease-out); }
@keyframes pp-pop { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.98); } }
.access-card { position: relative; display: grid; justify-items: center; gap: 14px; padding: 34px 26px 26px; border-radius: 26px; text-align: center;
  background: linear-gradient(180deg, #17181b, #0e0f11); border: 1px solid var(--line-2); box-shadow: 0 40px 120px rgba(0, 0, 0, .7); }
.access-card h2 { margin: 0; font: italic 400 32px/1.1 var(--font-display); color: var(--white); }
.access-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--fg-2); font-size: 26px; }
#accessCode { width: 100%; box-sizing: border-box; min-height: 60px; padding: 0 16px; border-radius: 16px; text-align: center; text-transform: uppercase;
  font: 500 24px var(--font-mono); letter-spacing: .32em; color: var(--white); background: #08080a; border: 1px solid #3a3d42;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 0 rgba(201, 204, 209, 0); transition: border-color var(--t-base), box-shadow var(--t-base); }
#accessCode:focus { outline: none; border-color: var(--chrome); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 4px rgba(201, 204, 209, .14); }
.access-msg { min-height: 1.3em; margin: 0; font-size: 14px; color: var(--fg); }
.access-help { margin: 0; font-size: 13px; color: var(--muted); }
.access-card .btn { min-height: 52px; }
.shake { animation: pp-shake 420ms var(--ease-out); }
@keyframes pp-shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

/* ---------- double-ring cursor (desktop with a mouse only) ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; position: fixed; inset: 0 auto auto 0; z-index: 60; pointer-events: none; mix-blend-mode: difference; }
  .cursor i, .cursor b { position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate3d(-100px, -100px, 0); }
  .cursor i { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
  .cursor b { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid rgba(255, 255, 255, .8); transition: width 240ms var(--ease-out), height 240ms var(--ease-out), margin 240ms var(--ease-out); }
  .cursor.hot b { width: 62px; height: 62px; margin: -31px 0 0 -31px; }
}

/* ---------- reduced motion: a still stage, no blur-ups, no cursor, no drift ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #stageCanvas, .cursor, .grid5 i::after, .scroll-cue i { display: none; }
  .ch { opacity: 1; filter: none; transform: none; transition: none; }
  .shot { clip-path: none; transition: none; }
  .slide, .reveal { transition-duration: 1ms; }
}
