/* StandBy website. Brand rules: _playstore/design-system.md
   Flat fills only: no gradients, glows or blur shadows. Depth = hard offset shadows. */

:root {
  --violet: #6B3BFF;
  --deep: #3B1FB8;
  --deeper: #2A1488;
  --mid: #8A63FF;
  --lavender: #C7B8FF;
  --yellow: #FFD60A;
  --yellow-side: #E39A00;
  --yellow-light: #FFE55C;
  --white: #FFFFFF;
  --pale: #F1ECFF;
  --bezel: #0C0C10;

  /* App screen colours (only inside device frames) */
  --screen: #000000;
  --screen-card: #151517;
  --screen-muted: #9A9A9F;
  --screen-link: #0A84FF;
  --screen-tile: #3A72D8;
  --night: #FF453A;

  --font: "Segoe UI Variable Display", "Segoe UI Variable Text", Inter, system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --page-x: clamp(20px, 5vw, 80px);
  --max: 1240px;
  --h1: clamp(48px, 6.2vw, 96px);
  --h2: clamp(40px, 5.2vw, 76px);
  --sub: clamp(18px, 1.8vw, 24px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  color: var(--white);
  background: var(--violet);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.skip {
  position: absolute; inset-inline-start: 16px; top: -64px; z-index: 10;
  padding: 12px 16px; border-radius: 12px;
  background: var(--yellow); color: var(--deeper); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; border-radius: 8px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--page-x) * 2); margin: 0 auto; padding: 0 var(--page-x); }

/* ---------- Type ---------- */
.h1, .h2 {
  margin: 0;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h1 { font-size: var(--h1); }
.h2 { font-size: var(--h2); }
.y { color: var(--yellow); }

.sub {
  margin-top: 24px;
  max-width: 34ch;
  font-size: var(--sub);
  font-weight: 500;
  line-height: 1.36;
  color: var(--lavender);
  text-wrap: pretty;
}
.on-mid .sub { color: var(--white); }

/* ---------- Nav ---------- */
.nav { position: relative; z-index: 3; }
.nav .wrap { display: flex; align-items: center; gap: 32px; height: 88px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav-links { display: flex; gap: 28px; margin-inline-start: auto; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 16px; color: var(--lavender); transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { color: var(--white); } }
.nav .btn { padding: 12px 20px; font-size: 16px; margin-inline-start: auto; }
.nav-links + .btn { margin-inline-start: 0; }
@media (max-width: 860px) { .nav-links { display: none; } .nav .btn { margin-inline-start: auto; } }
@media (max-width: 420px) { .nav .btn .long { display: none; } }

/* ---------- Buttons: hard offset shadow, pressed = pushed into it ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 28px;
  border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 18px; line-height: 1;
  text-decoration: none; white-space: nowrap;
  color: var(--deeper);
  background: var(--white);
  box-shadow: 0 6px 0 var(--deeper);
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out), background-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--deeper); }
.btn-yellow { background: var(--yellow); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--pale); }
  .btn-yellow:hover { background: var(--yellow-light); }
}
.btn-ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px var(--lavender); }
.btn-ghost:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px var(--lavender); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); } }

.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-bottom: 96px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  min-height: min(760px, calc(100svh - 88px));
}
.hero .sub { max-width: 30ch; }
.hero-art { position: relative; display: grid; place-items: center; padding: 48px 0; }

.facts {
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  margin-top: 48px;
  font-size: 16px; font-weight: 600; color: var(--lavender);
}
.facts li { display: flex; align-items: center; gap: 10px; }
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); flex: none; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; gap: 24px; }
  .hero-art { padding: 32px 0 0; }
}

/* Decoration: flat circles + one yellow dot */
.circle { position: absolute; border-radius: 50%; pointer-events: none; }
.c-mid { background: var(--mid); }
.c-deep { background: var(--deep); }
.c-violet { background: var(--violet); }
.c-deeper { background: var(--deeper); }
.c-yellow { background: var(--yellow); }

/* ---------- Landscape device with the live StandBy screen ---------- */
.device-land {
  position: relative; z-index: 1;
  width: min(100%, 680px);
  aspect-ratio: 2400 / 1080;
  padding: 2.2%;
  border-radius: 9% / 20%;
  background: var(--bezel);
  box-shadow: 0 28px 0 var(--deep);
  transform: rotate(-7deg);
  container-type: inline-size;
}
.night .device-land { transform: none; box-shadow: 0 28px 0 var(--deeper); }

.screen {
  position: relative;
  height: 100%;
  border-radius: 7.4% / 17%;
  background: var(--screen);
  overflow: hidden;
  display: grid;
  grid-template-columns: 58fr 42fr;
  align-items: center;
  padding: 0 4cqw 0 5cqw;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  transition: color 420ms ease;
}
.clock { display: flex; flex-direction: column; align-items: center; }
.time { display: flex; align-items: flex-end; gap: 1.2cqw; line-height: 0.82; }
.digits { font-size: 17cqw; font-weight: 500; letter-spacing: -0.03em; display: flex; }
.digits span { display: inline-block; }
.ampm { font-size: 2.6cqw; font-weight: 700; color: var(--screen-muted); padding-bottom: 0.3cqw; transition: color 420ms ease; }
.date { margin-top: 4.4cqw; font-size: 2.5cqw; font-weight: 600; color: var(--screen-muted); transition: color 420ms ease; }

.tasks { display: flex; flex-direction: column; gap: 2.6cqw; }
.task-card { background: var(--screen-card); border-radius: 2.4cqw; padding: 2cqw 2.2cqw; transition: background-color 420ms ease; }
.task-head { display: flex; align-items: center; gap: 1.6cqw; font-size: 2.3cqw; font-weight: 600; }
.task-big { display: flex; align-items: baseline; gap: 1.4cqw; margin-top: 0.8cqw; padding-inline-start: 4cqw; }
.task-big b { font-size: 4.6cqw; font-weight: 600; letter-spacing: -0.02em; }
.link { color: var(--screen-link); font-weight: 600; font-size: 1.8cqw; transition: color 420ms ease; }
.task-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1.6cqw; padding: 0 1.4cqw 0 1.8cqw; font-size: 2cqw; font-weight: 600; }
.task-row .t { color: var(--screen-muted); transition: color 420ms ease; }
.tile { display: grid; place-items: center; width: 4.4cqw; height: 4.4cqw; border-radius: 1.1cqw; background: var(--screen-tile); transition: background-color 420ms ease; }
.task-card .tile { width: 5.2cqw; height: 5.2cqw; border-radius: 1.3cqw; }
.tile svg { width: 58%; height: 58%; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Red night mode (recreated: same layout, red ink on black) */
.screen.is-night,
.screen.is-night .ampm,
.screen.is-night .date,
.screen.is-night .link,
.screen.is-night .task-row .t { color: var(--night); }
.screen.is-night .tile { background: #4A0E0B; color: var(--night); }
.screen.is-night .task-card { background: #120404; }
.screen.is-night .ampm, .screen.is-night .date, .screen.is-night .task-row .t { color: #B3302A; }

/* ---------- Feature sections ---------- */
.band { position: relative; overflow: hidden; }
.band-violet { background: var(--violet); }
.band-deep { background: var(--deep); }
.band-mid { background: var(--mid); }
.band-deeper { background: var(--deeper); }
.band-yellow { background: var(--yellow); color: var(--deep); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: end;
  padding-top: 128px;
}
.split.flip .copy { order: 2; }
.copy { align-self: center; padding-bottom: 128px; }

.points { display: grid; gap: 16px; margin-top: 40px; max-width: 460px; }
.points li { display: grid; grid-template-columns: 24px 1fr; gap: 16px; font-size: 18px; font-weight: 500; color: var(--pale); }
.points li::before { content: ""; width: 10px; height: 10px; margin: 8px 0 0 6px; border-radius: 50%; background: var(--yellow); }
.on-mid .points li { color: var(--white); }

.stage { position: relative; display: flex; justify-content: center; align-self: end; }
.stage .circle { z-index: 0; }

/* Portrait phone that bleeds off the bottom of its band */
.phone {
  position: relative; z-index: 1;
  width: min(360px, 78vw);
  height: min(600px, 132vw);
  padding: 12px 12px 0;
  border-radius: 52px 52px 0 0;
  background: var(--bezel);
  overflow: hidden;
}
.phone img { width: 100%; height: auto; border-radius: 40px 40px 0 0; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 48px; padding-top: 88px; }
  .split.flip .copy { order: 0; }
  .copy { padding-bottom: 0; }
}

/* Clock face list */
.faces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; max-width: 520px; }
.faces li { padding: 8px 14px; border-radius: 999px; background: var(--white); color: var(--deep); font-weight: 700; font-size: 15px; }
.also { margin-top: 24px; max-width: 46ch; font-size: 17px; font-weight: 500; color: var(--white); }

/* ---------- Night demo ---------- */
.night .inner { padding-block: 128px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; }
.night .stage { align-self: center; flex-direction: column; align-items: center; gap: 56px; }
@media (max-width: 960px) { .night .inner { grid-template-columns: 1fr; padding-block: 88px 104px; } }

.seg {
  position: relative;
  display: inline-grid; grid-template-columns: 1fr 1fr;
  padding: 4px; border-radius: 999px;
  background: var(--deeper);
}
.seg button {
  position: relative; z-index: 1;
  min-width: 112px; padding: 12px 20px;
  border: 0; border-radius: 999px; background: transparent;
  font: inherit; font-weight: 700; font-size: 16px;
  color: var(--lavender); cursor: pointer;
  transition: color 200ms ease, transform 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.seg button:active { transform: scale(0.97); }
.seg button[aria-pressed="true"] { color: var(--deeper); }
.seg .thumb {
  position: absolute; top: 4px; bottom: 4px; inset-inline-start: 4px;
  width: calc(50% - 4px);
  border-radius: 999px; background: var(--white);
  transition: transform 260ms var(--ease-in-out), background-color 260ms ease;
}
.seg[data-mode="night"] .thumb { transform: translateX(100%); background: var(--yellow); }
[dir="rtl"] .seg[data-mode="night"] .thumb { transform: translateX(-100%); }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 12px; margin-top: 40px; max-width: 480px; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: center;
  font-weight: 600; font-size: 18px;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--white); color: var(--deep); font-weight: 800;
}

/* ---------- Privacy card ---------- */
.privacy .inner { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; padding-block: 128px; }
.privacy .h2 { color: var(--deep); }
.privacy .sub { color: var(--deep); font-weight: 500; }
.checks { display: grid; gap: 20px; margin-top: 40px; }
.checks li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: center; font-size: clamp(20px, 2vw, 26px); font-weight: 700; color: var(--deep); }
.checks svg { width: 40px; height: 40px; }
.privacy .btn { box-shadow: 0 6px 0 var(--yellow-side); color: var(--deep); }
.privacy .btn:active { box-shadow: 0 2px 0 var(--yellow-side); }
.mark-stage { position: relative; display: grid; place-items: center; width: 100%; max-width: 480px; aspect-ratio: 1; }
.mark-stage .circle { inset: 4%; background: var(--yellow-light); }
.mark-stage img { position: relative; width: 78%; height: auto; }
@media (max-width: 900px) { .privacy .inner { grid-template-columns: 1fr; padding-block: 88px; } .mark-stage { max-width: 360px; } }

/* ---------- FAQ ---------- */
.faq .inner { padding-block: 128px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; }
.faq .copy { align-self: start; padding-bottom: 0; }
@media (max-width: 900px) { .faq .inner { grid-template-columns: 1fr; padding-block: 88px; gap: 40px; } }
.qa { border-top: 2px solid rgba(199, 184, 255, 0.35); }
.qa details { border-bottom: 2px solid rgba(199, 184, 255, 0.35); }
.qa summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 0;
  font-size: clamp(19px, 1.7vw, 22px); font-weight: 700;
  cursor: pointer; list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; flex: none; width: 14px; height: 14px; margin-inline-end: 4px;
  border-right: 3px solid var(--yellow); border-bottom: 3px solid var(--yellow);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 200ms var(--ease-out);
}
.qa details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.qa p { padding: 0 48px 24px 0; color: var(--pale); font-size: 18px; max-width: 62ch; }

/* ---------- Final CTA + footer ---------- */
.cta .inner { padding-block: 128px 112px; }
.cta .copy { padding-bottom: 0; }
.footer { background: var(--deeper); color: var(--lavender); font-size: 15px; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 40px; padding-bottom: 40px; }
.footer .brand { color: var(--white); font-size: 18px; }
.footer .brand img { width: 32px; height: 32px; border-radius: 8px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 24px; margin-inline-start: auto; }
.footer a { text-decoration: none; font-weight: 600; transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .footer a:hover { color: var(--white); } }

/* ---------- Legal page ---------- */
.legal { background: var(--violet); padding: 48px 0 128px; }
.legal article {
  max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 64px);
  border-radius: 32px; background: var(--white); color: #1C1530;
  box-shadow: 0 16px 0 var(--deep);
}
.legal h1 { margin: 0; font-size: clamp(40px, 6vw, 64px); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; color: var(--deep); }
.legal h2 { margin: 48px 0 12px; font-size: 24px; font-weight: 800; color: var(--deep); letter-spacing: -0.01em; }
.legal p, .legal li { font-size: 17px; line-height: 1.6; }
.legal p + p, .legal ul + p { margin-top: 12px; }
.legal ul { list-style: disc; padding-inline-start: 24px; display: grid; gap: 8px; margin-top: 12px; }
.legal .meta { margin-top: 16px; color: #5B5470; font-size: 15px; }
.legal a { color: var(--deep); font-weight: 600; }

/* ---------- Motion ----------
   Entrances are GSAP timelines in main.js. Until GSAP renders their start state, the animated
   elements stay hidden (no flash of final layout). Without JS or GSAP, html.js is removed and all is visible. */
.js .hero .h1, .js .hero .sub, .js .hero .actions, .js .hero .facts, .js .hero .device-land, .js .hero .circle,
.js .reveal .copy > *, .js .reveal .stage > *, .js .reveal > .circle { visibility: hidden; }

/* SplitText line masks: keep descenders (g, y, p) inside the mask */
.h1 > div, .h2 > div { padding-bottom: 0.08em; margin-bottom: -0.08em; }

@media (prefers-reduced-motion: reduce) {
  .seg .thumb, .qa summary::after { transition: none; }
}
