/* ───────────────────────────────────────────────────────────────────────────
   FriendBase — marketing site
   Color palette mirrors Theme.swift so the web and app feel like one product.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --pink:       #FF5D8F;
  --purple:     #7A5CFF;
  --teal:       #2AD4C6;
  --bg:         #F6F4FF;
  --ink:        #11142B;
  --ink-soft:   #5B6076;
  --ink-muted:  #9AA0B6;
  --line:       #ECEBF3;
  --card:       #FFFFFF;
  --gradient:   linear-gradient(135deg, #FF5D8F 0%, #7A5CFF 100%);
  --gradient-soft: linear-gradient(180deg, #FFE9F2 0%, #E8E1FF 60%, #F6F4FF 100%);
  --shadow-card:    0 4px 14px rgba(0, 0, 0, 0.04);
  --shadow-cta:     0 8px 24px rgba(122, 92, 255, 0.35);
  --shadow-hero:    0 12px 40px rgba(122, 92, 255, 0.25);
  --radius-card:    18px;
  --radius-large:   24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Top nav ─────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  background: rgba(246, 244, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 10;
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.3px;
  font-size: 17px;
}
.brand-mark {
  width: 36px; height: 36px;
  background: var(--gradient);
  border-radius: 10px;
  color: white;
  font-weight: 900;
  display: grid;
  place-items: center;
  font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(122, 92, 255, 0.25);
}
.nav-links { display: flex; gap: 4px; }
.nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: white; color: var(--ink); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 90px 24px 70px;
  background: var(--gradient-soft);
  position: relative;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
  opacity: 0.45;
}
.hero::before {
  background: var(--pink);
  width: 320px; height: 320px;
  top: -80px; right: -60px;
}
.hero::after {
  background: var(--purple);
  width: 280px; height: 280px;
  bottom: -60px; left: -40px;
}
.hero-content { position: relative; z-index: 1; }
.hero-mark {
  width: 96px; height: 96px;
  background: var(--gradient);
  border-radius: 26px;
  display: inline-grid;
  place-items: center;
  color: white;
  font-weight: 900;
  font-size: 38px;
  letter-spacing: 1px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-hero);
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 14px;
  line-height: 1.05;
}
.hero h1 .gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .tagline {
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--ink);
  font-weight: 600;
  max-width: 600px;
  margin: 0 auto 18px;
}
.hero .lede {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.coming-soon-pill {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 24px;
  border: 1px solid rgba(122, 92, 255, 0.2);
}

.cta-row { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: var(--gradient);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  border-radius: 14px;
  box-shadow: var(--shadow-cta);
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(122, 92, 255, 0.4);
}
.cta[disabled], .cta.is-disabled {
  cursor: not-allowed;
  opacity: 0.75;
}
.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 22px;
  background: white;
  color: var(--purple);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  transition: transform 0.15s;
}
.cta-secondary:hover { transform: translateY(-1px); }

/* ── Sections ────────────────────────────────────────────────────────────── */

section { padding: 90px 24px; }
section h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: -0.7px;
  text-align: center;
  margin-bottom: 14px;
}
section .section-lede {
  text-align: center;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 50px;
  font-size: 17px;
  line-height: 1.6;
}

/* ── Features grid ───────────────────────────────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  max-width: 1000px;
  margin: 0 auto;
}
.feature-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 30px 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.07);
}
.feature-emoji {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
  line-height: 1;
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.feature-card p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ── Visual mockup band (phone-shaped preview) ───────────────────────────── */

.preview-band {
  background: var(--gradient-soft);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.phone-frame {
  display: inline-block;
  width: 290px;
  max-width: 100%;
  margin: 30px auto 0;
  padding: 14px 12px;
  background: #1a1a1a;
  border-radius: 42px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}
.phone-screen {
  background: white;
  border-radius: 30px;
  padding: 20px 16px;
  text-align: left;
  min-height: 460px;
  position: relative;
  overflow: hidden;
}
.phone-screen .day { font-size: 11px; color: var(--ink-soft); }
.phone-screen .greet {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}
.phone-hero {
  background: var(--gradient);
  color: white;
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 16px;
}
.phone-hero .label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  opacity: 0.85;
}
.phone-hero .big { font-size: 16px; font-weight: 800; margin-top: 4px; }
.phone-hero .stats {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.phone-stat {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 7px 8px;
  flex: 1;
}
.phone-stat .v { font-size: 14px; font-weight: 800; }
.phone-stat .l { font-size: 8px; opacity: 0.9; }
.phone-screen .section-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--ink-soft);
  margin: 8px 0 8px;
}
.phone-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  background: white;
}
.phone-row .avatar {
  width: 36px; height: 36px;
  background: var(--gradient);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 12px;
  font-weight: 800;
}
.phone-row .name { font-size: 12px; font-weight: 700; }
.phone-row .when { font-size: 10px; color: var(--ink-soft); margin-top: 1px; }
.phone-row .badge {
  margin-left: auto;
  background: rgba(122, 92, 255, 0.12);
  color: var(--purple);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

/* ── Privacy band ────────────────────────────────────────────────────────── */

.privacy-band {
  background: var(--gradient);
  color: white;
  text-align: center;
}
.privacy-band h2 { color: white; }
.privacy-band p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 560px;
  margin: 0 auto 26px;
  font-size: 17px;
}
.privacy-band .pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.privacy-band .pill {
  background: rgba(255, 255, 255, 0.18);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.privacy-band .btn-white {
  display: inline-block;
  background: white;
  color: var(--purple);
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s;
}
.privacy-band .btn-white:hover { transform: translateY(-1px); }

/* ── Footer ──────────────────────────────────────────────────────────────── */

footer {
  padding: 50px 24px 60px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  border-top: 1px solid var(--line);
  background: white;
}
footer .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 16px;
}
footer .links { margin-bottom: 12px; }
footer .links a {
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 10px;
  font-weight: 600;
}
footer .links a:hover { color: var(--purple); }
footer .copy {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 8px;
}

/* ── Privacy policy page ─────────────────────────────────────────────────── */

.policy-hero {
  background: var(--gradient);
  color: white;
  padding: 70px 24px 50px;
  text-align: center;
}
.policy-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.policy-hero .meta {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
}
.policy-hero .back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: white;
  opacity: 0.9;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}
.policy-hero .back-link:hover { opacity: 1; }
.policy-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}
.policy-body section {
  padding: 0;
  margin-bottom: 32px;
  scroll-margin-top: 80px;
}
.policy-body h2 {
  font-size: 22px;
  text-align: left;
  margin-bottom: 12px;
  margin-top: 30px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.policy-body h3 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 22px;
  margin-bottom: 8px;
  color: var(--ink);
}
.policy-body p, .policy-body li {
  color: var(--ink-soft);
  margin-bottom: 10px;
  line-height: 1.7;
  font-size: 15px;
}
.policy-body ul, .policy-body ol { padding-left: 22px; margin-bottom: 14px; }
.policy-body a { color: var(--purple); text-decoration: underline; }
.policy-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.policy-body th, .policy-body td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.policy-body th {
  color: var(--ink);
  font-weight: 700;
  background: var(--bg);
}
.policy-body td { color: var(--ink-soft); }
.policy-body code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.policy-body strong { color: var(--ink); }
.policy-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0 30px;
}
.policy-body .contact-card {
  background: var(--gradient-soft);
  border-radius: var(--radius-card);
  padding: 24px;
  text-align: center;
  margin-top: 30px;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .hero { padding: 60px 20px 50px; }
  section { padding: 60px 20px; }
  .nav-link:not(.nav-cta) { display: none; }
  .nav-cta {
    padding: 7px 12px;
    background: var(--gradient);
    color: white;
    border-radius: 999px;
    font-size: 12px;
  }
  .nav-cta:hover { background: var(--gradient); color: white; }
}
