/* Palwyn landing page. Plain CSS, no build step.
   Shape rule: interactive = pill, content surfaces = 16px, device frames use their physical radii. */

@font-face { font-family: "Geist"; src: url("fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #f7f7f8;
  --bg-2: #eeeef0;
  --ink: #18181b;
  --ink-2: #52525b;
  --ink-3: #71717a;
  --line: rgb(24 24 27 / .09);
  --accent: #2ed3a1;          /* fills, strokes */
  --accent-text: #0b7a5b;     /* accent used as text on --bg */
  --accent-ink: #052e22;      /* text on --accent */
  --accent-soft: rgb(46 211 161 / .14);
  --shadow: 0 30px 80px -30px rgb(24 40 34 / .35), 0 8px 24px -12px rgb(24 40 34 / .2);

  --win: #f3f3f4;
  --win-rail: #e9e9ec;
  --win-card: #ffffff;
  --win-line: rgb(24 24 27 / .08);

  --mark-tile: #fafafa;
  --mark-phone: #18181b;
  --mark-link: #12a67c;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(16px, 4vw, 48px);
  --r: 16px;
  color-scheme: light;
}
/* light is the default; dark only when the visitor picks it */
:root[data-theme="dark"] {
  --bg: #0c0c0e;
  --bg-2: #131316;
  --ink: #f4f4f5;
  --ink-2: #a1a1aa;
  --ink-3: #8b8b94;
  --line: rgb(255 255 255 / .08);
  --accent-text: #2ed3a1;
  --accent-soft: rgb(46 211 161 / .12);
  --shadow: 0 40px 100px -30px rgb(0 0 0 / .7), 0 10px 30px -12px rgb(0 0 0 / .5);

  --win: #1f1f22;
  --win-rail: #19191b;
  --win-card: #2a2a2e;
  --win-line: rgb(255 255 255 / .07);

  --mark-tile: #18181b;
  --mark-phone: #fafafa;
  --mark-link: #2ed3a1;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 "Geist", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.i { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 8px; }

/* logo mark: follows the page theme */
.mark { width: 28px; height: 28px; flex: none; }
.mark-tile { fill: var(--mark-tile); }
.mark-phone { stroke: var(--mark-phone); }
.mark-link { stroke: var(--mark-link); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em; white-space: nowrap;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform .25s var(--ease), background-color .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; transition: background-color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.solid { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border-color: var(--line); }
.nav-in { max-width: 1280px; margin: 0 auto; height: 64px; padding: 0 var(--pad); display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; letter-spacing: -.01em; }
.nav nav { display: flex; gap: 28px; margin-left: auto; }
.nav nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; }
.nav nav a:hover { color: var(--ink); }
.theme-btn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background-color .25s var(--ease), transform .25s var(--ease); }
.theme-btn:hover { background: var(--bg-2); }
.theme-btn:active { transform: scale(.94); }
.theme-btn .i { grid-area: 1 / 1; width: 18px; height: 18px; transition: opacity .3s var(--ease), transform .4s var(--ease); }
.theme-btn .i-sun, [data-theme="dark"] .theme-btn .i-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="dark"] .theme-btn .i-sun { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero {
  max-width: 1280px; margin: 0 auto; min-height: 100dvh;
  padding: 104px var(--pad) 64px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 56px); align-items: center;
}
.hero h1 { font-size: clamp(34px, 3.6vw, 56px); }
@media (min-width: 901px) { .hero h1 span { white-space: nowrap; } }
.hero h1 .dim { color: var(--ink-3); }
.lede { margin-top: 24px; font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); max-width: 34ch; }
.ctas { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.scene { position: relative; perspective: 1600px; padding: 0 0 20% 14%; }
.hero-win { transform: rotateY(calc(-9deg + var(--rx, 0deg))) rotateX(calc(4deg + var(--ry, 0deg))); transform-origin: 60% 50%; transition: transform .6s var(--ease); }
.scene .hero-phone { position: absolute; left: 0; bottom: 0; width: 23%; transform: translateZ(60px) rotate(-4deg) translate(calc(var(--rx, 0deg) * -2px), calc(var(--ry, 0deg) * 2px)); transition: transform .6s var(--ease); }

/* ---------- Windows window (scales with its own width) ---------- */
.win {
  container-type: inline-size; position: relative;
  background: var(--win); border: 1px solid var(--win-line); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden; aspect-ratio: 16 / 10.4;
  display: flex; flex-direction: column;
}
.win > * { font-size: 1.75cqi; }
.win-bar { display: flex; align-items: center; justify-content: space-between; height: 5.6cqi; padding: 0 0 0 2.2cqi; flex: none; }
.win-title { display: flex; align-items: center; gap: 1.2cqi; color: var(--ink-2); font-size: 1.5cqi; }
.mark.sm { width: 2.6cqi; height: 2.6cqi; }
.win-ctl { display: flex; height: 100%; }
.win-ctl i { width: 6.4cqi; position: relative; }
.win-ctl i::after { content: ""; position: absolute; inset: 50% 2.6cqi auto; height: 1px; background: var(--ink-3); }
.win-ctl i:nth-child(2)::after { inset: calc(50% - .6cqi) 2.6cqi auto; height: 1.2cqi; background: none; border: 1px solid var(--ink-3); }
.win-ctl i:nth-child(3)::after { transform: rotate(45deg); }
.win-ctl i:nth-child(3)::before { content: ""; position: absolute; inset: 50% 2.6cqi auto; height: 1px; background: var(--ink-3); transform: rotate(-45deg); }
.win-body { flex: 1; display: flex; min-height: 0; }
.rail { width: 21%; padding: 1.2cqi; display: flex; flex-direction: column; gap: .4cqi; }
.rail b { font-weight: 400; color: var(--ink-2); padding: 1cqi 1.6cqi; border-radius: .8cqi; position: relative; transition: background-color .4s, color .4s; }
.rail b.on { background: var(--win-card); color: var(--ink); }
.rail b.on::before { content: ""; position: absolute; left: 0; top: 30%; bottom: 30%; width: .45cqi; border-radius: 1cqi; background: var(--accent); }
.pane { flex: 1; background: var(--win-rail); border-top-left-radius: 1.2cqi; border-top: 1px solid var(--win-line); border-left: 1px solid var(--win-line); padding: 2.6cqi 3cqi; min-width: 0; }

/* hero dashboard */
.dash-head { display: flex; align-items: baseline; gap: 1.6cqi; }
.dash-head strong { font-size: 3cqi; font-weight: 600; letter-spacing: -.02em; }
.conn { color: var(--accent-text); font-size: 1.4cqi; }
.dash-grid { margin-top: 2.2cqi; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4cqi; }
.tile { background: var(--win-card); border: 1px solid var(--win-line); border-radius: 1cqi; padding: 1.6cqi; display: flex; flex-direction: column; gap: .5cqi; }
.tile small { color: var(--ink-3); font-size: 1.3cqi; }
.tile em { font-style: normal; font-weight: 600; font-size: 2.3cqi; }
.tile span { color: var(--ink-3); font-size: 1.3cqi; }
.bar { height: .6cqi; border-radius: 1cqi; background: var(--win-line); overflow: hidden; margin-top: .6cqi; }
.bar i { display: block; height: 100%; background: var(--accent); }
.dash-list { margin-top: 2.2cqi; display: flex; flex-direction: column; gap: .2cqi; }
.dash-list small { color: var(--ink-3); font-size: 1.3cqi; margin-bottom: .6cqi; }
.dash-list p { display: flex; align-items: center; gap: 1.2cqi; padding: 1cqi 1.2cqi; background: var(--win-card); border-radius: .8cqi; }
.dash-list time { margin-left: auto; color: var(--ink-3); font-size: 1.3cqi; }

/* Windows toast */
.toast {
  position: absolute; right: 2cqi; bottom: 2cqi; width: 40%;
  background: color-mix(in srgb, var(--win-card) 92%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--win-line); border-radius: 1.2cqi; padding: 1.8cqi; box-shadow: var(--shadow);
  opacity: 0; transform: translateX(8cqi);
}
.scene.live .toast { animation: toast-in .7s var(--ease) .9s forwards; }
@keyframes toast-in { to { opacity: 1; transform: none; } }
.toast-app { display: flex; align-items: center; gap: .8cqi; color: var(--ink-2); font-size: 1.3cqi; }
.toast-app span { margin-left: auto; color: var(--ink-3); }
.mark.xs { width: 2cqi; height: 2cqi; }
.toast strong { display: block; margin-top: 1.2cqi; font-weight: 600; }
.toast p { color: var(--ink-2); margin-top: .3cqi; line-height: 1.4; }
.toast-reply, .compose { margin-top: 1.4cqi; display: flex; align-items: center; justify-content: space-between; gap: 1cqi; padding: 1cqi 1.4cqi; border-radius: .8cqi; background: var(--win-rail); border: 1px solid var(--win-line); min-height: 4cqi; }
.toast-reply .i, .compose .i { color: var(--accent-text); }
.typed::after { content: ""; display: inline-block; width: 1px; height: 1.1em; background: var(--ink); vertical-align: -.15em; margin-left: 1px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- Android phone (scales with its own width) ---------- */
.phone {
  container-type: inline-size; aspect-ratio: 9 / 19.2; position: relative;
  background: #0a0a0b; border-radius: 15% / 7%;
  box-shadow: var(--shadow), inset 0 0 0 2px #3a3a3e, inset 0 0 0 5px #1d1d20;
}
.phone-screen {
  position: absolute; inset: 1.6% 3.6%; border-radius: 12cqi; overflow: hidden;
  background: linear-gradient(170deg, #1b3a33 0%, #0f1a1a 55%, #0b0f10 100%); color: #f4f4f5;
  font-size: 5.6cqi; padding: 6cqi 5cqi;
}
.phone-screen::before { content: ""; position: absolute; top: 3cqi; left: 50%; width: 7cqi; height: 7cqi; margin-left: -3.5cqi; border-radius: 50%; background: #050506; }
.sb { display: flex; justify-content: space-between; font-size: 4.6cqi; opacity: .9; padding: 0 3cqi; }
.sb-r { display: flex; gap: 1.6cqi; align-items: center; }
.lock-time { margin-top: 12cqi; text-align: center; font-size: 24cqi; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.lock-date { text-align: center; font-size: 5cqi; opacity: .8; margin-top: 2cqi; }
.notif { margin-top: 10cqi; background: rgb(255 255 255 / .12); backdrop-filter: blur(10px); border-radius: 6cqi; padding: 5cqi; font-size: 5cqi; line-height: 1.35; }
.notif + .notif { margin-top: 3cqi; }
.notif small { display: flex; justify-content: space-between; opacity: .7; font-size: 4.2cqi; margin-bottom: 1.6cqi; }
.notif strong { font-weight: 600; display: block; }
.notif.dim { opacity: .75; }

/* ---------- story: sticky stage ---------- */
.story { max-width: 1280px; margin: 0 auto; padding: 120px var(--pad) 40px; }
.story-h { font-size: clamp(36px, 4.6vw, 60px); max-width: 16ch; }
.story-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); }
.step { min-height: 88dvh; display: flex; flex-direction: column; justify-content: center; gap: 16px; opacity: .28; transition: opacity .5s var(--ease); }
.step.on { opacity: 1; }
.pain { font-size: 17px; color: var(--ink-3); max-width: 36ch; justify-self: start; }
/* the problem gets crossed out once its step is on screen */
.pain span { background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 58% / 0% 2px; transition: background-size .9s var(--ease) .25s; }
.step.on .pain span { background-size: 100% 2px; }
.steps { padding-bottom: 24dvh; }
.step h3 { font-size: clamp(26px, 2.6vw, 36px); max-width: 16ch; }
.step p:last-child { color: var(--ink-2); max-width: 40ch; }

.stage-wrap { position: sticky; top: 0; height: 100dvh; display: flex; align-items: center; }
.stage { position: relative; width: 100%; padding: 0 0 10% 12%; }
.stage .stage-phone { position: absolute; left: 0; bottom: 0; width: 25%; }
.screens { position: relative; }
.screens { flex: 1; background: var(--win-rail); border-top-left-radius: 1.2cqi; border-top: 1px solid var(--win-line); border-left: 1px solid var(--win-line); min-width: 0; }
.scr, .pscr { position: absolute; inset: 0; opacity: 0; transform: translateY(2cqi) scale(.985); transition: opacity .55s var(--ease), transform .55s var(--ease); pointer-events: none; }
.scr { padding: 2.6cqi 3cqi; }
.pscr { top: 14cqi; padding: 0 5cqi; transform: translateY(6cqi); }
.stage[data-step="1"] [data-s="1"], .stage[data-step="2"] [data-s="2"], .stage[data-step="3"] [data-s="3"], .stage[data-step="4"] [data-s="4"] { opacity: 1; transform: none; }
.stage[data-step="1"] .rail [data-for="1"], .stage[data-step="2"] .rail [data-for="2"], .stage[data-step="3"] .rail [data-for="3"], .stage[data-step="4"] .rail [data-for="4"] { background: var(--win-card); color: var(--ink); }

/* calls */
.call-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.8cqi; background: var(--win-card); border: 1px solid var(--win-line); border-radius: 1.2cqi; padding: 2.2cqi; }
.call-card strong { display: block; font-size: 2.2cqi; font-weight: 600; }
.call-card small { color: var(--ink-3); }
.avatar { width: 6cqi; height: 6cqi; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.call-btns { display: flex; gap: 1cqi; }
.call-btns span { display: flex; align-items: center; gap: .6cqi; padding: 1cqi 1.8cqi; border-radius: 99px; font-weight: 500; }
.ans { background: var(--accent); color: var(--accent-ink); }
.dec { background: #e5484d; color: #fff; }
.stage[data-step="1"] .ans { animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(46 211 161 / .5); } 100% { box-shadow: 0 0 0 1.6cqi rgb(46 211 161 / 0); } }
.log { margin-top: 2.4cqi; display: flex; flex-direction: column; gap: .4cqi; }
.log p { display: grid; grid-template-columns: 1fr auto auto; gap: 2cqi; padding: 1.2cqi 1.6cqi; border-radius: .8cqi; background: var(--win-card); }
.log small, .log time { color: var(--ink-3); }

/* messages */
.thread { display: flex; flex-direction: column; gap: 1.2cqi; height: 100%; }
.thread-head { font-weight: 600; font-size: 2.2cqi; padding-bottom: 1.4cqi; border-bottom: 1px solid var(--win-line); }
.thread .in, .thread .out, .p-thread .in, .p-thread .out { max-width: 70%; padding: 1.2cqi 1.8cqi; border-radius: 1.6cqi; line-height: 1.4; }
.thread .in { background: var(--win-card); align-self: flex-start; border-bottom-left-radius: .4cqi; }
.thread .out { background: var(--accent); color: var(--accent-ink); align-self: flex-end; border-bottom-right-radius: .4cqi; }
.thread .compose { margin-top: auto; }

/* photos */
.ph-head { display: flex; justify-content: space-between; align-items: center; }
.ph-head strong { font-size: 2.2cqi; font-weight: 600; }
.save { display: flex; align-items: center; gap: .6cqi; padding: .9cqi 1.8cqi; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.ph-grid { margin-top: 2cqi; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1cqi; }
.ph-grid img { aspect-ratio: 1; width: 100%; height: auto; object-fit: cover; border-radius: .8cqi; }

/* clipboard */
.clip { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4cqi; text-align: center; }
.i.big { width: 7cqi; height: 7cqi; color: var(--accent-text); }
.clip small { color: var(--ink-3); }
.clip strong { font-size: 7cqi; font-weight: 400; letter-spacing: .08em; }
.paste { padding: .9cqi 1.8cqi; border-radius: 99px; border: 1px solid var(--win-line); color: var(--ink-2); }

/* phone screens in the story */
.ring { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3cqi; padding-top: 18cqi; }
.avatar.lg { width: 34cqi; height: 34cqi; font-size: 11cqi; background: rgb(46 211 161 / .18); color: #2ed3a1; }
.ring strong { font-size: 8cqi; font-weight: 500; }
.ring small { opacity: .7; font-size: 4.6cqi; }
.p-thread { display: flex; flex-direction: column; gap: 3cqi; font-size: 5cqi; }
.p-thread b { font-weight: 600; padding-bottom: 3cqi; border-bottom: 1px solid rgb(255 255 255 / .1); }
.p-thread .in { background: rgb(255 255 255 / .12); align-self: flex-start; max-width: 85%; padding: 3cqi 4cqi; border-radius: 5cqi; }
.p-thread .out { background: #2ed3a1; color: #052e22; align-self: flex-end; max-width: 85%; padding: 3cqi 4cqi; border-radius: 5cqi; }
.p-thread small { align-self: flex-end; opacity: .6; font-size: 4cqi; }
.p-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6cqi; }
.p-grid img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 2cqi; }
.p-share { display: flex; flex-direction: column; gap: 6cqi; font-size: 5.2cqi; line-height: 1.45; }
.p-share mark { background: rgb(46 211 161 / .35); color: inherit; padding: 0 1cqi; border-radius: 1cqi; }
.sheet { background: #1f2224; border-radius: 6cqi; padding: 5cqi; display: flex; flex-direction: column; gap: 2cqi; }
.sheet small { opacity: .6; }
.sheet span { display: flex; align-items: center; gap: 3cqi; padding: 3cqi; border-radius: 4cqi; }
.sheet .hi { background: rgb(46 211 161 / .18); color: #2ed3a1; }

/* ---------- privacy: the peak ---------- */
.bridge { min-height: 120dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 120px var(--pad); position: relative; }
.bridge::before { content: ""; position: absolute; inset: 10% 0; background: radial-gradient(50% 40% at 50% 38%, var(--accent-soft), transparent 70%); pointer-events: none; }
.bigmark { width: clamp(160px, 22vw, 260px); position: relative; }
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
.draw-phone { stroke: var(--ink); }
.draw-link { stroke: var(--accent); transition-delay: .5s; }
.bridge.in .draw { stroke-dashoffset: 0; }
.bridge h2 { margin-top: 40px; font-size: clamp(44px, 7vw, 96px); position: relative; }
.bridge-p { margin-top: 24px; font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2); max-width: 46ch; position: relative; }
.facts { list-style: none; padding: 0; margin: 72px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); max-width: 1040px; text-align: left; position: relative; }
.facts li { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.facts .i { width: 26px; height: 26px; color: var(--accent-text); margin-bottom: 6px; }
.facts strong { font-weight: 600; font-size: 18px; }
.facts span { color: var(--ink-2); font-size: 16px; }

/* ---------- bento ---------- */
.more { max-width: 1280px; margin: 0 auto; padding: 80px var(--pad) 40px; }
.more h2, .limits h2, .start h2, .faq h2 { font-size: clamp(34px, 4.2vw, 56px); }
.bento { margin-top: 48px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cell { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; position: relative; }
.cell h3 { font-size: 22px; letter-spacing: -.02em; }
.cell p { color: var(--ink-2); font-size: 16px; max-width: 42ch; }
.c-pad { grid-column: 1 / 4; grid-row: 1 / 3; }
.c-screen { grid-column: 4 / 7; grid-row: 1; }
.c-drop { grid-column: 4 / 6; grid-row: 2; }
.c-ring { grid-column: 6 / 7; grid-row: 2; background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.c-ring p { color: color-mix(in srgb, var(--accent-ink) 80%, transparent); }
.c-notif { grid-column: 1 / 3; grid-row: 3; }
.c-media { grid-column: 3 / 7; grid-row: 3; }

.pad-vis { flex: 1; min-height: 360px; position: relative; display: grid; place-items: center; margin: -8px -8px 12px; border-radius: 12px; background: radial-gradient(70% 60% at 40% 45%, var(--accent-soft), transparent 70%); }
.phone.mini { width: 180px; transform: rotate(-6deg); }
.tabs { display: flex; gap: 2cqi; margin-top: 6cqi; font-size: 5cqi; }
.tabs b { font-weight: 600; background: rgb(46 211 161 / .2); color: #2ed3a1; padding: 1.5cqi 4cqi; border-radius: 99px; }
.tabs span { padding: 1.5cqi 3cqi; opacity: .6; }
.pad { margin-top: 5cqi; height: 62%; border-radius: 6cqi; background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .08); position: relative; }
.finger { position: absolute; width: 12cqi; height: 12cqi; border-radius: 50%; background: rgb(46 211 161 / .35); box-shadow: 0 0 0 3cqi rgb(46 211 161 / .12); left: 30%; top: 40%; }
.keys { margin-top: 4cqi; display: flex; flex-wrap: wrap; gap: 1.6cqi; font-size: 4cqi; }
.keys span { padding: 1.6cqi 2.6cqi; border-radius: 2cqi; background: rgb(255 255 255 / .08); }
.cursor { position: absolute; width: 40px; height: 40px; fill: var(--ink); right: 18%; top: 30%; }
.in .finger { animation: finger 4s var(--ease) infinite; }
.in .cursor { animation: cursor 4s var(--ease) infinite; }
@keyframes finger { 0%, 100% { transform: translate(0, 0); } 45% { transform: translate(28cqi, -18cqi); } 55% { transform: translate(28cqi, -18cqi) scale(.8); } }
@keyframes cursor { 0%, 100% { transform: translate(0, 0); } 45% { transform: translate(90px, -50px); } 55% { transform: translate(90px, -50px) scale(.85); } }

.mirror { margin: -8px -8px 12px; }
.win.tiny { aspect-ratio: 16 / 8; box-shadow: none; }
.mirror-body { flex: 1; background: #101012; display: grid; place-items: center; }
.phone-flat { width: 22%; aspect-ratio: 9 / 19; border-radius: 3cqi; overflow: hidden; }
.phone-flat img { width: 100%; height: 100%; object-fit: cover; }

.drop { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.file { padding: 8px 14px; border-radius: 999px; border: 1px dashed color-mix(in srgb, var(--accent-text) 60%, transparent); color: var(--accent-text); font-size: 14px; font-family: "Geist Mono", ui-monospace, monospace; }

.ring-i { width: 40px; height: 40px; margin-bottom: auto; }
.in .ring-i { animation: shake 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes shake { 0%, 60%, 100% { transform: rotate(0); } 64% { transform: rotate(14deg); } 70% { transform: rotate(-12deg); } 76% { transform: rotate(8deg); } 82% { transform: rotate(-4deg); } }
.c-notif > .i { width: 32px; height: 32px; color: var(--accent-text); margin-bottom: auto; }

.np { display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 12px; max-width: 420px; }
.np img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.np strong { display: block; font-weight: 600; font-size: 15px; }
.np small { color: var(--ink-3); font-size: 13px; }
.np-ctl { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--accent-text); }
.np-ctl i { width: 3px; height: 12px; background: var(--accent); border-radius: 2px; transform-origin: bottom; }
.in .np-ctl i { animation: eq 1s ease-in-out infinite alternate; }
.np-ctl i:nth-child(3) { animation-delay: .2s; }
.np-ctl i:nth-child(4) { animation-delay: .4s; }
@keyframes eq { from { transform: scaleY(.3); } to { transform: scaleY(1); } }

/* marquee: breadth of smaller features */
.marquee { margin-top: 56px; display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee ul { list-style: none; margin: 0; padding: 0 12px 0 0; display: flex; gap: 12px; flex: none; animation: marquee 50s linear infinite; }
.marquee li { white-space: nowrap; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
.marquee:hover ul { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- limits ---------- */
.limits { max-width: 1280px; margin: 0 auto; padding: 120px var(--pad) 40px; }
.limit-cols { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); }
.limit-cols h3 { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.limit-cols p { padding: 16px 0; color: var(--ink-2); max-width: 52ch; }
.limit-cols strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: 2px; }

/* ---------- start ---------- */
.start { max-width: 1280px; margin: 0 auto; padding: 120px var(--pad) 40px; }
.flow { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; position: relative; }
.flow::before { content: ""; position: absolute; top: 27px; left: 28px; right: 28px; height: 1px; background: linear-gradient(90deg, var(--accent), var(--line)); }
.flow li { position: relative; display: flex; flex-direction: column; gap: 8px; }
.flow .i { width: 56px; height: 56px; padding: 15px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); color: var(--accent-text); margin-bottom: 12px; }
.flow h3 { font-size: 22px; letter-spacing: -.02em; }
.flow p { color: var(--ink-2); max-width: 30ch; }

/* ---------- faq ---------- */
.faq { max-width: 1280px; margin: 0 auto; padding: 120px var(--pad) 40px; }
.faq-list { margin-top: 40px; max-width: 880px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; font-size: 19px; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(45deg); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 24px; color: var(--ink-2); max-width: 62ch; }

/* ---------- get ---------- */
.get { max-width: 1280px; margin: 80px auto 0; padding: 120px var(--pad); display: flex; flex-direction: column; align-items: flex-start; gap: 20px; border-top: 1px solid var(--line); }
.get-mark { width: 72px; height: 72px; }
.get h2 { font-size: clamp(44px, 6vw, 80px); }
.get p { color: var(--ink-2); font-size: 19px; max-width: 44ch; }
.get-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }

.foot { max-width: 1280px; margin: 0 auto; padding: 32px var(--pad) 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--ink-3); font-size: 14px; border-top: 1px solid var(--line); }
.foot a { color: var(--ink-2); text-underline-offset: 3px; margin-right: auto; }

/* ---------- tip dialog ---------- */
.tip { width: min(452px, calc(100% - 2 * var(--pad))); max-height: calc(100dvh - 2 * var(--pad)); overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }
.tip::backdrop { background: rgb(12 12 14 / .6); }
body:has(.tip[open]) { overflow: hidden; }
.tip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tip-head h2 { font-size: 22px; }
.tip-frame { min-height: 712px; border-radius: var(--r); background: var(--bg-2); overflow: hidden; }
.tip-frame iframe { display: block; width: 100%; height: 712px; border: 0; }
.tip-note { margin-top: 12px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
@media (prefers-reduced-motion: no-preference) {
  .tip[open] { animation: tip-in .35s var(--ease); }
  .tip[open]::backdrop { animation: tip-fade .35s var(--ease); }
}
@keyframes tip-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes tip-fade { from { opacity: 0; } }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
.bento [data-reveal]:nth-child(2) { transition-delay: .08s; }
.bento [data-reveal]:nth-child(3) { transition-delay: .12s; }
.bento [data-reveal]:nth-child(4) { transition-delay: .16s; }
.bento [data-reveal]:nth-child(6) { transition-delay: .08s; }

/* scroll-linked draw where supported */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .draw { transition: none; animation: draw linear both; animation-timeline: view(); animation-range: entry 30% cover 45%; }
    .draw-link { animation-range: cover 25% cover 55%; }
  }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .nav .theme-btn { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 96px; min-height: auto; }
  .scene { padding: 0 0 12% 14%; }
  .story-grid { display: flex; flex-direction: column; gap: 0; }
  .stage-wrap { order: -1; top: 64px; height: auto; padding: 16px 0 24px; z-index: 2; background: var(--bg); }
  .steps { padding-bottom: 10dvh; }
  .step { min-height: 70dvh; }
  .facts { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento > .cell { grid-column: auto; grid-row: auto; }
  .pad-vis { min-height: 300px; }
  .limit-cols { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow::before { top: 28px; bottom: 28px; left: 27px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--accent), var(--line)); }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .ctas .btn, .get-ctas .btn { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], .toast { opacity: 1; transform: none; }
  .draw { stroke-dashoffset: 0; }
  .marquee ul { flex-wrap: wrap; }
  .marquee ul[aria-hidden] { display: none; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
}
