/* ============================================================
   Cashie · shared styles
   Brand tokens pulled from the app (Theme.swift / Typography.swift)
   ============================================================ */

:root {
  /* Surfaces */
  --bg: #fafafa;
  --bg-warm: #f2f3f5;
  --bg-cream: #f4f5f7;
  --phone-bg: #eaecee;

  /* Ink */
  --ink: #111111;
  --ink-soft: rgba(17, 17, 17, 0.68);
  --ink-mute: rgba(17, 17, 17, 0.48);
  --ink-faint: rgba(17, 17, 17, 0.30);

  /* Hairlines */
  --line: rgba(17, 17, 17, 0.14);
  --line-soft: rgba(17, 17, 17, 0.08);

  /* Brand green — the only primary accent */
  --green: #04ba74;
  --green-deep: #039a60;
  --green-pastel: #eaf7f1;
  --green-light: #d5f2e8;

  /* Win-gold — celebration only */
  --gold: #f1bd3a;
  --gold-deep: #c9881a;
  --gold-light: #fce9a8;
  --gold-pastel: #fef5d6;

  /* Alerts */
  --red: #e83f3f;
  --red-soft: rgba(232, 63, 63, 0.06);

  /* Shadows */
  --shadow-card: 0 20px 50px -20px rgba(17, 17, 17, 0.18);
  --shadow-soft: 0 10px 30px -12px rgba(17, 17, 17, 0.10);
  --shadow-btn: 0 10px 24px -10px rgba(4, 186, 116, 0.6);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --content: 1120px;

  /* Easing */
  --ease-snap: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.display {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 0.98;
}

.container {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 32px;
}

.kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--green-deep);
}

.accent { color: var(--green); }
.ital { font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  border: none;
  transition: transform 0.28s var(--ease-snap), box-shadow 0.28s var(--ease-snap), background 0.2s;
  will-change: transform;
}
.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); background: var(--green-deep); }
.btn-primary:active { transform: translateY(0) scale(0.99); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn .apple { width: 18px; height: 18px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 2px 6px rgba(17, 17, 17, 0.14); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--ink-soft); transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { padding: 9px 18px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: none; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: 0.2s; }

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease-snap), transform 0.6s var(--ease-snap);
}
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 70px 0 40px;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}
.blob-1 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(4,186,116,0.22), transparent 70%); top: -120px; right: -120px; }
.blob-2 { width: 460px; height: 460px; background: radial-gradient(circle, rgba(4,186,116,0.14), transparent 70%); bottom: -160px; left: -140px; }
.blob-3 { width: 360px; height: 360px; background: radial-gradient(circle, rgba(241,189,58,0.12), transparent 70%); top: 30%; left: 35%; }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(48px, 7vw, 86px);
  margin: 18px 0 0;
}
.hero h1 .accent { display: inline-block; }
.hero-sub {
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 30ch;
  margin: 22px 0 30px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: 13px; color: var(--ink-mute); margin-top: 16px; }

/* Pill badge (hero) */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--radius-pill);
  background: var(--green-pastel); color: var(--green-deep);
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--green-light);
}

/* Safe-to-spend stat card floating near the phone */
.stat-card {
  position: absolute;
  z-index: 3;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 14px 18px;
}
.stat-card .kicker { color: var(--ink-mute); }
.stat-card .amount { font-size: 34px; }
.stat-card.tl { top: 8%; left: -6%; }
.stat-card.br { bottom: 14%; right: -8%; }

/* ---------- Phone mockup ---------- */
.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative;
  width: 300px;
  max-width: 78vw;
  background: #0c0c0d;
  border-radius: 50px;
  padding: 11px;
  box-shadow: var(--shadow-card), 0 2px 0 rgba(255,255,255,0.4) inset;
  z-index: 2;
}
.phone::after { /* screen highlight */
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 40%);
  pointer-events: none;
  z-index: 3;
}
/* Screen matches the screenshot exactly (1179x2556) so the whole app screen
   shows 1:1 with no cropping. Height comes from the aspect-ratio, not a fixed
   phone height, which keeps every mock identical in proportion. */
.phone .screen {
  width: 100%;
  aspect-ratio: 1179 / 2556;
  border-radius: 40px;
  overflow: hidden;
  background: var(--phone-bg);
}
.phone .screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The screenshots already include the real iOS status bar + Dynamic Island,
   so no CSS notch is drawn (avoids a double-island). */
.phone .notch { display: none; }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.band { padding: 96px 0; }
.band-warm { background: var(--bg-warm); }
.band-cream { background: var(--bg-cream); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(34px, 5vw, 56px); margin: 14px 0 0; }
.section-head p { font-size: 19px; color: var(--ink-soft); margin: 16px 0 0; }

/* Two-column media + copy rows — one consistent spec for every such section */
.row, .type-wrap, .cashie-row, .logways {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.row.flip .col-media { order: 2; }
.col-copy h3 { font-size: clamp(28px, 3.5vw, 42px); margin: 12px 0 0; }
.col-copy p { font-size: 18px; color: var(--ink-soft); margin: 16px 0 0; max-width: 42ch; }

/* ---------- Sticky feature scroll ---------- */
.sticky-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.sticky-media { position: sticky; top: 96px; align-self: start; }
.feature-steps { display: flex; flex-direction: column; gap: 14vh; padding: 8vh 0; }
.feature-step { transition: opacity 0.4s var(--ease-snap); }
.feature-step h3 { font-size: clamp(26px, 3.2vw, 38px); margin: 10px 0 0; }
.feature-step p { font-size: 18px; color: var(--ink-soft); margin: 14px 0 0; max-width: 40ch; }
.feature-step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green-pastel); color: var(--green-deep);
  font-weight: 700; font-size: 15px;
}
.sticky-shots { position: relative; width: 300px; max-width: 78vw; aspect-ratio: 1179 / 2556; }
.sticky-shots .phone { position: absolute; inset: 0; width: 100%; }
.sticky-shots .phone img { transition: opacity 0.5s var(--ease-snap); }

/* ---------- How you log (2-tap section) ---------- */
.log-cards { display: flex; flex-direction: column; gap: 16px; }
.log-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px 20px; box-shadow: var(--shadow-soft);
  transition: transform 0.28s var(--ease-snap), box-shadow 0.28s var(--ease-snap);
}
.log-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.log-card.primary { border-color: var(--green); box-shadow: 0 18px 40px -22px rgba(4, 186, 116, 0.55); }
.log-ico {
  width: 50px; height: 50px; border-radius: 15px; background: var(--green-pastel);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.log-card.primary .log-ico { background: var(--green-light); }
.log-meta h3 { margin: 0; font-size: 19px; font-weight: 700; }
.log-meta p { margin: 5px 0 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; }
.tag {
  font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--bg-warm); color: var(--ink-soft); white-space: nowrap;
}
.tag-green { background: var(--green); color: #fff; }

/* ---------- "We see you" chips ---------- */
.type-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; max-width: 44ch; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-pill);
  background: #fff; border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
}
.chip.seen::before { content: "✓"; color: var(--green); font-weight: 800; font-size: 13px; }

/* ---------- Meet Cashie ---------- */
.mascot { width: 320px; max-width: 70vw; margin: 0 auto; filter: drop-shadow(0 24px 40px rgba(17,17,17,0.18)); will-change: transform; }
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-16px) rotate(1deg); } }

/* ---------- Rank-up / gamification (dark band) ---------- */
.band-dark {
  background:
    radial-gradient(circle at 22% -10%, rgba(73, 214, 240, 0.16), transparent 42%),
    radial-gradient(circle at 85% 110%, rgba(155, 91, 224, 0.16), transparent 45%),
    #0b0d10;
  color: #fff;
}
.band-dark .kicker { color: #6fe0f2; }
.band-dark .section-head h2, .band-dark .col-copy h3 { color: #fff; }
.band-dark .section-head p, .band-dark .col-copy p { color: rgba(255, 255, 255, 0.72); }

.phone-duo {
  display: flex; justify-content: center; align-items: flex-start;
  gap: 48px; flex-wrap: wrap;
}
.phone-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; width: 280px; max-width: 80vw; }
.phone-duo .phone { width: 100%; }
.phone-fig figcaption {
  font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, 0.82);
  max-width: 24ch; text-align: center; line-height: 1.4;
}

/* ---------- Selling-points feature grid (no screenshots) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 24px; box-shadow: var(--shadow-soft);
  transition: transform 0.28s var(--ease-snap), box-shadow 0.28s var(--ease-snap);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.feature .feat-ico {
  width: 46px; height: 46px; border-radius: 13px; background: var(--green-pastel);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.feature h3 { margin: 16px 0 0; font-size: 19px; font-weight: 700; }
.feature p { margin: 8px 0 0; font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 880px) { .feature-grid { grid-template-columns: 1fr 1fr; } .phone-duo { gap: 32px; } .phone-duo .phone { width: 232px; } }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Final CTA ---------- */
.cta-band {
  position: relative;
  text-align: center;
  padding: 110px 0;
  background: linear-gradient(135deg, #073d2c, #04ba74);
  color: #fff;
  overflow: hidden;
}
.cta-band h2 { font-size: clamp(38px, 6vw, 68px); margin: 0 0 14px; }
.cta-band p { font-size: 20px; color: rgba(255,255,255,0.85); margin: 0 0 32px; }
.cta-band .btn-primary { background: #fff; color: var(--green-deep); box-shadow: 0 14px 30px -12px rgba(0,0,0,0.4); }
.cta-band .btn-primary:hover { background: #f2fff9; }

/* ---------- Footer ---------- */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--line-soft); background: var(--bg); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer .brand { font-size: 16px; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); }
.footer .copy { font-size: 13px; color: var(--ink-mute); width: 100%; margin-top: 8px; }

/* ---------- Legal / support article pages ---------- */
.doc { padding: 64px 0 96px; }
.doc-head { max-width: 720px; margin: 0 auto 40px; }
.doc-head h1 { font-size: clamp(36px, 5vw, 58px); margin: 8px 0 0; }
.doc-head .updated { color: var(--ink-mute); font-size: 14px; margin-top: 14px; }
.doc-body { max-width: 720px; margin: 0 auto; }
.doc-body h2 { font-size: 24px; margin: 40px 0 0; }
.doc-body h3 { font-size: 18px; margin: 28px 0 0; }
.doc-body p, .doc-body li { color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.doc-body a { color: var(--green-deep); text-decoration: underline; text-underline-offset: 3px; }
.doc-body .lead { font-size: 19px; color: var(--ink); }
.callout {
  background: var(--bg-cream); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 18px 22px; margin: 24px 0;
  font-size: 15px; color: var(--ink-soft);
}
.faq { border-top: 1px solid var(--line-soft); }
.faq details { border-bottom: 1px solid var(--line-soft); padding: 4px 0; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 4px; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 24px; font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 4px 20px; margin: 0; }

/* Contact card (support page) */
.contact-card {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px;
  background: var(--bg-cream); border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl); padding: 32px; margin: 4px 0 8px;
}
.contact-main h2 { margin: 0 0 10px; font-size: 26px; }
.contact-main p { margin: 0 0 18px; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.contact-main .btn { margin-bottom: 14px; }
.contact-fine { font-size: 14px; }
.contact-fine a { color: var(--green-deep); text-decoration: underline; text-underline-offset: 3px; }
.contact-aside { border-left: 1px solid var(--line); padding-left: 28px; }
.contact-aside h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.contact-aside ul { margin: 0; padding-left: 18px; }
.contact-aside li { color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.faq-heading { margin-top: 48px; }
@media (max-width: 640px) {
  .contact-card { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .contact-aside { border-left: none; border-top: 1px solid var(--line); padding-left: 0; padding-top: 20px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line-soft);
    padding: 16px 32px 24px;
  }
  .nav-links.open a { padding: 8px 0; font-size: 16px; }
  .nav-toggle { display: block; }
  .hero-grid, .row, .sticky-feature, .type-wrap, .cashie-row, .logways { grid-template-columns: 1fr; }
  .row.flip .col-media { order: 0; }
  .hero { text-align: center; padding-top: 48px; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .sticky-media { position: static; display: flex; justify-content: center; margin-bottom: 24px; }
  .feature-steps { gap: 56px; padding: 24px 0; }
  .section-head { margin-bottom: 40px; }
  .band { padding: 72px 0; }
  .stat-card.tl { top: 2%; left: 0; }
  .stat-card.br { bottom: 6%; right: 0; }
}

@media (max-width: 520px) {
  .container { padding: 0 22px; }
  .stat-card .amount { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
  .float { animation: none; }
  .blob { will-change: auto; }
  * { scroll-behavior: auto !important; }
}
