:root {
  --bg: #FAFAF8;
  --surface: #F5F4F0;
  --card: #FFFFFF;
  --dark: #1A1A2E;
  --primary: #2D5A3D;
  --primary-light: #E8F0EB;
  --accent: #D4A843;
  --accent-light: #FFF8E7;
  --needs: #3B82A0;
  --needs-light: #E6F2F7;
  --wants: #C4724E;
  --wants-light: #FDF0EB;
  --savings: #2D5A3D;
  --savings-light: #E8F0EB;
  --border: #E8E6E1;
  --text: #1A1A2E;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== NOISE TEXTURE OVERLAY ===== */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate {
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-d1 { animation-delay: 0.1s; }
.animate-d2 { animation-delay: 0.2s; }
.animate-d3 { animation-delay: 0.35s; }
.animate-d4 { animation-delay: 0.5s; }
.animate-d5 { animation-delay: 0.65s; }
.animate-d6 { animation-delay: 0.8s; }

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

nav.scrolled { border-bottom-color: var(--border); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: block;
  object-fit: contain;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--dark);
  text-decoration: none;
}

.nav-cta {
  padding: 10px 24px;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 26, 46, 0.2);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px 80px;
  position: relative;
}

.hero-content {
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-text { max-width: 520px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--accent-light);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 20px;
}

h1 em {
  font-style: italic;
  color: var(--primary);
}

.hero-sub {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 440px;
}

.hero-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
}

.hero-form input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--card);
  color: var(--dark);
  outline: none;
  transition: border-color 0.2s;
}

.hero-form input:focus {
  border-color: var(--primary);
}

.hero-form input::placeholder {
  color: var(--text-muted);
}

.hero-form button {
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45, 90, 61, 0.3);
}

.hero-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Phone mockup */
.hero-phone {
  display: flex;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

.phone-frame {
  width: 280px;
  height: 580px;
  background: var(--dark);
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 40px 80px rgba(26, 26, 46, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  position: relative;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 26px;
  overflow: hidden;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 80px; height: 6px;
  background: var(--dark);
  border-radius: 3px;
  margin: 0 auto 20px;
}

.phone-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.phone-header-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.phone-header-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--dark);
}

.phone-hero-card {
  background: var(--dark);
  border-radius: 14px;
  padding: 14px 16px;
  color: #fff;
  margin-bottom: 12px;
}

.phone-hero-label {
  font-size: 8px;
  opacity: 0.5;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.phone-hero-amount {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  margin: 4px 0 10px;
}

.phone-progress {
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.15);
  overflow: hidden;
  display: flex;
}

.phone-progress-needs { width: 33%; background: var(--needs); border-radius: 3px; }
.phone-progress-wants { width: 20%; background: var(--wants); }
.phone-progress-savings { width: 13%; background: var(--savings); }

.phone-bucket {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phone-bucket-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-bucket-emoji {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.phone-bucket-name {
  font-size: 12px;
  font-weight: 600;
}

.phone-bucket-sub {
  font-size: 9px;
  color: var(--text-muted);
}

.phone-bucket-amount {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}

.phone-bucket-label {
  font-size: 9px;
  color: var(--text-muted);
  text-align: right;
}

/* ===== HOW IT WORKS ===== */
.section {
  padding: 100px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 60px;
}

.section-sub a {
  color: var(--primary);
  text-decoration: none;
}

.section-sub a:hover {
  text-decoration: underline;
}

.buckets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bucket-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.bucket-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}

.bucket-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.bucket-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.bucket-name {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
}

.bucket-pct {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
}

.bucket-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== FEATURES ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
}

.feature-emoji {
  font-size: 28px;
  margin-bottom: 16px;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--dark);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== LAGOM MEANING ===== */
.lagom-section {
  padding: 100px 40px;
  background: var(--dark);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.lagom-section::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(45, 90, 61, 0.3), transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(212, 168, 67, 0.15), transparent 60%);
  pointer-events: none;
}

.lagom-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.lagom-word {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 80px);
  font-style: italic;
  color: var(--accent);
  margin-bottom: 8px;
}

.lagom-pronunciation {
  font-family: var(--font-mono);
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 24px;
}

.lagom-meaning {
  font-family: var(--font-display);
  font-size: 28px;
  color: #fff;
  margin-bottom: 16px;
}

.lagom-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 100px 40px;
  text-align: center;
}

.cta-content {
  max-width: 520px;
  margin: 0 auto;
}

.cta-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 32px auto 0;
}

.cta-form input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--card);
  color: var(--dark);
  outline: none;
  transition: border-color 0.2s;
}

.cta-form input:focus { border-color: var(--primary); }

.cta-form button {
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45, 90, 61, 0.3);
}

/* ===== FOOTER ===== */
footer {
  padding: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: block;
  object-fit: contain;
}

.footer-text {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-right {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-right a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 24px;
  transition: color 0.2s;
}

.footer-right a:hover { color: var(--primary); }

/* ===== SUCCESS STATE ===== */
.form-success {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--primary-light);
  border-radius: 12px;
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
}

.form-success.show {
  display: flex;
}

/* ===== INNER PAGES (Privacy, Support) ===== */
.page-header {
  padding: 120px 40px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.page-header h1 {
  margin-bottom: 8px;
}

.page-header .page-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.content-prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 40px 100px;
}

.content-prose h2,
.content-prose h3 {
  font-family: var(--font-display);
  color: var(--dark);
  margin-top: 40px;
  margin-bottom: 12px;
}

.content-prose h2 { font-size: clamp(24px, 3vw, 28px); }
.content-prose h3 { font-size: 18px; font-weight: 600; }

.content-prose p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.content-prose ul, .content-prose ol {
  margin: 0 0 16px 24px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.content-prose li { margin-bottom: 6px; }

.content-prose a {
  color: var(--primary);
  text-decoration: none;
}

.content-prose a:hover { text-decoration: underline; }

.content-prose .last-updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ===== CONTACT FORM ===== */
.contact-form {
  max-width: 480px;
  margin-top: 24px;
}

.contact-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--card);
  color: var(--dark);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 16px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45, 90, 61, 0.3);
}

/* Success message (sits below form so it stays visible when form is hidden) */
.contact-success {
  margin-top: 0;
  display: none;
}

.contact-success.show {
  display: flex;
}

/* Honeypot: hidden from users, left in DOM for bots */
.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .nav-logo-text { display: none; }

  .hero { padding: 100px 20px 60px; }
  .hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-text { max-width: 100%; }
  .hero-sub { margin: 0 auto 32px; }
  .hero-form { flex-direction: column; max-width: 100%; }
  .hero-phone { order: -1; }
  .phone-frame { width: 240px; height: 500px; }

  .section { padding: 60px 20px; }
  .buckets-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }

  .lagom-section { padding: 60px 20px; }

  .cta-section { padding: 60px 20px; }
  .cta-form { flex-direction: column; }

  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 32px 20px;
  }
  .footer-right a { margin: 0 12px; }

  .page-header { padding: 100px 20px 32px; }
  .content-prose { padding: 0 20px 60px; }
}
