/* ==========================================================================
   Speron Dialer: design system and site styles
   Mobile-first. Breakpoints: 640, 768, 1024, 1280.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Roboto Flex";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/RobotoFlex-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Roboto Flex";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/RobotoFlex-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  /* Surfaces, taken from the app */
  --color-bg: #070A0F;
  --color-surface: #0D141C;
  --color-surface-2: #141D26;
  --color-line: #24303C;

  /* Text */
  --color-text: #F2F4F7;
  --color-text-muted: #8B98AA;
  --color-text-faint: #5E6D80;

  /* Accent: the one chromatic role */
  --color-gold: #C7A867;
  --color-gold-light: #DFC286;
  --color-gold-dark: #CAAB6A;
  --color-gold-ink: #1A1408;
  --color-gold-soft: rgba(199, 168, 103, 0.12);
  --color-cream: #FFFCF6;
  --gradient-gold: linear-gradient(180deg, var(--color-gold-light) 0%, var(--color-gold-dark) 100%);

  /* Sand band, taken from the store banner */
  --color-sand-top: #FDCA7F;
  --color-sand-mid: #E6B068;
  --color-sand-bottom: #D09758;
  --color-sand-ink: #24180A;

  /* Object colors, only inside product illustrations */
  --color-answer: #2DE59D;
  --color-answer-deep: #123936;
  --color-reject: #E4475F;
  --color-reject-deep: #2A1520;
  --color-chomper: #FFD426;
  --color-call-screen: linear-gradient(180deg, #12202D 0%, #080B10 72%);

  /* Typography */
  --font-sans: "Roboto Flex", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --text-display: clamp(2.5rem, 1.5rem + 4.6vw, 5.25rem);
  --text-h2: clamp(2rem, 1.45rem + 2.4vw, 3.5rem);
  --text-h3: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --text-lead: clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  --text-body: 1rem;
  --text-small: 0.875rem;
  --text-eyebrow: 0.8125rem;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --leading-tight: 1.05;
  --leading-snug: 1.25;
  --leading-normal: 1.6;
  --tracking-tight: -0.02em;
  --tracking-eyebrow: 0.24em;
  --measure: 60ch;

  /* Spacing: strict 8px scale */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;
  --space-16: 128px;
  --space-20: 160px;

  /* Layout */
  --container: 1200px;
  --gutter: var(--space-2);
  --section-space: var(--space-12);
  --header-height: 72px;

  /* Radii, nested: outer = inner + padding */
  --radius-1: 8px;
  --radius-2: 16px;
  --radius-3: 24px;
  --radius-pill: 999px;
  --phone-bezel: 8px;
  --phone-radius: 40px;

  /* Elevation: only under phones */
  --shadow-phone: 0 40px 80px -32px rgba(0, 0, 0, 0.7), 0 16px 32px -24px rgba(0, 0, 0, 0.6);

  /* Motion */
  --duration-fast: 160ms;
  --duration-normal: 240ms;
  --duration-slow: 700ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

@media (min-width: 640px) {
  :root {
    --gutter: var(--space-3);
  }
}

@media (min-width: 768px) {
  :root {
    --section-space: var(--space-16);
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: var(--space-4);
  }
}

@media (min-width: 1280px) {
  :root {
    --gutter: var(--space-5);
    --section-space: var(--space-20);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + var(--space-2));
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--color-gold);
  color: var(--color-gold-ink);
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 4px;
  border-radius: var(--radius-1);
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-1);
  left: var(--space-1);
  z-index: 100;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-1);
  background: var(--color-gold);
  color: var(--color-gold-ink);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--duration-normal) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

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

.section {
  position: relative;
  padding-block: var(--section-space);
}

.section + .section {
  border-top: 1px solid var(--color-line);
}

.section-head {
  display: grid;
  gap: var(--space-3);
  max-width: 44rem;
}

/* ---------- Typography ---------- */
.eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-gold);
}

.display {
  font-size: var(--text-display);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

.h2 {
  font-size: var(--text-h2);
  font-weight: var(--weight-light);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

.h3 {
  font-size: var(--text-h3);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  text-wrap: balance;
}

.lead {
  max-width: var(--measure);
  font-size: var(--text-lead);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.body {
  max-width: var(--measure);
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.small {
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

.accent {
  color: var(--color-gold);
}

/* ---------- Icons ---------- */
.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--s {
  width: 16px;
  height: 16px;
}

/* ---------- Buttons and links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 48px;
  padding: 0 var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    filter var(--duration-normal) var(--ease),
    background-color var(--duration-normal) var(--ease),
    border-color var(--duration-normal) var(--ease),
    color var(--duration-normal) var(--ease),
    transform var(--duration-fast) var(--ease);
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  background: var(--gradient-gold);
  color: var(--color-gold-ink);
}

.button--primary:hover {
  filter: brightness(1.08);
}

.button--outline {
  background-color: transparent;
  border-color: rgba(199, 168, 103, 0.55);
  color: var(--color-gold);
}

.button--outline:hover {
  background-color: var(--color-gold-soft);
  border-color: var(--color-gold);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease);
}

.link-arrow .icon {
  color: var(--color-gold);
  transition: transform var(--duration-normal) var(--ease);
}

.link-arrow:hover {
  color: var(--color-gold);
}

.link-arrow:hover .icon {
  transform: translateY(4px);
}

.link-arrow--right:hover .icon {
  transform: translateX(4px);
}

.text-link {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: rgba(199, 168, 103, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition:
    color var(--duration-normal) var(--ease),
    text-decoration-color var(--duration-normal) var(--ease);
}

.text-link:hover {
  color: var(--color-gold);
  text-decoration-color: var(--color-gold);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 10, 15, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-normal) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.brand__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-1);
}

.brand__name {
  font-size: 0.9375rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand__light {
  font-weight: var(--weight-light);
}

.brand__bold {
  font-weight: var(--weight-semibold);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: calc(var(--space-1) * -1);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
  transition: background-color var(--duration-normal) var(--ease);
}

.nav-toggle:hover {
  background-color: var(--color-surface-2);
}

.nav-toggle__close,
.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

.site-nav {
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  padding: var(--space-1) var(--gutter) var(--space-3);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity var(--duration-normal) var(--ease),
    transform var(--duration-normal) var(--ease),
    visibility 0s linear var(--duration-normal);
}

.site-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity var(--duration-normal) var(--ease),
    transform var(--duration-normal) var(--ease),
    visibility 0s;
}

.site-nav__list {
  display: grid;
}

.site-nav__link {
  display: flex;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-text-muted);
  font-size: 1.125rem;
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease);
}

.site-nav__link:hover {
  color: var(--color-text);
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    padding: 0;
    background: none;
    border: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-4);
  }

  .site-nav__link {
    min-height: 48px;
    border: 0;
    font-size: var(--text-small);
    font-weight: var(--weight-medium);
  }
}

/* ---------- Phone frame ---------- */
.phone {
  --phone-screen-radius: calc(var(--phone-radius) - var(--phone-bezel));
  position: relative;
  width: var(--phone-width, 280px);
  max-width: 100%;
  padding: var(--phone-bezel);
  border-radius: var(--phone-radius);
  background: linear-gradient(160deg, #3A3122 0%, #151A21 30%, #0D141C 70%, #2A2419 100%);
  box-shadow: inset 0 0 0 1px rgba(199, 168, 103, 0.3), var(--shadow-phone);
}

.phone__screen {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--phone-screen-radius);
  background: var(--color-bg);
}

.phone--s {
  --phone-radius: 24px;
  --phone-bezel: 8px;
}

/* ---------- Keypad ring motif ---------- */
.keyring {
  --keyring-size: 200px;
  --keyring-tilt: -12deg;
  position: absolute;
  display: grid;
  place-content: center;
  width: var(--keyring-size);
  height: var(--keyring-size);
  border: 1.5px solid currentColor;
  border-radius: 50%;
  color: rgba(199, 168, 103, 0.14);
  text-align: center;
  font-weight: var(--weight-light);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  transform: rotate(var(--keyring-tilt));
}

.keyring__digit {
  font-size: calc(var(--keyring-size) * 0.36);
}

.keyring__letters {
  margin-top: calc(var(--keyring-size) * 0.04);
  font-size: calc(var(--keyring-size) * 0.09);
  letter-spacing: 0.2em;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-6) var(--space-12);
}

.hero__grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.hero__text {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-2);
}

.hero__stores {
  margin-top: var(--space-1);
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

.hero__stores strong {
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.hero__media {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: center;
}

.hero__media .keyring:nth-of-type(1) {
  top: -8%;
  left: -16%;
}

.hero__media .keyring:nth-of-type(2) {
  --keyring-size: 240px;
  --keyring-tilt: 14deg;
  right: -24%;
  top: 30%;
}

.hero__media .keyring:nth-of-type(3) {
  --keyring-size: 168px;
  --keyring-tilt: -6deg;
  left: -12%;
  bottom: -4%;
}

.hero .phone {
  --phone-width: 272px;
  z-index: 1;
}

@media (min-width: 768px) {
  .hero {
    padding-block: var(--space-10) var(--space-16);
  }

  .hero .phone {
    --phone-width: 320px;
  }
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-12);
  }

  .hero .phone {
    --phone-width: 340px;
  }
}

/* ---------- Call tokens (shared by the call demo and the rule diagram) ---------- */
.token-band {
  fill: none;
  stroke-linecap: round;
}

.token-band--reject {
  stroke: rgba(228, 71, 95, 0.08);
  stroke-width: 36;
}

.token-band--answer {
  stroke: rgba(45, 229, 157, 0.07);
  stroke-width: 40;
}

.token-dots {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 0 1;
}

.token-dots--reject {
  stroke: var(--color-reject);
  opacity: 0.8;
}

.token-dots--answer {
  stroke: var(--color-answer);
  opacity: 0.85;
}

.token-ring {
  stroke-width: 2.5;
}

.token-ring--reject {
  fill: var(--color-reject-deep);
  stroke: var(--color-reject);
}

.token-ring--answer {
  fill: var(--color-answer-deep);
  stroke: var(--color-answer);
}

.token-glyph {
  color: #fff;
}

.rule__art .token-dots {
  stroke-width: 6;
}

.rule__art .token-ring {
  stroke-width: 2;
}

/* ---------- Call demo (animated incoming call) ---------- */
.call-demo {
  --call-cycle: 8s;
  container-type: inline-size;
}

.call-demo__screen {
  display: flex;
  flex-direction: column;
  aspect-ratio: 9 / 19.5;
  padding: 4cqi 7cqi 8cqi;
  background: var(--color-call-screen);
}

.call-demo__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 4.2cqi;
  color: var(--color-text);
}

.call-demo__signal {
  width: 6cqi;
  height: 4.4cqi;
  fill: currentColor;
}

.call-demo__head {
  display: grid;
  justify-items: center;
  gap: 1.5cqi;
  margin-top: 9cqi;
  text-align: center;
}

.call-demo__state {
  display: grid;
  font-size: 4cqi;
  letter-spacing: 0.24em;
  color: var(--color-gold);
}

.call-demo__state > span {
  grid-area: 1 / 1;
}

.call-demo__name {
  font-size: 10cqi;
  font-weight: var(--weight-regular);
  line-height: 1.1;
}

.call-demo__meta {
  font-size: 4.6cqi;
  color: var(--color-text-muted);
}

.call-demo__stage {
  display: grid;
  flex: 1;
  align-items: center;
  margin-top: 4cqi;
}

.call-demo__game,
.call-demo__connected {
  grid-area: 1 / 1;
}

.call-demo__game {
  width: 100%;
  overflow: visible;
}

.call-demo__halo {
  fill: none;
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
}

.call-demo__halo--reject {
  stroke: rgba(228, 71, 95, 0.5);
}

.call-demo__halo--answer {
  stroke: rgba(45, 229, 157, 0.5);
}

.call-demo__chomper-glow {
  fill: rgba(255, 212, 38, 0.14);
}

.call-demo__jaw {
  fill: var(--color-chomper);
  transform-box: fill-box;
}

.call-demo__jaw--top {
  transform-origin: 50% 100%;
  transform: rotate(-30deg);
}

.call-demo__jaw--bottom {
  transform-origin: 50% 0%;
  transform: rotate(30deg);
}

.call-demo__eye {
  fill: var(--color-gold-ink);
}

.call-demo__chomper,
.call-demo__target {
  transform-box: fill-box;
  transform-origin: center;
}

.call-demo__connected {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4cqi;
  opacity: 0;
}

.call-demo__avatar {
  display: grid;
  place-content: center;
  width: 30cqi;
  height: 30cqi;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: #1C2733;
  color: var(--color-gold);
  font-size: 13cqi;
  font-weight: var(--weight-light);
}

.call-demo__timer {
  display: inline-flex;
  font-size: 6cqi;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  line-height: 1;
}

.call-demo__digits {
  display: inline-grid;
  height: 1em;
  overflow: hidden;
}

.call-demo__digits-track {
  display: grid;
}

.call-demo__digits-track > span {
  display: block;
  height: 1em;
}

.call-demo__end {
  display: grid;
  place-content: center;
  width: 18cqi;
  height: 18cqi;
  margin-top: 12cqi;
  border-radius: 50%;
  background: var(--color-reject);
  color: #fff;
}

.call-demo__end svg {
  width: 8cqi;
  height: 8cqi;
  transform: rotate(135deg);
}

/* Animation timeline: 0-20% ringing, 20-56% chomper runs, 56-62% answer,
   62-90% on call, 90-96% back to ringing. All parts share one cycle. */
.call-demo__halo {
  animation: call-halo 1.6s var(--ease) infinite;
}

.call-demo__halo--answer {
  animation-delay: 0.4s;
}

.call-demo__jaw--top {
  animation: jaw-top 0.36s var(--ease-in-out) infinite alternate;
}

.call-demo__jaw--bottom {
  animation: jaw-bottom 0.36s var(--ease-in-out) infinite alternate;
}

.call-demo__runner {
  animation: call-run var(--call-cycle) var(--ease-in-out) infinite;
}

.call-demo__eat {
  animation: call-eat var(--call-cycle) var(--ease-in-out) infinite;
}

.call-demo__chomper {
  animation: call-absorb var(--call-cycle) var(--ease) infinite;
}

.call-demo__target {
  animation: call-target var(--call-cycle) var(--ease) infinite;
}

.call-demo__game {
  animation: call-game var(--call-cycle) var(--ease) infinite;
}

.call-demo__connected {
  animation: call-connected var(--call-cycle) var(--ease) infinite;
}

.call-demo__incoming {
  animation: call-game var(--call-cycle) var(--ease) infinite;
}

.call-demo__oncall {
  opacity: 0;
  animation: call-connected var(--call-cycle) var(--ease) infinite;
}

.call-demo__digits-track {
  animation: call-timer var(--call-cycle) step-end infinite;
}

.js .call-demo:not(.is-playing) * {
  animation-play-state: paused;
}

@keyframes call-halo {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes jaw-top {
  from {
    transform: rotate(-34deg);
  }

  to {
    transform: rotate(-2deg);
  }
}

@keyframes jaw-bottom {
  from {
    transform: rotate(34deg);
  }

  to {
    transform: rotate(2deg);
  }
}

@keyframes call-run {
  0%,
  20% {
    transform: translate(0, 0);
  }

  56%,
  90% {
    transform: translate(152px, -180px);
  }

  91%,
  100% {
    transform: translate(0, 0);
  }
}

@keyframes call-eat {
  0%,
  20% {
    stroke-dashoffset: 0;
  }

  56%,
  90% {
    stroke-dashoffset: -100;
  }

  91%,
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes call-absorb {
  0%,
  55% {
    transform: scale(1);
    opacity: 1;
  }

  61%,
  90% {
    transform: scale(0.3);
    opacity: 0;
  }

  96%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes call-target {
  0%,
  54% {
    transform: scale(1);
  }

  58% {
    transform: scale(1.18);
  }

  63%,
  100% {
    transform: scale(1);
  }
}

@keyframes call-game {
  0%,
  58% {
    opacity: 1;
  }

  64%,
  90% {
    opacity: 0;
  }

  96%,
  100% {
    opacity: 1;
  }
}

@keyframes call-connected {
  0%,
  60% {
    opacity: 0;
  }

  66%,
  88% {
    opacity: 1;
  }

  94%,
  100% {
    opacity: 0;
  }
}

@keyframes call-timer {
  0% {
    transform: translateY(0);
  }

  73% {
    transform: translateY(-1em);
  }

  80% {
    transform: translateY(-2em);
  }

  100% {
    transform: translateY(-2em);
  }
}

/* ---------- Features ---------- */
.features {
  display: grid;
  gap: var(--space-12);
  margin-top: var(--space-10);
}

.feature {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

.feature__text {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.feature__text .h3 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  font-weight: var(--weight-light);
  line-height: 1.15;
}

.feature__media {
  display: grid;
  justify-items: center;
}

.feature .phone {
  --phone-width: 264px;
}

@media (min-width: 1024px) {
  .features {
    gap: var(--space-16);
    margin-top: var(--space-16);
  }

  .feature {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-12);
  }

  .feature--reverse .feature__media {
    order: -1;
  }

  .feature .phone {
    --phone-width: 300px;
  }
}

/* Also inside: spec list + phone fan */
.also {
  display: grid;
  gap: var(--space-10);
  margin-top: var(--space-12);
  padding-top: var(--space-12);
  border-top: 1px solid var(--color-line);
}

.also__head {
  display: grid;
  gap: var(--space-2);
}

.spec-list {
  display: grid;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-6);
}

.spec-list__item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-line);
}

.spec-list__item .icon {
  color: var(--color-gold);
}

.spec-list__title {
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
}

.spec-list__text {
  margin-top: var(--space-1);
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

.fan {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  max-width: 520px;
  width: 100%;
  margin-inline: auto;
  padding-top: var(--space-4);
}

.fan .phone {
  --phone-width: 40%;
}

.fan .phone:nth-child(1) {
  margin-right: -6%;
  transform: rotate(-8deg) translateY(16px);
}

.fan .phone:nth-child(2) {
  z-index: 1;
}

.fan .phone:nth-child(3) {
  margin-left: -6%;
  transform: rotate(8deg) translateY(16px);
}

@media (min-width: 640px) {
  .spec-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .also {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-12);
    align-items: center;
    margin-top: var(--space-16);
    padding-top: var(--space-16);
  }
}

/* ---------- Call screen ---------- */
/* On small screens the controls dissolve into the main grid so the phone
   sits right under the theme chips. */
.callscreen {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

.callscreen__controls {
  display: contents;
}

.callscreen .theme-viewer {
  order: 1;
}

.callscreen .looks {
  order: 2;
}

.rules {
  display: grid;
  gap: var(--space-3);
}

.rule {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
}

.rule__art {
  width: 136px;
  height: auto;
  overflow: visible;
}

.rule__title {
  display: block;
  font-weight: var(--weight-medium);
}

.rule__text {
  color: var(--color-text-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 40px;
  padding: 0 var(--space-2);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background-color: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition:
    color var(--duration-normal) var(--ease),
    border-color var(--duration-normal) var(--ease),
    background-color var(--duration-normal) var(--ease);
}

.chip:hover {
  color: var(--color-text);
}

.chip[aria-selected="true"] {
  border-color: var(--color-gold);
  background-color: var(--color-gold-soft);
  color: var(--color-gold);
}

.chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chip-dot, var(--color-gold));
}

.theme-picker {
  display: grid;
  gap: var(--space-2);
}

.theme-picker__rule {
  min-height: 3.2em;
  color: var(--color-text-muted);
}

.theme-viewer {
  display: grid;
  justify-items: center;
}

.theme-viewer .phone {
  --phone-width: 280px;
}

.theme-viewer__frames {
  display: grid;
}

.theme-viewer__frames > img {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease);
}

.theme-viewer__frames > img.is-active {
  opacity: 1;
}

.looks {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
}

.looks__number {
  font-size: clamp(3.5rem, 2.8rem + 3vw, 5.5rem);
  font-weight: var(--weight-light);
  line-height: 0.9;
  letter-spacing: var(--tracking-tight);
  color: var(--color-gold);
}

.looks__caption {
  display: grid;
  gap: var(--space-1);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.swatch {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--swatch);
}

@media (min-width: 1024px) {
  .callscreen {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-12);
  }

  .callscreen__controls {
    display: grid;
    gap: var(--space-6);
  }

  .theme-viewer .phone {
    --phone-width: 320px;
  }
}

/* ---------- Sand band (from the store banner) ---------- */
.band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--color-sand-top) 0%, var(--color-sand-mid) 55%, var(--color-sand-bottom) 100%);
  color: var(--color-sand-ink);
}

.band__grid {
  position: relative;
  display: grid;
  gap: var(--space-6);
  padding-top: var(--section-space);
}

.band__text {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-3);
  align-content: center;
}

.band .eyebrow {
  color: var(--color-sand-ink);
}

.band__lead {
  max-width: var(--measure);
  font-size: var(--text-lead);
  color: rgba(36, 24, 10, 0.82);
  text-wrap: pretty;
}

.band__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  max-width: 32rem;
  margin-top: var(--space-2);
}

.band__fact {
  padding-top: var(--space-2);
  border-top: 1px solid rgba(36, 24, 10, 0.24);
}

.band__fact dt {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.band__fact dd {
  margin-top: var(--space-1);
  font-size: var(--text-h3);
  font-weight: var(--weight-light);
}

.band__media {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: end;
}

.band__figure {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%), linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%), linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-composite: intersect;
}

.band__figure img {
  width: 100%;
}

.ripple {
  position: absolute;
  left: 19%;
  top: 29%;
  width: 18%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 252, 246, 0.85);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  animation: ripple 2.4s var(--ease) infinite;
}

.ripple:nth-of-type(2) {
  animation-delay: 0.8s;
}

.ripple:nth-of-type(3) {
  animation-delay: 1.6s;
}

.js .band:not(.is-playing) .ripple {
  animation-play-state: paused;
}

@keyframes ripple {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.4);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.2);
  }
}

@media (min-width: 1024px) {
  .band__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-8);
  }

  .band__text {
    padding-bottom: var(--section-space);
  }

  .band__media {
    justify-items: end;
  }

  .band__figure {
    width: min(100%, 560px);
  }
}

/* ---------- Hands free ---------- */
.gestures {
  display: grid;
  gap: var(--space-6) var(--space-4);
  margin-top: var(--space-10);
}

.gesture {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
}

.gesture__art {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-1);
  overflow: visible;
  color: var(--color-gold);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gesture__fill {
  fill: currentColor;
  fill-opacity: 0.18;
}

.gesture__solid {
  fill: currentColor;
  stroke: none;
}

.gesture__text {
  color: var(--color-text-muted);
}

.gestures__note {
  margin-top: var(--space-6);
}

/* Pictogram motion: plays once when the list comes into view */
.gesture__move {
  transform-box: fill-box;
  transform-origin: center;
}

.gestures.is-visible .gesture__move--raise {
  animation: picto-raise 1.6s var(--ease) 0.2s both;
}

.gestures.is-visible .gesture__move--flip {
  animation: picto-flip 1.6s var(--ease-in-out) 0.4s both;
}

.gestures.is-visible .gesture__move--press {
  animation: picto-press 1.2s var(--ease) 0.6s both;
}

.gestures.is-visible .gesture__move--press-twice {
  animation: picto-press-twice 1.2s var(--ease) 0.8s both;
}

.gestures.is-visible .gesture__move--hangup {
  animation: picto-hangup 0.8s var(--ease) 1.6s both;
}

.gestures.is-visible .gesture__move--volume {
  animation: picto-press 1.2s var(--ease) 1s both;
}

.gestures.is-visible .gesture__fade--off {
  animation: picto-off 0.8s var(--ease) 1.4s both;
}

.gestures.is-visible .gesture__fade--late {
  animation: picto-off 0.8s var(--ease) 1.8s both;
}

.gestures.is-visible .gesture__fade--blank {
  animation: picto-off 0.8s var(--ease) 1.6s both;
}

.gestures.is-visible .gesture__fade--in {
  animation: picto-in 0.6s var(--ease) 1.8s both;
}

@keyframes picto-raise {
  from {
    transform: translate(-8px, 12px) rotate(-12deg);
  }

  to {
    transform: translate(0, 0) rotate(0);
  }
}

@keyframes picto-flip {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(180deg);
  }
}

@keyframes picto-press {
  0%,
  100% {
    transform: translateX(0);
  }

  30%,
  50% {
    transform: translateX(-2px);
  }
}

@keyframes picto-press-twice {
  0%,
  45%,
  100% {
    transform: translateX(0);
  }

  15%,
  25%,
  60%,
  70% {
    transform: translateX(-2px);
  }
}

@keyframes picto-hangup {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(135deg);
  }
}

@keyframes picto-off {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes picto-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (min-width: 640px) {
  .gestures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .gestures {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-8) var(--space-6);
    margin-top: var(--space-12);
  }
}

/* ---------- Studio ---------- */
.studio {
  display: grid;
  gap: var(--space-8);
}

.studio__head {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.studio__coords {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-small);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.studio__coords .icon {
  color: var(--color-gold);
}

.studio__body {
  display: grid;
  gap: var(--space-3);
}

.facts {
  margin-top: var(--space-3);
  border-top: 1px solid var(--color-line);
}

.facts__row {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--color-line);
}

.facts__row dt {
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

.facts__row dd {
  overflow-wrap: anywhere;
}

@media (min-width: 640px) {
  .facts__row {
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: var(--space-3);
    align-items: baseline;
  }
}

@media (min-width: 1024px) {
  .studio {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-12);
  }
}

/* ---------- Get the app + Contact ---------- */
.reach {
  display: grid;
  gap: var(--space-12);
}

.reach__col {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.store-list {
  margin-top: var(--space-2);
  border-top: 1px solid var(--color-line);
}

.store-list__item {
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--color-line);
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  font-weight: var(--weight-light);
  line-height: var(--leading-snug);
}

.mail {
  display: inline-block;
  max-width: 100%;
  margin-top: var(--space-2);
  font-size: clamp(1.375rem, 0.9rem + 2.2vw, 2.5rem);
  font-weight: var(--weight-light);
  line-height: var(--leading-snug);
  overflow-wrap: anywhere;
}

.reach__buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.copy-status {
  min-height: 1.6em;
  font-size: var(--text-small);
  color: var(--color-gold);
}

@media (min-width: 1024px) {
  .reach {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-12);
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-line);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-3);
  align-items: center;
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

.site-footer__meta a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease);
}

.site-footer__meta a:hover {
  color: var(--color-gold);
}

@media (min-width: 1024px) {
  .site-footer__inner {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: end;
  }
}

/* ---------- Long-form text (privacy page) ---------- */
.prose {
  max-width: 44rem;
  color: var(--color-text-muted);
}

.prose > * + * {
  margin-top: var(--space-2);
}

.prose h2 {
  margin-top: var(--space-8);
  font-size: var(--text-h3);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

.prose h2 + * {
  margin-top: var(--space-2);
}

.prose h3 {
  margin-top: var(--space-4);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

.prose h3 + * {
  margin-top: var(--space-1);
}

.prose code {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--color-text);
}

.prose ul {
  display: grid;
  gap: var(--space-1);
  padding-left: var(--space-3);
  list-style: disc;
}

.prose li::marker {
  color: var(--color-gold);
}

.prose strong {
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.page-head {
  display: grid;
  gap: var(--space-3);
  max-width: 44rem;
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-line);
  margin-bottom: var(--space-6);
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--duration-slow) var(--ease),
    transform var(--duration-slow) var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    transform: none;
  }
}
