/* Budget.Cool website. Same palette as the apps (dark by default, light when asked). */

:root {
  --bg: #0b0d12;
  --bg-elev: #12151c;
  --bg-hover: #171b24;
  --text: #e8e9ed;
  --muted: #8b90a0;
  --faint: #6a7082;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #7c6df2;
  --accent-hover: #8f81f5;
  --accent-soft: rgba(124, 109, 242, 0.14);
  --positive: #22c55e;
  --negative: #f4495e;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f8;
    --bg-elev: #ffffff;
    --bg-hover: #f0f2f6;
    --text: #1a1d26;
    --muted: #5b6172;
    --faint: #7a8092;
    --border: rgba(15, 23, 42, 0.1);
    --border-strong: rgba(15, 23, 42, 0.2);
    --accent: #5b4bd8;
    --accent-hover: #4a3cc4;
    --accent-soft: rgba(91, 75, 216, 0.1);
    --positive: #15803d;
    --negative: #dc2626;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

html:not(.ready) body { visibility: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.18; margin: 0 0 0.5rem; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.01em; margin-bottom: 0.4rem; }
h3 { font-size: 1.08rem; }

p { margin: 0 0 0.75rem; }

svg.ico-base { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
}
.brand-mark svg { width: 18px; height: 18px; }
.top-nav { display: flex; align-items: center; gap: 1.1rem; font-size: 0.92rem; color: var(--muted); }
.top-nav a:not(.btn):hover { color: var(--text); }
.top-nav .btn.small { padding: 0.45rem 0.95rem; font-size: 0.88rem; }
.lang {
  border: 1px solid var(--border-strong); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 0.3rem 0.7rem; font: inherit; font-size: 0.82rem; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.35rem; border-radius: 12px;
  font-weight: 600; background: var(--accent); color: #fff; border: 1px solid var(--accent); cursor: pointer;
  font: inherit; font-weight: 600;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--bg-hover); }

.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 36rem; }
.lead span { display: block; }
.section-lead { color: var(--muted); font-size: 1.05rem; max-width: 40rem; margin-bottom: 2rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.6rem 0 1rem; }
.cta.center { justify-content: center; }
.fine { font-size: 0.88rem; color: var(--faint); }

/* Sections share one rhythm */
section { max-width: 1180px; margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 4vw, 2.5rem); }
section + section { border-top: 1px solid var(--border); }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 6vw, 4.5rem);
}
.hero h1 span { display: block; }

.profile-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 1.7rem; max-width: 30rem;
}
.pick {
  display: flex; align-items: center; gap: 0.75rem; text-align: left; font: inherit; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 14px;
  padding: 0.85rem 0.95rem; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.pick:hover { background: var(--bg-hover); }
.pick svg {
  width: 26px; height: 26px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; color: var(--muted);
}
.pick span { display: flex; flex-direction: column; }
.pick strong { font-size: 1rem; }
.pick small { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.pick.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.pick.on svg { color: var(--accent); }

.hero-shot { position: relative; min-height: 520px; }
.device { position: absolute; overflow: hidden; border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--border-strong); background: var(--bg-elev); }
.device img { width: 100%; height: auto; }
.device.desktop { right: 0; top: 0; width: 88%; border-radius: 14px; }
.device.phone { left: 0; bottom: 0; width: 38%; border-radius: 26px; border-width: 6px; border-color: #1c2030; }

/* Benefit and example cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.benefit, .example {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem;
  transition: border-color 0.15s, transform 0.15s;
}
.benefit:hover, .example:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.benefit p { color: var(--muted); font-size: 0.95rem; margin: 0; }

.ico {
  width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1rem;
}
.ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.example .scene { color: var(--muted); font-size: 0.95rem; }
.example ul { list-style: none; padding: 0; margin: 0.9rem 0 0; display: grid; gap: 0.5rem; }
.example li {
  position: relative; padding-left: 1.5rem; font-size: 0.93rem; color: var(--text);
}
.example li::before {
  content: ''; position: absolute; left: 0.2rem; top: 0.55rem; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* Screenshots */
.shot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; align-items: start; }
.shot { margin: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.shot img { width: 100%; height: auto; background: var(--bg); }
.shot.wide { grid-column: span 2; }
.shot figcaption {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.85rem 1rem; font-size: 0.9rem; color: var(--muted);
  border-top: 1px solid var(--border);
}
.shot figcaption svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* How it works */
.steps { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.steps li {
  display: flex; flex-direction: column; gap: 0.6rem; padding: 1.4rem; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.steps p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.num {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 700; background: var(--accent); color: #fff;
}

/* Privacy */
.privacy h2 { display: flex; align-items: center; gap: 0.6rem; }
.inline-ico { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.checks { list-style: none; padding: 0; margin: 1.2rem 0 1rem; display: grid; gap: 0.7rem; max-width: 46rem; }
.checks li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--text); }
.checks svg {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: 0.15rem; fill: none; stroke: var(--positive); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Final call and footer */
.final { text-align: center; }
.final p { color: var(--muted); font-size: 1.05rem; }
.foot {
  display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; align-items: center;
  padding: 2rem 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem;
}
.foot a:hover { color: var(--text); }

/* Tablet */
@media (max-width: 1000px) {
  .shot-grid { grid-template-columns: repeat(2, 1fr); }
  .shot.wide { grid-column: span 2; }
}

/* Phones */
@media (max-width: 760px) {
  .top-nav a:not(.btn) { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-shot { min-height: 260px; }
  .device.desktop { width: 100%; top: 0; }
  .device.phone { width: 30%; left: 0; bottom: 0; border-width: 4px; border-radius: 18px; }
  .profile-switch { grid-template-columns: 1fr; }
  .pick { padding: 0.7rem 0.8rem; }
  .pick svg { width: 22px; height: 22px; }
  .steps { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .benefit, .example { padding: 1.1rem; }
  .ico { width: 40px; height: 40px; margin-bottom: 0.75rem; border-radius: 11px; }
  .ico svg { width: 20px; height: 20px; }

  /* Screenshots: one swipeable row, each image capped in height. */
  .shot-grid {
    display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%;
    overflow-x: auto; scroll-snap-type: x mandatory; gap: 0.8rem; padding-bottom: 0.5rem;
    margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem;
  }
  .shot { scroll-snap-align: start; }
  .shot.wide { grid-column: auto; }
  .shot img { max-height: 380px; width: 100%; object-fit: cover; object-position: top; }
  .shot figcaption { font-size: 0.85rem; padding: 0.7rem 0.8rem; }
  .shot figcaption svg { width: 16px; height: 16px; }
  .checks svg { width: 18px; height: 18px; }
}
