/* ══════════════════════════════════════════════════════════
   Split and Pay — web design tokens.
   Mirrors the app's own design system in
   Split_and_Pay/src/constants/theme.ts (COLORS / SPACING /
   BORDER_RADIUS / SHADOWS / FONTS). Keep the two in sync.
   ══════════════════════════════════════════════════════════ */

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

:root {
  /* Primary palette — pink fintech theme */
  --pink: #F7B5CD;
  --pink-dark: #E89AB5;
  --pink-light: #FDF0F5;

  /* Secondary — dark tones (app header + dark balance card) */
  --charcoal: #2E2829;
  --charcoal-light: #4A3F40;

  /* Backgrounds */
  --white: #FFFFFF;
  --bg-gray: #F5F5F5;

  /* Text */
  --text: #2E2829;
  --text-secondary: #666666;
  --text-light: #757575;

  /* Borders */
  --border: #E0E0E0;
  --border-light: #F0F0F0;

  /* Balance semantics — green/red for financial clarity */
  --owed: #1CC29F;
  --owes: #E74C3C;

  /* BORDER_RADIUS */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-xxl: 24px;

  /* SHADOWS */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.16);
}

html {
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* ── Navbar — mirrors the app's TabHeader (cardDark) ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--charcoal);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  color: var(--white);
}

.navbar-brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
}

/* "Split" keeps the surrounding colour, "& Pay" carries the brand pink */
.brand-accent {
  color: var(--pink);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.navbar-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.navbar-links a:hover {
  color: var(--white);
}

.navbar-links a.active {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: 0.3s;
  border-radius: var(--r-sm);
}

/* ── Language switch ── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.lang-switch a {
  padding: 5px 12px;
  color: rgba(255, 255, 255, 0.7);
  transition: background 0.2s, color 0.2s;
}

.lang-switch a.active {
  background: var(--pink);
  color: var(--charcoal);
}

.lang-switch a:not(.active):hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* ── Hero — app home screen: light ground under the dark header ── */
.hero {
  padding: 128px 2rem 72px;
  text-align: center;
  background: var(--bg-gray);
  border-bottom: 1px solid var(--border-light);
}

.hero-content {
  max-width: 760px;
  margin: 0 auto;
}

.hero-icon {
  width: 84px;
  height: 84px;
  border-radius: var(--r-xl);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.hero h1 {
  font-size: 2.125rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.hero p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Balance cards — the app's signature dark + pink pair ── */
.balance-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 520px;
  margin: 2.5rem auto 0;
  text-align: left;
}

.balance-card {
  border-radius: var(--r-xl);
  padding: 1.25rem;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}

.balance-card-dark {
  background: var(--charcoal);
}

.balance-card-pink {
  background: var(--pink);
}

.balance-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.balance-card-dark .balance-label {
  color: rgba(255, 255, 255, 0.7);
}

.balance-card-pink .balance-label {
  color: var(--charcoal);
}

.balance-amount {
  display: block;
  margin-top: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.balance-card-dark .balance-amount {
  color: var(--owed);
}

.balance-card-pink .balance-amount {
  color: var(--charcoal);
}

.balance-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.balance-card-dark .balance-meta {
  color: rgba(255, 255, 255, 0.5);
}

.balance-card-pink .balance-meta {
  color: var(--charcoal-light);
}

.balance-caption {
  margin-top: 0.875rem;
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
}

/* ── "Coming soon" pill — styled like the app's Add Expense button ── */
.store-soon {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pink);
  color: var(--charcoal);
  padding: 12px 24px;
  border-radius: var(--r-xxl);
  font-size: 0.9375rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ── Features ── */
.features {
  padding: 72px 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--pink);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--pink-light);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
}

/* ── Page Header (sub-pages) — the app's dark TabHeader ── */
.page-header {
  padding: 112px 2rem 48px;
  text-align: center;
  background: var(--charcoal);
  color: var(--white);
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

/* ── Content Section ── */
.content-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.content-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text);
  margin: 2.25rem 0 0.75rem;
}

.content-section h2:first-child {
  margin-top: 0;
}

.content-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.content-section strong {
  color: var(--text);
}

.content-section ul {
  color: var(--text-secondary);
  margin: 0.5rem 0 1rem 1.5rem;
  line-height: 1.8;
}

.content-section ul li {
  margin-bottom: 0.4rem;
}

/* Pink is too light to carry link text on white — charcoal text,
   pink underline. Keeps the brand cue and stays readable. */
.content-section a {
  color: var(--text);
  font-weight: 500;
  border-bottom: 2px solid var(--pink);
  transition: background 0.2s;
}

.content-section a:hover {
  background: var(--pink-light);
}

.last-updated {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* ── Contact Card ── */
.contact-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  max-width: 480px;
  margin: 2.5rem auto;
}

.contact-card .contact-icon {
  width: 60px;
  height: 60px;
  background: var(--pink-light);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.625rem;
  margin: 0 auto 1.25rem;
}

.contact-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.contact-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pink);
  color: var(--charcoal) !important;
  padding: 12px 24px;
  border-radius: var(--r-xxl);
  font-weight: 600;
  font-size: 0.9375rem;
  border-bottom: none !important;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, transform 0.2s;
}

.contact-email:hover {
  background: var(--pink-dark);
  transform: translateY(-2px);
}

/* ── Footer ── */
.footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.8125rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  transition: color 0.2s;
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1.25rem;
  }

  .navbar-right {
    gap: 0.75rem;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--charcoal);
    flex-direction: column;
    padding: 0.5rem 1.25rem 1rem;
    gap: 0;
    box-shadow: var(--shadow-lg);
  }

  .navbar-links.open {
    display: flex;
  }

  .navbar-links a {
    padding: 12px 0;
    border-bottom: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 108px 1.25rem 56px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-icon {
    width: 72px;
    height: 72px;
  }

  .balance-row {
    grid-template-columns: 1fr;
    max-width: 340px;
  }

  .balance-card {
    min-height: 0;
  }

  .features {
    padding: 48px 1.25rem;
  }

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

  .section-title {
    font-size: 1.5rem;
  }

  .page-header {
    padding: 100px 1.25rem 40px;
  }

  .page-header h1 {
    font-size: 1.625rem;
  }

  .content-section {
    padding: 2rem 1.25rem 3rem;
  }

  .contact-card {
    margin: 2rem 0;
    padding: 2rem 1.5rem;
  }
}
