:root {
  --icon-stroke: 1.75;
  --bg: #f9f8f5;
  --bg-elevated: #ffffff;
  --brand: #1a1a1a;
  --primary: #114e64;
  --primary-soft: rgba(17, 78, 100, 0.08);
  --secondary: #535e6e;
  --muted: #8a8f94;
  --border: #f0eee8;
  --success: #2f8b63;
  --warning: #ddab3e;
  --danger: #cc5649;
  --insight: #1a1a1c;
  --radius: 20px;
  --radius-sm: 12px;
  --nav-h: 52px;
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.47059;
  color: var(--brand);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  text-decoration: underline;
}

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

.container {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(249, 248, 245, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav.is-scrolled {
  border-color: var(--border);
  background: rgba(249, 248, 245, 0.9);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--brand);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo img {
  height: 26px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.footer .logo img {
  height: 30px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--brand);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  border: none;
}

.lang-toggle button {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--secondary);
  transition: background 0.2s var(--ease), color 0.2s;
}

.lang-toggle button.is-active {
  background: var(--bg-elevated);
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s;
}

.btn:hover {
  text-decoration: none;
  transform: scale(1.02);
}

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

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(17, 78, 100, 0.25);
}

.icon {
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-link-arrow .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease);
}

.btn-link-arrow:hover .icon {
  transform: translateX(3px);
}

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
}

/* Hero */
.page {
  padding-top: var(--nav-h);
}

.hero {
  padding: 72px 0 100px;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 120vw);
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(17, 78, 100, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 16px;
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.9s var(--ease) 0.1s forwards;
}

.hero h1 {
  margin: 0 auto 20px;
  max-width: 14ch;
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 1s var(--ease) 0.2s forwards;
}

.hero-lead {
  margin: 0 auto 32px;
  display: inline-block;
  max-width: min(100%, 64ch);
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  animation: rise 1s var(--ease) 0.35s forwards;
}

.hero-lead p {
  margin: 0;
  max-width: 50ch;
  font-size: clamp(19px, 2.5vw, 24px);
  line-height: 1.45;
  color: var(--secondary);
}

.hero-lead p:first-child {
  max-width: none;
  white-space: nowrap;
}

.hero-lead p + p {
  margin-top: 16px;
  margin-inline: auto;
  white-space: pre-line;
}

@media (max-width: 720px) {
  .hero-lead {
    display: block;
    width: 100%;
    max-width: 50ch;
  }

  .hero-lead p:first-child {
    white-space: normal;
  }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 56px;
  opacity: 0;
  animation: rise 1s var(--ease) 0.5s forwards;
}

.hero-device {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image {
  width: min(520px, 92vw);
  height: auto;
  display: block;
  opacity: 0;
  transform: translateY(24px);
  animation: phone-in 1.2s var(--ease) 0.55s forwards;
  filter: drop-shadow(0 32px 64px rgba(17, 78, 100, 0.18));
}

/* Sections */
.section {
  padding: 100px 0;
  background: var(--bg);
}

.section-alt {
  background: var(--bg-elevated);
}

.hero + .section-alt {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 80px, var(--bg-elevated) 100%);
}

.section-alt + .section {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 80px, var(--bg) 100%);
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 12px;
}

.section h2 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.section-intro {
  margin: 0 0 48px;
  max-width: 52ch;
  font-size: 21px;
  color: var(--secondary);
  line-height: 1.4;
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: stretch;
}

.feature-grid--pillars {
  grid-template-columns: repeat(3, 1fr);
}

.feature-grid--pillars .feature-card {
  min-height: 260px;
}

.feature-card--flagship {
  border-color: rgba(17, 78, 100, 0.35);
  background: linear-gradient(145deg, rgba(17, 78, 100, 0.06) 0%, var(--bg) 55%);
  box-shadow: 0 24px 48px -32px rgba(17, 78, 100, 0.35);
}

.section-alt .feature-card--flagship {
  background: linear-gradient(145deg, rgba(17, 78, 100, 0.08) 0%, var(--bg-elevated) 55%);
}

.feature-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.mock-rollover-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
  width: 100%;
  justify-content: flex-start;
}

.mock-rollover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  font-size: 14px;
}

.mock-rollover-row.positive span:last-child {
  color: var(--success);
  font-weight: 700;
}

.mock-rollover-row.negative span:last-child {
  color: var(--danger);
  font-weight: 700;
}

.mock-rollover-row.mock-rollover-result span:last-child {
  font-weight: 700;
}

.mock-rollover-arrow {
  display: flex;
  justify-content: center;
  color: var(--brand);
  opacity: 0.45;
}

.mock-rollover-arrow .icon {
  width: 20px;
  height: 20px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.feature-card .feature-icon {
  flex-shrink: 0;
}

.section-alt .feature-card {
  background: var(--bg-elevated);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(17, 78, 100, 0.2);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: var(--primary-soft);
  color: var(--primary);
}

.feature-icon .icon {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  flex-shrink: 0;
  margin: 0 0 10px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.feature-card--flagship p {
  max-width: 72ch;
}

.feature-card p {
  margin: 0;
  flex: 1;
  font-size: 15px;
  color: var(--secondary);
  line-height: 1.55;
}

/* Showcase rows */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
  margin-bottom: 80px;
}

#how-it-works .showcase {
  margin-bottom: 0;
  padding-bottom: 56px;
}

#how-it-works .showcase + .showcase {
  margin-top: 0;
  padding-top: 56px;
  border-top: 1px solid var(--border);
}

#how-it-works .showcase:last-child {
  padding-bottom: 0;
}

.showcase-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 8px 0;
}

.showcase:last-child {
  margin-bottom: 0;
}

.showcase.reverse {
  direction: rtl;
}

.showcase.reverse > * {
  direction: ltr;
}

.showcase-copy h3 {
  margin: 0 0 12px;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.showcase-copy p {
  margin: 0;
  font-size: 17px;
  color: var(--secondary);
  line-height: 1.55;
  max-width: 40ch;
}

.showcase-body {
  white-space: pre-line;
}

.mock-showcase-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  justify-content: center;
}

.mock-app-card {
  border-radius: 15px;
  padding: 16px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.06);
}

.mock-weekly-card {
  position: relative;
  background: #ffffff;
  overflow: hidden;
  padding-bottom: 21px;
}

.mock-weekly-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: var(--primary);
  border-radius: 0 0 15px 15px;
}

.mock-weekly-header,
.mock-insights-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.mock-weekly-header h4,
.mock-insights-header h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mock-weekly-header .icon {
  width: 21px;
  height: 21px;
  color: var(--brand);
}

.mock-weekly-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mock-weekly-stats p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--brand);
}

.mock-weekly-over {
  font-weight: 700;
  color: #c95c4a !important;
}

.mock-insights-card {
  background: var(--insight);
  color: #fff;
}

.mock-insights-emoji {
  font-size: 17px;
  line-height: 1;
}

.mock-insights-header h4 {
  color: #fff;
}

.mock-insights-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mock-insight-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mock-insight-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
}

.mock-insight-row p {
  margin: 2px 0 0;
  font-size: 17px;
  line-height: 1.45;
  color: #fff;
}

.mock-unexpected-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #ffffff;
  width: 100%;
}

.mock-budget-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  font-size: 16px;
  line-height: 1.3;
}

.mock-budget-icon {
  width: 16px;
  height: 16px;
  color: var(--brand);
  opacity: 0.72;
}

.mock-budget-label {
  flex: 1;
  min-width: 0;
  color: var(--brand);
  font-weight: 400;
}

.mock-budget-amount {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

.mock-budget-amount--safe {
  font-weight: 600;
  color: var(--success);
}

/* Privacy band */
.privacy-band {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    var(--bg-elevated) 14%,
    var(--bg-elevated) 86%,
    var(--bg) 100%
  );
}

.privacy-band h2 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.privacy-band p {
  margin: 0 auto 28px;
  max-width: 48ch;
  color: var(--secondary);
  font-size: 19px;
}

.privacy-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.privacy-pills span {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--secondary);
}

/* CTA */
.cta {
  text-align: center;
  padding: 100px 0 120px;
  background: var(--brand);
  color: #fff;
}

.cta h2 {
  margin: 0 0 12px;
  font-size: 48px;
  letter-spacing: -0.03em;
  color: #fff;
}

.cta p {
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 19px;
  max-width: 42ch;
  margin-inline: auto;
}

.cta .app-store-badge {
  background: #fff;
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.cta a.app-store-badge:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.32);
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px 11px 16px;
  background: #000;
  color: #fff;
  border-radius: 8px;
  min-height: 46px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  user-select: none;
  vertical-align: middle;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

a.app-store-badge:hover {
  text-decoration: none;
  transform: scale(1.02);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.app-store-badge--hero {
  gap: 12px;
  padding: 14px 26px 14px 20px;
  border-radius: 9px;
  min-height: 54px;
}

.app-store-badge--hero .app-store-badge-icon {
  width: 26px;
  height: 26px;
}

.app-store-badge--hero .app-store-badge-small {
  font-size: 10.5px;
}

.app-store-badge--hero .app-store-badge-large {
  font-size: 20px;
}

.app-store-badge-icon {
  flex-shrink: 0;
}

.app-store-badge-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.05;
  text-align: left;
}

.app-store-badge-small {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.app-store-badge-large {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Footer */
.footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer li {
  margin-bottom: 8px;
}

.footer a {
  color: var(--secondary);
  text-decoration: none;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Legal & Support pages */
.legal-page,
.support-page {
  padding: calc(var(--nav-h) + 48px) 0 80px;
}

.legal-page h1,
.support-page h1 {
  margin: 0 0 8px;
  font-size: clamp(36px, 5vw, 48px);
  letter-spacing: -0.03em;
}

.legal-updated {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 40px;
}

.legal-body h2 {
  margin: 40px 0 12px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.legal-body p {
  margin: 0 0 16px;
  color: var(--secondary);
  line-height: 1.6;
}

.legal-body ul {
  margin: 0 0 20px;
  padding-left: 1.25rem;
  color: var(--secondary);
  line-height: 1.6;
}

.legal-body li {
  margin-bottom: 8px;
}

.lang-panel {
  display: none;
}

.lang-panel.is-active {
  display: block;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 48px auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 19px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: var(--brand);
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--ease);
}

.faq-icon .icon {
  width: 14px;
  height: 14px;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease);
}

.faq-answer-inner {
  padding: 0 0 22px;
  color: var(--secondary);
  line-height: 1.55;
}

.faq-item.is-open .faq-answer {
  max-height: 400px;
}

.contact-card {
  margin-top: 64px;
  padding: 40px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  border: 1px solid rgba(17, 78, 100, 0.12);
  text-align: center;
}

.contact-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.contact-card p {
  margin: 0 0 20px;
  color: var(--secondary);
}

.contact-email {
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes phone-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    background: rgba(249, 248, 245, 0.98);
    padding: 24px;
    gap: 20px;
    align-items: flex-start;
    backdrop-filter: blur(20px);
  }

  .feature-grid,
  .feature-grid--pillars {
    grid-template-columns: 1fr;
  }

  .feature-grid--pillars .feature-card {
    min-height: 0;
  }

  .feature-card--flagship {
    grid-column: auto;
  }

  .showcase {
    gap: 32px;
  }

  .showcase,
  .showcase.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 32px;
  }

  #how-it-works .showcase {
    padding-bottom: 40px;
  }

  #how-it-works .showcase + .showcase {
    padding-top: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(var(--max), calc(100% - 32px));
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
