/* 3Sub website — tokens mirror 3Sub-ios/ThreeSub/Shared/Style (ColorPalette, Theme, CardStyle, Spacing). */

:root {
  /* ColorPalette */
  --pure-white: #FFFFFF;
  --almost-white: #F8F8F8;
  --almost-black: #1C1C1C;
  --dark-gray: #444444;
  --medium-gray: #A5A5A5;
  --light-gray: #C8C7C7;
  --lighter-gray: #EDEDED;
  --lightest-gray: #F2F2F2;

  --light-purple: #AFA7FB;
  --light-orange: #FFB68C;
  --light-blue: #8CE4FF;
  --light-green: #7EE5C5;
  --light-yellow: #FFE28C;
  --light-red: #FFA5B2;

  /* Theme.light */
  --scene-bg: var(--almost-white);
  --card-bg: var(--pure-white);
  --text-1: var(--almost-black);
  --text-2: var(--dark-gray);
  --text-3: var(--medium-gray);
  --solid-border: #000000;
  --regular-border: var(--light-gray);
  --light-separator: var(--light-gray);
  --shadow-color: rgba(28, 28, 28, 0.8);
  --toggled-bg: var(--lighter-gray);

  /* CardStyle: 1px solid border, CR12, hard 2×2 offset shadow with no blur */
  --radius-4: 4px;
  --radius-8: 8px;
  --radius-12: 12px;
  --radius-16: 16px;
  --shadow: 2px 2px 0 var(--shadow-color);
  --shadow-lg: 4px 4px 0 var(--shadow-color);
  --shadow-inset: inset 2px 2px 0 var(--shadow-color);

  /* Fonts.swift: Avenir for UI, Averia Serif Libre for money */
  --font-sans: "Avenir", "Avenir Next", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-money: "Averia Serif Libre", Georgia, serif;

  --page-max: 1120px;
  --gutter: 20px;

  color-scheme: light dark;
}

/* Theme.dark */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --scene-bg: var(--almost-black);
    --card-bg: var(--almost-black);
    --text-1: var(--pure-white);
    --text-2: var(--lighter-gray);
    --text-3: var(--medium-gray);
    --solid-border: var(--pure-white);
    --regular-border: var(--dark-gray);
    --light-separator: var(--dark-gray);
    --shadow-color: rgba(255, 255, 255, 0.8);
    --toggled-bg: var(--dark-gray);
  }
}
:root[data-theme="dark"] {
  --scene-bg: var(--almost-black);
  --card-bg: var(--almost-black);
  --text-1: var(--pure-white);
  --text-2: var(--lighter-gray);
  --text-3: var(--medium-gray);
  --solid-border: var(--pure-white);
  --regular-border: var(--dark-gray);
  --light-separator: var(--dark-gray);
  --shadow-color: rgba(255, 255, 255, 0.8);
  --toggled-bg: var(--dark-gray);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--scene-bg);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Dashed rule, as under the Home summary (dash 2, gap 5) */
.dashed-rule {
  height: 1px;
  border: 0;
  margin: 0;
  background-image: linear-gradient(to right, var(--solid-border) 2px, transparent 2px);
  background-size: 7px 1px;
  background-repeat: repeat-x;
}

/* ---------- Components ---------- */

.card {
  background: var(--card-bg);
  border: 1px solid var(--solid-border);
  border-radius: var(--radius-12);
  box-shadow: var(--shadow);
}

/* RoundedRectangleButtonStyle */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  font: 800 14px/1 var(--font-sans);
  color: var(--text-1);
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--solid-border);
  border-radius: var(--radius-12);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow 80ms ease, background-color 80ms ease;
}
.btn:hover { background: var(--lightest-gray); }
.btn:active { background: var(--toggled-bg); box-shadow: var(--shadow-inset); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn:hover { background: #2a2a2a; }
}
:root[data-theme="dark"] .btn:hover { background: #2a2a2a; }

.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 48px; width: auto; }

.eyebrow {
  font: 800 12px/1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.money { font-family: var(--font-money); font-variant-numeric: tabular-nums; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--scene-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease;
}
.nav.is-scrolled { border-bottom-color: var(--light-separator); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 800 18px/1 var(--font-sans);
  letter-spacing: 0.02em;
}
.nav__brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font: 500 14px/1 var(--font-sans);
}
.nav__links a { text-decoration: none; color: var(--text-2); }
.nav__links a:hover { color: var(--text-1); }
.nav .btn { height: 36px; }

@media (max-width: 720px) {
  .nav__links a:not(.btn) { display: none; }
}

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

.hero { padding: 56px 0 88px; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
}
.hero__icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.hero h1 {
  margin: 12px 0 20px;
  font: 800 clamp(40px, 6vw, 64px)/1.05 var(--font-sans);
  letter-spacing: -0.02em;
}
.hero__lede {
  max-width: 30em;
  margin: 0 0 32px;
  font: 400 18px/1.55 var(--font-sans);
  color: var(--text-2);
}
.hero__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hero__note { font: 500 13px/1.4 var(--font-sans); color: var(--text-3); }

@media (max-width: 880px) {
  .hero { padding: 32px 0 64px; }
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__copy { text-align: center; }
  .hero__icon { margin-left: auto; margin-right: auto; }
  .hero__lede { margin-left: auto; margin-right: auto; }
  .hero__cta { align-items: center; }
}

/* ---------- Problem → solution ---------- */

.problem { padding: 24px 0 96px; }
.problem__text {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 0;
  text-align: center;
  font: 500 clamp(20px, 2.6vw, 26px)/1.5 var(--font-sans);
  color: var(--text-1);
}
.problem__pain { color: var(--text-3); }

/* ---------- Section heading ---------- */

.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 {
  margin: 12px 0 0;
  font: 800 clamp(30px, 4vw, 42px)/1.15 var(--font-sans);
  letter-spacing: -0.01em;
}
.section-head p.section-head__sub {
  max-width: 34em;
  margin: 16px auto 0;
  font: 400 17px/1.55 var(--font-sans);
  color: var(--text-2);
}

/* ---------- Features ---------- */

.features { padding: 0 0 112px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.feature { min-width: 0; padding: 20px 20px 28px; }
.feature h3 { margin: 24px 4px 6px; font: 800 20px/1.25 var(--font-sans); }
.feature > p { margin: 0 4px; font: 400 15px/1.55 var(--font-sans); color: var(--text-2); }

.feature__demo {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 24px 20px;
  background: var(--scene-bg);
  border: 1px solid var(--regular-border);
  border-radius: var(--radius-8);
}
.feature__demo > * { width: 100%; max-width: 340px; }

@media (max-width: 760px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .feature { padding: 14px 14px 24px; }
  .feature__demo { padding: 20px 12px; }
  .seg { gap: 8px; }
}

.btn--sm { height: 28px; padding: 0 10px; font-size: 11px; border-radius: var(--radius-8); cursor: default; }

.dot {
  flex: none;
  width: 10px;
  height: 10px;
  border: 1px solid var(--solid-border);
  border-radius: 50%;
}

/* Segmented buttons — togglable vs toggled RoundedRectangleButtonStyle */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.seg__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  font: 800 12px/1 var(--font-sans);
  background: var(--card-bg);
  border: 1px solid var(--solid-border);
  border-radius: var(--radius-12);
  box-shadow: var(--shadow);
}
.seg__btn svg { width: 14px; height: 14px; }
.seg__btn.is-on { background: var(--toggled-bg); box-shadow: var(--shadow-inset); }
.seg--sm .seg__btn { height: 30px; font-size: 11px; }

/* Voice add */
.voice {
  margin-top: 18px;
  padding: 14px 16px;
  text-align: center;
  background: var(--card-bg);
  border: 1px dashed var(--solid-border);
  border-radius: var(--radius-12);
}
.voice__wave { display: flex; justify-content: center; align-items: center; gap: 4px; height: 24px; }
.voice__wave i {
  width: 3px;
  height: 40%;
  background: var(--text-1);
  border-radius: 2px;
  animation: wave 1.1s ease-in-out infinite;
}
.voice__wave i:nth-child(2n) { animation-delay: -0.3s; }
.voice__wave i:nth-child(3n) { animation-delay: -0.6s; }
.voice__wave i:nth-child(4n) { animation-delay: -0.8s; }
@keyframes wave { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.voice__quote { margin: 10px 0 0; font: 500 14px/1.4 var(--font-sans); color: var(--text-2); }

/* Notifications */
.notif-stack { position: relative; padding-top: 18px; }
.notif {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid var(--solid-border);
  border-radius: var(--radius-16);
  box-shadow: var(--shadow);
}
.notif img { flex: none; width: 20px; height: 20px; border-radius: 5px; }
.notif--back {
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  bottom: 18px;
  opacity: 0.55;
  box-shadow: none;
}
.notif--back > * { visibility: hidden; }
.notif__body { min-width: 0; flex: 1; }
.notif__meta { display: flex; justify-content: space-between; font: 800 10px/1 var(--font-sans); letter-spacing: 0.04em; color: var(--text-3); }
.notif__meta span { font-weight: 500; letter-spacing: 0; }
.notif__title { margin-top: 5px; font: 800 13px/1.3 var(--font-sans); }
.notif__text { margin-top: 2px; font: 400 12px/1.4 var(--font-sans); color: var(--text-2); }

/* Mark as paid */
.paid { display: grid; gap: 10px; }
.paid__row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 10px 0 12px;
  background: var(--card-bg);
  border: 1px solid var(--solid-border);
  border-radius: var(--radius-12);
  box-shadow: var(--shadow);
  font: 400 13px/1 var(--font-sans);
}
.paid__name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paid__row .money { font-size: 14px; color: var(--text-2); }
.paid__row.is-paid { box-shadow: none; border-color: var(--regular-border); }
.paid__row.is-paid .paid__name, .paid__row.is-paid .money { color: var(--text-3); text-decoration: line-through; }
.paid__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 92px;
  justify-content: center;
  font: 800 11px/1 var(--font-sans);
  color: #34C759;
}
.paid__tag svg { width: 12px; height: 12px; }
.paid__row .btn--sm { width: 92px; border: 0; box-shadow: none; }

.progress { margin-top: 6px; }
.progress__label { display: flex; justify-content: space-between; margin-bottom: 6px; font: 800 11px/1 var(--font-sans); }
.progress__label span:last-child { font-weight: 500; color: var(--text-3); }
.progress__track {
  height: 10px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--solid-border);
  border-radius: 999px;
}
.progress__fill { height: 100%; background: #34C759; border-right: 1px solid var(--solid-border); }

/* Insights — ColorPercentageBar */
.insight .seg { margin-bottom: 18px; }
.pct-bar {
  display: flex;
  gap: 2px;
  height: 36px;
  padding: 3px;
  background: var(--card-bg);
  border: 1px solid var(--solid-border);
  border-radius: var(--radius-12);
  box-shadow: var(--shadow);
}
.pct-bar span { border-radius: var(--radius-8); }
.legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font: 500 12px/1 var(--font-sans);
}
.legend li { display: flex; align-items: center; gap: 6px; }
.legend b { margin-left: auto; font-weight: 800; }

/* Extras */
.extras { margin-top: 48px; }
.extras__title {
  margin: 0 0 16px;
  font: 800 14px/1 var(--font-sans);
  text-align: center;
  color: var(--text-3);
}
.extras__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.extra { display: flex; gap: 14px; padding: 18px; }
.extra__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
}
.extra__icon svg { width: 22px; height: 22px; }
.extra h4 { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; font: 800 15px/1.3 var(--font-sans); }
.extra p { margin: 0; font: 400 14px/1.5 var(--font-sans); color: var(--text-2); }

.plus-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font: 800 10px/1 var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFB800;
}
.plus-badge svg { width: 12px; height: 12px; }

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

/* ---------- Screenshots ---------- */

.screens { padding: 0 0 112px; }
.screens__strip {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px max(var(--gutter), calc((100vw - var(--page-max)) / 2 + var(--gutter))) 12px;
  scrollbar-width: none;
}
.screens__strip::-webkit-scrollbar { display: none; }
.phone--shot {
  flex: none;
  width: 260px;
  margin: 0;
  padding: 10px;
  border-radius: 40px;
  scroll-snap-align: center;
}
.phone--shot img { width: 100%; border-radius: 30px; border: 1px solid var(--regular-border); }

/* ---------- Trust ---------- */

.trust { padding: 0 0 112px; }
.trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.trust-card { padding: 28px; }
.trust-card__icon { display: block; width: 32px; height: 32px; }
.trust-card__icon svg { width: 100%; height: 100%; }
.trust-card h3 { margin: 18px 0 6px; font: 800 18px/1.3 var(--font-sans); }
.trust-card p { margin: 0; font: 400 15px/1.6 var(--font-sans); color: var(--text-2); }

.trust-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  font: 800 14px/1.3 var(--font-sans);
}
.trust-facts li { display: flex; align-items: center; gap: 8px; }
.trust-facts li::before {
  content: "";
  width: 14px;
  height: 8px;
  margin-top: -4px;
  border-left: 2px solid #34C759;
  border-bottom: 2px solid #34C759;
  transform: rotate(-45deg);
}

@media (max-width: 760px) {
  .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .trust-card { padding: 22px; }
  .trust-facts { flex-direction: column; align-items: center; }
}

/* ---------- FAQ ---------- */

.faq { padding: 0 0 112px; }
.faq__list { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }
.faq__item { padding: 0; }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font: 800 16px/1.35 var(--font-sans);
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
/* Plus → minus: the vertical bar rotates flat as the panel opens */
.faq__icon { position: relative; flex: none; width: 14px; height: 14px; margin-right: 5px; }
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 14px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.45s var(--ease-out);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: rotate(180deg); }
.faq__item[open] .faq__icon::before { transform: rotate(180deg); }
.faq__item.is-closing .faq__icon::before { transform: none; }
.faq__item.is-closing .faq__icon::after { transform: rotate(90deg); }
.faq__item summary:focus-visible { outline: 2px solid var(--text-1); outline-offset: -4px; border-radius: var(--radius-12); }
.faq__item p {
  margin: 0;
  padding: 0 20px 20px;
  font: 400 15px/1.6 var(--font-sans);
  color: var(--text-2);
}
.faq__item p a { color: var(--text-1); }

/* ---------- Footer ---------- */

.footer { padding: 0 0 40px; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  padding-top: 28px;
  font: 500 13px/1.4 var(--font-sans);
  color: var(--text-3);
}
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer__links { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.footer__links a { color: var(--text-2); text-decoration: none; }
.footer__links a:hover { color: var(--text-1); text-decoration: underline; }
.footer__social { display: inline-grid; place-items: center; }
.footer__social svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
  .footer__inner { flex-direction: column-reverse; align-items: center; text-align: center; }
  .footer__links { justify-content: center; }
}

/* ---------- Legal pages (privacy.html, termsofservice.html) ---------- */

.legal { padding: 24px 0 96px; }
.legal__card {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 56px 56px;
  box-shadow: var(--shadow-lg);
}
.legal h1 {
  margin: 0 0 8px;
  font: 800 clamp(30px, 4.4vw, 42px)/1.15 var(--font-sans);
  letter-spacing: -0.01em;
}
.legal .updated {
  margin: 0 0 32px;
  font: 800 12px/1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.legal h2 {
  margin: 40px 0 12px;
  padding-top: 32px;
  font: 800 22px/1.3 var(--font-sans);
  background-image: linear-gradient(to right, var(--solid-border) 2px, transparent 2px);
  background-size: 7px 1px;
  background-repeat: repeat-x;
  background-position: top left;
}
.legal h3 { margin: 28px 0 6px; font: 800 17px/1.35 var(--font-sans); }
.legal p,
.legal li {
  font: 400 16px/1.7 var(--font-sans);
  color: var(--text-2);
}
.legal p { margin: 0 0 14px; }
.legal strong { font-weight: 800; color: var(--text-1); }
.legal a { color: var(--text-1); text-underline-offset: 3px; }
.legal a:hover { text-decoration-thickness: 2px; }

/* The "we don't sell your data" statement, set apart like an inset card */
.legal .highlight {
  margin: 20px 0;
  padding: 16px 20px;
  font-weight: 800;
  color: var(--text-1);
  background: var(--scene-bg);
  border: 1px solid var(--regular-border);
  border-radius: var(--radius-12);
}

.legal ul { margin: 0 0 16px; padding: 0; list-style: none; }
.legal li { position: relative; margin-bottom: 8px; padding-left: 22px; }
.legal li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border: 1px solid var(--solid-border);
  border-radius: 50%;
}

@media (max-width: 640px) {
  .legal { padding-top: 8px; }
  .legal__card { padding: 32px 22px 36px; }
  .legal h2 { margin-top: 32px; padding-top: 24px; font-size: 20px; }
}

/* ---------- Phone mock (Home screen) ---------- */

.phone {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 14px;
  background: var(--card-bg);
  border: 1px solid var(--solid-border);
  border-radius: 44px;
  box-shadow: var(--shadow-lg);
}
.phone__screen {
  overflow: hidden;
  padding: 16px 14px 20px;
  background: var(--scene-bg);
  border: 1px solid var(--regular-border);
  border-radius: 32px;
}
.phone__island {
  width: 88px;
  height: 24px;
  margin: 0 auto 12px;
  background: var(--almost-black);
  border-radius: 999px;
}
:root[data-theme="dark"] .phone__island { background: #000; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .phone__island { background: #000; }
}

.summary { text-align: center; padding: 12px 0 16px; }
.summary__label { font: 800 14px/1 var(--font-sans); }
.summary__amount { margin-top: 8px; font-size: 34px; line-height: 1.1; }
.summary + .dashed-rule { margin: 0 2px 18px; }

.list-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 2px 10px;
  font: 800 14px/1 var(--font-sans);
}
.list-title span { font: 500 12px/1 var(--font-sans); color: var(--text-3); }

.pay-list { display: grid; gap: 12px; margin: 0; padding: 0 2px 2px 0; list-style: none; }

/* UpcomingPaymentView.ViewCell — H88, cardStyle(.medium) */
.pay-cell {
  display: flex;
  align-items: center;
  height: 76px;
  padding: 0 12px;
  gap: 12px;
}
.pay-cell__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--solid-border);
  border-radius: var(--radius-8);
  color: var(--almost-black);
}
.pay-cell__icon svg { width: 18px; height: 18px; }
.pay-cell__info { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pay-cell__name { font: 400 12px/1.2 var(--font-sans); color: var(--text-1); }
.pay-cell__due {
  display: flex;
  align-items: center;
  gap: 4px;
  font: 800 12px/1.2 var(--font-sans);
  white-space: nowrap;
}
.pay-cell__due svg { width: 12px; height: 12px; flex: none; }
.pay-cell__price { text-align: right; }
.pay-cell__price .money { display: block; font-size: 16px; color: var(--text-2); }
.pay-cell__price small { font: 800 8px/1 var(--font-sans); letter-spacing: 0.04em; }

.bg-purple { background: var(--light-purple); }
.bg-orange { background: var(--light-orange); }
.bg-blue { background: var(--light-blue); }
.bg-green { background: var(--light-green); }
.bg-yellow { background: var(--light-yellow); }
.bg-red { background: var(--light-red); }

/* ---------- Scroll animations (only when <html class="motion">) ---------- */

:root { --ease-out: cubic-bezier(0.16, 1, 0.3, 1); }

.motion [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.motion [data-reveal].is-visible { opacity: 1; transform: none; }

/* Hero phone rises a little further and settles from a slight scale */
.motion .hero .phone[data-reveal] { transform: translateY(72px) scale(0.96); transition-delay: 250ms; }
.motion .hero .phone[data-reveal].is-visible { transform: none; }

/* Payment cells slide in after the phone lands */
.motion .pay-cell[data-reveal] { transform: translateY(16px); transition-delay: calc(650ms + var(--i, 0) * 120ms); }
.motion .pay-cell[data-reveal].is-visible { transform: none; }

/* Feature demos play once their card is visible */
.motion .feature .notif:not(.notif--back) {
  opacity: 0;
  transform: translateY(-18px) scale(0.97);
  transition: opacity 0.6s var(--ease-out) 0.45s, transform 0.8s var(--ease-out) 0.45s;
}
.motion .feature.is-visible .notif:not(.notif--back) { opacity: 1; transform: none; }

.motion .feature .progress__fill { transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease-out) 0.5s; }
.motion .feature.is-visible .progress__fill { transform: none; }

.motion .feature .paid__tag { opacity: 0; transform: scale(0.6); transition: opacity 0.4s ease 0.9s, transform 0.5s var(--ease-out) 0.9s; }
.motion .feature.is-visible .paid__tag { opacity: 1; transform: none; }

/* ColorPercentageBar: segments fill left to right, 1s linear as in the app */
.motion .feature .pct-bar span { clip-path: inset(0 100% 0 0); transition: clip-path 0.35s linear; }
.motion .feature.is-visible .pct-bar span { clip-path: inset(0 0 0 0); }
.motion .feature.is-visible .pct-bar span:nth-child(1) { transition-delay: 0.45s; }
.motion .feature.is-visible .pct-bar span:nth-child(2) { transition-delay: 0.8s; }
.motion .feature.is-visible .pct-bar span:nth-child(3) { transition-delay: 1.15s; }
.motion .feature.is-visible .pct-bar span:nth-child(4) { transition-delay: 1.5s; }

.motion .feature .seg__btn.is-on { transition: background-color 0.3s ease 0.6s, box-shadow 0.3s ease 0.6s; }
.motion .feature:not(.is-visible) .seg__btn.is-on { background: var(--card-bg); box-shadow: var(--shadow); }

/* Problem statement: words light up with scroll */
.motion .problem__fix .w { color: var(--regular-border); transition: color 0.35s ease; }
.motion .problem__fix .w.lit { color: var(--text-1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
