/* FocusMe — landing. Tokens mirror design/landing_focus.pen (Violet Void).
   No external requests: system font stacks only, so the strict CSP holds. */

:root {
  --bg: #0f0f1c;
  --panel: #0a0a0a;
  --line: #222233;
  --line-strong: #33334d;

  --fg: #ffffff;
  --fg-1: #dcdce8;
  --fg-2: #c0c0c0;
  --fg-3: #a1a1a1;
  --fg-4: #8a8aa3;
  --fg-5: #6b6b85;

  --accent: #582cff;
  --accent-lt: #7c6bff;
  --warn: #ff7a45;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --gut: 120px;
  --maxw: 1440px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* eyebrow — the mono caption that labels every section */

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-lt);
  margin: 0;
}

.eyebrow.warn {
  color: var(--warn);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 640;
  margin: 0;
}

h2 {
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(15, 15, 28, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  height: 72px;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 640;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav nav a {
  font-size: 14px;
  color: var(--fg-3);
  text-decoration: none;
  white-space: nowrap;
}

.nav nav a:hover {
  color: var(--fg);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 15px 28px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #6a41ff;
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
  font-weight: 500;
}

.btn-ghost:hover {
  border-color: #4a4a6b;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 14px;
}

/* ---------- section rhythm ---------- */

section {
  border-bottom: 1px solid var(--line);
}

.pad {
  padding: 104px 0;
}

/* ---------- hero ---------- */

.hero {
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 80px;
  align-items: center;
  padding-top: 104px;
  padding-bottom: 96px;
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 24px 0 0;
  max-width: 15ch;
}

.hero .lede {
  margin: 24px 0 0;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.6;
  color: var(--fg-3);
  max-width: 54ch;
}

.hero .cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.note {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-5);
  margin-top: 22px;
}

/* ---------- device mockups ----------
   Phones are rendered as real objects in space: a metal bezel, a screen inset,
   and a shared 3D rotation. Never a bare screenshot pasted flat on the page. */

.phone {
  position: relative;
  border-radius: 46px;
  padding: 7px;
  background: linear-gradient(148deg, #55556f 0%, #1b1b26 38%, #12121a 62%, #43435c 100%);
  box-shadow: 0 44px 90px rgba(0, 0, 0, 0.78), 0 4px 14px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.phone img {
  width: 100%;
  border-radius: 39px;
  display: block;
}

/* glass sheen across the bezel and screen */
.phone::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 46px;
  pointer-events: none;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.03) 22%,
    rgba(255, 255, 255, 0) 46%
  );
}

/* hero: two phones sharing one perspective, bleeding past the column edge */

.stage {
  position: relative;
  width: 560px;
  height: 468px;
  /* bleed past the container so the composition runs off the viewport edge
     instead of stopping short of it */
  margin-right: -150px;
  perspective: 1700px;
  perspective-origin: 55% 45%;
}

/* accent glow that lifts the composition off the dark ground */
.stage::before {
  content: "";
  position: absolute;
  left: -18%;
  top: -14%;
  width: 128%;
  height: 150%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(96, 56, 255, 0.42),
    rgba(88, 44, 255, 0.12) 55%,
    transparent 76%
  );
  filter: blur(32px);
}

.phones {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: scale(var(--stage-scale, 1)) rotateX(7deg) rotateY(-19deg)
    rotateZ(-11deg);
}

.phones .phone {
  position: absolute;
  width: 292px;
}

.phone-back {
  left: 14px;
  top: -18px;
  transform: translateZ(-40px);
}

.phone-front {
  left: 226px;
  top: 96px;
  transform: translateZ(40px);
}

/* feature rows: a single phone, tilted just enough to read as an object */

.phone-sm {
  width: 286px;
  border-radius: 42px;
}

.phone-sm::after {
  border-radius: 42px;
}

.phone-sm img {
  border-radius: 35px;
}

.tilt-r {
  transform: perspective(1500px) rotateY(-13deg) rotateZ(-4deg);
}

.tilt-l {
  transform: perspective(1500px) rotateY(13deg) rotateZ(4deg);
}

/* ---------- cost band ---------- */

.band .wrap {
  padding-top: 88px;
  padding-bottom: 88px;
}

.band h2 {
  font-size: clamp(28px, 3.4vw, 40px);
}

.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 44px;
}

.cols > * {
  padding: 0 40px;
  border-left: 1px solid var(--line);
}

.cols > *:first-child {
  padding-left: 0;
  border-left: 0;
}

/* specificity must beat `.cols p` below, hence the `.cols` prefix */
.cols .figure {
  font-family: var(--mono);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--accent-lt);
  line-height: 1.1;
  margin-top: 0;
}

.cols h3 {
  font-size: 17px;
  margin: 12px 0 0;
}

.cols p {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fg-3);
}

/* ---------- feature rows ---------- */

.feature .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 96px;
  align-items: center;
}

.feature.flip .wrap {
  grid-template-columns: auto minmax(0, 1fr);
}

.feature.flip .phone-sm {
  order: -1;
}

.feature h2 {
  margin-top: 18px;
}

.feature .body {
  margin-top: 20px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--fg-3);
  max-width: 58ch;
}

.rules {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.rules li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
}

.rules li:first-child {
  border-top: 0;
}

.rules dfn {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--accent-lt);
  font-style: normal;
}

/* ---------- comparison ---------- */

.cmp table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 44px;
  text-align: left;
}

.cmp th,
.cmp td {
  padding: 22px 24px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.cmp thead th {
  padding-top: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--fg-5);
}

.cmp thead th:last-child {
  color: var(--accent-lt);
}

.cmp th:first-child,
.cmp td:first-child {
  padding-left: 0;
}

.cmp tbody th {
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 640;
  color: var(--fg);
  width: 24%;
}

.cmp td {
  font-size: 15px;
  line-height: 1.55;
}

.cmp .them {
  color: var(--fg-4);
  width: 34%;
}

.cmp .us {
  color: var(--fg-1);
}

/* ---------- privacy panel ---------- */

.privacy .wrap {
  padding-top: 104px;
  padding-bottom: 104px;
}

.panel {
  background: var(--panel);
  border: 1px solid #1e1e2e;
  border-radius: 24px;
  padding: 72px 64px;
}

.panel h2 {
  margin-top: 18px;
  font-size: clamp(26px, 2.9vw, 34px);
  max-width: 30ch;
}

.panel .cols {
  margin-top: 52px;
}

.panel .cols > * {
  padding: 0 36px;
  border-left-color: #1e1e2e;
}

.panel .cols > *:first-child {
  padding-left: 0;
}

.panel .cols p {
  color: var(--fg-4);
}

/* ---------- honest ---------- */

.honest .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 96px;
  padding-top: 112px;
  padding-bottom: 120px;
}

.honest h2 {
  font-size: clamp(30px, 3.8vw, 44px);
  letter-spacing: -0.035em;
  margin-top: 18px;
  max-width: 16ch;
}

.honest .col p {
  font-size: 17px;
  line-height: 1.65;
}

.honest .col p:first-child {
  color: var(--fg-2);
}

.honest .col p + p {
  margin-top: 22px;
  color: var(--fg-4);
}

/* ---------- price ---------- */

.price .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 96px;
  align-items: start;
}

.amount {
  font-family: var(--mono);
  font-size: clamp(52px, 6vw, 76px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-top: 20px;
}

.price .per {
  margin-top: 8px;
  font-size: 17px;
  color: var(--fg-3);
}

.price .btn {
  margin-top: 32px;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tiers > * {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.tiers > *:first-child {
  padding-left: 0;
  padding-right: 32px;
  border-left: 0;
}

.tiers ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.tiers li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.5;
}

.tiers .free li {
  color: var(--fg-4);
}

.tiers .pro li {
  color: var(--fg-1);
}

.tiers .pro .eyebrow {
  color: var(--accent-lt);
}

.tiers .free .eyebrow {
  color: var(--fg-5);
}

/* ---------- faq ---------- */

.faq dl {
  margin: 44px 0 0;
}

.faq .qa {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 80px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.faq dt {
  font-family: var(--display);
  font-weight: 640;
  font-size: 18px;
  line-height: 1.35;
}

.faq dd {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--fg-4);
}

/* ---------- final cta ---------- */

.final {
  background: var(--panel);
}

.final .wrap {
  display: flex;
  align-items: center;
  gap: 64px;
  padding-top: 96px;
  padding-bottom: 96px;
}

.final h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  max-width: 18ch;
}

.final p {
  margin-top: 14px;
  font-size: 16.5px;
  color: var(--fg-4);
}

.final .btn {
  margin-left: auto;
  padding: 17px 34px;
  font-size: 16px;
}

/* ---------- footer ---------- */

.foot {
  border-bottom: 0;
}

.foot .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 36px;
  padding-bottom: 36px;
  font-size: 14px;
  color: var(--fg-5);
}

.foot nav {
  margin-left: auto;
  display: flex;
  gap: 28px;
}

.foot nav a {
  color: var(--fg-3);
  text-decoration: none;
}

.foot nav a:hover {
  color: var(--fg);
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  :root {
    --gut: 64px;
  }

  .hero .wrap,
  .feature .wrap {
    gap: 56px;
  }
}

@media (max-width: 940px) {
  :root {
    --gut: 28px;
  }

  .pad {
    padding: 72px 0;
  }

  .hero .wrap,
  .feature .wrap,
  .feature.flip .wrap,
  .honest .wrap,
  .price .wrap,
  .faq .qa,
  .final .wrap {
    grid-template-columns: minmax(0, 1fr);
    display: grid;
    gap: 40px;
  }

  .hero .wrap {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  /* headline before the device on narrow screens — the phone would otherwise
     fill the whole first screen before a single word is read */
  .hero .stage,
  .feature .phone-sm,
  .feature.flip .phone-sm {
    order: 0;
    margin: 0 auto;
  }

  .feature .phone-sm,
  .feature.flip .phone-sm {
    width: min(250px, 68vw);
    transform: perspective(1200px) rotateY(-9deg) rotateZ(-3deg);
  }

  /* the two-phone composition does not fit a phone screen — one device,
     still tilted, still an object */
  .hero .stage {
    width: min(250px, 68vw);
    height: auto;
    margin-right: auto;
    perspective: 1300px;
  }

  .stage::before {
    left: -22%;
    top: 4%;
    width: 144%;
    height: 92%;
    filter: blur(28px);
  }

  .phones {
    position: static;
    transform: rotateY(-9deg) rotateZ(-3deg);
  }

  .phones .phone {
    position: static;
    width: 100%;
    transform: none;
  }

  .phone-back {
    display: none;
  }

  .cols,
  .tiers {
    grid-template-columns: minmax(0, 1fr);
  }

  .cols > *,
  .panel .cols > *,
  .tiers > * {
    padding: 28px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .cols > *:first-child,
  .panel .cols > *:first-child,
  .tiers > *:first-child {
    padding-top: 0;
    padding-right: 0;
    border-top: 0;
  }

  .panel {
    padding: 44px 28px;
    border-radius: 18px;
  }

  .honest .wrap,
  .price .wrap {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .final .btn {
    margin-left: 0;
  }

  .nav nav a.hide-sm {
    display: none;
  }

  .foot .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .foot nav {
    margin-left: 0;
    flex-wrap: wrap;
    gap: 8px 20px;
  }

  .rules li {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}

/* comparison table becomes stacked blocks on narrow screens */

@media (max-width: 760px) {
  .cmp table,
  .cmp tbody,
  .cmp tr,
  .cmp th,
  .cmp td,
  .cmp tbody th,
  .cmp .them,
  .cmp .us {
    display: block;
    width: auto;
  }

  .cmp thead {
    display: none;
  }

  .cmp tr {
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
  }

  .cmp th,
  .cmp td {
    padding: 0;
    border: 0;
  }

  .cmp td {
    margin-top: 10px;
  }

  .cmp td::before {
    display: block;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-5);
    margin-bottom: 4px;
  }

  .cmp .them::before,
  .cmp .us::before {
    content: attr(data-label);
  }

  .cmp .us::before {
    color: var(--accent-lt);
  }
}

/* ---------- legal pages (privacy, terms) ---------- */

.legal .wrap {
  max-width: 900px;
  padding-top: 72px;
  padding-bottom: 96px;
}

.legal h1 {
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.legal .updated {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-5);
  margin-top: 12px;
}

.legal h2 {
  font-size: clamp(21px, 2.4vw, 24px);
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.legal h3 {
  font-size: 17.5px;
  margin-top: 32px;
}

.legal p,
.legal li {
  color: var(--fg-2);
  font-size: 16px;
  line-height: 1.7;
}

.legal p {
  margin-top: 16px;
}

.legal ul,
.legal ol {
  padding-left: 22px;
  margin-top: 16px;
}

.legal li {
  margin-top: 8px;
}

.legal a {
  color: var(--accent-lt);
}

.legal code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--fg-1);
}

.legal strong {
  color: var(--fg);
  font-weight: 600;
}

.legal .toc {
  margin-top: 40px;
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.legal .toc ol {
  margin: 0;
  columns: 2;
  column-gap: 36px;
}

.legal .toc li {
  color: var(--fg-4);
}

.legal .callout {
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid #1e1e2e;
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: var(--panel);
}

.legal .callout ul {
  margin-top: 0;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}

.legal th,
.legal td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  color: var(--fg-2);
  line-height: 1.6;
}

.legal thead th {
  background: var(--panel);
  color: var(--fg);
  font-family: var(--display);
  font-weight: 640;
}

@media (max-width: 640px) {
  .legal .toc ol {
    columns: 1;
  }
}

/* ============================================================
   Motion
   Everything here is pure CSS — the page ships zero JavaScript and the
   Caddy CSP is `default-src 'none'` with no script-src, so scroll effects
   use CSS scroll-driven animations rather than IntersectionObserver.

   Two guards wrap every effect:
   - @supports, so browsers without scroll timelines never get stuck on a
     hidden initial state (the reveal styles only exist inside the block);
   - prefers-reduced-motion, which disables the lot.
   ============================================================ */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise-sm {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translate3d(56px, 34px, 0) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* ---- hero entrance: staggered, runs once on load ---- */

  .hero .wrap > div:first-child > * {
    animation: rise 0.72s cubic-bezier(0.22, 0.68, 0.24, 1) both;
  }

  .hero .wrap > div:first-child > .eyebrow {
    animation-delay: 0.05s;
  }

  .hero .wrap > div:first-child > h1 {
    animation-delay: 0.13s;
  }

  .hero .wrap > div:first-child > .lede {
    animation-delay: 0.23s;
  }

  .hero .wrap > div:first-child > .cta {
    animation-delay: 0.33s;
  }

  .hero .wrap > div:first-child > .note {
    animation-delay: 0.42s;
  }

  /* drift lives on .stage, never on .phones — animating `transform` there
     would replace the 3D rotation that builds the whole composition */
  .stage {
    animation: stage-in 1s cubic-bezier(0.22, 0.68, 0.24, 1) 0.18s both,
      drift 9s ease-in-out 1.4s infinite;
  }

  .stage::before {
    animation: breathe 7s ease-in-out infinite;
  }

  /* ---- scroll reveals ---- */

  @supports (animation-timeline: view()) {
    .band h2,
    .band .cols > *,
    .feature .wrap > *,
    .cmp .eyebrow,
    .cmp h2,
    .cmp tbody tr,
    .panel > .eyebrow,
    .panel > h2,
    .panel .cols > *,
    .honest .wrap > *,
    .price .wrap > *,
    .faq h2,
    .faq .qa,
    .final .wrap > * {
      animation: rise-sm 0.7s cubic-bezier(0.22, 0.68, 0.24, 1) both;
      animation-timeline: view();
      animation-range: entry 2% cover 22%;
    }

    /* columns and rows arrive one after another, not as a block */
    .band .cols > *:nth-child(2),
    .panel .cols > *:nth-child(2) {
      animation-range: entry 6% cover 26%;
    }

    .band .cols > *:nth-child(3),
    .panel .cols > *:nth-child(3) {
      animation-range: entry 10% cover 30%;
    }

    .cmp tbody tr:nth-child(2) {
      animation-range: entry 5% cover 25%;
    }

    .cmp tbody tr:nth-child(3) {
      animation-range: entry 8% cover 28%;
    }

    .cmp tbody tr:nth-child(4) {
      animation-range: entry 11% cover 31%;
    }

    .faq .qa:nth-child(even) {
      animation-range: entry 5% cover 25%;
    }

    /* the nav is transparent over the hero and solidifies as you leave it */
    .nav {
      animation: nav-settle linear both;
      animation-timeline: scroll();
      animation-range: 0 180px;
    }

    @keyframes nav-settle {
      from {
        background-color: rgba(15, 15, 28, 0);
        border-bottom-color: transparent;
      }
      to {
        background-color: rgba(15, 15, 28, 0.92);
        border-bottom-color: var(--line);
      }
    }
  }
}

/* ---- hover / focus states (harmless without motion preference) ---- */

.btn {
  transform: translateZ(0);
  transition: background-color 0.18s ease, border-color 0.18s ease,
    transform 0.18s cubic-bezier(0.22, 0.68, 0.24, 1), box-shadow 0.25s ease;
}

.btn-accent {
  box-shadow: 0 6px 20px rgba(88, 44, 255, 0.28);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(88, 44, 255, 0.42);
}

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

.btn:active {
  transform: translateY(0);
}

/* picking the phone up: the tilt relaxes toward the viewer on hover */

.phone-sm {
  transition: transform 0.55s cubic-bezier(0.22, 0.68, 0.24, 1),
    box-shadow 0.55s ease;
}

.tilt-r:hover,
.tilt-l:hover {
  transform: perspective(1500px) rotateY(0deg) rotateZ(0deg) translateY(-8px);
  box-shadow: 0 56px 110px rgba(0, 0, 0, 0.8), 0 0 60px rgba(88, 44, 255, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phones {
  transition: transform 0.9s cubic-bezier(0.22, 0.68, 0.24, 1);
}

.stage:hover .phones {
  transform: scale(var(--stage-scale, 1)) rotateX(3deg) rotateY(-11deg)
    rotateZ(-6deg);
}

.stage:hover {
  animation-play-state: paused;
}

/* comparison rows lift out of the page as you read down them */

.cmp tbody tr {
  transition: background-color 0.25s ease;
}

.cmp tbody tr:hover {
  background-color: rgba(124, 107, 255, 0.05);
}

/* FAQ rows get an accent rule that grows in from the left */

.faq .qa {
  position: relative;
  transition: border-color 0.25s ease;
}

.faq .qa::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 1px;
  width: 0;
  background: var(--accent-lt);
  transition: width 0.45s cubic-bezier(0.22, 0.68, 0.24, 1);
}

.faq .qa:hover::before {
  width: 100%;
}

/* nav and footer links: underline sweeps in */

.nav nav a:not(.btn),
.foot nav a {
  position: relative;
  transition: color 0.2s ease;
}

.nav nav a:not(.btn)::after,
.foot nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 1px;
  width: 0;
  background: currentColor;
  transition: width 0.28s cubic-bezier(0.22, 0.68, 0.24, 1);
}

.nav nav a:not(.btn):hover::after,
.foot nav a:hover::after {
  width: 100%;
}

.rules li {
  transition: color 0.2s ease;
}

.rules li:hover {
  color: var(--fg);
}

/* keyboard users get the same affordances, visibly */

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent-lt);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
