/* Track & Split — shared styles.
   Tokens mirror the Android app: colors from values/colors.xml and
   values-night/colors.xml, Poppins from res/font, 12dp corners. */

:root {
  --brand: #E85D4A;
  --brand-strong: #D14733;
  --brand-soft: #FDEEEB;
  --grad-a: #E85D4A;
  --grad-b: #FF867A;
  --split: #673AB7;

  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --text: #222222;
  --muted: #888888;
  --line: #E2E8F0;

  --green: #4CAF50;
  --radius: 12px;
  --radius-lg: 20px;
  --wrap: 1080px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}

:root[data-theme="dark"] {
    --brand: #FF7A66;
    --brand-strong: #FF9385;
    --brand-soft: #2A1A17;
    --bg: #0F172A;
    --surface: #1E293B;
    --surface-2: #172033;
    --text: #F1F5F9;
    --muted: #94A3B8;
    --line: #334155;
    --split: #A78BFA;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
  }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }

a { color: var(--brand); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 22px;
  height: 66px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16.5px; letter-spacing: -.01em;
  color: var(--text); text-decoration: none; margin-right: auto;
}
.brand svg { display: block; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  color: var(--text); padding: 8px; margin: -8px -8px -8px 0;
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 66px;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 0; font-size: 16px; width: 100%; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost {
  background: var(--surface); color: var(--text); border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- hero ---------- */

.hero { padding: 76px 0 64px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
@media (max-width: 900px) {
  .hero { padding: 52px 0 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.eyebrow {
  display: inline-block; background: var(--brand-soft); color: var(--brand-strong);
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 20px;
}
h1 {
  font-size: clamp(32px, 5.2vw, 50px); line-height: 1.14;
  letter-spacing: -.03em; font-weight: 700; margin: 0 0 18px;
}
.hero p.lead { font-size: 18px; color: var(--muted); margin: 0 0 30px; max-width: 33em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.phone {
  border: 1px solid var(--line); border-radius: 26px; background: var(--surface);
  box-shadow: var(--shadow); padding: 16px; max-width: 340px; margin: 0 auto; width: 100%;
}
.phone-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
}
.phone-row:last-child { border-bottom: 0; }
.dot {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-strong);
  font-size: 15px; font-weight: 600;
}
.phone-row .t { flex: 1; min-width: 0; }
.phone-row .t b { display: block; font-size: 14.5px; font-weight: 600; }
.phone-row .t span { font-size: 12.5px; color: var(--muted); }
.amt { font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.amt.out { color: var(--brand); }
.amt.in { color: var(--green); }

/* ---------- sections ---------- */

section { padding: 62px 0; }
.section-head { max-width: 640px; margin: 0 0 40px; }
h2 { font-size: clamp(25px, 3.4vw, 33px); line-height: 1.22; letter-spacing: -.025em; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 19px; letter-spacing: -.015em; margin: 0 0 8px; font-weight: 600; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px;
}
.card .ico {
  width: 42px; height: 42px; border-radius: var(--radius);
  background: var(--brand-soft); color: var(--brand-strong);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card a.more { display: inline-block; margin-top: 14px; font-size: 14.5px; font-weight: 600; text-decoration: none; }

.alt { background: var(--surface-2); }

/* ---------- feature detail rows ---------- */

.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  padding: 46px 0; border-bottom: 1px solid var(--line);
}
.feature-row:last-child { border-bottom: 0; }
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; gap: 26px; } }
.feature-row ul { margin: 16px 0 0; padding-left: 20px; color: var(--muted); }
.feature-row li { margin: 7px 0; }
.feature-row li strong { color: var(--text); font-weight: 600; }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pill {
  font-size: 13px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}

/* ---------- blog ---------- */

.post-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px;
}
.post-card:hover { border-color: var(--brand); }
.post-meta { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.post-card h3 { margin-bottom: 8px; }
.post-card p { color: var(--muted); font-size: 15px; margin: 0; }

article.post { padding: 52px 0 72px; }
article.post h1 { font-size: clamp(28px, 4.4vw, 40px); margin-bottom: 14px; }
article.post .post-meta { margin-bottom: 34px; font-size: 14px; }
article.post h2 { font-size: 24px; margin: 42px 0 12px; }
article.post h3 { font-size: 18.5px; margin: 30px 0 8px; }
article.post p, article.post li { color: var(--text); }
article.post ul, article.post ol { padding-left: 22px; }
article.post li { margin: 8px 0; }
article.post blockquote {
  margin: 26px 0; padding: 16px 20px; border-left: 3px solid var(--brand);
  background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}
.callout {
  background: var(--brand-soft); border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; margin: 26px 0;
}
.callout p { margin: 0; }

.table-scroll { overflow-x: auto; margin: 22px 0; }
table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 15px; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; }

/* ---------- faq ---------- */

details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 0 20px; margin-bottom: 12px;
}
details summary {
  cursor: pointer; list-style: none; padding: 17px 0;
  font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; gap: 16px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--brand); font-weight: 400; font-size: 21px; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details .body { padding: 0 0 18px; color: var(--muted); }
details .body p:first-child { margin-top: 0; }
details .body p:last-child { margin-bottom: 0; }

/* ---------- cta ---------- */

.cta-band {
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  border-radius: var(--radius-lg); padding: 52px 32px; text-align: center; color: #fff;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255, 255, 255, .9); margin: 0 0 26px; font-size: 17px; }
.cta-band .btn-ghost { background: #fff; color: var(--brand-strong); border-color: #fff; }
.cta-band .btn-ghost:hover { color: var(--brand-strong); filter: brightness(.96); }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 46px 0 34px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 14px; font-weight: 600; }
.footer-grid a { display: block; color: var(--muted); text-decoration: none; font-size: 15px; padding: 5px 0; }
.footer-grid a:hover { color: var(--text); }
.footer-about p { color: var(--muted); font-size: 14.5px; margin: 12px 0 0; max-width: 30em; }
.footer-bottom {
  border-top: 1px solid var(--line); margin-top: 34px; padding-top: 22px;
  color: var(--muted); font-size: 14px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ==========================================================================
   Phone mockup + flow sections
   ========================================================================== */

.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--line); background: var(--surface);
  padding: 7px 14px; border-radius: 999px;
}
.chip svg { color: var(--brand); flex: 0 0 auto; }
.trust {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 13.5px; margin: 20px 0 0;
}
.trust svg { color: var(--brand); flex: 0 0 auto; }

/* ---- the phone ---- */

.stage { position: relative; display: flex; justify-content: center; }
.stage::before {
  content: ""; position: absolute; inset: 8% -6% 12% -6%;
  background: radial-gradient(60% 55% at 50% 40%, rgba(232, 93, 74, .20), transparent 70%);
  filter: blur(28px); z-index: 0;
}
.device {
  position: relative; z-index: 1;
  width: 300px; max-width: 100%;
  border-radius: 40px; padding: 11px;
  background: linear-gradient(160deg, #2b3440, #11161d);
  box-shadow: 0 26px 60px rgba(16, 24, 40, .30), 0 3px 10px rgba(16, 24, 40, .18);
}
.screen {
  border-radius: 30px; overflow: hidden;
  background: var(--surface); border: 1px solid rgba(255, 255, 255, .06);
}
.status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 18px 5px; font-size: 11px; font-weight: 600; color: var(--muted);
}
.status .icons { display: flex; gap: 4px; align-items: center; }
.app-bar {
  display: flex; align-items: center; gap: 10px; padding: 6px 16px 14px;
}
.g-avatar {
  width: 34px; height: 34px; border-radius: 11px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.app-bar .g-name { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.app-bar .g-sub { font-size: 11.5px; color: var(--muted); }

.balance {
  margin: 0 14px 12px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: #fff;
}
.balance .lbl { font-size: 11px; opacity: .85; letter-spacing: .04em; text-transform: uppercase; }
.balance .val { font-size: 23px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.balance .sub { font-size: 11.5px; opacity: .9; margin-top: 3px; }

.feed { padding: 0 14px 12px; display: grid; gap: 8px; }
.bubble {
  border-radius: 14px; padding: 10px 12px; font-size: 12.5px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.bubble.mine {
  background: var(--brand-soft); border-color: transparent; margin-left: 34px;
}
.bubble .who { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.bubble .amt-line { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.bubble b { font-weight: 600; }
.bubble .meta { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.bubble.msg { border-radius: 14px 14px 14px 4px; }

.composer {
  display: flex; align-items: center; gap: 8px; margin: 0 14px 14px;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 14px;
  font-size: 12px; color: var(--muted);
}
.composer .send {
  margin-left: auto; width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: #fff;
  display: flex; align-items: center; justify-content: center;
}

/* floating card that shows the other half of the app */
.float-card {
  position: absolute; z-index: 2; left: -26px; bottom: 18px;
  width: 226px; padding: 13px 14px; border-radius: 15px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.float-card .tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--brand-strong); background: var(--brand-soft);
  padding: 3px 8px; border-radius: 999px; margin-bottom: 9px;
}
.float-card .sms {
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
  border-left: 2px solid var(--line); padding-left: 9px; margin-bottom: 10px;
}
.float-card .out { display: flex; align-items: center; gap: 9px; }
.float-card .out .ic {
  width: 28px; height: 28px; border-radius: 9px; flex: 0 0 auto;
  background: var(--brand-soft); color: var(--brand-strong);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.float-card .out b { font-size: 12.5px; display: block; font-weight: 600; }
.float-card .out span { font-size: 10.5px; color: var(--muted); }
.float-card .out .v { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--brand); }

@media (max-width: 1000px) { .float-card { left: -10px; width: 206px; } }
@media (max-width: 460px) { .float-card { position: static; width: 100%; margin-top: 18px; } .stage { display: block; } .device { margin: 0 auto; } }

/* ---- numbered steps ---- */

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 900px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps-grid { grid-template-columns: 1fr; } }
.step {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); padding: 24px;
}
.step .n {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: var(--brand); margin-bottom: 12px;
}
.step h3 { font-size: 17px; margin-bottom: 7px; }
.step p { color: var(--muted); font-size: 14.5px; margin: 0; }

.label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}

/* ---- featured guide ---- */

.featured {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); padding: 34px; margin-bottom: 22px;
}
@media (max-width: 820px) { .featured { grid-template-columns: 1fr; gap: 22px; padding: 26px; } }
.featured h3 { font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -.02em; margin-bottom: 10px; }
.featured p { color: var(--muted); margin: 0 0 18px; }
.featured .side { display: grid; gap: 10px; }
.featured .side a {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; font-size: 14.5px; font-weight: 500;
}
.featured .side a:hover { border-color: var(--brand); color: var(--brand); }
.featured .side a span { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* ---------- theme toggle ---------- */

.nav-links { order: 2; }
.theme-toggle { order: 3; }
.nav-toggle { order: 4; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text);
  cursor: pointer; padding: 0;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }

/* ==========================================================================
   Motion
   All of it sits behind prefers-reduced-motion, and every animated element is
   fully visible without JS -- the reveal classes are only added by script.
   ========================================================================== */

.card, .post-card, .step, .featured .side a, .btn, .theme-toggle, .pill, .chip {
  transition: transform .22s cubic-bezier(.16, 1, .3, 1),
              border-color .22s ease, box-shadow .22s ease, color .22s ease;
}

@media (prefers-reduced-motion: no-preference) {

  .card:hover, .post-card:hover, .step:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
  }
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(0); }
  .featured .side a:hover { transform: translateX(3px); }
  .pill:hover { transform: translateY(-1px); border-color: var(--brand); color: var(--brand); }

  /* scroll reveal — .js-reveal is added by script, so no-JS keeps everything visible */
  .js-reveal {
    opacity: 0; transform: translateY(20px);
    transition: opacity .65s cubic-bezier(.16, 1, .3, 1),
                transform .65s cubic-bezier(.16, 1, .3, 1);
  }
  .js-reveal.in { opacity: 1; transform: none; }
  .js-reveal:nth-child(2) { transition-delay: .07s; }
  .js-reveal:nth-child(3) { transition-delay: .14s; }
  .js-reveal:nth-child(4) { transition-delay: .21s; }
  .js-reveal:nth-child(5) { transition-delay: .28s; }
  .js-reveal:nth-child(6) { transition-delay: .35s; }

  /* hero entrance */
  .hero .eyebrow, .hero h1, .hero p.lead,
  .hero .hero-chips, .hero .hero-actions, .hero .trust {
    animation: rise .7s cubic-bezier(.16, 1, .3, 1) both;
  }
  .hero h1 { animation-delay: .05s; }
  .hero p.lead { animation-delay: .12s; }
  .hero .hero-chips { animation-delay: .19s; }
  .hero .hero-actions { animation-delay: .26s; }
  .hero .trust { animation-delay: .33s; }

  .stage { animation: rise .8s cubic-bezier(.16, 1, .3, 1) .15s both; }
  .float-card { animation: rise .7s cubic-bezier(.16, 1, .3, 1) .55s both; }

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

  /* the phone breathes, slowly enough not to distract */
  .device { animation: float 7s ease-in-out 1.2s infinite; }
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
  }

  /* the balance figure counts itself in */
  .balance .val { animation: pop .6s cubic-bezier(.34, 1.56, .64, 1) .5s both; }
  @keyframes pop {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: none; }
  }

  .brand svg { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
  .brand:hover svg { transform: rotate(-8deg) scale(1.06); }
}
