:root {
  --bg: #17181A;
  --bg-2: #1E2023;
  --surface: #25272B;
  --line: #2E3034;
  --text: #F4F4F2;
  --muted: #B4B3AE;
  --dim: #8E8D89;
  --red: #D63A2F;
  --red-hover: #E5483C;
  --red-text: #FF6B5E;
  --red-tint: rgba(214, 58, 47, .15);
  --font: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Overpass Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --gut: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--red); color: #FFFFFF; }
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: var(--gut); }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 20; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }

/* reveal on scroll, only while the script is running */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(23, 24, 26, .78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: background-color .3s, border-color .3s, box-shadow .3s; }
.top.scrolled { background: rgba(23, 24, 26, .92); border-color: var(--line); box-shadow: 0 14px 30px -22px rgba(0, 0, 0, .9); }
.top-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.progress { position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 22px; letter-spacing: -.03em; line-height: 1; }
.brand-mark { width: 36px; height: 36px; transition: transform .4s var(--ease-back); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; font-weight: 600; }
.nav a { position: relative; text-decoration: none; color: var(--muted); padding-block: 6px; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--red); transform: scaleX(0); transition: transform .35s var(--ease); }
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active::after { transform: scaleX(1); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--muted); transition: color .2s, background-color .2s, transform .2s; }
.icon-link:hover { color: var(--text); background: var(--surface); transform: translateY(-1px); }
.icon-link svg { width: 22px; height: 22px; }
@media (max-width: 900px) { .nav { display: none; } .top-actions { margin-left: auto; } }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; line-height: 1; padding: 15px 22px; border-radius: 12px; text-decoration: none; transition: background-color .2s, box-shadow .2s, transform .2s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; transition: transform .3s var(--ease-back); }
.btn-red { background: var(--red); color: #FFFFFF; box-shadow: 0 10px 24px -14px rgba(214, 58, 47, .9); }
.btn-red:hover { background: var(--red-hover); box-shadow: 0 16px 30px -14px rgba(214, 58, 47, .95); }
.btn-red:hover svg { transform: translateY(2px); }
.btn-ghost { box-shadow: inset 0 0 0 1.5px rgba(244, 244, 242, .38); color: var(--text); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--text); background: rgba(244, 244, 242, .04); }
.btn-ghost:hover svg { transform: rotate(-10deg) scale(1.1); }
.btn-sm { padding: 10px 16px; font-size: 14px; border-radius: 10px; }

.eyebrow { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--red-text); }

/* hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 8vw, 104px) clamp(64px, 9vw, 120px); }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.trail path { fill: none; stroke: var(--text); stroke-opacity: .08; stroke-width: 3; stroke-dasharray: 14 12; stroke-linecap: round; animation: march 30s linear infinite; }
@keyframes march { to { stroke-dashoffset: -520; } }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-in > * { min-width: 0; }
.hero h1 { margin-top: 18px; }
.tagline { display: block; font-size: clamp(52px, 9vw, 112px); font-weight: 900; line-height: .9; letter-spacing: -.05em; text-wrap: balance; }
.h1-sub { display: block; margin-top: 24px; font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; max-width: 30ch; }
.lead { margin-top: 12px; font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 52ch; }
.hero .actions { margin-top: 30px; }
.meta { margin-top: 16px; font-family: var(--mono); font-size: 13.5px; color: var(--dim); }

.hero-art { display: grid; place-items: center; }
.icon-float { animation: float 6s ease-in-out 1.6s infinite; }
.icon-btn { display: block; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 26%; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); }
.icon-btn:active { transform: perspective(900px) scale(.97); }
.app-icon { width: min(100%, 320px); height: auto; transform: rotate(-4deg); filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55)); transition: transform .5s var(--ease-back); }
.icon-btn:hover .app-icon { transform: rotate(0deg) scale(1.03); }
.stack-svg.play .slab { animation: drop .9s var(--ease-back) both; }
.stack-svg.play .s1 { animation-delay: .25s; }
.stack-svg.play .s2 { animation-delay: .5s; }
.stack-svg.play .s3 { animation-delay: .75s; }
@keyframes drop { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-10px); } }

/* on phones the square icon becomes a wide banner */
.m-banner { display: none; }
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-art { order: -1; justify-items: stretch; }
  .icon-float { display: none; }
  .m-banner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 136px; padding: 0 14px 0 24px; border: 0; border-radius: 24px; background: var(--red); color: #FFFFFF; text-align: left; overflow: hidden; cursor: pointer; box-shadow: 0 26px 44px -26px rgba(214, 58, 47, .9); transition: transform .25s var(--ease); -webkit-tap-highlight-color: transparent; }
  .m-banner:active { transform: scale(.98); }
  .m-trail { position: absolute; inset: 0; width: 100%; height: 100%; }
  .m-trail path { fill: none; stroke: #FFFFFF; stroke-opacity: .22; stroke-width: 2.5; stroke-dasharray: 10 9; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: march 30s linear infinite; }
  .m-word { position: relative; font-weight: 900; font-size: 46px; line-height: .9; letter-spacing: -.045em; }
  .m-word small { display: block; margin-top: 10px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; opacity: .85; }
  .m-stones { position: relative; flex: none; width: 132px; height: 92px; filter: drop-shadow(0 10px 12px rgba(122, 26, 16, .35)); }
}
@media (max-width: 360px) {
  .m-word { font-size: 38px; }
  .m-stones { width: 108px; height: 76px; }
}

/* terminals */
.term { position: relative; margin-top: 28px; background: #0F1011; border: 1px solid var(--line); border-radius: 14px; padding: 16px 84px 16px 20px; font-family: var(--mono); font-size: 14px; line-height: 1.8; max-width: 540px; overflow-x: auto; }
.term p { white-space: nowrap; }
.term .pr { color: var(--red-text); }
.term .out { color: var(--dim); }
.js .term[data-type]:not(.done) .cmd:not(.on), .js .term[data-type]:not(.done) .out:not(.on) { visibility: hidden; }
.term .out.on { animation: fade-in .4s var(--ease) both; }
.cmd.typing::after { content: ""; display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -.18em; background: var(--red-text); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.copy { position: absolute; top: 12px; right: 12px; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--dim); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; cursor: pointer; transition: color .2s, border-color .2s, background-color .2s; }
.copy:hover { color: var(--text); border-color: var(--dim); }
.copy.ok { color: #FFFFFF; background: var(--red); border-color: var(--red); }

/* sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.band { background: var(--bg-2); border-block: 1px solid var(--line); }
.section h2 { margin-top: 14px; font-size: clamp(34px, 5vw, 56px); font-weight: 900; line-height: 1; letter-spacing: -.04em; max-width: 18ch; text-wrap: balance; }

.features { list-style: none; margin: 52px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.features li { border-top: 1px solid var(--line); padding-top: 26px; }
.fi { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--red-tint); color: var(--red-text); transition: transform .45s var(--ease-back), background-color .3s, color .3s; }
.fi svg { width: 24px; height: 24px; }
.features li:hover .fi { transform: translateY(-4px) rotate(-8deg); background: var(--red); color: #FFFFFF; }
.features h3 { margin-top: 18px; font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.features p { margin-top: 8px; color: var(--muted); font-size: 16px; }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

.shots { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.shots-text p:not(.eyebrow) { margin-top: 18px; color: var(--muted); max-width: 42ch; }
.shots-row { display: flex; justify-content: center; gap: clamp(8px, 3vw, 28px); }
/* figure stays put (hover target), inner div floats, img tilts and lifts */
.shot { position: relative; margin: 0; width: min(48%, 300px); }
.shot:last-child { margin-top: 56px; }
.shot-float { animation: float 7s ease-in-out infinite; }
.shot:last-child .shot-float { animation-delay: -3.5s; }
.shot img { width: 100%; height: auto; transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px)) scale(var(--s, 1)); transition: transform .45s var(--ease), opacity .4s, filter .4s; }
.shot.is-active { z-index: 2; }
.shot.is-active .shot-float { animation-play-state: paused; }
.shot.is-active img { --lift: -14px; --s: 1.05; }
.shots-row.has-active .shot:not(.is-active) img { --s: .95; opacity: .55; filter: saturate(.6); }
@media (max-width: 860px) { .shots { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 52px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 22px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #FFFFFF; font-weight: 800; font-size: 16px; line-height: 1; }
.js .steps li.in::before { animation: pop .6s var(--ease-back) both; animation-delay: calc(var(--d, 0s) + .2s); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.steps h3 { margin-top: 16px; font-size: 19px; font-weight: 800; }
.steps p { margin-top: 6px; color: var(--muted); font-size: 16px; }
.steps a { color: var(--red-text); }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.note { margin-top: 40px; color: var(--dim); font-size: 15.5px; max-width: 64ch; }
.note a { color: var(--text); }

.os { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.os .body { margin-top: 18px; color: var(--muted); max-width: 46ch; }
.os .actions { margin-top: 28px; }
.os .term { margin-top: 0; max-width: none; font-size: 13px; overflow-x: hidden; }
.os .term p { white-space: normal; overflow-wrap: anywhere; }
.os .term p + p { margin-top: 6px; }
@media (max-width: 860px) { .os { grid-template-columns: 1fr; } }

.faq { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.faq-side { position: sticky; top: 100px; }
.faq-lead { margin-top: 18px; color: var(--muted); max-width: 32ch; }
.ask { position: relative; margin-top: 32px; padding: 24px 24px 26px; max-width: 360px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; transition: border-color .3s, transform .4s var(--ease); }
.ask:hover { border-color: rgba(255, 107, 94, .4); transform: translateY(-3px); }
.ask-mark { position: absolute; right: -22px; bottom: -30px; width: 150px; height: 150px; opacity: .1; transform: rotate(-8deg); transition: transform .6s var(--ease-back), opacity .4s; pointer-events: none; }
.ask:hover .ask-mark { opacity: .18; transform: rotate(0deg) translateY(-6px); }
.ask h3 { position: relative; font-size: 19px; font-weight: 800; line-height: 1.25; }
.ask p { position: relative; margin-top: 6px; color: var(--muted); font-size: 15.5px; max-width: 26ch; }
.ask .btn { position: relative; margin-top: 18px; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; cursor: pointer; list-style: none; padding: 20px 44px 20px 0; font-weight: 700; font-size: 18px; line-height: 1.35; transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--red-text); }
.faq summary::after { content: ""; position: absolute; right: 10px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim); transform: translateY(-70%) rotate(45deg); transition: transform .35s var(--ease), border-color .2s; }
.faq summary:hover::after { border-color: var(--red-text); }
.faq details[open]:not(.closing) summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-a { overflow: hidden; }
.faq-a p { padding-bottom: 20px; color: var(--muted); max-width: 60ch; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } .faq-side { position: static; } .ask { max-width: none; } }

/* bottom dock for quick jumps on phones */
.dock { display: none; }
@media (max-width: 900px) {
  .dock { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; display: flex; gap: 2px; padding: 6px; border-radius: 24px; background: rgba(30, 32, 35, .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 20px 44px -16px rgba(0, 0, 0, .9); transform: translateX(-50%); animation: dock-in .7s var(--ease) .4s both; }
  .dock a { position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 46px; border-radius: 18px; color: var(--dim); transition: color .25s; -webkit-tap-highlight-color: transparent; }
  .dock a svg { width: 23px; height: 23px; transition: transform .4s var(--ease-back); }
  .dock a:active svg { transform: scale(.88); }
  .dock a.active { color: var(--red-text); }
  .dock a.active svg { transform: translateY(-3px); }
  .dock-pill { position: absolute; top: 6px; left: 0; width: 48px; height: 46px; border-radius: 18px; background: var(--red-tint); box-shadow: inset 0 0 0 1px rgba(255, 107, 94, .32), 0 0 22px -2px rgba(214, 58, 47, .45); opacity: 0; transform: translateX(var(--x, 6px)); transition: transform .5s var(--ease-back), opacity .3s; }
  .dock-pill::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--red-text); }
  .dock.ready .dock-pill { opacity: 1; }
}
@keyframes dock-in { from { opacity: 0; transform: translate(-50%, 130%); } to { opacity: 1; transform: translateX(-50%); } }

/* footer */
.foot { border-top: 1px solid var(--line); padding-block: 36px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.foot-by { color: var(--dim); font-size: 15px; }
.foot-by a { color: var(--muted); font-weight: 700; text-decoration: none; transition: color .2s; }
.foot-by a:hover { color: var(--red-text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; font-size: 15px; }
.foot-links a { color: var(--muted); text-decoration: none; transition: color .2s; }
.foot-links a:hover { color: var(--text); }
@media (max-width: 620px) { .foot-links { margin-left: 0; } }
/* leave room so the phone dock never covers the footer */
@media (max-width: 900px) { .foot { padding-bottom: calc(112px + env(safe-area-inset-bottom)); } }

/* 404 */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: var(--gut); }
.lost .brand-mark { width: 96px; height: 96px; margin: 0 auto; }
.lost h1 { margin-top: 24px; font-size: clamp(36px, 6vw, 64px); font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.lost p { margin-top: 14px; color: var(--muted); }
.lost .actions { justify-content: center; margin-top: 28px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
