/* Layout: a 3D stage (two phones joined by a signal line) over a drifting mote field, a caption band,
   then the written steps. Single dark look by choice: it matches the apps. */
:root {
  --bg: #06080c; --bg2: #0b1018; --panel: rgba(255,255,255,.06); --line: rgba(255,255,255,.12);
  --fg: #eef1f8; --fg2: #a9b6cb; --fg3: #6b788f;
  --accent: #35d3c2; --accent-rgb: 53,211,194; --red: #ff5a6a; --amber: #ffb454; --green: #4ade80; --blue: #5b9dff;
  --display: 'Sora', 'Segoe UI', system-ui, sans-serif; --body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 17px; line-height: 1.5; overflow-x: hidden; }
#motes { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding-block: 28px 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 28px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.brand i { width: 34px; height: 34px; border-radius: 10px; background: radial-gradient(circle at 35% 30%, rgba(var(--accent-rgb),1), rgba(var(--accent-rgb),.25)); box-shadow: 0 0 24px rgba(var(--accent-rgb),.55); display: inline-block; }
.eyebrow { font-family: var(--body); font-weight: 700; font-size: 12px; letter-spacing: .14em; color: var(--fg3); text-transform: uppercase; }
h1 { font-family: var(--display); font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
.lede { color: var(--fg2); max-width: 62ch; margin: 0; font-size: 19px; }

/* ---- 3D stage ---- */
.scene { perspective: 1400px; padding: 10px 0; }
#stage { transform-style: preserve-3d; transition: transform .25s ease-out; display: grid; grid-template-columns: 1fr 120px 1fr; align-items: center; justify-items: center; gap: 0; min-height: 520px; }
.phone { position: relative; width: 236px; height: 480px; border-radius: 40px; background: linear-gradient(160deg, #141c2a, #0a0f18); border: 2px solid rgba(255,255,255,.14); box-shadow: 0 40px 80px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,255,255,.05); transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .6s; }
#phoneL { transform: rotateY(18deg) translateZ(20px); } #phoneR { transform: rotateY(-18deg) translateZ(20px); }
.phone.focus { transform: rotateY(0deg) translateZ(70px) scale(1.04); }
.phone.lit { border-color: rgba(var(--accent-rgb),.8); box-shadow: 0 40px 80px rgba(0,0,0,.65), 0 0 60px rgba(var(--accent-rgb),.35); }
.phone::before { content: ""; position: absolute; left: 50%; top: 12px; width: 70px; height: 20px; border-radius: 12px; background: #000; transform: translateX(-50%); z-index: 3; }
.plabel { position: absolute; left: 0; right: 0; bottom: -36px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--fg2); letter-spacing: .02em; }
.screen { position: absolute; inset: 10px; border-radius: 32px; overflow: hidden; background: linear-gradient(180deg, #111a2b, var(--bg2) 45%, var(--bg)); padding: 44px 16px 16px; display: flex; flex-direction: column; gap: 10px; transform-style: preserve-3d; transition: transform .26s ease, opacity .26s ease; }
.screen.flipping { transform: rotateY(90deg); opacity: .2; }
.idle { color: var(--fg3); text-align: center; margin-top: 40%; }

/* bits that look like the apps */
.s-tag { font-size: 10px; letter-spacing: .14em; font-weight: 700; color: var(--accent); }
.s-h { font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.15; letter-spacing: -.01em; }
.s-p { font-size: 13px; color: var(--fg2); line-height: 1.4; }
.s-big { font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--accent); letter-spacing: .12em; text-align: center; }
.btn { border-radius: 16px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); font-family: var(--display); font-weight: 700; font-size: 15px; box-shadow: 0 10px 20px rgba(0,0,0,.45); }
.btn.p { background: rgba(var(--accent-rgb),.16); border-color: rgba(var(--accent-rgb),.5); }
.btn small { display: block; font-family: var(--body); font-weight: 500; color: var(--fg2); font-size: 12px; margin-top: 2px; }
.tick, .wait, .todo { display: flex; gap: 10px; align-items: center; font-size: 13px; padding: 8px 0; border-top: 1px solid var(--line); }
.tick::before, .wait::before, .todo::before { content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none; }
.tick::before { background: var(--green); box-shadow: 0 0 10px var(--green); } .wait::before { background: var(--accent); animation: pulse 1.1s ease-in-out infinite alternate; } .todo::before { border: 2px solid var(--fg3); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; font-size: 13px; }
.stamp { display: inline-block; align-self: flex-end; font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .08em; color: #fff; padding: 5px 10px; border-radius: 8px; transform: rotate(-6deg); animation: stamp .45s cubic-bezier(.2,1.4,.3,1) both; box-shadow: 0 10px 20px rgba(0,0,0,.5); }
.stamp.scam { background: var(--red); } .stamp.safe { background: var(--green); color: #06201e; } .stamp.careful { background: var(--amber); color: #2a1a00; }
.alert { background: #1a2130; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 12px; animation: drop .5s cubic-bezier(.2,1.2,.3,1) both; box-shadow: 0 16px 30px rgba(0,0,0,.5); }
.alert b { display: block; font-size: 13px; }
.kb { margin-top: auto; background: #1c2434; border-radius: 10px; padding: 6px; display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.kb span { height: 22px; border-radius: 4px; background: #2a3448; }
.nudge { background: rgba(var(--accent-rgb),.16); border: 1px solid rgba(var(--accent-rgb),.5); border-radius: 12px; padding: 8px 10px; font-size: 12px; animation: drop .5s both; }
.bars { display: flex; gap: 6px; align-items: flex-end; height: 70px; }
.bars i { flex: 1; background: linear-gradient(180deg, rgba(var(--accent-rgb),1), rgba(var(--accent-rgb),.3)); border-radius: 4px 4px 0 0; animation: grow .8s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.gauge { width: 110px; height: 110px; border-radius: 50%; margin: 6px auto; background: conic-gradient(var(--red) 0 var(--v), rgba(255,255,255,.08) var(--v) 100%); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 26px; box-shadow: 0 0 30px rgba(var(--accent-rgb),.3); animation: grow .9s both; }
.gauge::before { content: ""; position: absolute; width: 84px; height: 84px; border-radius: 50%; background: var(--bg2); }
.gauge span { position: relative; }
.pair { display: flex; gap: 10px; justify-content: center; align-items: center; }
.icon { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), #1b2c4f); box-shadow: 0 8px 18px rgba(0,0,0,.5); } .icon.copy { filter: hue-rotate(20deg) saturate(1.3); }

/* link between phones */
#link { position: relative; width: 120px; height: 6px; align-self: center; }
#link::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 3px dashed var(--fg3); opacity: .6; }
#link.on::before, #link.done::before { border-color: var(--accent); opacity: 1; }
#signal { position: absolute; top: -3px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); opacity: 0; }
#signal.run { animation: run 1.6s ease-in-out infinite; } #signal.run.reverse { animation-direction: reverse; }

/* caption band */
.band { display: grid; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; backdrop-filter: blur(10px); margin-top: 26px; }
.band .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#stepNo { font-size: 12px; letter-spacing: .14em; font-weight: 700; color: var(--accent); text-transform: uppercase; }
#stepTitle { font-family: var(--display); font-weight: 800; font-size: 24px; margin: 0; }
#caption { margin: 0; color: var(--fg2); font-size: 18px; max-width: 70ch; }
.ctl { display: flex; gap: 8px; } .ctl button { background: var(--panel); border: 1px solid var(--line); color: var(--fg); border-radius: 12px; padding: 8px 14px; font-family: var(--display); font-weight: 700; cursor: pointer; } .ctl button:focus-visible { outline: 2px solid var(--accent); }
#dots { display: flex; gap: 6px; flex-wrap: wrap; } .dot { width: 10px; height: 10px; border-radius: 5px; border: 0; background: var(--fg3); cursor: pointer; transition: width .2s; padding: 0; } .dot.on { width: 28px; background: var(--accent); }
.progress { height: 3px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; } #prog { height: 100%; width: 0; background: var(--accent); }

/* written steps + limits */
h2 { font-family: var(--display); font-size: 26px; margin: 10px 0 0; letter-spacing: -.01em; }
#steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#steps li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid transparent; cursor: pointer; color: var(--fg2); }
#steps li.on { background: var(--panel); border-color: rgba(var(--accent-rgb),.4); color: var(--fg); }
#steps b { font-family: var(--display); color: var(--accent); min-width: 22px; }
.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.limits .card { padding: 16px; font-size: 15px; } .limits .card b { display: block; font-family: var(--display); margin-bottom: 4px; }
footer { color: var(--fg3); font-size: 13px; }

@keyframes run { 0% { left: 0; opacity: 0 } 10% { opacity: 1 } 90% { opacity: 1 } 100% { left: 108px; opacity: 0 } }
@keyframes pulse { from { transform: scale(.85); opacity: .5 } to { transform: scale(1.15); opacity: 1 } }
@keyframes stamp { from { transform: scale(3) rotate(-14deg); opacity: 0 } to { transform: scale(1) rotate(-6deg); opacity: 1 } }
@keyframes drop { from { transform: translateY(-30px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes grow { from { transform: scaleY(0) } to { transform: scaleY(1) } }
@keyframes prog { from { width: 0 } to { width: 100% } }

@media (max-width: 760px) {
  #stage { grid-template-columns: 1fr; gap: 54px; min-height: 0; }
  #link { width: 6px; height: 60px; } #link::before { left: 2px; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 3px dashed var(--fg3); }
  #signal { left: -3px; top: 0; } @keyframes run { 0% { top: 0; opacity: 0 } 10% { opacity: 1 } 90% { opacity: 1 } 100% { top: 50px; opacity: 0 } }
  #phoneL, #phoneR, .phone.focus { transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
