/* Quanta AI landing
   Colors, type scale and category palette mirror the iOS app
   (Palette.swift, Typography.swift, Assets.xcassets/Stylable/Colors). */

/* ---------- Fonts ---------- */

@font-face { font-family: "Nunito"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/nunito-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/nunito-latin-800-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */

:root {
  --ink: #1C1E23;
  --ink-2: rgba(28, 30, 35, 0.666);
  --ink-3: rgba(28, 30, 35, 0.32);
  --ink-4: rgba(28, 30, 35, 0.115);
  --ink-5: rgba(28, 30, 35, 0.0511);
  --paper: #FAFAFA;
  --paper-2: rgba(250, 250, 250, 0.666);
  --gray: #F1F2F3;
  --green: #6FBF88;
  --red: #FF5C5C;
  --bezel: #0E0F12;

  --ai: linear-gradient(100deg, #FF6FA3, #C77DFF 40%, #6EA8FF 70%, #59D0B8);
  --ai-ring: conic-gradient(from var(--spin, 0deg), #FF6FA3, #FFB86B, #8EE59B, #59D0B8, #6EA8FF, #C77DFF, #FF6FA3);

  --font: "Nunito", ui-rounded, -apple-system, system-ui, sans-serif;
  --gutter: 32px;
  --max: 1200px;
  --radius-l: 44px;
  --radius-m: 32px;
  --shadow-float: inset 0 0 0 1px rgba(28, 30, 35, 0.06), 0 20px 40px -24px rgba(28, 30, 35, 0.45);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Animatable angle for the rainbow edge used by the AI visuals */
@property --spin {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

/* Category colors: --bg is the tile (level 4), --fg the accent (level 1) */
.c-amber      { --bg: #FFECB3; --fg: #FFCA28; }
.c-blue       { --bg: #BBDEFB; --fg: #42A5F5; }
.c-bluegray   { --bg: #CFD8DC; --fg: #78909C; }
.c-brown      { --bg: #D7CCC8; --fg: #8D6E63; }
.c-cyan       { --bg: #B2EBF2; --fg: #26C6DA; }
.c-deeporange { --bg: #FFCCBC; --fg: #FF7043; }
.c-deeppurple { --bg: #D1C4E9; --fg: #7E57C2; }
.c-green      { --bg: #C8E6C9; --fg: #66BB6A; }
.c-indigo     { --bg: #C5CAE9; --fg: #5C6BC0; }
.c-lightblue  { --bg: #B3E5FC; --fg: #29B6F6; }
.c-lightgreen { --bg: #DCEDC8; --fg: #9CCC65; }
.c-lime       { --bg: #F0F4C3; --fg: #D4E157; }
.c-limegray   { --bg: #EBE7CB; --fg: #C6BD76; }
.c-orange     { --bg: #FFE0B2; --fg: #FFA726; }
.c-pink       { --bg: #F8BBD0; --fg: #EC407A; }
.c-purple     { --bg: #E1BEE7; --fg: #AB47BC; }
.c-red        { --bg: #FFCDD2; --fg: #EF5350; }
.c-redgray    { --bg: #E9B7B7; --fg: #BA494C; }
.c-teal       { --bg: #B2DFDB; --fg: #26A69A; }
.c-yellow     { --bg: #FFF9C4; --fg: #FFEE58; }

/* Tiles and icon circles use the app's top-to-bottom gradient */
[class^="c-"], [class*=" c-"] {
  --tile: linear-gradient(color-mix(in srgb, var(--bg) 66.6%, transparent), var(--bg));
}

/* Chart colors (level 3) */
.d-pink   { --c: #F48FB1; }
.d-blue   { --c: #90CAF9; }
.d-purple { --c: #B39DDB; }
.d-cyan   { --c: #80DEEA; }
.d-amber  { --c: #FFE082; }
.d-green  { --c: #A5D6A7; }

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  interpolate-size: allow-keywords;
  scroll-padding-top: 88px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 3px solid #6EA8FF; outline-offset: 3px; border-radius: 12px; }

.i { width: 1em; height: 1em; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.center { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }

.skip {
  position: fixed; z-index: 100; top: 12px; left: 12px;
  padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 700;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ---------- Type ---------- */

.h1 {
  font-size: clamp(46px, 6.4vw, 88px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.h2 {
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 540px;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
}

.ai-text {
  background: var(--ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h1 .ai-text { white-space: nowrap; }

/* Words split by main.js for the headline reveal */
.word { display: inline-block; }

.ai-text .word {
  background: var(--ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* background-clip: text only paints inside the box, and with tight leading
   descenders hang below it; padding extends the paint area, margin undoes the shift */
.ai-text { padding: 0.06em 0 0.24em; }
.ai-text .word { padding: 0.06em 0.02em 0.24em; margin: -0.06em -0.02em -0.24em; }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 16px;
  border-radius: 999px;
  background: var(--ink-5);
  font-size: 15px; font-weight: 700;
}

.pill__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ai-ring);
  animation: spin 4s linear infinite;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 28px;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 17px; font-weight: 700;
  transition: background-color 0.2s, opacity 0.2s;
}
.btn:hover { background: #33363D; }
.btn--small { height: 44px; padding: 0 20px; font-size: 15px; }
.btn--ghost { background: var(--ink-5); color: var(--ink); }
.btn--ghost:hover { background: var(--ink-4); }

.store { display: inline-flex; border-radius: 14px; transition: opacity 0.2s; }
.store img { height: 56px; width: auto; }
.store:hover { opacity: 0.85; }
.store--light { box-shadow: 0 0 0 1px rgba(250, 250, 250, 0.25); }

/* ---------- Header ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 250, 0.78);
  -webkit-backdrop-filter: saturate(1.4) blur(20px);
  backdrop-filter: saturate(1.4) blur(20px);
  transition: box-shadow 0.3s, transform 0.4s var(--ease-out);
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--ink-5); }
.nav.is-hidden { transform: translateY(-100%); }

.nav__in { height: 72px; display: flex; align-items: center; gap: 40px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }

.nav__links { display: flex; gap: 28px; font-size: 16px; font-weight: 700; color: var(--ink-2); }
.nav__links a { transition: color 0.2s; }
.nav__links a:hover { color: var(--ink); }
.nav .btn { margin-left: auto; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 40px;
}

.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 6px 0; font-size: 15px; font-weight: 700; color: var(--ink-3); }
.hero__facts li { display: inline-flex; align-items: center; }
.hero__facts li + li::before { content: ""; width: 4px; height: 4px; margin: 0 10px; border-radius: 50%; background: currentColor; }

.hero__visual {
  position: relative;
  height: 720px;
  display: flex; justify-content: center; align-items: center;
}

.glow {
  position: absolute; inset: 16% 8% 12% 14%;
  border-radius: 50%;
  background: var(--ai-ring);
  filter: blur(64px);
  opacity: 0.8;
  animation: spin 14s linear infinite;
}

/* ---------- Phone mockup ----------
   Inside .phone__screen, 1em equals 10pt of the 402pt-wide iPhone canvas,
   so app measurements from the design translate directly (24pt -> 2.4em). */

.phone {
  --pw: 330px;
  --bz: 10px;
  position: relative; z-index: 2;
  width: var(--pw);
  aspect-ratio: 402 / 874;
  padding: var(--bz);
  border-radius: calc(var(--pw) * 0.15);
  background: var(--bezel);
  box-shadow: 0 60px 90px -50px rgba(28, 30, 35, 0.55), inset 0 0 0 1.5px rgba(255, 255, 255, 0.1);
}

.phone__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--pw) * 0.13);
  background: var(--paper);
  font-size: calc((var(--pw) - var(--bz) * 2) / 40.2);
  isolation: isolate;
  clip-path: inset(0 round calc(var(--pw) * 0.13));
}

.app { position: relative; height: 100%; display: flex; flex-direction: column; padding: 0 1.6em; }

.app__status { height: 5.4em; display: flex; align-items: center; justify-content: space-between; padding: 0 1.6em; }
.app__status span:first-child { font-size: 1.6em; font-weight: 700; }
.app__island { width: 12.4em; height: 3.6em; border-radius: 2em; background: var(--bezel); }
.app__bars { width: 2.6em; height: 1.2em; border-radius: 0.4em; background: var(--ink); }

.app__tags { display: flex; justify-content: center; gap: 0.8em; margin-top: 1.2em; }
.app__tags span { padding: 0.5em 1.2em; border-radius: 2em; background: var(--ink-5); font-size: 1.3em; font-weight: 700; }

.app__balance { margin-top: 0.6em; text-align: center; font-size: 4.4em; font-weight: 800; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }

.app__sum { display: flex; justify-content: center; gap: 0.8em; margin-top: 0.6em; }
.app__sum-item { padding: 0.5em 1.1em; border-radius: 2em; font-size: 1.3em; font-weight: 800; }
.app__sum-item--red { background: rgba(255, 92, 92, 0.14); color: #D64545; }
.app__sum-item--green { background: rgba(111, 191, 136, 0.18); color: #3F8F5A; }

.app__group { margin-top: 1.8em; }
.app__title { display: flex; align-items: center; gap: 0.4em; margin-bottom: 1em; font-size: 2.2em; font-weight: 800; }
.app__title .i { font-size: 0.8em; color: var(--ink-3); }

.tiles { display: grid; gap: 0.8em; }
.tiles--3 { grid-template-columns: repeat(3, 1fr); }

.tile {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 1em;
  padding: 0.8em;
  border-radius: 3.2em;
  background: var(--tile);
  min-width: 0;
}
.tile__ic {
  width: 4em; height: 4em;
  margin: 0.3em 0 0 0.3em;
  border-radius: 50%;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
}
.tile__ic .i { font-size: 2.4em; }
.tile__name { margin: 0 0 -0.1em 0.46em; font-size: 1.3em; color: var(--ink-2); white-space: nowrap; }
.tile__sum { margin: -0.5em 0 0.1em 0.3em; font-size: 2em; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Tab bar: a blurred sheet with rounded top corners running to the screen edge,
   50pt of icons above the 34pt home indicator area */
.app__tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  height: 8.4em; padding-bottom: 3.4em;
  display: flex; align-items: center;
  border-radius: 3.2em 3.2em 0 0;
  background: rgba(250, 250, 250, 0.82);
  -webkit-backdrop-filter: blur(2em);
  backdrop-filter: blur(2em);
  color: var(--ink-3);
}
.app__tabbar .i { flex: 1; font-size: 2.4em; }
.app__tabbar .is-on { color: var(--ink); }

/* Add button (LiquidMenu, collapsed): a 55pt black circle with a plus */
.app__add {
  position: absolute; right: 0.8em; bottom: 9.7em; z-index: 4;
  width: 5.5em; height: 5.5em; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
}
.app__add .i { font-size: 2.4em; transform: rotate(45deg); }

/* ---------- Sections ---------- */

main > section { margin-top: 140px; }
main > .hero { margin-top: 0; }

/* How it works */

.how__stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 72px;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 40px;
  padding-bottom: 40px;
}

.how__steps { display: flex; flex-direction: column; gap: 16px; }

.how__step {
  display: grid;
  grid-template-columns: 72px 1fr;
  column-gap: 20px;
  padding: 24px 28px;
  border-radius: var(--radius-l);
  opacity: 0.35;
  transition: opacity 0.45s var(--ease-out), background-color 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.how__step.is-active { opacity: 1; background: var(--ink-5); }
.how__step img { grid-row: span 2; width: 72px; height: 72px; }
.how__step h3 { font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -0.01em; }
.how__step p { margin-top: 6px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }

.how__device { position: relative; display: flex; justify-content: center; }
.how__device::before {
  content: ""; position: absolute; inset: 10% 6%;
  border-radius: 50%;
  background: var(--ai-ring);
  filter: blur(80px); opacity: 0.35;
  animation: spin 16s linear infinite;
}
.how__device .phone { --pw: min(340px, calc((100svh - 120px) * 0.46)); }

.scene {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 8em 2em 3em;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s var(--ease-out), visibility 0s linear 0.5s;
}
.scene.is-active { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease-out), visibility 0s; }

/* Voice: a dark screen with a moving rainbow edge, like in the app */
.scene--voice { background: #121317; color: var(--paper); justify-content: center; gap: 2.4em; padding-bottom: 14em; }
.scene--voice, .scene--snap { isolation: isolate; overflow: hidden; }
/* The rainbow rim is a gradient behind an inset dark panel whose soft shadow
   blends into it; no masks or filters, which Safari does not clip reliably */
.scene--voice::before, .scene--snap::before {
  content: ""; position: absolute; inset: -30%; z-index: -2;
  background: var(--ai-ring);
  animation: spin 5s linear infinite;
}
.scene__edge {
  position: absolute; inset: 0.6em; z-index: -1;
  border-radius: calc(var(--pw) * 0.13 - 0.6em);
  background: #121317;
  box-shadow: 0 0 1.8em 0.2em #121317;
}
.scene__hint { font-size: 1.6em; color: rgba(250, 250, 250, 0.45); }
.scene__words { min-height: 3em; padding: 0 1em; text-align: center; font-size: 2.6em; line-height: 1.2; font-weight: 800; }
.scene__words .caret { display: inline-block; width: 0.08em; height: 1em; margin-left: 0.06em; vertical-align: -0.12em; background: currentColor; animation: blink 1s steps(1) infinite; }

/* Voice bars. main.js drives them like speech; the CSS loop is the no-script fallback */
.eq { display: flex; align-items: center; gap: 0.45em; height: 6em; }
.eq span {
  width: 0.5em; height: 100%;
  border-radius: 0.25em;
  background: var(--paper);
  box-shadow: 0 0 1em rgba(250, 250, 250, 0.35);
  transform: scaleY(0.2);
  transform-origin: 50% 50%;
  animation: eq 1.2s ease-in-out infinite alternate;
}
.eq span:nth-child(3n) { animation-delay: -0.4s; }
.eq span:nth-child(3n + 1) { animation-delay: -0.8s; }
.js .eq span { animation: none; }

/* Snap: a receipt under a scanning line */
.scene--snap { background: #121317; justify-content: center; padding-bottom: 14em; }
.scene--snap .scene__edge { background: radial-gradient(circle at 50% 35%, #3A3D45, #121317 70%); }
.receipt {
  position: relative;
  width: 24em; margin-top: 2em;
  padding: 2.4em 2.2em 3em;
  display: flex; flex-direction: column; gap: 1em;
  background: #FFFFFF;
  border-radius: 0.6em;
  color: var(--ink);
  transform: rotate(-3deg);
  box-shadow: 0 2em 4em rgba(0, 0, 0, 0.45);
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.receipt b { text-align: center; font-size: 1.6em; letter-spacing: 0.12em; margin-bottom: 0.4em; }
.receipt span { display: flex; justify-content: space-between; font-size: 1.4em; color: var(--ink-2); }
.receipt i { font-style: normal; }
.receipt__total { margin-top: 0.6em; padding-top: 0.8em; border-top: 0.12em dashed var(--ink-3); color: var(--ink) !important; font-weight: 800; }
.scan {
  position: absolute; left: 6%; right: 6%; top: 12%;
  height: 0.3em; border-radius: 0.3em;
  background: linear-gradient(90deg, transparent, var(--green) 20%, var(--green) 80%, transparent);
  box-shadow: 0 0 1.8em 0.5em rgba(111, 191, 136, 0.5);
  animation: scan 2.2s ease-in-out infinite alternate;
}
/* Bottom controls of the voice and camera covers: 40pt actions around a 69pt main button */
.ctrls {
  position: absolute; left: 0; right: 0; bottom: 6.6em;
  display: flex; align-items: center; justify-content: center; gap: 1.6em;
}
.ctrls--voice { gap: 2.4em; }
.ctrls span {
  width: 4em; height: 4em;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(241, 242, 243, 0.115);
  color: var(--paper);
}
.ctrls .i { width: 2.4em; height: 2.4em; }
.ctrls .ctrls__main { width: 6.9em; height: 6.9em; border-radius: 2.4em; }

/* Tap: the calculator sheet. Controls sit at the bottom like in the app,
   the amount is centered in the space left above them */
.scene--tap { justify-content: flex-end; padding: 0 1.6em 3em; background: var(--paper); }
.calc__backdrop { position: absolute; inset: 0; filter: blur(3em); opacity: 0.85; }
.calc__backdrop span { position: absolute; width: 12.4em; height: 11.2em; border-radius: 3.2em; background: var(--tile); }
.calc__backdrop span:nth-child(1) { left: 0.8em; top: 35.7em; }
.calc__backdrop span:nth-child(2) { left: 13.9em; top: 35.7em; }
.calc__backdrop span:nth-child(3) { left: 27em; top: 35.7em; }
.calc__backdrop span:nth-child(4) { left: 0.8em; top: 54.5em; }
.calc__backdrop span:nth-child(5) { left: 13.9em; top: 54.5em; }
.calc__backdrop span:nth-child(6) { left: 27em; top: 54.5em; }
.scene--tap::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(rgba(250, 250, 250, 0.7), rgba(250, 250, 250, 0.2) 45%, rgba(250, 250, 250, 0.25));
}
.scene--tap > :not(.calc__backdrop) { z-index: 1; }

.calc__close {
  position: absolute; right: 1.6em; top: 8em;
  width: 3.6em; height: 3.6em; border-radius: 50%;
  background: var(--ink-5);
  display: flex; align-items: center; justify-content: center;
}
.calc__close .i { font-size: 2.2em; }

.calc__value {
  position: relative; flex: 1; align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  padding-top: 0.6em;
  font-size: 8em; line-height: 1; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.calc__rows { position: relative; align-self: stretch; margin-bottom: 1em; display: flex; flex-direction: column; gap: 1em; }
.calc__row { display: flex; gap: 0.6em; }

.calc__pick {
  flex: 1; min-width: 0;
  height: 3.41em; padding: 0 0.94em 0 0.41em;
  display: flex; align-items: center; gap: 0.7em;
  border-radius: 999px;
  background: var(--tile);
  font-size: 1.7em; font-weight: 600;
  white-space: nowrap;
}
.calc__pick-ic { flex: none; width: 2.59em; height: 2.59em; border-radius: 50%; background: rgba(250, 250, 250, 0.45); display: flex; align-items: center; justify-content: center; }
.calc__pick-ic .i { font-size: 1.41em; }

.calc__chip {
  height: 2.94em; padding: 0 1.06em;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--ink-5);
  font-size: 1.7em; font-weight: 600;
  white-space: nowrap;
}
.calc__chip--grow { flex: 1; }

.keys {
  position: relative; align-self: stretch;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 6.8em;
  gap: 0.7em;
}
.keys span {
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.9em;
  background: var(--ink-5);
  font-size: 2.9em; line-height: 1; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.keys .i { width: 0.86em; height: 0.86em; }
.keys .k-wide { grid-column: span 2; }
.keys .k-red { background: rgba(255, 92, 92, 0.115); }
.keys .k-op { background: rgba(255, 149, 0, 0.115); }
.keys .k-ok { background: var(--ink); color: var(--paper); }

/* Toast: a capsule that slides in at the top, from ToastView.swift (1em = 10pt) */
.qt-slot {
  position: absolute; z-index: 5; left: 0.8em; right: 0.8em; top: 5.8em;
  display: grid; justify-items: center;
  pointer-events: none;
}
.qt-slot > .qt { grid-area: 1 / 1; }
.qt {
  display: inline-flex; align-items: center; gap: 1em;
  max-width: 100%;
  padding: 0.6em 1.6em 0.6em 0.6em;
  border-radius: 999px;
  background: rgba(250, 250, 250, 0.94);
  -webkit-backdrop-filter: blur(2em);
  backdrop-filter: blur(2em);
  box-shadow: inset 0 0 0 1px var(--ink-5), 0 0.4em 1.6em rgba(0, 0, 0, 0.12);
  color: var(--ink);
}
.qt:has(.qt__pill) { padding-right: 0.6em; }
.qt__ic {
  flex: none;
  width: 3.6em; height: 3.6em; border-radius: 50%;
  background: var(--tile);
  display: flex; align-items: center; justify-content: center;
}
.qt__ic .i { font-size: 2em; }
.qt__text { display: flex; flex-direction: column; min-width: 0; }
.qt__text b { font-size: 1.5em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt__text small { font-size: 1.3em; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.qt--warn .qt__text small { color: #E04848; }
.qt__pill {
  flex: none;
  height: 2.4em; padding: 0 0.8em;
  display: flex; align-items: center;
  border-radius: 999px;
  background: var(--ink-5);
  font-size: 1.5em; font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.qt__pill--action { padding: 0 0.93em; font-weight: 600; }
.qt__ring { position: relative; flex: none; padding: 0.5em; }
.qt__ring > svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.qt__ring > svg circle { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; }

/* Without motion only the first hero toast is shown */
html:not(.js) [data-hero-toast] + [data-hero-toast],
.no-anim [data-hero-toast] + [data-hero-toast] { display: none; }

/* Outside the phone the toast is drawn a little larger */
.stage .qt { font-size: 11px; }

/* Categories marquee */

.marquee {
  margin-top: 56px;
  display: flex; flex-direction: column; gap: 12px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__row { display: flex; gap: 12px; width: max-content; will-change: transform; }
.marquee__row:nth-child(2) { margin-left: -90px; }

.mtile {
  flex: none;
  width: 168px; height: 150px;
  padding: 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  border-radius: 44px;
  background: var(--tile);
  font-size: 17px; font-weight: 800;
}
.mtile .tile__ic { width: 48px; height: 48px; margin: 0; }
.mtile .tile__ic .i { font-size: 28px; }
.mtile__text { display: flex; flex-direction: column; gap: 2px; }
.mtile__name { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.mtile__text b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mtile .tile__ic .i { font-size: 26px; }

/* Split sections: limits and statistics */

.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 72px; }
.split--rev .split__copy { order: 2; }
.split__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }

.ticks { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; font-size: 17px; font-weight: 700; }
.ticks li { display: flex; align-items: center; gap: 12px; }
.ticks li > span { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink-5); display: flex; align-items: center; justify-content: center; font-size: 16px; }

.stage {
  position: relative;
  min-height: 560px;
  padding: 48px 32px;
  border-radius: 56px;
  background: linear-gradient(160deg, var(--gray), var(--paper));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  overflow: hidden;
}

.ring-tile {
  position: relative;
  width: 300px;
  padding: 28px;
  border-radius: 76px;
  background: var(--tile);
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 40px 60px -40px rgba(28, 30, 35, 0.35);
}
.ring { width: 120px; height: 120px; transform: rotate(-90deg); margin-bottom: 16px; }
.ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.ring__track { stroke: rgba(250, 250, 250, 0.7); }
.ring__fill { stroke: var(--ink); stroke-dasharray: 0 400; }
.ring-tile.is-over .ring__fill { stroke: var(--red); }
.ring-tile__ic {
  position: absolute; left: 28px; top: 28px;
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.ring-tile__ic::before { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--paper); }
.ring-tile__ic .i { position: relative; font-size: 44px; }
.ring-tile__name { font-size: 22px; color: var(--ink-2); }
.ring-tile__sum { font-size: 48px; line-height: 1.05; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring-tile__left { font-size: 15px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.avgs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 420px; }
.avg { padding: 22px; border-radius: var(--radius-m); background: var(--ink-5); text-align: center; }
.avg small { display: block; font-size: 16px; color: var(--ink-2); }
.avg b { display: block; margin-top: 6px; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }

.donut { position: relative; width: min(340px, 100%); aspect-ratio: 1; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut__seg { fill: none; stroke: var(--c); stroke-width: 26; stroke-linecap: round; stroke-dasharray: 0 600; }
.donut__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut__center small { font-size: 15px; color: var(--ink-2); }
.donut__center b { font-size: 32px; font-weight: 800; }

.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; width: min(380px, 100%); font-size: 15px; font-weight: 700; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.legend span { margin-left: auto; color: var(--ink-3); }

/* Feature cards */

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }

.card {
  position: relative;
  padding: 32px;
  border-radius: var(--radius-l);
  background: var(--ink-5);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.35s var(--ease-out), background-color 0.35s;
}
.card:hover { background: var(--ink-4); }
.card__ic { width: 56px; height: 56px; margin-bottom: 10px; border-radius: 50%; background: var(--tile); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.card h3 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.card p { font-size: 17px; line-height: 1.5; color: var(--ink-2); }

/* FAQ */

.faq__list { max-width: 820px; margin: 48px auto 0; display: flex; flex-direction: column; gap: 10px; }

.faq details { border-radius: var(--radius-m); background: var(--ink-5); transition: background-color 0.25s; }
.faq details:hover { background: var(--ink-4); }

.faq summary {
  min-height: 76px; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  list-style: none; cursor: pointer;
  font-size: 19px; font-weight: 800;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary i {
  position: relative; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(250, 250, 250, 0.9);
  transition: transform 0.3s var(--ease-out);
}
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--ink); }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i { transform: rotate(45deg); }

.faq__body { padding: 0 28px 26px; }
.faq__body p { max-width: 680px; font-size: 17px; line-height: 1.6; color: var(--ink-2); }

/* Smooth open and close where the browser supports animating details */
.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.35s var(--ease-out), content-visibility 0.35s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }

/* Final call to action */

.final {
  position: relative;
  border-radius: 64px;
  padding: 120px 32px;
  background: var(--ink);
  color: var(--paper);
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.final .lead { color: rgba(250, 250, 250, 0.666); }
.final__glow {
  position: absolute; z-index: -1; left: 50%; top: 100%;
  width: 900px; height: 600px; margin-left: -450px; margin-top: -260px;
  border-radius: 50%;
  background: var(--ai-ring);
  filter: blur(90px); opacity: 0.5;
  animation: spin 18s linear infinite;
}
.final__3d { position: absolute; z-index: -1; height: auto; pointer-events: none; }
.final__3d--coins { width: 180px; left: 6%; top: 14%; }
.final__3d--money { width: 150px; right: 7%; top: 10%; }
.final__3d--camera { width: 130px; right: 14%; bottom: 8%; }

/* Footer */

.foot {
  display: grid;
  grid-template-columns: 2fr repeat(3, auto);
  gap: 40px 64px;
  padding-top: 80px;
  padding-bottom: 56px;
  font-size: 15px; font-weight: 700;
  color: var(--ink-2);
}
.foot nav { display: flex; flex-direction: column; gap: 12px; }
.foot b { color: var(--ink); font-weight: 800; }
.foot nav a { transition: color 0.2s; }
.foot nav a:hover { color: var(--ink); }
.foot__brand { display: flex; flex-direction: column; gap: 12px; }
.foot__brand .brand { color: var(--ink); font-size: 20px; }
.foot__brand .brand img { width: 32px; height: 32px; border-radius: 8px; }
.foot__muted { color: var(--ink-3); }

/* ---------- Reveal states ----------
   boot.js adds .js only when motion is allowed. If main.js never starts,
   boot.js adds .no-anim and everything is shown as is. */

.js:not(.no-anim) [data-reveal],
.js:not(.no-anim) [data-hero-item],
.js:not(.no-anim) [data-hero-phone],
.js:not(.no-anim) [data-hero-toast],
.js:not(.no-anim) [data-result],
.js:not(.no-anim) [data-toast],
.js:not(.no-anim) [data-batch] > * { opacity: 0; }
.js:not(.no-anim) [data-split] { visibility: hidden; }

/* ---------- Keyframes ---------- */

@keyframes spin { to { --spin: 360deg; } }
@keyframes eq { from { transform: scaleY(0.18); } to { transform: scaleY(1); } }
@keyframes scan { from { top: 10%; } to { top: 86%; } }
@keyframes blink { 50% { opacity: 0; } }

/* The rotating gradients rely on @property; elsewhere they simply stay still */
.glow, .how__device::before, .final__glow { transform: translateZ(0); }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .nav__links { display: none; }

  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero__copy { align-items: center; text-align: center; }
  .hero__actions, .hero__facts { justify-content: center; }
  .hero__visual { height: 680px; }

  .split, .split--rev { grid-template-columns: 1fr; gap: 48px; }
  .split--rev .split__copy { order: 0; }

  .grid { grid-template-columns: 1fr 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .how__stage { grid-template-columns: 1fr; min-height: 0; gap: 28px; padding-top: 40px; }
  .how__step { grid-template-columns: 56px 1fr; padding: 20px; }
  .how__step img { width: 56px; height: 56px; }
  .how__step h3 { font-size: 24px; }

  /* Steps play by themselves here, so only the current one is shown above the phone */
  .js .how__steps { display: grid; min-height: 156px; }
  .js .how__step { grid-area: 1 / 1; align-self: start; }
  .js .how__step:not(.is-active) { opacity: 0; visibility: hidden; transform: translateY(8px); }
  .js .how__step.is-active { background: transparent; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  main > section { margin-top: 96px; }

  .nav__in { gap: 12px; height: 64px; }
  .brand { font-size: 20px; }
  .brand img { width: 32px; height: 32px; }

  .h1 { font-size: clamp(40px, 11.5vw, 56px); }
  .store img { height: 52px; }

  .hero__visual { height: 560px; }
  .hero .phone { --pw: 260px; }

  .how__device .phone { --pw: 260px; }

  .mtile { width: 136px; height: 124px; border-radius: 36px; }
  .mtile__text b { font-size: 17px; }
  .mtile .tile__ic { width: 40px; height: 40px; }
  .mtile .tile__ic .i { font-size: 22px; }

  .stage { min-height: 480px; padding: 36px 16px; border-radius: 44px; }
  .ring-tile { width: 260px; padding: 24px; border-radius: 66px; }
  .ring-tile__ic { left: 24px; top: 24px; }
  .legend { gap: 10px 18px; }

  .grid { grid-template-columns: 1fr; }
  .card { padding: 24px; border-radius: 32px; }

  .faq summary { padding: 0 20px; font-size: 17px; min-height: 68px; }
  .faq__body { padding: 0 20px 22px; }

  .final { padding: 88px 20px; border-radius: 40px; }
  .final__3d--coins { width: 110px; left: -4%; top: 4%; }
  .final__3d--money { width: 90px; right: -3%; top: auto; bottom: 3%; }
  .final__3d--camera { display: none; }

  .foot { grid-template-columns: 1fr; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scan { top: 50%; }
}
