/* FamilyBudget design system — privacy-first fintech (emerald) */
:root {
  color-scheme: light;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --white: #ffffff;
  --bg: #f0fdf4;
  --surface: var(--white);
  --ink: var(--slate-900);
  --muted: var(--slate-600);
  --line: #d1fae5;
  --ring: rgba(5, 150, 105, 0.18);
  --primary: var(--emerald-600);
  --primary-hover: var(--emerald-700);
  --accent: var(--emerald-500);
  --shadow: 0 10px 30px rgba(6, 95, 70, 0.07);
  --shadow-sm: 0 4px 14px rgba(6, 95, 70, 0.06);
  --radius: 1rem;
  --radius-xl: 1.25rem;
  --max: 44rem;
  --max-wide: 56rem;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --focus: 0 0 0 3px rgba(16, 185, 129, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.65;
  background:
    radial-gradient(ellipse 80% 50% at 0% -10%, #a7f3d0 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, #d1fae5 0%, transparent 50%),
    linear-gradient(180deg, #ecfdf5 0%, var(--bg) 40%, #f8fafc 100%);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

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

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

/* —— Layout shell —— */
.shell {
  width: min(var(--max-wide), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0 0.75rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(236, 253, 245, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ring);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--slate-600);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--emerald-800);
}

/* —— Typography —— */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--emerald-100);
  color: var(--emerald-800);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5.2vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--slate-900);
  font-weight: 750;
}

h2 {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--slate-900);
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--slate-900);
}

.lede {
  margin: 0;
  font-size: 1.125rem;
  color: var(--slate-700);
  max-width: 38rem;
  line-height: 1.7;
}

.muted {
  color: var(--slate-500) !important;
  font-size: 0.95rem;
}

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.86em;
  background: var(--emerald-50);
  color: var(--emerald-800);
  padding: 0.12em 0.4em;
  border-radius: 6px;
  border: 1px solid var(--line);
}

/* —— Hero —— */
.hero {
  padding: 2.75rem 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--emerald-800);
  border-color: var(--emerald-200);
}

.btn-secondary:hover {
  background: var(--emerald-50);
  color: var(--emerald-800);
  border-color: var(--emerald-500);
}

/* —— Cards & sections —— */
.section {
  padding: 0.5rem 0 2.25rem;
}

.section-head {
  margin-bottom: 1.15rem;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--slate-600);
  max-width: 36rem;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.4rem 1.45rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--emerald-200);
  box-shadow: 0 14px 34px rgba(6, 95, 70, 0.09);
}

.card h2,
.card h3 {
  margin: 0.65rem 0 0.45rem;
  font-size: 1.08rem;
}

.card p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.97rem;
}

.icon-badge {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--emerald-50);
  border: 1px solid var(--line);
  color: var(--primary);
}

.icon-badge svg {
  width: 1.3rem;
  height: 1.3rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Privacy callout */
.callout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 55%);
  border: 1px solid var(--emerald-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.35rem;
  margin: 0.25rem 0 2rem;
}

.callout .icon-badge {
  flex-shrink: 0;
  background: var(--emerald-100);
}

.callout strong {
  display: block;
  font-size: 1.05rem;
  color: var(--emerald-800);
  margin-bottom: 0.25rem;
}

.callout p {
  margin: 0;
  color: var(--slate-700);
  font-size: 0.98rem;
}

/* How it works */
.steps {
  display: grid;
  gap: 0.85rem;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.step-num {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

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

/* Screenshot placeholder */
.mockups {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .mockups {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mockup {
  aspect-ratio: 9 / 16;
  max-height: 280px;
  border-radius: var(--radius-xl);
  border: 1px dashed var(--emerald-200);
  background:
    linear-gradient(160deg, var(--emerald-50), #fff 60%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 8px,
      rgba(16, 185, 129, 0.04) 8px,
      rgba(16, 185, 129, 0.04) 16px
    );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--slate-500);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

.mockup svg {
  width: 1.75rem;
  height: 1.75rem;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.75;
  opacity: 0.85;
}

/* About panel */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.45rem;
  margin-bottom: 2rem;
}

.panel p {
  margin: 0;
  color: var(--slate-600);
}

.panel p + p {
  margin-top: 0.75rem;
}

/* —— Privacy prose —— */
.prose-wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 1.25rem auto 2.5rem;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: clamp(1.35rem, 3vw, 2.25rem);
}

.prose > h1 {
  font-size: clamp(1.75rem, 4vw, 2.15rem);
  margin-bottom: 0.35rem;
}

.prose .meta {
  margin: 0 0 1.25rem;
  color: var(--slate-500);
  font-size: 0.92rem;
}

.prose h2 {
  margin-top: 1.85rem;
  margin-bottom: 0.55rem;
  font-size: 1.2rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--emerald-50);
}

.prose h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.prose h3 {
  margin-top: 1.15rem;
  margin-bottom: 0.4rem;
  font-size: 1.02rem;
  color: var(--slate-700);
}

.prose p,
.prose li {
  color: var(--slate-700);
  font-size: 0.98rem;
}

.prose p {
  margin: 0 0 0.85rem;
}

.prose ul {
  margin: 0 0 0.85rem;
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose li::marker {
  color: var(--primary);
}

.prose a {
  font-weight: 500;
}

/* —— Footer —— */
.site-footer {
  width: min(var(--max-wide), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.75rem;
  border-top: 1px solid var(--line);
  color: var(--slate-600);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.site-footer .brand {
  margin-bottom: 0.5rem;
}

.site-footer p {
  margin: 0.3rem 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.footer-links a {
  color: var(--slate-600);
  text-decoration: none;
  font-weight: 500;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
