/* Tabode - site styles. Colors mirror Tabode/src/constants/palette.ts
   and the icon gradient (#5CC3A0 -> #2F8F72). */

:root {
  --bg: #F2F7F5;
  --card: #FFFFFF;
  --card-alt: #E9F2EE;
  --border: #D5E5DE;
  --text: #14211D;
  --sub: #5A6E67;
  --accent: #1F7F63;
  --on-accent: #FFFFFF;
  --mint: #CDEFE2;
  --on-mint: #0F3B2E;
  --owed: #1F7F63;
  --owe: #B9473F;

  --grad: linear-gradient(135deg, #5CC3A0 0%, #2F8F72 100%);
  --radius: 18px;
  --wrap: 1080px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1614;
    --card: #16211E;
    --card-alt: #1B2925;
    --border: #25352F;
    --text: #E8F3EF;
    --sub: #8FA79F;
    --accent: #7DD3B2;
    --on-accent: #08241B;
    --mint: #1E3A31;
    --on-mint: #BDEBD9;
    --owed: #7DD3B2;
    --owe: #F2948A;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }

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

@media (max-width: 560px) { .wrap { padding-inline: 16px; } }

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---- Nav -------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img { border-radius: 8px; }

.nav-links { display: flex; gap: 24px; }

.nav-links a {
  color: var(--sub);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

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

@media (max-width: 420px) { .nav-links { gap: 16px; } }

/* ---- Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 88px 96px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -30% -20% auto auto;
  width: 820px;
  height: 820px;
  background: radial-gradient(circle, color-mix(in srgb, #5CC3A0 28%, transparent) 0%, transparent 62%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5.4vw, 3.75rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.accent { color: var(--accent); }

.lede {
  margin: 22px 0 0;
  max-width: 48ch;
  color: var(--sub);
  font-size: 1.125rem;
}

.cta-row { margin-top: 32px; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--accent);
  border-radius: 999px;
  color: var(--on-accent);
  font-size: 0.9375rem;
  font-weight: 700;
}

@media (max-width: 860px) {
  .hero { padding-block: 56px 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .lede { font-size: 1.0625rem; }
}

/* ---- Phone mock (illustration) --------------------------------------- */
.phone {
  width: 100%;
  max-width: 360px;
  justify-self: end;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 30px 60px -24px rgba(15, 59, 46, 0.35);
  font-size: 0.875rem;
}

@media (max-width: 860px) { .phone { justify-self: start; } }

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.home-name { font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.01em; }

.avatar-row { display: flex; }

.avatar-row i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: -6px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--c);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 700;
}

.balance {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2px 12px;
  margin-bottom: 14px;
  padding: 16px;
  background: var(--grad);
  border-radius: 18px;
  color: #FFFFFF;
}

.balance-label { grid-column: 1; font-size: 0.8125rem; font-weight: 600; opacity: 0.9; }
.balance-amount { grid-column: 1; font-size: 1.875rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }

.balance-btn {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  color: #0F3B2E;
  font-size: 0.8125rem;
  font-weight: 700;
}

.expenses {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.expenses li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-alt);
  border-radius: 14px;
}

.cat {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--mint);
  border-radius: 10px;
  color: var(--on-mint);
}

.cat svg, .icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exp-main, .exp-amt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.exp-main b, .exp-amt { font-weight: 700; }
.exp-main small { color: var(--sub); font-size: 0.75rem; }
.exp-amt { align-items: flex-end; font-variant-numeric: tabular-nums; }
.exp-amt small { font-size: 0.6875rem; font-weight: 600; white-space: nowrap; }
.owed, .paid { color: var(--owed); }
.owe { color: var(--owe); }

/* ---- Features --------------------------------------------------------- */
.features { padding-block: 80px; }

.features h2, .how h2, .closing h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.6vw, 2.375rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.section-lede {
  margin: 12px 0 40px;
  max-width: 58ch;
  color: var(--sub);
  font-size: 1.0625rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.feature {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

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

.icon svg { width: 22px; height: 22px; }

.feature h3 { margin: 0 0 8px; font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--sub); font-size: 0.9375rem; }

/* ---- How it works ----------------------------------------------------- */
.how {
  padding-block: 80px;
  background: var(--card-alt);
  border-block: 1px solid var(--border);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.steps li {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  background: var(--grad);
  border-radius: 50%;
  color: #FFFFFF;
  font-weight: 800;
}

.steps h3 { margin: 0 0 6px; font-size: 1.125rem; font-weight: 700; }
.steps p { margin: 0; color: var(--sub); font-size: 0.9375rem; }

/* ---- Closing ---------------------------------------------------------- */
.closing { padding-block: 96px; text-align: center; }
.closing-inner { display: flex; flex-direction: column; align-items: center; }

.closing img {
  margin-bottom: 24px;
  border-radius: 22px;
  box-shadow: 0 16px 40px -16px rgba(15, 59, 46, 0.45);
}

.closing p { margin: 12px 0 0; max-width: 52ch; color: var(--sub); font-size: 1.0625rem; }

/* ---- Footer ----------------------------------------------------------- */
.footer {
  padding-block: 28px;
  border-top: 1px solid var(--border);
  color: var(--sub);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer p { margin: 0; }
.footer a { text-decoration: none; font-weight: 600; }
.footer a:hover { text-decoration: underline; }

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