/* Spendfox site. Tokens copied from the app (Theme.swift, BrandMark.swift): keep identical. */
:root {
  --bg: #F6F5F1; --card: #FFFFFF; --card-alt: #EFEEE9;
  --ink: #141418; --on-ink: #FFFFFF; --secondary: #85858F;
  --accent: #FF6B57; --accent-soft: #FFE6E0; --cream: #FFF4EC;
  --brand-light: #FF9466; --brand-deep: #E8473F;
  --brand-gradient: linear-gradient(135deg, #FF9466, #FF6B57 50%, #E8473F);
  --income: #1DB57A; --expense: #F0533F; --warning: #F5A524; --teal: #13A3A8; --premium: #F5A524;
  --radius: 26px; --radius-sm: 18px;
  --shadow-card: 0 6px 14px rgba(0, 0, 0, .045);
  --glass-bg: rgba(255, 255, 255, .55); --glass-border: rgba(255, 255, 255, .65);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 8px 24px rgba(20, 20, 24, .08);
  --glow: .85;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0B0D; --card: #18181C; --card-alt: #242429;
    --ink: #F4F4F6; --on-ink: #141418; --secondary: #9C9CA6; --accent-soft: #3A201B; --cream: #1E1714;
    --shadow-card: 0 6px 14px rgba(0, 0, 0, .3);
    --glass-bg: rgba(28, 28, 32, .55); --glass-border: rgba(255, 255, 255, .12);
    --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 0, 0, .4);
    --glow: .22;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-size: 17px; line-height: 1.5; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* The app's AppBackground: a soft mesh glow at the top that fades into the page. */
body::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 560px; z-index: -1; pointer-events: none;
  opacity: var(--glow);
  background:
    radial-gradient(60% 70% at 8% 0%, #FFC9B8, transparent 70%),
    radial-gradient(50% 60% at 50% 0%, #FFE3C2, transparent 70%),
    radial-gradient(55% 70% at 95% 5%, #D9DEFF, transparent 70%),
    radial-gradient(60% 60% at 30% 60%, #FFE9DC, transparent 70%),
    radial-gradient(50% 60% at 80% 60%, #E6E3FF, transparent 70%);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Glass: controls only (like the app). Content cards stay solid. */
.glass {
  background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
}
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-card); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 26px;
  border-radius: 999px; font: 700 17px/1 var(--font); text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-brand { background: var(--brand-gradient); color: #fff; }
.btn-glass { color: var(--ink); }
.btn-sm { height: 44px; padding: 0 18px; font-size: 15px; }

/* Navigation: a glass pill floating near the top. */
.nav { position: sticky; top: 12px; z-index: 10; margin-top: 12px; }
.nav-bar { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 8px 0 14px; border-radius: 999px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; list-style: none; }
.nav-links a { display: block; padding: 10px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--secondary); }
.nav-links a:hover { color: var(--ink); }
/* The links sit directly on the nav pill on wide screens; the glass box is only the phone menu. */
@media (min-width: 761px) {
  .nav-links.glass { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 999px; border: 0; color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; padding: 8px; border-radius: var(--radius); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; font-size: 17px; color: var(--ink); }
  .nav-links.glass { background: var(--card); }
  .menu-btn { display: inline-flex; }
  .nav-cta { display: none; }
}

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 72px 0 56px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px;
}
.chip .i { width: 16px; height: 16px; }
h1 { font-size: clamp(42px, 7vw, 76px); line-height: 1.02; font-weight: 800; letter-spacing: -.025em; margin: 18px 0 18px; }
h1 .grad { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--secondary); max-width: 34ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 18px; }
.trust-line { font-size: 14px; font-weight: 600; color: var(--secondary); }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 560px; }
.float-chip {
  position: absolute; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px;
  font-weight: 700; font-size: 15px; white-space: nowrap; animation: float 2.4s ease-in-out infinite alternate;
}
.float-chip b { font-weight: 800; }
.fc1 { top: 12%; left: 0; } .fc2 { top: 30%; right: 0; animation-delay: .6s; }
.fc3 { bottom: 24%; left: 2%; animation-delay: 1.2s; } .fc4 { bottom: 8%; right: 4%; animation-delay: 1.8s; }
@keyframes float { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .actions { justify-content: center; }
  .hero-visual { min-height: 520px; }
}

/* iPhone frame with a screenshot (placeholder until the owner's screenshots arrive). */
.phone {
  position: relative; width: 270px; aspect-ratio: 9 / 19.5; border-radius: 46px; padding: 10px;
  background: #0E0E10; box-shadow: 0 30px 60px rgba(20, 20, 24, .22), inset 0 0 0 2px #2A2A2E;
}
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; translate: -50% 0; width: 84px; height: 24px; border-radius: 999px; background: #0E0E10; z-index: 1; }
.screen { width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: var(--bg); }
.screen img { width: 100%; height: 100%; object-fit: cover; }
.shot-placeholder {
  height: 100%; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; padding: 20px;
  background: radial-gradient(120% 60% at 50% 0%, var(--accent-soft), transparent 70%), var(--card);
  color: var(--secondary); font-weight: 700; font-size: 15px;
}
.shot-placeholder img { width: 64px; height: 64px; }

/* Sections */
section { padding: 72px 0; }
.eyebrow { color: var(--accent); font-weight: 800; font-size: 15px; letter-spacing: .02em; }
h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 12px; }
.sub { color: var(--secondary); font-size: 18px; max-width: 46ch; }
.center { text-align: center; } .center .sub { margin-inline: auto; }

/* Trust strip */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0; }
.trust div { display: flex; align-items: center; gap: 10px; padding: 16px 18px; font-weight: 700; font-size: 15px; }
.trust .i { color: var(--accent); }
@media (max-width: 760px) { .trust { grid-template-columns: 1fr 1fr; } }

/* Features: a bento of solid cards. */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.feature { padding: 26px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.feature.big { grid-column: span 2; }
.feature h3 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.feature p { color: var(--secondary); }
.icon-tile { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.pro { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--premium) 16%, transparent); color: var(--premium); }
.feature .visual { margin-top: auto; padding-top: 14px; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .feature.big { grid-column: auto; } }

/* Small mock pieces drawn in HTML (like the app's rows). */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--card-alt); }
.row + .row { margin-top: 8px; }
.emoji { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; flex: none; }
.row .t { font-weight: 700; } .row .s { font-size: 13px; color: var(--secondary); }
.row .amt { margin-left: auto; font-weight: 800; }
.sms { padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: var(--card-alt); font-size: 14px; line-height: 1.4; max-width: 300px; }
.arrow { display: flex; justify-content: center; color: var(--accent); padding: 8px 0; }
.bar { height: 8px; border-radius: 999px; background: var(--card-alt); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; }
.budget + .budget { margin-top: 12px; }
.budget div:first-child { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 8px 12px; border-radius: 999px; background: var(--card-alt); font-weight: 700; font-size: 14px; }
.typed { font-weight: 700; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--card-alt); }
.typed::after { content: "|"; color: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* The fox with feelings */
.moods { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; margin-top: 34px; }
.mood { display: grid; justify-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--secondary); }
.mood img { width: 88px; height: 88px; transition: transform .2s ease; }
.mood:hover img { transform: scale(1.08) rotate(-4deg); }
@media (max-width: 900px) { .moods { grid-template-columns: repeat(3, 1fr); row-gap: 22px; } }

/* Chat mock (Ask Spendfox) */
.chat { padding: 22px; display: grid; gap: 12px; }
.bubble { padding: 12px 16px; border-radius: 20px; max-width: 85%; font-size: 16px; }
.bubble.me { justify-self: end; background: var(--ink); color: var(--on-ink); border-bottom-right-radius: 6px; }
.answer { display: flex; gap: 10px; align-items: flex-start; }
.answer img { width: 36px; height: 36px; }
.bubble.fox { background: var(--card-alt); border-bottom-left-radius: 6px; }
.points { display: grid; gap: 20px; list-style: none; margin-top: 24px; }
.points li { display: flex; gap: 14px; }
.points b { display: block; font-size: 18px; }
.points span { color: var(--secondary); }

/* Privacy panel: cream with the fox directly on it. */
.panel { padding: 44px; border-radius: 32px; background: var(--cream); display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center; }
.panel > img { width: 150px; height: 150px; }
.checks { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-top: 20px; }
.checks li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.checks .i { color: var(--income); width: 20px; height: 20px; }
@media (max-width: 760px) { .panel { grid-template-columns: 1fr; padding: 30px 22px; text-align: center; } .panel > img { margin-inline: auto; } .checks { grid-template-columns: 1fr; text-align: left; } }

/* Pricing */
.toggle { display: inline-flex; padding: 4px; border-radius: 999px; margin-top: 26px; }
.toggle button { border: 0; background: none; font: 700 15px/1 var(--font); color: var(--secondary); padding: 12px 20px; border-radius: 999px; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; text-align: left; align-items: start; }
.plan { padding: 28px; position: relative; }
.plan.premium { outline: 2.5px solid var(--accent); }
.plan h3 { font-size: 22px; font-weight: 800; }
.price { font-size: 44px; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 2px; }
.price small { font-size: 16px; color: var(--secondary); font-weight: 700; }
.plan .note { color: var(--secondary); font-size: 14px; min-height: 21px; }
.plan ul { list-style: none; display: grid; gap: 10px; margin-top: 20px; font-size: 15px; }
.plan li { display: flex; gap: 10px; }
.plan li .i { width: 19px; height: 19px; color: var(--income); margin-top: 2px; }
.badge { position: absolute; top: 22px; right: 22px; padding: 5px 11px; border-radius: 999px; background: var(--brand-gradient); color: #fff; font-size: 12px; font-weight: 800; }
.fine { color: var(--secondary); font-size: 13px; margin-top: 18px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 760px; margin: 30px auto 0; display: grid; gap: 10px; }
.faq details { padding: 4px 22px; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 0; font-weight: 700; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { margin-left: auto; transition: transform .2s ease; color: var(--secondary); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { color: var(--secondary); padding-bottom: 18px; }

/* Final call to action */
.cta { text-align: center; padding: 64px 24px; border-radius: 32px; background: var(--cream); }
.cta img { width: 110px; height: 110px; margin: 0 auto 10px; }

/* Footer */
footer { padding: 40px 0 48px; color: var(--secondary); font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.foot a { text-decoration: none; font-weight: 600; } .foot a:hover { color: var(--ink); }
.tm { margin-top: 18px; font-size: 12px; }

/* Legal pages */
.doc { max-width: 720px; margin: 0 auto; padding: 56px 0 24px; }
.doc h1 { font-size: clamp(34px, 6vw, 52px); margin-bottom: 6px; }
.doc .updated { color: var(--secondary); font-weight: 600; margin-bottom: 28px; }
.doc h2 { font-size: 24px; margin: 34px 0 10px; }
.doc p, .doc li { color: var(--ink); opacity: .86; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; display: grid; gap: 8px; margin-top: 10px; }
.doc .card { padding: 22px 24px; margin-top: 18px; }

/* Scroll reveal (off with reduced motion). */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
