/* ==========================================================================
   Nudget — product website styles
   Brand: zero-based budgeting, offline-first. Green #00802F on warm cream,
   matching the app's light theme. Zero dependencies (system fonts, no CDN).
   ========================================================================== */

:root {
  --green:       #00802F;
  --green-700:   #006a27;
  --green-900:   #06401f;
  --green-tint:  rgba(0, 128, 47, 0.08);
  --green-tint2: rgba(0, 128, 47, 0.14);
  --teal:        #2f8f86;
  --amber:       #f59e0b;
  --red:         #d32f2f;

  --cream:       #f5f7ef;
  --cream-2:     #eef2e6;
  --card:        #ffffff;
  --ink:         #16261d;
  --muted:       #56685c;
  --line:        rgba(22, 38, 29, 0.10);

  --radius:      18px;
  --radius-sm:   12px;
  --shadow:      0 18px 40px -24px rgba(6, 64, 31, 0.45);
  --shadow-sm:   0 6px 18px -10px rgba(6, 64, 31, 0.35);

  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
          "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.12; margin: 0 0 .4em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.muted { color: var(--muted); }
.center { text-align: center; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-weight: 650; cursor: pointer;
  padding: .8rem 1.35rem; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-700); }
.btn-ghost { background: transparent; color: var(--green-900); border-color: rgba(0,128,47,.35); }
.btn-ghost:hover { background: var(--green-tint); }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.05rem; }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 247, 239, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 24%; object-fit: cover; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: var(--ink); font-weight: 550; }
.nav-links a:hover { color: var(--green-700); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: .6rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: .2s; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle at 70% 30%, var(--green-tint2), transparent 62%); z-index: 0; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 650;
  color: var(--green-900); background: var(--green-tint); border: 1px solid rgba(0,128,47,.18);
  padding: .35rem .75rem; border-radius: 999px; margin-bottom: 1.1rem;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-tint2); }
.hero h1 .accent { color: var(--green); }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 32ch; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.hero-note { font-size: .85rem; color: var(--muted); }
.hero-note strong { color: var(--ink); }

/* ---- Waitlist form ------------------------------------------------------- */
.waitlist { display: flex; gap: .5rem; flex-wrap: wrap; max-width: 460px; margin: 0 0 .7rem; }
.waitlist input[type="email"] {
  flex: 1 1 220px; min-width: 0; font: inherit; padding: .8rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
}
.waitlist input[type="email"]:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-tint); }
.form-msg { font-size: .9rem; font-weight: 600; min-height: 1.2em; margin: 0; }
.form-msg.ok { color: var(--green-700); }
.form-msg.err { color: var(--red); }

/* ---- Hero / screenshot layout helpers ------------------------------------ */
.phone-wrap { display: flex; justify-content: center; }

/* tint helpers for the feature icons */
.t-green { background: var(--green-tint2); color: var(--green); }
.t-teal  { background: rgba(47,143,134,.15); color: var(--teal); }
.t-amber { background: rgba(245,158,11,.16); color: #b9770a; }
.t-red   { background: rgba(211,47,47,.12); color: var(--red); }

/* ---- Section scaffolding ------------------------------------------------- */
section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { max-width: 640px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head .kicker { color: var(--green-700); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.alt { background: var(--cream-2); }

/* ---- Features ------------------------------------------------------------ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .fi { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.feature h3 { margin-bottom: .3rem; }
.feature p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ---- Steps --------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 28px 22px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 800; margin-bottom: 14px;
}
.step h3 { margin-bottom: .3rem; }
.step p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ---- Privacy band -------------------------------------------------------- */
.privacy {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #eafff0; border-radius: 28px; padding: clamp(34px, 5vw, 56px); text-align: center;
  box-shadow: var(--shadow);
}
.privacy h2 { color: #fff; }
.privacy p { color: #d3f4dd; max-width: 56ch; margin: 0 auto 1.4rem; font-size: 1.08rem; }
.privacy-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pill { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; padding: .5rem .95rem; border-radius: 999px; font-weight: 600; font-size: .92rem; }

/* ---- Real device screenshots --------------------------------------------- */
.device-shot {
  display: block; width: 100%; height: auto;
  border-radius: 30px; border: 7px solid #11201a; background: #11201a;
  box-shadow: var(--shadow);
}
.hero-shot { width: 300px; max-width: 78vw; rotate: 2deg; }

/* ---- Screenshots --------------------------------------------------------- */
.shots { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; align-items: flex-start; }
.shots figure { width: 240px; max-width: 62vw; margin: 0; }
.shots figure:nth-child(odd) .device-shot { rotate: -2deg; }
.shots figure:nth-child(even) .device-shot { rotate: 2deg; }
.shots figcaption { text-align: center; margin-top: 14px; font-weight: 650; color: var(--muted); font-size: .92rem; }

/* ---- FAQ ----------------------------------------------------------------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 18px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--green); font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* ---- CTA band ------------------------------------------------------------ */
.cta { text-align: center; }
.cta-box { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: clamp(34px, 5vw, 56px); box-shadow: var(--shadow-sm); max-width: 760px; margin: 0 auto; }
.cta-box .waitlist { margin: 1.4rem auto .6rem; justify-content: center; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--cream-2); border-top: 1px solid var(--line); padding: 40px 0; }
.foot-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.foot-by { color: var(--muted); font-size: .92rem; margin-top: .5rem; }
.foot-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.foot-links a { color: var(--ink); font-weight: 550; }

/* ---- Legal pages --------------------------------------------------------- */
.legal { max-width: 780px; margin: 0 auto; padding: clamp(36px, 6vw, 72px) 22px; }
.legal .badge { display: inline-block; background: var(--green-tint); color: var(--green-900); border: 1px solid rgba(0,128,47,.18); font-weight: 650; font-size: .8rem; padding: .3rem .7rem; border-radius: 999px; margin-bottom: .8rem; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.legal .lead { color: var(--muted); font-size: 1.08rem; }
.legal-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 28px 0; box-shadow: var(--shadow-sm); }
.legal-row { display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding: 16px 22px; border-top: 1px solid var(--line); }
.legal-row:first-child { border-top: 0; }
.legal-k { font-weight: 700; color: var(--muted); font-size: .92rem; }
.legal-note { display: block; color: var(--muted); font-size: .85rem; margin-top: .4rem; }
.prose h2 { font-size: 1.3rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
.prose .small { font-size: .9rem; }
.legal-updated { color: var(--muted); font-size: .9rem; margin-top: 2rem; }

/* ---- Reveal animation ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-text { order: 1; }
  .hero-visual { order: 2; }
  .hero .lead { max-width: none; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  .nav.open + .mobile-menu { display: flex; }
  .features, .steps { grid-template-columns: 1fr; }
  .legal-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Mobile menu (toggled by JS) */
.mobile-menu { display: none; flex-direction: column; gap: .2rem; padding: 10px 0 16px; border-bottom: 1px solid var(--line); }
.mobile-menu a { padding: 10px 22px; color: var(--ink); font-weight: 600; }
.mobile-menu a:hover { background: var(--green-tint); text-decoration: none; }
