/* ==========================================================================
   Termite — landing page
   ========================================================================== */

/* --- globals -------------------------------------------------------------- */

:root{--accent:#55F573}

html,body{margin:0;padding:0;background:#030202;color:#fff;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
html{scroll-behavior:smooth}
body{font-optical-sizing:auto}
a{color:#55F573;text-decoration:none}
a:hover{color:#8ef7a3}

@keyframes blink{0%,50%{opacity:1}50.01%,100%{opacity:0}}
@keyframes spinPulse{0%,100%{opacity:.45}50%{opacity:1}}

/* --- shared helpers ------------------------------------------------------- */

.flex-spacer{flex:1}
.accent{color:var(--accent)}

.eyebrow{font-family:ui-monospace,'SF Mono',Menlo,monospace;font-size:13px;font-weight:600;letter-spacing:1.5px;color:var(--accent);text-transform:uppercase}

.section-title{font-size:42px;font-weight:800;letter-spacing:-1.4px;margin:14px 0 0}
.section-title--balance{text-wrap:balance}
.section-title--720{max-width:720px;text-wrap:balance}
.section-title--680{max-width:680px;text-wrap:balance}
.section-title--640{max-width:640px;text-wrap:balance}
.section-lede{font-size:17px;line-height:1.6;color:rgba(255,255,255,0.6);margin:16px 0 0;max-width:620px;text-wrap:pretty}

/* --- nav ------------------------------------------------------------------ */

.nav{position:sticky;top:0;z-index:100;backdrop-filter:blur(20px) saturate(160%);-webkit-backdrop-filter:blur(20px) saturate(160%);background:rgba(3,2,2,0.72);border-bottom:1px solid rgba(255,255,255,0.07)}
.nav-inner{max-width:1180px;margin:0 auto;display:flex;align-items:center;gap:28px;padding:14px 32px}
.nav-brand,.nav-brand:hover{display:flex;align-items:center;gap:10px;color:#fff}
.nav-brand-mark{width:30px;height:30px;display:block}
.nav-brand-name{font-size:17px;font-weight:700;letter-spacing:-0.3px}
.nav-links{display:flex;align-items:center;gap:26px;font-size:14px;font-weight:500}
.nav-link{color:rgba(255,255,255,0.75)}
.nav-link:hover{color:#fff}
.nav-cta{display:flex;align-items:center;gap:7px;background:var(--accent);color:#04140a;font-size:13.5px;font-weight:700;padding:9px 16px;border-radius:999px;transition:transform 0.1s ease-out,filter 0.15s ease-out}
.nav-cta:hover{color:#04140a;filter:brightness(1.1)}
.nav-cta:active{transform:scale(0.96)}

/* --- hero ----------------------------------------------------------------- */

.hero{max-width:1180px;margin:0 auto;padding:88px 32px 60px;display:flex;gap:64px;align-items:center;flex-wrap:wrap}
.hero-copy{flex:1;min-width:440px}
.hero-title{font-size:62px;line-height:1.04;letter-spacing:-2.2px;font-weight:800;margin:18px 0 0;text-wrap:balance}
.hero-lede{font-size:19px;line-height:1.55;color:rgba(255,255,255,0.66);margin:24px 0 0;max-width:540px;text-wrap:pretty}
.hero-actions{display:flex;gap:12px;margin-top:34px;align-items:center;flex-wrap:wrap}
.hero-facts{display:flex;gap:22px;margin-top:38px;font-family:ui-monospace,'SF Mono',Menlo,monospace;font-size:12.5px;color:rgba(255,255,255,0.45);flex-wrap:wrap}

/* store buttons */
.btn-appstore{display:flex;align-items:center;gap:11px;background:#fff;color:#000;border-radius:14px;padding:11px 20px;transition:transform 0.1s ease-out,filter 0.15s ease-out}
.btn-appstore:hover{color:#000;filter:brightness(0.92)}
.btn-appstore:active{transform:scale(0.96)}
.btn-appstore-accent{display:flex;align-items:center;gap:11px;background:var(--accent);color:#04140a;border-radius:14px;padding:12px 22px;transition:transform 0.1s ease-out,filter 0.15s ease-out}
.btn-appstore-accent:hover{color:#04140a;filter:brightness(1.08)}
.btn-appstore-accent:active{transform:scale(0.96)}
.btn-play{display:flex;align-items:center;gap:11px;background:transparent;color:#fff;border:1px solid rgba(255,255,255,0.28);border-radius:14px;padding:10px 20px;transition:transform 0.1s ease-out,border-color 0.15s ease-out}
.btn-play:hover{color:#fff;border-color:rgba(255,255,255,0.55)}
.btn-play:active{transform:scale(0.96)}
.btn-play--footer{padding:11px 22px}
.store-label{display:flex;flex-direction:column;line-height:1.15;text-align:left}
.store-label-top{font-size:10.5px;font-weight:500;opacity:0.7}
.store-label-top--strong{font-weight:600;opacity:0.75}
.store-label-main{font-size:17px;font-weight:700;letter-spacing:-0.3px}
.store-label-main--strong{font-weight:800}
.link-quiet{font-size:15px;font-weight:600;color:rgba(255,255,255,0.8);padding:12px 8px}
.link-quiet:hover{color:#fff}

/* --- phone shell ---------------------------------------------------------- */

.hero-phone-slot{width:320px;height:696px;position:relative;flex:none}
.phone{width:402px;height:874px;transform:scale(0.796);transform-origin:0 0;border-radius:64px;background:#050506;box-shadow:0 0 0 2px #2e2e33,0 0 0 7px #131316,0 40px 100px rgba(0,0,0,0.65);position:relative}
.phone--glow{box-shadow:0 0 0 2px #2e2e33,0 0 0 7px #131316,0 40px 100px rgba(0,0,0,0.65),0 0 120px rgba(85,245,115,0.07)}
.phone-screen{position:absolute;inset:8px;border-radius:56px;overflow:hidden;background:#000}
.phone-screen--term{background:#0a0a0c}

/* status bar / island */
.status-bar{position:absolute;top:0;left:0;right:0;height:54px;display:flex;align-items:center;justify-content:space-between;padding:10px 38px 0;z-index:50}
.status-time{font-size:16px;font-weight:600;color:#fff}
.dynamic-island{position:absolute;top:12px;left:50%;margin-left:-59px;width:118px;height:34px;border-radius:18px;background:#000;z-index:60;border:0.5px solid rgba(255,255,255,0.07)}

/* --- session header ------------------------------------------------------- */

.sess-head{position:absolute;top:62px;left:12px;right:12px;z-index:40}
.sess-bar{border-radius:26px;background:rgba(120,120,128,0.18);border:0.5px solid rgba(255,255,255,0.1);height:56px;display:flex;align-items:center;padding:0 8px;gap:8px}
.sess-round-btn{width:38px;height:38px;border-radius:19px;background:rgba(255,255,255,0.08);border:0.5px solid rgba(255,255,255,0.1);display:flex;align-items:center;justify-content:center;flex:none}
.sess-round-btn--dots{gap:2.5px}
.sess-meta{flex:1;min-width:0}
.sess-title-row{display:flex;align-items:center;gap:6px}
.sess-name{font-size:14px;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sess-sub{font-size:11px;color:rgba(255,255,255,0.55);font-family:ui-monospace,monospace}
.dot-live{width:6px;height:6px;border-radius:3px;background:#30d158;box-shadow:0 0 6px #30d158}
.dot-live--lg{width:7px;height:7px;border-radius:4px;box-shadow:0 0 5px #30d158}
.dot-white{width:3px;height:3px;border-radius:2px;background:#fff}
.badge-persistent{display:inline-flex;align-items:center;gap:3px;font-size:10px;font-weight:700;color:#30d158;background:rgba(48,209,88,0.16);padding:2.5px 7px;border-radius:999px;flex:none}

.tab-row{display:flex;gap:8px;margin-top:8px;padding:0 2px}
.tab-row--agent{margin-top:10px;align-items:center}
.tab{display:flex;align-items:center;gap:7px;padding:7px 13px;border-radius:999px;background:rgba(255,255,255,0.1);border:0.5px solid rgba(255,255,255,0.12);font-size:13px;font-weight:600}
.tab-host{color:#ff6961;font-family:ui-monospace,monospace}
.tab-count{color:#fff}
.tab-close{color:rgba(255,255,255,0.45)}
.tab-new{display:flex;align-items:center;gap:5px;padding:7px 13px;border-radius:999px;background:rgba(255,255,255,0.06);font-size:13px;font-weight:600;color:rgba(255,255,255,0.85)}
.tab-new-plus{font-size:15px;line-height:1}
.agent-tag{font-size:11px;font-weight:700;color:#30d158;font-family:ui-monospace,monospace;margin-left:auto}

/* --- terminal body -------------------------------------------------------- */

.term{position:absolute;left:0;right:0;padding:0 16px;font-family:ui-monospace,'SF Mono',Menlo,monospace;font-size:12px;line-height:1.62;color:#fff;overflow:hidden}
.term--hero{top:194px;bottom:236px}
.term--panel{top:190px;bottom:206px}
.term--faded{top:128px;bottom:60px;color:rgba(255,255,255,0.35);filter:blur(0.4px)}

.c-green{color:#30d158}
.c-blue{color:#0a84ff}
.c-purple{color:#bf5af2}
.c-yellow{color:#ffd60a}
.c-red{color:#ff453a}
.c-orange{color:#ff9f0a}
.c-dim45{color:rgba(235,235,245,0.45)}
.c-dim55{color:rgba(235,235,245,0.55)}
.c-dim70{color:rgba(235,235,245,0.7)}
.c-dim85{color:rgba(235,235,245,0.85)}
.w600{font-weight:600}
.mt4{margin-top:4px}
.mt6{margin-top:6px}
.mt8{margin-top:8px}
.term-spinner{margin-top:10px;animation:spinPulse 1.6s ease-in-out infinite}

.term-prompt{margin-top:10px;border:0.5px solid rgba(255,159,10,0.5);border-radius:8px;padding:10px 12px;background:rgba(255,159,10,0.07)}
.term-prompt-q{color:#ff9f0a;font-weight:600}
.term-prompt-sel{margin-top:6px;color:#fff}
.term-prompt-opt{color:rgba(235,235,245,0.6)}

/* --- input stack ---------------------------------------------------------- */

.input-stack{position:absolute;left:0;right:0;bottom:0;z-index:40;display:flex;flex-direction:column;gap:6px;padding-bottom:10px}
.qc-row{display:flex;gap:6px;padding:0 10px;overflow:hidden}
.qc{padding:0 12px;height:32px;display:flex;align-items:center;border-radius:10px;background:rgba(44,44,46,0.9);border:0.5px solid rgba(255,255,255,0.08);font-family:ui-monospace,monospace;font-size:12.5px;font-weight:500;color:rgba(255,255,255,0.9);flex:none}
.qc--approve{padding:0 13px;background:rgba(48,209,88,0.22);border-color:rgba(48,209,88,0.3);font-weight:600;color:#30d158}
.qc--danger{background:rgba(255,69,58,0.22);border-color:rgba(255,69,58,0.3);color:#ff6961}
.qc--approve-solid{padding:0 13px;height:34px;background:#30d158;border:0;font-size:13px;font-weight:700;color:#04140a;box-shadow:0 0 16px rgba(48,209,88,0.4)}
.qc-row--lg .qc{height:34px;font-size:13px}

.composer-row{margin:0 8px;display:flex;align-items:center;gap:8px}
.raw-btn{height:44px;padding:0 14px;display:flex;align-items:center;border-radius:14px;background:rgba(44,44,46,0.9);border:0.5px solid rgba(255,255,255,0.08);font-size:14px;font-weight:600;color:rgba(255,255,255,0.85);flex:none}
.composer{flex:1;border-radius:22px;background:rgba(28,28,30,0.92);border:0.5px solid rgba(255,255,255,0.1);height:44px;display:flex;align-items:center;padding:0 8px 0 14px;gap:9px}
.composer-placeholder{flex:1;font-family:ui-monospace,monospace;font-size:13px;color:rgba(255,255,255,0.4)}
.send-btn{width:30px;height:30px;border-radius:15px;background:#30d158;display:flex;align-items:center;justify-content:center}

.key-row{display:flex;gap:6px;padding:0 10px;overflow:hidden;align-items:center}
.keycap{min-width:44px;height:34px;padding:0 11px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:rgba(44,44,46,0.9);border:0.5px solid rgba(255,255,255,0.08);font-family:ui-monospace,monospace;font-size:13px;font-weight:500;color:rgba(255,255,255,0.9);flex:none}
.icon-key{width:38px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:17px;background:rgba(44,44,46,0.9);border:0.5px solid rgba(255,255,255,0.08);flex:none}

.home-bar{width:134px;height:5px;border-radius:3px;background:rgba(255,255,255,0.35);margin:6px auto 0}
.home-bar--pinned{background:rgba(255,255,255,0.5);margin:0 auto;position:absolute;bottom:8px;left:50%;transform:translateX(-50%)}
.home-bar--pinned-dim{background:rgba(255,255,255,0.35)}

/* --- scroll stories ------------------------------------------------------- */

.story-intro{max-width:1180px;margin:0 auto}
.story-intro--flow{padding:90px 32px 40px}
.story-intro--persist{padding:110px 32px 40px}

.story{max-width:1180px;margin:0 auto;padding:0 32px;display:flex;gap:72px}
.story--reverse{flex-direction:row-reverse}
.story-steps{flex:1;padding:8vh 0 16vh;display:flex;flex-direction:column;gap:44vh}

.story-step{border-left:3px solid rgba(255,255,255,0.12);padding-left:26px;opacity:0.4;transition:opacity 0.4s,border-color 0.4s}
.story-step.is-active{opacity:1;border-left-color:var(--accent)}
.step-num{font-family:ui-monospace,monospace;font-size:13px;color:var(--accent);font-weight:700}
.step-title{font-size:26px;font-weight:700;letter-spacing:-0.6px;margin:8px 0 0}
.step-body{font-size:16px;line-height:1.6;color:rgba(255,255,255,0.62);margin:10px 0 0;max-width:400px;text-wrap:pretty}
.persist-word{color:#30d158;font-weight:600}

.story-phone-col{width:320px;flex:none}
.story-phone-sticky{position:sticky;top:110px;width:320px;height:696px}

.panel{position:absolute;inset:0;opacity:0;transform:translateY(16px) scale(0.985);z-index:1;transition:opacity 0.55s cubic-bezier(0.32,0.72,0,1),transform 0.55s cubic-bezier(0.32,0.72,0,1)}
.panel.is-active{opacity:1;transform:translateY(0) scale(1);z-index:2}
.panel--black{background:#000}
.panel--term{background:#0a0a0c}
.panel--lock{background:radial-gradient(120% 80% at 0% 0%,#0d3319 0%,#07220f 52%,#020a05 100%)}
.panel-shot{width:100%;height:100%;object-fit:cover;display:block}

/* --- lock screen panels --------------------------------------------------- */

.lock-top{text-align:center;padding-top:74px}
.lock-date{font-size:20px;font-weight:600;color:rgba(255,255,255,0.9);margin-top:26px}
.lock-time{font-size:88px;font-weight:250;letter-spacing:-2px;color:#fff;line-height:1.05;margin-top:2px}

.lock-card{margin:34px 14px 0;border-radius:24px;background:rgba(10,10,12,0.62);backdrop-filter:blur(24px);border:0.5px solid rgba(255,255,255,0.1);padding:15px 16px}
.lock-card--ask{background:rgba(10,10,12,0.68);border-color:rgba(255,159,10,0.35);box-shadow:0 0 40px rgba(255,159,10,0.12)}
.lock-card--done{border-color:rgba(48,209,88,0.3)}
.lock-card-head{display:flex;align-items:center;gap:9px}
.lock-app-icon{width:26px;height:26px;border-radius:7px;background:rgba(48,209,88,0.18);display:flex;align-items:center;justify-content:center;font-family:ui-monospace,monospace;font-size:11px;font-weight:800;color:#30d158;flex:none}
.lock-app-meta{flex:1;min-width:0}
.lock-app-name{font-size:15px;font-weight:700}
.lock-app-host{font-size:11px;color:rgba(235,235,245,0.6)}
.lock-timer{font-family:ui-monospace,monospace;font-size:14px;color:rgba(235,235,245,0.65)}

.lock-status-row{display:flex;gap:7px;margin-top:11px;align-items:center}
.lock-status-dot{width:15px;height:15px;border-radius:8px;background:#30d158;display:flex;align-items:center;justify-content:center;flex:none}
.lock-status-glyph{font-family:ui-monospace,monospace;font-size:8px;font-weight:800;color:#04140a}
.lock-status-text{font-size:13.5px;color:rgba(235,235,245,0.7)}

.lock-ask-icon{width:26px;height:26px;border-radius:13px;background:rgba(255,159,10,0.2);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;color:#ff9f0a;flex:none}
.lock-ask-q{margin-top:11px;font-size:14.5px;font-weight:600;color:#fff;line-height:1.4}
.lock-ask-cmd{font-family:ui-monospace,monospace;color:#ffd60a}
.lock-ask-actions{display:flex;gap:10px;margin-top:13px}
.lock-approve{flex:1;height:40px;border-radius:12px;background:#30d158;display:flex;align-items:center;justify-content:center;gap:7px;font-size:14px;font-weight:700;color:#003912}
.lock-reject{flex:1;height:40px;border-radius:12px;background:#ff453a;display:flex;align-items:center;justify-content:center;gap:7px;font-size:14px;font-weight:700;color:#fff}

.lock-done-icon{width:26px;height:26px;border-radius:13px;background:rgba(48,209,88,0.2);display:flex;align-items:center;justify-content:center;flex:none}
.lock-done-tag{font-size:12px;font-weight:700;color:#30d158}
.lock-done-line{font-size:13.5px;font-weight:600;color:#30d158}
.lock-done-note{font-size:12px;color:rgba(235,235,245,0.5)}

.lock-actions{position:absolute;bottom:34px;left:0;right:0;display:flex;justify-content:space-between;padding:0 46px}
.lock-action{width:50px;height:50px;border-radius:25px;background:rgba(255,255,255,0.14);backdrop-filter:blur(16px);display:flex;align-items:center;justify-content:center}

/* --- reattach panel ------------------------------------------------------- */

.reattach-bar{border-radius:20px;background:rgba(120,120,128,0.24);backdrop-filter:blur(18px) saturate(180%);border:0.5px solid rgba(255,255,255,0.12);height:50px;display:flex;align-items:center;padding:0 12px;gap:8px}
.dot-amber{width:6px;height:6px;border-radius:3px;background:#ff9f0a;box-shadow:0 0 6px #ff9f0a;animation:spinPulse 1.2s ease-in-out infinite}
.reattach-name{font-size:14px;font-weight:600}
.reattach-sub{font-size:11px;color:#ff9f0a;font-family:ui-monospace,monospace}
.reattach-toast{position:absolute;left:24px;right:24px;top:44%;border-radius:18px;background:rgba(40,40,44,0.9);backdrop-filter:blur(24px);border:0.5px solid rgba(255,255,255,0.14);padding:18px;text-align:center;z-index:45}
.reattach-toast-title{font-family:ui-monospace,monospace;font-size:13px;color:#ff9f0a;font-weight:700;animation:spinPulse 1.2s ease-in-out infinite}
.reattach-toast-body{font-size:12.5px;color:rgba(255,255,255,0.55);margin-top:8px;line-height:1.5}

/* --- features ------------------------------------------------------------- */

.features{max-width:1180px;margin:0 auto;padding:130px 32px 0}
.feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:44px}
.feature-card{background:#0d0d0f;border:1px solid rgba(255,255,255,0.07);border-radius:18px;padding:24px;min-width:0}
.feature-title{font-size:19px;font-weight:700;margin:18px 0 0;letter-spacing:-0.4px}
.feature-body{font-size:14.5px;line-height:1.6;color:rgba(255,255,255,0.58);margin:8px 0 0;text-wrap:pretty}

.pill-row{display:flex;gap:5px;flex-wrap:wrap}
.pill{padding:5px 11px;border-radius:999px;font-size:11.5px;font-weight:600;border:0.5px solid rgba(255,255,255,0.12)}
.pill--green{background:rgba(52,199,89,0.6)}
.pill--red{background:rgba(255,59,48,0.6)}
.pill--grey{background:rgba(60,60,67,0.85)}
.pill--mono{font-family:ui-monospace,monospace}

.notif{border-radius:14px;background:rgba(40,40,44,0.9);border:0.5px solid rgba(255,255,255,0.1);padding:11px 13px}
.notif-head{display:flex;align-items:center;gap:8px}
.notif-icon{width:20px;height:20px;border-radius:5px;background:#030202;display:flex;align-items:center;justify-content:center;flex:none}
.notif-icon-img{width:14px;height:14px}
.notif-app{font-size:11px;font-weight:700;color:rgba(255,255,255,0.6)}
.notif-time{font-size:11px;color:rgba(255,255,255,0.4)}
.notif-title{font-size:12.5px;font-weight:600;margin-top:7px}
.notif-body{font-size:12px;color:rgba(255,255,255,0.55);margin-top:2px;font-family:ui-monospace,monospace}
.notif-actions{display:flex;gap:7px;margin-top:9px}
.notif-approve{flex:1;text-align:center;padding:5px 0;border-radius:8px;background:rgba(48,209,88,0.25);color:#30d158;font-size:11.5px;font-weight:700}
.notif-reject{flex:1;text-align:center;padding:5px 0;border-radius:8px;background:rgba(255,69,58,0.2);color:#ff453a;font-size:11.5px;font-weight:700}
.notif-stop{flex:1;text-align:center;padding:5px 0;border-radius:8px;background:rgba(255,255,255,0.08);color:rgba(255,255,255,0.7);font-size:11.5px;font-weight:700}

.island-wrap{display:flex;justify-content:center;padding:6px 0}
.island{display:flex;align-items:center;gap:26px;background:#000;border:0.5px solid rgba(255,255,255,0.14);border-radius:24px;padding:9px 18px}
.island-app{display:flex;align-items:center;gap:7px}
.island-glyph{width:18px;height:18px;border-radius:5px;background:rgba(48,209,88,0.2);display:flex;align-items:center;justify-content:center;font-family:ui-monospace,monospace;font-size:8px;font-weight:800;color:#30d158}
.island-name{font-size:12px;font-weight:700}
.island-timer{font-family:ui-monospace,monospace;font-size:12px;color:#30d158}

.nl-input{border-radius:12px;background:rgba(40,40,44,0.9);border:0.5px solid rgba(255,255,255,0.1);padding:10px 13px;font-size:12.5px;color:rgba(255,255,255,0.75)}
.nl-output{font-family:ui-monospace,monospace;font-size:12px;color:var(--accent);margin:8px 0 0 13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.attach-row{display:flex;align-items:center;gap:9px;border-radius:12px;background:rgba(40,40,44,0.9);border:0.5px solid rgba(255,255,255,0.1);padding:9px 13px;min-width:0}
.attach-thumb{width:26px;height:26px;border-radius:6px;background:linear-gradient(135deg,#30d158,#0f7a33);flex:none}
.attach-path{flex:1;min-width:0;font-family:ui-monospace,monospace;font-size:11.5px;color:rgba(255,255,255,0.7);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.keycap-sm{min-width:34px;height:30px;padding:0 8px;display:flex;align-items:center;justify-content:center;border-radius:7px;background:rgba(44,44,46,0.9);border:0.5px solid rgba(255,255,255,0.08);font-family:ui-monospace,monospace;font-size:11.5px;font-weight:500}
.keycap-sm--alt{background:rgba(60,60,67,0.85);border-color:rgba(255,255,255,0.12);font-weight:600}

/* --- gallery -------------------------------------------------------------- */

.gallery{max-width:1180px;margin:0 auto;padding:130px 32px 0}
.gallery-row{display:flex;gap:36px;margin-top:44px;justify-content:space-between;flex-wrap:wrap}
.gal-item{display:flex;flex-direction:column;gap:16px;align-items:center}
.gal-phone{width:250px;border-radius:42px;background:#050506;padding:6px;box-shadow:0 0 0 2px #2e2e33,0 30px 70px rgba(0,0,0,0.55)}
.gal-shot{width:100%;border-radius:36px;display:block}
.gal-caption{text-align:center;max-width:250px}
.gal-caption-title{font-size:15px;font-weight:700}
.gal-caption-body{font-size:13px;color:rgba(255,255,255,0.5);margin-top:3px;line-height:1.5}

/* --- platforms ------------------------------------------------------------ */

.platforms{max-width:1180px;margin:0 auto;padding:130px 32px 0}
.platforms-inner{display:flex;gap:64px;align-items:center;flex-wrap:wrap}
.platforms-copy{flex:1;min-width:380px}
.platforms-lede{font-size:17px;line-height:1.65;color:rgba(255,255,255,0.6);margin:18px 0 0;max-width:480px;text-wrap:pretty}
.platforms-list{display:flex;flex-direction:column;gap:12px;margin-top:26px;font-size:15px;color:rgba(255,255,255,0.75)}
.platforms-item{display:flex;gap:10px;align-items:baseline}
.platforms-bullet{color:var(--accent);font-family:ui-monospace,monospace}
.ipad-frame{width:500px;flex:none;border-radius:36px;background:#050506;padding:11px;box-shadow:0 0 0 2px #2e2e33,0 0 0 7px #131316,0 40px 100px rgba(0,0,0,0.6)}
.ipad-shot{width:100%;border-radius:26px;display:block}

/* --- security band -------------------------------------------------------- */

.security{max-width:1180px;margin:110px auto 0;padding:0 32px}
.security-band{border-radius:22px;border:1px solid rgba(85,245,115,0.18);background:linear-gradient(180deg,rgba(85,245,115,0.05),rgba(85,245,115,0.01));padding:40px 44px}
.security-head{display:flex;align-items:center;gap:12px}
.security-title{font-size:28px;font-weight:800;letter-spacing:-0.8px;margin:0}
.security-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px;margin-top:28px}
.security-label{font-family:ui-monospace,monospace;font-size:13px;font-weight:700;color:var(--accent)}
.security-body{font-size:13.5px;line-height:1.55;color:rgba(255,255,255,0.6);margin:7px 0 0}

/* --- footer --------------------------------------------------------------- */

.footer{text-align:center;padding:150px 32px 60px}
.footer-logo{width:72px;height:72px}
.footer-title{font-size:48px;font-weight:800;letter-spacing:-1.6px;margin:26px 0 0;text-wrap:balance}
.footer-lede{font-size:17px;color:rgba(255,255,255,0.55);margin:14px 0 0}
.footer-actions{display:flex;justify-content:center;gap:12px;margin-top:30px;flex-wrap:wrap}
.footer-meta{margin-top:70px;padding-top:26px;border-top:1px solid rgba(255,255,255,0.07);display:flex;justify-content:space-between;max-width:1116px;margin-left:auto;margin-right:auto;font-size:12.5px;color:rgba(255,255,255,0.35);font-family:ui-monospace,'SF Mono',Menlo,monospace}
.footer-meta a{color:inherit}
.footer-meta a:hover{color:var(--accent)}

/* ==========================================================================
   Responsive layer (tablet/mobile)
   Desktop is frozen at >=1100px — every rule below lives in a max-width query.
   ========================================================================== */

/* --- tablet (<=1024) ------------------------------------------------------ */

@media (max-width:1024px){
  /* touch targets — tablet is a touch band too, so 44px starts here, not at 700 */
  .nav-brand,.nav-cta{box-sizing:border-box;min-height:44px}
  .link-quiet{padding:13px 10px}
  .story-intro,.features,.gallery,.platforms{scroll-margin-top:84px}
  .hero{gap:48px}
  .hero-phone-slot{margin:0 auto}
  .story{gap:48px}
  .story-steps{gap:34vh}
  .feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gallery-row{gap:34px 20px;justify-content:center;max-width:560px;margin-left:auto;margin-right:auto}
  .platforms-inner{gap:48px}
  .ipad-frame{margin:0 auto}
  .security-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 28px}
}

/* --- mobile (<=700) ------------------------------------------------------- */

@media (max-width:700px){
  /* nav — anchor links drop out, brand + CTA keep 44px targets */
  .nav-inner{gap:12px;padding:10px 20px}
  .nav-links{display:none}
  .nav-cta{padding:0 18px;font-size:14px}
  .story-intro,.features,.gallery,.platforms{scroll-margin-top:72px}

  .section-title{font-size:32px;letter-spacing:-0.9px}
  .section-lede{font-size:16px}

  /* hero */
  .hero{padding:56px 20px 48px;gap:36px}
  .hero-copy{flex:1 1 100%;min-width:0}
  .hero-title{font-size:40px;letter-spacing:-1.2px}
  .hero-lede{font-size:17px;margin-top:20px}
  .hero-actions{margin-top:28px;gap:10px}
  .hero-actions .btn-appstore{padding:10px 16px}
  .hero-actions .btn-play{padding:9px 16px}
  .hero-facts{gap:8px 16px;margin-top:26px;font-size:12px}
  .hero-phone-slot{--s:0.647;width:calc(402px * var(--s));height:calc(874px * var(--s));margin:0 auto}
  .hero-phone-slot .phone{transform:scale(var(--s))}

  /* stories — phone pins under the nav, steps scroll beneath it */
  .story-intro--flow{padding:64px 20px 24px}
  .story-intro--persist{padding:76px 20px 24px}
  .story,.story--reverse{flex-direction:column-reverse;gap:0;padding:0 20px}
  .story-phone-col{position:sticky;top:66px;z-index:5;width:auto;margin:0 -20px;padding:10px 20px 26px;background:linear-gradient(180deg,#030202 calc(100% - 26px),rgba(3,2,2,0) 100%)}
  .story-phone-sticky{--s:0.53;position:static;width:calc(402px * var(--s));height:calc(874px * var(--s));margin:0 auto}
  .story-phone-sticky .phone{transform:scale(var(--s))}
  .story-steps{padding:0 0 18vh;gap:12vh}
  .story-step{padding-top:30vh;padding-left:18px;border-left-color:rgba(255,255,255,0.09)}
  .step-title{font-size:21px;letter-spacing:-0.4px}
  .step-body{font-size:15px;max-width:none}

  /* features / gallery / platforms */
  .features{padding:80px 20px 0}
  .feature-grid{grid-template-columns:1fr;margin-top:32px}
  .gallery{padding:80px 20px 0}
  .gallery-row{flex-direction:column;align-items:center;gap:36px;margin-top:32px}
  .platforms{padding:80px 20px 0}
  .platforms-copy{flex:1 1 100%;min-width:0}
  .platforms-lede{font-size:16px}
  .platforms-list{font-size:14.5px;margin-top:22px}
  .ipad-frame{width:100%;max-width:500px;padding:8px;border-radius:28px}
  .ipad-shot{border-radius:21px}

  /* security */
  .security{margin:76px auto 0;padding:0 20px}
  .security-band{padding:26px 22px}
  .security-title{font-size:22px;letter-spacing:-0.5px}
  .security-grid{margin-top:22px;gap:22px}

  /* footer */
  .footer{padding:96px 20px 48px}
  .footer-logo{width:56px;height:56px}
  .footer-title{font-size:36px;letter-spacing:-1.1px}
  .footer-lede{font-size:16px}
  .footer-actions{flex-direction:column;align-items:stretch;max-width:300px;margin-left:auto;margin-right:auto}
  .footer-actions .btn-appstore-accent,.footer-actions .btn-play{justify-content:center}
  .footer-meta{margin-top:48px;gap:8px}
}

@media (max-width:560px){
  .security-grid{grid-template-columns:1fr}
  .footer-meta{flex-direction:column;align-items:center;text-align:center}
}

@media (max-width:430px){
  .hero-title{font-size:38px}
  .feature-card{padding:20px}
  .security-band{padding:24px 18px}
  .gal-phone{width:100%;max-width:250px}
  .gal-caption{max-width:100%}
}

@media (max-width:380px){
  .hero-title{font-size:34px;letter-spacing:-1px}
  .section-title{font-size:28px}
  .footer-title{font-size:32px}
  .hero-phone-slot{--s:0.572}
  .story-phone-sticky{--s:0.47}
}

/* short viewports — keep >=25vh of step text under the pinned panel */
@media (max-width:700px) and (max-height:760px){
  .story-phone-sticky{--s:0.40}
}
@media (max-width:700px) and (max-height:620px){
  .story-phone-sticky{--s:0.35}
  .hero-phone-slot{--s:0.55}
}

/* --- reduced motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *{animation:none !important;transition-duration:0.01ms !important}
  [id^="ch1-p"],[id^="ch2-p"]{transform:none !important}
  /* mirrors the reduced-motion branch of the original updateStories() */
  .panel{transition:opacity 0.2s ease}
}
