/* Budget Splitter – Landing page
   Warm, trustworthy palette: cream, deep teal, soft gold */

:root {
  --bg: #faf8f5;
  --bg-card: #fff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --accent: #0d5c5c;
  --accent-hover: #094848;
  --accent-light: #e8f2f2;
  --gold: #b8860b;
  --gold-light: #f5ecd8;
  --border: #e5e2dc;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ---- Scroll-triggered reveal animations ---- */
.reveal .hero-title,
.reveal .hero-lead,
.reveal .hero-cta,
.reveal .mock-card,
.reveal .section-title,
.reveal .feature,
.reveal .step,
.reveal .cta-title,
.reveal .cta-lead,
.reveal .cta-buttons,
.reveal .cta-note {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.reveal-in .hero-title,
.reveal.reveal-in .hero-lead,
.reveal.reveal-in .hero-cta,
.reveal.reveal-in .mock-card,
.reveal.reveal-in .section-title,
.reveal.reveal-in .feature,
.reveal.reveal-in .step,
.reveal.reveal-in .cta-title,
.reveal.reveal-in .cta-lead,
.reveal.reveal-in .cta-buttons,
.reveal.reveal-in .cta-note {
  opacity: 1;
  transform: translateY(0);
}

/* Hero: stagger on load */
.hero .hero-title { transition-delay: 0s; }
.hero .hero-lead { transition-delay: 0.08s; }
.hero .hero-cta { transition-delay: 0.16s; }
.hero .mock-card-1 { transition-delay: 0.1s; }
.hero .mock-card-2 { transition-delay: 0.2s; }
.hero .mock-card-3 { transition-delay: 0.3s; }

/* Features: title then cards with stagger */
.features.reveal-in .section-title { transition-delay: 0s; }
.features.reveal-in .feature-grid .feature:nth-child(1) { transition-delay: 0.08s; }
.features.reveal-in .feature-grid .feature:nth-child(2) { transition-delay: 0.16s; }
.features.reveal-in .feature-grid .feature:nth-child(3) { transition-delay: 0.24s; }
.features.reveal-in .feature-grid .feature:nth-child(4) { transition-delay: 0.32s; }

/* How it works: title then steps */
.how.reveal-in .section-title { transition-delay: 0s; }
.how.reveal-in .steps .step:nth-child(1) { transition-delay: 0.1s; }
.how.reveal-in .steps .step:nth-child(2) { transition-delay: 0.2s; }
.how.reveal-in .steps .step:nth-child(3) { transition-delay: 0.3s; }

/* CTA: stagger title, lead, buttons */
.cta.reveal-in .cta-title { transition-delay: 0s; }
.cta.reveal-in .cta-lead { transition-delay: 0.1s; }
.cta.reveal-in .cta-buttons { transition-delay: 0.2s; }
.cta.reveal-in .cta-note { transition-delay: 0.3s; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s ease, transform 0.2s ease;
}

.logo:hover {
  color: var(--accent-hover);
  transform: scale(1.02);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

/* Language switcher – far right, dropdown style */
.nav .lang-dropdown {
  margin-left: 0.5rem;
}

.lang-dropdown {
  position: relative;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: var(--radius);
  min-width: 4.5rem;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.lang-trigger:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-card);
}

.lang-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 1px var(--accent);
}

.lang-trigger-text {
  flex: 1;
  text-align: left;
}

.lang-trigger-icon {
  font-size: 0.55rem;
  opacity: 0.7;
  transition: transform 0.2s;
}

.lang-trigger[aria-expanded="true"] .lang-trigger-icon {
  transform: rotate(180deg);
}

.lang-list {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 11rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 200;
}

.lang-list.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-list li {
  margin: 0;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}

.lang-list li:hover {
  background: var(--accent-light);
}

.lang-list li[aria-current="true"] {
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 92, 92, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.btn-large {
  padding: 1rem 1.75rem;
  font-size: 1.05rem;
}

/* Hero */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    padding: 5rem 1.5rem 6rem;
    gap: 4rem;
  }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 1.25rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 28em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.mock-card {
  width: 100%;
  max-width: 280px;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mock-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.mock-card-1 { margin-right: 0; }
.mock-card-2 { margin-right: 1.5rem; }
.mock-card-3 { margin-right: 3rem; }

@media (min-width: 600px) {
  .mock-card-1 { margin-right: 2rem; }
  .mock-card-2 { margin-right: 3.5rem; }
  .mock-card-3 { margin-right: 5rem; }
}

.mock-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.mock-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
}

.mock-card-3 .mock-value {
  color: var(--gold);
  font-size: 1.5rem;
}

/* Section common */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  text-align: center;
  color: var(--text);
  margin: 0 0 2.5rem;
  letter-spacing: -0.02em;
}

/* Features */
.features {
  padding: 4rem 0 5rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-card) 50%, var(--bg) 100%);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 600px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
}

.feature {
  padding: 1.75rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.feature:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-light);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.feature:hover .feature-icon {
  transform: scale(1.15);
}

.feature h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.feature p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* How it works */
.how {
  padding: 4rem 0 5rem;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 600px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}


.step:last-child {
  border-bottom: none;
}

.step-num {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 50%;
  transition: transform 0.25s ease, background 0.25s ease;
}

.step:hover .step-num {
  transform: scale(1.1);
  background: var(--accent-hover);
}

.step h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* CTA */
.cta {
  padding: 4rem 0 5rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
}

.cta-inner {
  text-align: center;
}

.cta-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.cta-lead {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0 0 2rem;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta .btn-primary {
  background: #fff;
  color: var(--accent);
}

.cta .btn-primary:hover {
  background: var(--gold-light);
  color: var(--accent-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-note {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0;
}

/* Footer */
.site-footer {
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.footer-copy {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.footer-links {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 1.25rem;
}

.footer-links a:last-child {
  margin-right: 0;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-legal {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
  margin: 0;
}

/* ========== Mobile (clean, tidy, easy to use) ========== */
@media (max-width: 768px) {
  :root {
    --radius: 10px;
    --radius-lg: 16px;
  }

  /* Header: compact, hamburger visible */
  .header-inner {
    padding: 0.75rem 1rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  /* Hamburger button – only on mobile */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-toggle:hover {
    background: var(--accent-light);
  }

  .nav-toggle[aria-expanded="true"] {
    background: var(--accent-light);
  }

  .nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile nav: dropdown list below header – no scroll, just the list */
  .site-header {
    position: relative;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 1rem 1.25rem 1.25rem;
    background: var(--bg-card);
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    z-index: 50;
    overflow: visible;
    visibility: hidden;
    opacity: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    transition: visibility 0.25s ease, opacity 0.25s ease;
  }

  .site-header.nav-open .nav {
    visibility: visible;
    opacity: 1;
  }

  .nav a {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    min-height: 56px;
    border-radius: var(--radius);
    border: none;
    background: var(--bg);
    color: var(--text);
    margin-bottom: 0.25rem;
  }

  .nav a:hover {
    transform: none;
    color: var(--accent);
    background: var(--accent-light);
  }

  .nav .btn-small {
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    padding: 1.25rem 1.5rem;
    min-height: 56px;
    font-size: 1.2rem;
    justify-content: center;
    border-radius: var(--radius);
  }

  .nav .lang-dropdown {
    margin-top: 1.25rem;
    margin-left: 0;
  }

  .nav .lang-trigger {
    width: 100%;
    min-height: 56px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    justify-content: center;
    border-radius: var(--radius);
  }

  /* Hero: tighter padding, single column */
  .hero {
    padding: 2.5rem 1rem 3.5rem;
    gap: 2rem;
  }

  .hero-title {
    font-size: clamp(1.85rem, 6vw, 2.5rem);
    margin-bottom: 1rem;
  }

  .hero-lead {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
  }

  .hero-visual {
    gap: 0.75rem;
  }

  .mock-card {
    max-width: 100%;
    padding: 1rem 1.25rem;
  }

  .mock-card-1,
  .mock-card-2,
  .mock-card-3 {
    margin-right: 0;
  }

  /* Section inner: consistent mobile padding */
  .section-inner {
    padding: 0 1rem;
  }

  .section-title {
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    margin-bottom: 1.75rem;
  }

  /* Features: single column, comfortable cards */
  .features {
    padding: 2.5rem 0 3.5rem;
  }

  .feature-grid {
    gap: 1.25rem;
  }

  .feature {
    padding: 1.35rem;
  }

  .feature-icon {
    font-size: 1.75rem;
  }

  .feature h3 {
    font-size: 1.1rem;
  }

  .feature p {
    font-size: 0.9rem;
  }

  /* How it works: readable steps */
  .how {
    padding: 2.5rem 0 3.5rem;
  }

  .step {
    gap: 1.25rem;
    padding: 1.25rem 0;
  }

  .step-num {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
  }

  .step h3 {
    font-size: 1.05rem;
  }

  .step p {
    font-size: 0.9rem;
  }

  /* CTA: clear, tappable */
  .cta {
    padding: 2.5rem 1rem 3.5rem;
  }

  .cta-title {
    font-size: clamp(1.5rem, 4vw, 1.85rem);
  }

  .cta-lead {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .cta-buttons .btn-large {
    width: 100%;
    max-width: 320px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  .cta-note {
    font-size: 0.85rem;
  }

  /* Footer: stacked, readable */
  .site-footer {
    padding: 1.75rem 1rem;
  }

  .footer-brand {
    font-size: 1.05rem;
  }

  .footer-copy {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
  }

  .footer-links a {
    margin-right: 0;
    padding: 0.35rem 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .footer-legal {
    font-size: 0.75rem;
    line-height: 1.5;
  }
}

/* Hide hamburger on desktop */
@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}
