/* RapidEx Track website
   Plain CSS, no build step. Colours come from the app (teal + amber logo).
   The site is dark by default (data-theme="dark" on <html>); the header
   toggle switches to light and the choice is remembered in the browser. */

/* ---------------------------------------------------------------- tokens */
:root {
  --teal-300: #6cc6c6;
  --teal-400: #2faaaa;
  --teal-500: #168c8c; /* logo teal */
  --teal-600: #0e7474; /* text-safe teal on white */
  --teal-700: #0c5c5e;
  --teal-800: #0b4649;
  --teal-900: #08292d;
  --amber: #fdb514; /* logo amber */
  --income: #0f9f6e;
  --expense: #e5484d;

  --bg: #f7fafb;
  --surface: #ffffff;
  --surface-2: #eef4f5;
  --text: #0a1a1f;
  --muted: #51626b;
  --border: #dce7ea;
  --link: var(--teal-600);
  --accent: var(--teal-600);
  --accent-soft: #e3f3f3;
  --shadow-sm: 0 1px 2px rgba(10, 26, 31, 0.06), 0 1px 1px rgba(10, 26, 31, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(10, 26, 31, 0.18), 0 2px 6px rgba(10, 26, 31, 0.05);
  --shadow-lg: 0 40px 80px -30px rgba(7, 31, 34, 0.45), 0 12px 30px -12px rgba(7, 31, 34, 0.25);

  --radius: 20px;
  --radius-sm: 12px;
  --container: 1160px;
  --header-h: 68px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b1518;
  --surface: #122024;
  --surface-2: #172a2f;
  --text: #f1f7f8;
  --muted: #a3b7bd;
  --border: #233a40;
  --link: #5fd4d4;
  --accent: #36c2c2;
  --accent-soft: #143538;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 12px 30px -12px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

ul {
  margin: 0;
  padding: 0;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.section--tint {
  background: var(--surface-2);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.lead {
  font-size: clamp(1.08rem, 1.5vw, 1.25rem);
  color: var(--muted);
  max-width: 60ch;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .lead {
  margin-inline: auto;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--fill {
  fill: currentColor;
  stroke: none;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--amber);
  color: #0a1a1f;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.95rem;
}

.btn--primary {
  background: var(--teal-600);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(14, 116, 116, 0.7);
}

.btn--primary:hover {
  background: var(--teal-700);
}

.btn--amber {
  background: var(--amber);
  color: #0a1a1f;
  box-shadow: 0 10px 24px -10px rgba(253, 181, 20, 0.8);
}

.btn--amber:hover {
  background: #ffc437;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.btn--on-dark {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.btn--on-dark:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn--store {
  padding: 0 26px 0 20px;
  text-align: left;
}

.btn--store .icon {
  width: 26px;
  height: 26px;
}

.btn--store small {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.btn--store span {
  display: block;
  font-size: 1.08rem;
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  color: #fff;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.js .site-header {
  position: fixed;
}

.site-header.is-stuck {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.brand b {
  font-weight: 800;
  opacity: 0.72;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.86;
}

.nav a:hover,
.nav a[aria-current="page"] {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.site-header.is-stuck .nav a:hover,
.site-header.is-stuck .nav a[aria-current="page"] {
  background: var(--surface-2);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.site-header.is-stuck .icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn .icon {
  width: 21px;
  height: 21px;
}

.nav-toggle {
  display: none;
}

.theme-toggle .icon--sun,
:root[data-theme="dark"] .theme-toggle .icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon--sun {
  display: block;
}

.site-header.is-stuck .btn--header {
  background: var(--teal-600);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-grid;
  }

  .nav {
    position: absolute;
    inset: calc(var(--header-h) - 4px) 12px auto 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-md);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 1.05rem;
    opacity: 1;
  }

  .nav a:hover,
  .nav a[aria-current="page"] {
    background: var(--surface-2);
  }

  .site-header__actions {
    margin-left: auto;
  }
}

@media (max-width: 480px) {
  .btn--header {
    display: none;
  }
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(40px, 6vw, 80px)) 0 clamp(120px, 12vw, 170px);
  color: #fff;
  background:
    radial-gradient(900px 560px at 88% -8%, rgba(47, 201, 201, 0.42), transparent 62%),
    radial-gradient(640px 460px at -8% 108%, rgba(253, 181, 20, 0.2), transparent 62%),
    linear-gradient(135deg, #072226 0%, #0a4245 52%, #0e6667 100%);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero h1 {
  margin-bottom: 22px;
}

.hero h1 em {
  font-style: normal;
  color: var(--amber);
}

.hero .lead {
  color: rgba(255, 255, 255, 0.84);
  max-width: 54ch;
  margin-bottom: 32px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.pill b {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--amber);
  color: #0a1a1f;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  list-style: none;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  font-weight: 600;
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust .icon {
  width: 18px;
  height: 18px;
  color: var(--amber);
  stroke-width: 3;
}

.hero__visual {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 560px;
}

.hero__visual .phone--main {
  position: relative;
  z-index: 2;
  transform: translateX(-12%);
}

.hero__visual .phone--back {
  position: absolute;
  z-index: 1;
  top: 56px;
  left: 50%;
  transform: translateX(4%) rotate(7deg);
  transform-origin: bottom left;
}

.float-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #fff;
  color: #0a1a1f;
  box-shadow: 0 24px 50px -18px rgba(3, 20, 22, 0.55);
  font-size: 0.86rem;
  line-height: 1.25;
}

.float-card strong {
  display: block;
  font-size: 1.02rem;
}

.float-card__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #e3f3f3;
  color: var(--teal-600);
}

.float-card--a {
  left: -34px;
  top: 196px;
}

.float-card--b {
  right: 0;
  bottom: 70px;
}

.float-card--b .float-card__icon {
  background: #fff3d1;
  color: #9a6a00;
}

@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    min-height: 0;
    margin-top: 12px;
  }

  .hero__visual .phone--main {
    transform: translateX(-16%);
  }
}

@media (max-width: 520px) {
  .float-card--a {
    top: 150px;
    left: -6px;
  }

  .float-card--b {
    right: -6px;
    bottom: 40px;
  }

  .hero__visual .phone--back {
    top: 40px;
  }
}

/* ----------------------------------------------------------------- phone */
.phone {
  --w: 286px;
  width: var(--w);
  max-width: 78vw;
  margin: 0;
  padding: 9px;
  border-radius: 44px;
  background: linear-gradient(160deg, #1a2c31, #060f11 60%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, 0.09);
}

.phone--sm {
  --w: 248px;
}

.phone__screen {
  overflow: hidden;
  border-radius: 35px;
  background: #f7fafb;
}

.phone__screen::before {
  content: "9:41";
  display: flex;
  align-items: center;
  height: 28px;
  padding: 6px 20px 0;
  color: #0a1a1f;
  font: 700 12px/1 var(--font);
  letter-spacing: 0.02em;
  background: #f7fafb
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 12' fill='%230a1a1f'%3E%3Crect x='0' y='7' width='3' height='5' rx='1'/%3E%3Crect x='5' y='5' width='3' height='7' rx='1'/%3E%3Crect x='10' y='2.5' width='3' height='9.5' rx='1'/%3E%3Crect x='15' y='0' width='3' height='12' rx='1'/%3E%3Crect x='27' y='1' width='21' height='10' rx='3' fill='none' stroke='%230a1a1f' stroke-opacity='.5'/%3E%3Crect x='29' y='3' width='14' height='6' rx='1.5'/%3E%3Crect x='49.5' y='4' width='2' height='4' rx='1' fill-opacity='.5'/%3E%3C/svg%3E")
    no-repeat right 18px top 9px / 46px 11px;
}

/* --sb: colour of the capture's top edge, when it is not the usual dark background */
.phone--dark .phone__screen,
.phone--dark .phone__screen::before {
  background-color: var(--sb, #122024);
}

/* A capture with a bottom sheet open: the app dims everything behind it. */
.phone--dim .phone__screen,
.phone--dim .phone__screen::before {
  background-color: #080f11;
}

.phone--dark .phone__screen::before {
  color: #f1f7f8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 12' fill='%23f1f7f8'%3E%3Crect x='0' y='7' width='3' height='5' rx='1'/%3E%3Crect x='5' y='5' width='3' height='7' rx='1'/%3E%3Crect x='10' y='2.5' width='3' height='9.5' rx='1'/%3E%3Crect x='15' y='0' width='3' height='12' rx='1'/%3E%3Crect x='27' y='1' width='21' height='10' rx='3' fill='none' stroke='%23f1f7f8' stroke-opacity='.5'/%3E%3Crect x='29' y='3' width='14' height='6' rx='1.5'/%3E%3Crect x='49.5' y='4' width='2' height='4' rx='1' fill-opacity='.5'/%3E%3C/svg%3E");
}

.phone__screen img {
  width: 100%;
}

/* ----------------------------------------------------------------- stats */
.stats {
  position: relative;
  z-index: 5;
  margin-top: clamp(-90px, -7vw, -64px);
}

.stats__card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  list-style: none;
}

.stats__card li {
  padding: 26px 28px;
  border-left: 1px solid var(--border);
}

.stats__card li:first-child {
  border-left: 0;
}

.stats__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
}

.stats__label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.stats__label b {
  display: block;
  color: var(--text);
}

@media (max-width: 760px) {
  .stats__card {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats__card li {
    padding: 20px;
  }

  .stats__card li:nth-child(3) {
    border-left: 0;
  }

  .stats__card li:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

/* --------------------------------------------------------- feature rows */
.feature {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.feature + .feature {
  margin-top: clamp(72px, 10vw, 136px);
}

.feature__media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(28px, 4vw, 52px) 20px;
  border-radius: 32px;
  background:
    radial-gradient(420px 300px at 80% 0%, rgba(47, 170, 170, 0.22), transparent 70%),
    var(--surface-2);
  border: 1px solid var(--border);
}

.feature__media--duo {
  grid-auto-flow: column;
  gap: 0;
}

.feature__media--duo .phone:first-child {
  transform: translate(8%, 6%);
  z-index: 2;
}

.feature__media--duo .phone:last-child {
  transform: translate(-8%, -6%);
}

.feature--flip .feature__media {
  order: 2;
}

.feature__body h2 {
  margin-bottom: 16px;
}

.feature__body .lead {
  margin-bottom: 24px;
}

.ticks {
  display: grid;
  gap: 14px;
  list-style: none;
}

.ticks li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
}

.ticks .icon {
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  stroke-width: 3;
}

.ticks b {
  font-weight: 700;
}

.tag-premium {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(253, 181, 20, 0.16);
  color: #9a6400;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-transform: uppercase;
  vertical-align: middle;
}

:root[data-theme="dark"] .tag-premium {
  color: var(--amber);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.15s ease;
}

.text-link:hover .icon {
  transform: translateX(3px);
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature--flip .feature__media {
    order: 0;
  }
}

@media (max-width: 560px) {
  .feature__media--duo .phone {
    --w: 158px;
    padding: 6px;
    border-radius: 28px;
  }

  .feature__media--duo .phone__screen {
    border-radius: 22px;
  }

  .feature__media--duo .phone__screen::before {
    height: 18px;
    padding: 3px 12px 0;
    font-size: 8px;
    background-size: 30px 7px;
    background-position: right 11px top 6px;
  }

  .feature__media--duo .phone:last-child {
    margin-left: -26px;
  }
}

/* ------------------------------------------------------------ AI section */
.ai {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(700px 480px at 12% 0%, rgba(47, 201, 201, 0.3), transparent 62%),
    radial-gradient(560px 420px at 100% 100%, rgba(253, 181, 20, 0.16), transparent 62%),
    linear-gradient(160deg, #061c1f, #0a3538);
}

.ai .eyebrow {
  color: var(--amber);
}

.ai .lead {
  color: rgba(255, 255, 255, 0.82);
}

.ai__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}

.ai .ticks .icon {
  background: rgba(253, 181, 20, 0.18);
  color: var(--amber);
}

.ai__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.chat {
  max-width: 440px;
  margin-inline: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}

.chat__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 14px;
  font-weight: 700;
}

.chat__head .icon {
  color: var(--amber);
}

.chat__head small {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.chat__body {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: #0a2427;
}

.bubble {
  max-width: 88%;
  padding: 11px 15px;
  border-radius: 18px;
  font-size: 0.96rem;
  line-height: 1.5;
}

.bubble p {
  margin: 0 0 0.5em;
}

.bubble p:last-child,
.bubble ul:last-child {
  margin-bottom: 0;
}

.bubble ul {
  margin: 0 0 0.5em;
  padding-left: 1.1em;
}

.bubble--user {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: var(--teal-500);
  color: #fff;
}

.bubble--bot {
  border-bottom-left-radius: 6px;
  background: #143438;
  color: #e8f4f4;
}

.chat__prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 2px 4px;
  list-style: none;
}

.chat__prompts li {
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.84rem;
}

.chat__input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 11px 12px 11px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.93rem;
}

.chat__input span:last-child {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amber);
  color: #0a1a1f;
}

.chat__input .icon {
  width: 16px;
  height: 16px;
}

.chat__note {
  margin: 14px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .ai__grid {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------------- bento */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.tile {
  position: relative;
  overflow: hidden;
  grid-column: span 4;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tile--wide {
  grid-column: span 7;
}

.tile--mid {
  grid-column: span 5;
}

.tile h3 {
  margin-bottom: 8px;
}

.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.99rem;
}

.tile__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tile__icon .icon {
  width: 23px;
  height: 23px;
}

.tile--media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 20px;
  min-height: 330px;
  padding-bottom: 0;
}

.tile--media .tile__text {
  padding-bottom: 28px;
}

.tile__shot {
  align-self: end;
  justify-self: center;
  height: 300px;
  overflow: hidden;
}

.tile__shot .phone {
  --w: 216px;
  padding: 7px;
  border-radius: 34px;
  box-shadow: 0 24px 40px -20px rgba(7, 31, 34, 0.5);
}

.tile__shot .phone__screen {
  border-radius: 27px;
}

.tile--dark {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(150deg, #0a2b2e, #0b1518);
}

.tile--dark p {
  color: rgba(255, 255, 255, 0.74);
}

.tile--dark .tile__icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--amber);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  list-style: none;
}

.tags li {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 980px) {
  .tile,
  .tile--wide,
  .tile--mid {
    grid-column: span 6;
  }

  .tile--media {
    grid-column: span 12;
  }
}

@media (max-width: 620px) {
  .tile,
  .tile--wide,
  .tile--mid,
  .tile--media {
    grid-column: span 12;
  }

  .tile--media {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .tile--media .tile__text {
    padding-bottom: 0;
  }

  .tile__shot {
    height: 260px;
  }
}

/* ----------------------------------------------------------------- steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
  list-style: none;
}

.steps li {
  position: relative;
  padding: 30px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--teal-600);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 820px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------- privacy */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  list-style: none;
}

.card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.card .tile__icon {
  margin-bottom: 16px;
}

.card h3 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* --------------------------------------------------------------- pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 900px;
  margin-inline: auto;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.plan--premium {
  position: relative;
  color: #fff;
  border-color: transparent;
  background:
    radial-gradient(420px 300px at 100% 0%, rgba(253, 181, 20, 0.2), transparent 65%),
    linear-gradient(150deg, #0a4245, #071f22);
  box-shadow: var(--shadow-lg);
}

.plan__name {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.plan--premium .plan__name {
  color: var(--amber);
}

.plan__price {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.plan__price small {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  opacity: 0.7;
}

.plan__desc {
  color: var(--muted);
  margin-bottom: 22px;
}

.plan--premium .plan__desc {
  color: rgba(255, 255, 255, 0.78);
}

.plan .ticks {
  margin-bottom: 28px;
}

.plan--premium .ticks .icon {
  background: rgba(253, 181, 20, 0.18);
  color: var(--amber);
}

.plan .btn {
  margin-top: auto;
}

.plan__fine {
  margin: 14px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.plan--premium .plan__fine {
  color: rgba(255, 255, 255, 0.62);
}

@media (max-width: 760px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------- FAQ */
.faq {
  max-width: 820px;
  margin-inline: auto;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq details:first-of-type {
  border-top: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--accent);
  transition: transform 0.2s ease;
}

.faq details[open] summary .icon {
  transform: rotate(180deg);
}

.faq details > div {
  padding: 0 4px 24px;
  color: var(--muted);
  max-width: 68ch;
}

.faq details > div p:last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------------- CTA band */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px);
  border-radius: 36px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(600px 380px at 85% 0%, rgba(47, 201, 201, 0.4), transparent 62%),
    radial-gradient(500px 360px at 0% 100%, rgba(253, 181, 20, 0.22), transparent 62%),
    linear-gradient(135deg, #072226, #0c5557);
}

.cta h2 {
  margin-bottom: 14px;
}

.cta p {
  max-width: 52ch;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
}

.cta .hero__cta {
  justify-content: center;
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  margin-top: clamp(64px, 9vw, 120px);
  padding: 64px 0 34px;
  color: #c6d7da;
  background: #071a1d;
}

.site-footer a {
  color: #e7f1f2;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}

.site-footer .brand {
  color: #fff;
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 36ch;
  font-size: 0.96rem;
  color: #a9bfc3;
}

.site-footer h2 {
  margin-bottom: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8fa9ae;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  list-style: none;
  font-size: 0.97rem;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
  color: #8fa9ae;
}

@media (max-width: 820px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__grid > :first-child {
    grid-column: 1 / -1;
  }
}

/* -------------------------------------------------------------- subpages */
.page-hero {
  padding: calc(var(--header-h) + clamp(40px, 6vw, 72px)) 0 clamp(48px, 7vw, 84px);
  color: #fff;
  background:
    radial-gradient(800px 420px at 90% -20%, rgba(47, 201, 201, 0.4), transparent 62%),
    linear-gradient(135deg, #072226 0%, #0a4245 60%, #0e6667 100%);
}

.page-hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  max-width: 20ch;
}

.page-hero .lead {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
}

.page-hero .hero__cta {
  margin: 28px 0 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  list-style: none;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
}

.crumbs a {
  color: inherit;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  opacity: 0.6;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(40px, 6vw, 72px);
  list-style: none;
}

.toc a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
}

.toc a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.spec {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 72px);
  padding-block: clamp(36px, 5vw, 60px);
  border-top: 1px solid var(--border);
}

.spec:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.spec__head .tile__icon {
  margin-bottom: 16px;
}

.spec__head h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.spec__head p {
  color: var(--muted);
}

.spec__body h3 {
  margin-top: 1.6em;
  font-size: 1.05rem;
}

.spec__body h3:first-child {
  margin-top: 0;
}

.gallery {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 32px);
  margin-bottom: clamp(40px, 6vw, 72px);
  padding: 6px 4px 44px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.gallery .phone {
  --w: 232px;
  flex: none;
  scroll-snap-align: center;
  box-shadow: 0 26px 40px -22px rgba(7, 31, 34, 0.55), inset 0 0 0 1.5px rgba(255, 255, 255, 0.09);
}

@media (max-width: 1100px) {
  .gallery {
    justify-content: flex-start;
  }
}

.spec__body .note {
  margin-top: 22px;
}

.spec__body .tags {
  margin-top: 0;
}

.spec__body ul:not(.tags) {
  display: grid;
  gap: 10px;
  padding-left: 1.2em;
  color: var(--muted);
}

.spec__body li::marker {
  color: var(--accent);
}

.spec__body li b {
  color: var(--text);
}

.spec__body p {
  color: var(--muted);
}

@media (max-width: 820px) {
  .spec {
    grid-template-columns: 1fr;
  }
}

.note {
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.98rem;
}

.note b {
  color: var(--text);
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 2em;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 1.1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.4em;
}

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

.prose .updated {
  color: var(--muted);
  font-size: 0.95rem;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 1.2em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  background: var(--surface);
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-2);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.error-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 40px 20px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #072226, #0c5557);
}

.error-page .lead {
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.84);
}

.error-page__code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--amber);
}

/* ---------------------------------------------------------------- motion
   Progressive by design: without JavaScript, with "reduce motion" switched
   on, or in a browser without scroll-driven animations, the page is simply
   static. Only opacity and transforms are animated, so nothing reflows. */

.scroll-progress,
.bubble--typing {
  display: none;
}

.chat__reply {
  display: grid;
}

.chat__reply > * {
  grid-area: 1 / 1;
}

.stats__num {
  font-variant-numeric: tabular-nums;
}

.tile,
.card,
.plan,
.steps li,
.toc a {
  transition: translate 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

@media (hover: hover) {
  .tile:hover,
  .card:hover,
  .steps li:hover,
  .plan:not(.plan--premium):hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    box-shadow: var(--shadow-md);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* ---- page to page: a short cross-fade, the header stays put */
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.26s;
  }

  .site-header {
    view-transition-name: site-header;
  }

  /* ---- first screen: content rises in, phones follow */
  .hero__grid > :first-child > *,
  .page-hero .container > * {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero__grid > :first-child > :nth-child(2),
  .page-hero .container > :nth-child(2) {
    animation-delay: 70ms;
  }

  .hero__grid > :first-child > :nth-child(3),
  .page-hero .container > :nth-child(3) {
    animation-delay: 140ms;
  }

  .hero__grid > :first-child > :nth-child(4),
  .page-hero .container > :nth-child(4) {
    animation-delay: 210ms;
  }

  .hero__grid > :first-child > :nth-child(5) {
    animation-delay: 280ms;
  }

  .hero__visual .phone--main {
    animation: phone-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero__visual .phone--back {
    animation: phone-in 0.9s 0.16s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .float-card {
    animation: pop 0.5s 0.75s cubic-bezier(0.3, 1.4, 0.5, 1) both,
      bob 5s 1.3s ease-in-out infinite alternate;
  }

  .float-card--b {
    animation-delay: 0.95s, 1.9s;
  }

  .stats__card {
    animation: rise 0.7s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  /* ---- slow glows behind the hero and the closing call to action */
  .hero__grid,
  .cta > * {
    position: relative;
    z-index: 1;
  }

  .hero::before,
  .hero::after,
  .cta::before {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
  }

  .hero::before {
    top: -220px;
    right: -160px;
    width: 620px;
    height: 620px;
    background: radial-gradient(closest-side, rgba(47, 201, 201, 0.32), transparent);
    animation: drift-a 16s ease-in-out infinite alternate;
  }

  .hero::after {
    bottom: -220px;
    left: -180px;
    width: 480px;
    height: 480px;
    background: radial-gradient(closest-side, rgba(253, 181, 20, 0.17), transparent);
    animation: drift-b 20s ease-in-out infinite alternate;
  }

  .cta::before {
    top: -200px;
    right: -120px;
    width: 460px;
    height: 460px;
    background: radial-gradient(closest-side, rgba(47, 201, 201, 0.3), transparent);
    animation: drift-a 14s ease-in-out infinite alternate;
  }

  /* ---- sections fade up as they scroll into view (class set in main.js) */
  .js .reveal {
    --d: 0ms;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease var(--d), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d),
      translate 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  }

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

  /* neighbours arrive one after another */
  .js .bento > .reveal:nth-child(2),
  .js .bento > .reveal:nth-child(4),
  .js .cards > .reveal:nth-child(2),
  .js .steps > .reveal:nth-child(2),
  .js .plans > .reveal:nth-child(2) {
    --d: 90ms;
  }

  .js .bento > .reveal:nth-child(5),
  .js .cards > .reveal:nth-child(3),
  .js .steps > .reveal:nth-child(3) {
    --d: 180ms;
  }

  .js .cards > .reveal:nth-child(4) {
    --d: 270ms;
  }

  .ticks li:nth-child(2),
  .chat__prompts li:nth-child(2),
  .gallery .phone:nth-child(2) {
    --n: 1;
  }

  .ticks li:nth-child(3),
  .chat__prompts li:nth-child(3),
  .gallery .phone:nth-child(3) {
    --n: 2;
  }

  .ticks li:nth-child(4),
  .gallery .phone:nth-child(4) {
    --n: 3;
  }

  .ticks li:nth-child(5) {
    --n: 4;
  }

  .ticks li:nth-child(6) {
    --n: 5;
  }

  .js .reveal .ticks li {
    opacity: 0;
    translate: 0 10px;
    transition: opacity 0.5s ease, translate 0.5s ease;
    transition-delay: calc(0.25s + var(--n, 0) * 70ms);
  }

  .js .reveal.is-visible .ticks li {
    opacity: 1;
    translate: none;
  }

  .js .feature.reveal .phone {
    opacity: 0;
    scale: 0.92;
    transition: opacity 0.7s ease 0.12s, scale 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s;
  }

  .js .feature.reveal .phone:nth-child(2) {
    transition-delay: 0.26s;
  }

  .js .feature.reveal.is-visible .phone {
    opacity: 1;
    scale: 1;
  }

  .js .gallery.reveal .phone {
    opacity: 0;
    translate: 0 24px;
    transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--n, 0) * 90ms);
  }

  .js .gallery.reveal.is-visible .phone {
    opacity: 1;
    translate: none;
  }

  /* ---- the example chat plays once: question, typing dots, answer, prompts */
  .js .bubble--typing {
    display: inline-flex;
    align-items: center;
    align-self: start;
    justify-self: start;
    gap: 5px;
    padding: 15px 16px;
    opacity: 0;
  }

  .bubble--typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9fc4c6;
    animation: typing 1s ease-in-out infinite;
  }

  .bubble--typing span:nth-child(2) {
    animation-delay: 0.15s;
  }

  .bubble--typing span:nth-child(3) {
    animation-delay: 0.3s;
  }

  .js .chat .bubble--user,
  .js .chat .chat__reply > .bubble:not(.bubble--typing),
  .js .chat .chat__prompts li {
    opacity: 0;
  }

  .js .chat.is-visible .bubble--user {
    animation: pop-up 0.45s 0.4s cubic-bezier(0.3, 1.3, 0.5, 1) both;
  }

  .js .chat.is-visible .bubble--typing {
    animation: typing-show 1.4s 0.95s ease both;
  }

  .js .chat.is-visible .chat__reply > .bubble:not(.bubble--typing) {
    animation: pop-up 0.5s 2.25s ease both;
  }

  .js .chat.is-visible .chat__prompts li {
    animation: pop-up 0.4s ease both;
    animation-delay: calc(2.85s + var(--n, 0) * 90ms);
  }

  .chat__head .icon {
    animation: twinkle 2.8s ease-in-out infinite;
  }

  /* ---- small responses to the pointer */
  .btn {
    transition: transform 0.15s ease, scale 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  }

  .btn:active {
    scale: 0.97;
  }

  .btn--amber {
    position: relative;
    overflow: hidden;
  }

  .btn--amber::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
    translate: -130% 0;
    pointer-events: none;
  }

  .tile__icon,
  .brand img,
  .theme-toggle .icon,
  .pill .icon,
  .btn--store .icon {
    transition: scale 0.3s cubic-bezier(0.3, 1.4, 0.5, 1), rotate 0.3s cubic-bezier(0.3, 1.4, 0.5, 1),
      translate 0.2s ease;
  }

  @media (hover: hover) {
    .tile:hover,
    .card:hover,
    .steps li:hover,
    .plan:hover {
      translate: 0 -4px;
    }

    .toc a:hover {
      translate: 0 -2px;
    }

    .tile:hover .tile__icon,
    .card:hover .tile__icon {
      scale: 1.1;
      rotate: -6deg;
    }

    .brand:hover img {
      rotate: -10deg;
    }

    .theme-toggle:hover .icon {
      rotate: 25deg;
    }

    .pill:hover .icon {
      translate: 3px 0;
    }

    .btn--store:hover .icon {
      scale: 1.08;
    }

    .btn--amber:hover::after {
      translate: 130% 0;
      transition: translate 0.7s ease;
    }
  }

  /* ---- questions open and close smoothly where the browser can animate to auto */
  @supports (interpolate-size: allow-keywords) {
    :root {
      interpolate-size: allow-keywords;
    }

    .faq details::details-content {
      block-size: 0;
      overflow: clip;
      opacity: 0;
      transition: block-size 0.35s ease, opacity 0.35s ease, content-visibility 0.35s allow-discrete;
    }

    .faq details[open]::details-content {
      block-size: auto;
      opacity: 1;
    }
  }

  /* ---- tied to the scroll position (CSS scroll-driven animations) */
  @supports (animation-timeline: view()) {
    .scroll-progress {
      display: block;
      position: fixed;
      inset: 0 0 auto 0;
      z-index: 60;
      height: 3px;
      background: linear-gradient(90deg, var(--teal-400), var(--amber));
      transform-origin: 0 50%;
      scale: 0 1;
      animation: grow-x linear both;
      animation-timeline: scroll(root block);
    }

    .hero__visual {
      animation: lift linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 720px;
    }

    .feature__media .phone {
      animation: parallax linear both;
      animation-timeline: view();
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 18px;
  }
}

@keyframes phone-in {
  from {
    opacity: 0;
    translate: 0 40px;
    scale: 0.96;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    scale: 0.8;
  }
}

@keyframes pop-up {
  from {
    opacity: 0;
    translate: 0 10px;
    scale: 0.97;
  }
  to {
    opacity: 1;
  }
}

@keyframes bob {
  to {
    translate: 0 -8px;
  }
}

@keyframes drift-a {
  to {
    translate: -70px 50px;
    scale: 1.12;
  }
}

@keyframes drift-b {
  to {
    translate: 90px -40px;
    scale: 1.15;
  }
}

@keyframes typing {
  0%,
  60%,
  100% {
    translate: 0 0;
    opacity: 0.4;
  }
  30% {
    translate: 0 -4px;
    opacity: 1;
  }
}

@keyframes typing-show {
  0% {
    opacity: 0;
  }
  15%,
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes twinkle {
  50% {
    scale: 1.18;
    rotate: 12deg;
    opacity: 0.75;
  }
}

@keyframes grow-x {
  to {
    scale: 1 1;
  }
}

@keyframes lift {
  to {
    translate: 0 -50px;
  }
}

@keyframes parallax {
  from {
    translate: 0 26px;
  }
  to {
    translate: 0 -26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .text-link .icon {
    transition: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero__visual {
    display: none;
  }
}
