/* Family Sync — marketing landing page (matches app theme) */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --blue-top: #1E88E5;
  --blue: #1565C0;
  --coral: #FF3D00;
  --coral-light: #FF5722;
  --bg: #F0F4F8;
  --white: #FFFFFF;
  --text: #0D1117;
  --text-secondary: #374151;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --shadow: 0 8px 32px rgba(13, 17, 23, 0.08);
  --shadow-lg: 0 16px 48px rgba(13, 17, 23, 0.12);
  --radius: 16px;
  --radius-sm: 12px;
  --max-width: 1120px;
  --section-pad: clamp(64px, 10vw, 112px);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(240, 244, 248, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nav.scrolled {
  border-color: var(--border);
  box-shadow: 0 2px 16px rgba(13, 17, 23, 0.06);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.15s;
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--coral);
  color: var(--white) !important;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  transition: background 0.15s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--coral-light);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}

/* ── Hero ── */
.hero {
  padding: calc(64px + clamp(48px, 8vw, 96px)) 0 clamp(64px, 8vw, 96px);
  background: linear-gradient(165deg, var(--blue-top) 0%, var(--blue) 55%, #0D47A1 100%);
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 90% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(255, 61, 0, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  position: relative;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0 0 32px;
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  max-width: 520px;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  border-radius: 8px;
  transition: transform 0.15s, opacity 0.15s;
}

.store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.store-badge img {
  display: block;
  height: 44px;
  width: auto;
}

.hero-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* ── Phone mockup ── */
.phone-wrap {
  display: flex;
  justify-content: center;
  perspective: 800px;
}

.phone {
  width: min(280px, 90%);
  background: #0D1117;
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: rotateY(-8deg) rotateX(4deg);
}

.phone-screen {
  background: var(--bg);
  border-radius: 26px;
  overflow: hidden;
  min-height: 480px;
}

.phone-header {
  background: linear-gradient(180deg, var(--blue-top), var(--blue));
  padding: 28px 16px 16px;
  color: var(--white);
}

.phone-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.phone-header p {
  margin: 4px 0 0;
  font-size: 12px;
  opacity: 0.9;
}

.phone-body { padding: 12px; }

.mini-card {
  background: var(--white);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mini-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mini-card-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.mini-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.phone-tabs {
  display: flex;
  justify-content: space-around;
  padding: 10px 8px 14px;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.phone-tab {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.phone-tab.active { color: var(--coral); }

/* ── Feature sections (alternating) ── */
.features { padding: var(--section-pad) 0; }

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding: clamp(40px, 6vw, 64px) 0;
}

.feature.reverse .feature-content { order: 2; }
.feature.reverse .feature-visual { order: 1; }

.feature-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--coral);
  margin-bottom: 12px;
}

.feature h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.feature p {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
}

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

.feature-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  background: var(--coral);
  border-radius: 50%;
  opacity: 0.15;
}

.feature-list li::after {
  content: '✓';
  position: absolute;
  left: 3px;
  top: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--coral);
}

/* Feature visual cards */
.visual-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.visual-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 28px;
}

.visual-icon.blue { background: rgba(21, 101, 192, 0.12); }
.visual-icon.coral { background: rgba(255, 61, 0, 0.12); }
.visual-icon.green { background: rgba(46, 125, 50, 0.12); }
.visual-icon.purple { background: rgba(123, 31, 162, 0.12); }
.visual-icon.pink { background: rgba(194, 24, 91, 0.12); }

.mock-ui {
  margin-top: 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.mock-row:last-child { border-bottom: none; }

.mock-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mock-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.mock-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.mock-badge {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.mock-badge.due { background: rgba(255, 61, 0, 0.12); color: var(--coral); }
.mock-badge.ok { background: rgba(46, 125, 50, 0.12); color: #2E7D32; }

/* ── How it works ── */
.how {
  padding: var(--section-pad) 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(48px, 6vw, 64px);
}

.section-header h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  font-size: 17px;
  color: var(--text-secondary);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--blue-top), var(--blue));
  color: var(--white);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.step p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── CTA ── */
.cta {
  padding: var(--section-pad) 0;
  text-align: center;
}

.cta-box {
  background: linear-gradient(135deg, var(--blue-top), var(--blue));
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(48px, 6vw, 72px) clamp(32px, 5vw, 64px);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.cta-box h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 800;
}

.cta-box p {
  margin: 0 auto 32px;
  max-width: 480px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
}

.cta .store-buttons { justify-content: center; }

/* ── Footer ── */
.footer {
  padding: 48px 0;
  background: var(--text);
  color: rgba(255, 255, 255, 0.75);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  max-width: 320px;
}

.footer-col h4 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
}

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

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  font-size: 14px;
  transition: color 0.15s;
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-grid,
  .feature,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .feature.reverse .feature-content,
  .feature.reverse .feature-visual {
    order: unset;
  }

  .hero-visual { order: -1; }

  .phone { transform: none; }

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

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

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

  .nav-toggle { display: block; }
}

@media (max-width: 480px) {
  .store-buttons { flex-direction: column; align-items: flex-start; }
}
