/* ==========================================================================
   lovedone.app — consumer landing for the Sandwich Family Inbox
   Same design system as joinsandwich.com (indigo + Space Grotesk on cream),
   tuned warmer for a consumer audience.
   ========================================================================== */

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --surface-offset: #eef2ff;
  --brand: #4f46e5;
  --brand-hover: #3730a3;
  --brand-dark: #1e1b4b;
  --brand-highlight: #eef2ff;
  --ink: #1b1a16;
  --muted: #6e6a62;
  --faint: #a9a5a0;
  --line: #e6e2da;
  --line-strong: #d5d0c6;

  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.25vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.22vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.03rem + 0.45vw, 1.3125rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --text-hero: clamp(2.75rem, 1.8rem + 4.2vw, 5rem);

  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.25rem; --s-6: 1.5rem; --s-8: 2rem; --s-10: 2.5rem;
  --s-12: 3rem; --s-16: 4rem; --s-20: 5rem; --s-24: 6rem;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(27, 26, 22, 0.04), 0 0 0 1px rgba(27, 26, 22, 0.04);
  --shadow-md: 0 4px 14px rgba(27, 26, 22, 0.06), 0 0 0 1px rgba(27, 26, 22, 0.04);

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-body:    'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
p { max-width: 70ch; }
code, pre { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.container { width: min(1080px, 92vw); margin-inline: auto; }
.container-narrow { width: min(720px, 92vw); margin-inline: auto; }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 247, 245, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) 0;
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand);
  display: grid; place-items: center;
  color: #fff;
}
.nav-links { display: flex; gap: var(--s-6); align-items: center; }
.nav-links a { color: var(--ink); font-size: var(--text-sm); font-weight: 500; }
.nav-links a:hover { color: var(--brand); }
.nav-cta {
  padding: 10px 18px; border-radius: 10px;
  background: var(--brand); color: #fff !important;
  font-size: var(--text-sm); font-weight: 600;
}
.nav-cta:hover { background: var(--brand-hover); }
@media (max-width: 720px) {
  .nav-links { gap: var(--s-4); }
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ---- hero ---- */
.hero { padding: var(--s-20) 0 var(--s-12); text-align: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--brand);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--s-5);
}
.hero h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 17ch;
  margin: 0 auto var(--s-6);
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-sub {
  font-size: var(--text-lg); color: var(--muted); max-width: 56ch;
  margin: 0 auto var(--s-8);
}
.hero-cta-row {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  justify-content: center;
  align-items: center;
}
.hero-trust {
  margin-top: var(--s-5);
  font-size: var(--text-xs);
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 14px 26px; border-radius: 10px;
  font-size: var(--text-base); font-weight: 600;
  transition: background 180ms ease, color 180ms ease, transform 120ms ease;
  cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff !important; }
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--brand); color: var(--brand) !important; }

/* ---- inbox example ---- */
.inbox-demo {
  margin: var(--s-12) auto 0;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--s-5) var(--s-6);
  box-shadow: var(--shadow-md);
  text-align: left;
}
.inbox-demo-label {
  font-size: var(--text-xs);
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}
.inbox-demo-address {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--brand-dark);
  font-weight: 600;
  word-break: break-all;
}

/* ---- section ---- */
section { padding: var(--s-16) 0; }
.section-eyebrow {
  display: block;
  color: var(--brand);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-4);
  max-width: 22ch;
}
.section-sub {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: var(--s-10);
}

/* ---- feature cards (3-up) ---- */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5);
}
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--s-8);
  display: flex; flex-direction: column; gap: var(--s-4);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--brand-highlight); color: var(--brand);
  display: grid; place-items: center;
}
.feature h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.feature p { color: var(--muted); font-size: var(--text-sm); line-height: 1.6; }

/* ---- how-it-works steps ---- */
.steps {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-8);
}
@media (max-width: 900px) { .steps-grid { grid-template-columns: 1fr; } }
.step .step-n {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--brand); color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-sm); font-weight: 700;
  margin-bottom: var(--s-4);
}
.step h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--s-2);
}
.step p { color: var(--muted); font-size: var(--text-sm); }

/* ---- faq ---- */
.faq { background: var(--surface-2); border-top: 1px solid var(--line); }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--s-5) var(--s-6);
  margin-bottom: var(--s-3);
}
.faq-item h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--s-2);
  letter-spacing: -0.01em;
}
.faq-item p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
  max-width: none;
}
.faq-item p + p { margin-top: var(--s-2); }

/* ---- closing CTA ---- */
.closing {
  text-align: center;
  padding: var(--s-20) 0 var(--s-24);
}
.closing h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.03em;
  margin-bottom: var(--s-5);
  max-width: 18ch;
  margin-inline: auto;
}
.closing p {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 52ch;
  margin: 0 auto var(--s-8);
}

/* ---- corporate link ---- */
.corporate-note {
  background: var(--brand-highlight);
  border: 1px solid #dbe0fb;
  border-radius: var(--radius-md);
  padding: var(--s-6) var(--s-8);
  margin: var(--s-12) auto 0;
  max-width: 720px;
  text-align: center;
}
.corporate-note h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: var(--s-2);
}
.corporate-note p {
  font-size: var(--text-sm);
  color: var(--brand-dark);
  max-width: none;
  margin: 0;
}
.corporate-note a { font-weight: 600; }

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--line);
  padding: var(--s-12) 0;
  color: var(--muted);
  font-size: var(--text-sm);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--s-4);
}
.footer-brand {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--ink);
  font-weight: 600;
}
.footer-links { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--brand); }

/* ---- reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms ease, transform 600ms cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
