:root {
  --bg: #eef4fc;
  --card: #ffffff;
  --label: #0b1430;
  --secondary: rgba(11, 20, 48, 0.618);
  --tertiary: rgba(11, 20, 48, 0.382);
  --hair: rgba(11, 20, 48, 0.08);
  --accent: #0a30ab;
  --accent-text: #ffffff;
  --sky: #8fd3ff;
  --sea-1: #3fa6f0;
  --sea-2: #1561d8;
  --sea-3: #0a2f8f;
  --e1: 0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --e2: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
  --e3: 0 2px 6px rgba(0, 10, 60, 0.08), 0 8px 24px rgba(0, 10, 60, 0.14), 0 16px 48px rgba(0, 10, 60, 0.18);
  --radius: 28px;
  --margin: 20px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050a1a;
    --card: #0e1730;
    --label: #eef2ff;
    --secondary: rgba(238, 242, 255, 0.618);
    --tertiary: rgba(238, 242, 255, 0.382);
    --hair: rgba(238, 242, 255, 0.08);
    --accent: #8cbcff;
    --accent-text: #061233;
    --sky: #1d3f7a;
    --sea-1: #15438f;
    --sea-2: #0b2a66;
    --sea-3: #050a1a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); }
img { display: block; max-width: 100%; }
.wrap { max-width: 1040px; margin-inline: auto; padding-inline: var(--margin); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(120% 60% at 50% 0%, var(--sky) 0%, transparent 60%),
    linear-gradient(180deg, var(--sea-1) 0%, var(--sea-2) 55%, var(--sea-3) 100%);
  padding: 24px 0 0;
  overflow: hidden;
  isolation: isolate;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: var(--e1); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: rgba(255, 255, 255, 0.85); text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 10px; }

.hero-grid { display: grid; gap: 40px; align-items: center; padding: 40px 0 120px; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.15fr 1fr; padding: 64px 0 160px; } }

.hero-copy { position: relative; z-index: 2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 16px; min-height: 32px;
  background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 15px; line-height: 20px; font-weight: 600;
}
h1 {
  font-size: clamp(40px, 7vw, 64px); line-height: 1.04; font-weight: 800;
  letter-spacing: -0.02em; margin: 20px 0 16px; text-wrap: balance;
}
.lede { font-size: 20px; line-height: 28px; color: rgba(255, 255, 255, 0.86); margin: 0 0 32px; max-width: 30em; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 28px;
  background: #fff; color: #0a30ab; font-weight: 700; font-size: 17px; text-decoration: none;
  box-shadow: var(--e3); transition: transform 0.2s ease;
}
.store:hover { transform: translateY(-2px); }
.store svg { width: 20px; height: 20px; }
.cta-note { color: rgba(255, 255, 255, 0.7); font-size: 15px; line-height: 20px; }

/* The phone and Homie */
.stage { position: relative; justify-self: center; width: min(300px, 76vw); z-index: 1; }
.device {
  position: relative; border-radius: 48px; padding: 10px;
  background: linear-gradient(145deg, #2b3446, #0b0f18);
  box-shadow: var(--e3), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
  transform: rotate(4deg);
}
.device img { border-radius: 38px; width: 100%; height: auto; }
.float-homie {
  position: absolute; width: 46%; left: -24%; bottom: 14%;
  filter: drop-shadow(0 12px 24px rgba(0, 20, 80, 0.35));
  animation: bob 4.2s ease-in-out infinite;
}
.sticker { position: absolute; width: 64px; filter: drop-shadow(0 6px 12px rgba(0, 20, 80, 0.3)); animation: bob 5s ease-in-out infinite; }
.sticker.sparkles { top: 6%; right: -10%; animation-delay: -1.2s; }
.sticker.drop { top: 40%; right: -14%; width: 52px; animation-delay: -2.4s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }

/* Rising bubbles */
.bubbles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.bubbles span {
  position: absolute; bottom: -40px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.08);
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate(24px, -110vh); opacity: 0; }
}

.wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 96px; width: 100%; z-index: 3; }
.wave path { fill: var(--bg); }
.wave .back { opacity: 0.4; }

@media (prefers-reduced-motion: reduce) {
  .float-homie, .sticker, .bubbles span { animation: none; }
}

/* ---------- Sections ---------- */
main { padding: 32px 0 24px; }
section { margin: 0 0 96px; }
.section-head { max-width: 36em; margin-bottom: 32px; }
.kicker { color: var(--accent); font-weight: 700; font-size: 15px; line-height: 20px; margin: 0 0 8px; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 12px; text-wrap: balance; }
.section-head p { color: var(--secondary); font-size: 17px; line-height: 24px; margin: 0; }

/* Features */
.features { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--e1);
  overflow: hidden; display: flex; flex-direction: column;
}
.feature-art {
  height: 300px; display: flex; justify-content: center; align-items: flex-start; padding-top: 28px; overflow: hidden;
  background: linear-gradient(180deg, #dff0ff, #b8dcff);
}
.feature-art.sunset { background: linear-gradient(180deg, #ffe3c7, #f6b7a6); }
.feature-art.night { background: linear-gradient(180deg, #d9d6ff, #a9b6f5); }
@media (prefers-color-scheme: dark) {
  .feature-art { background: linear-gradient(180deg, #16305f, #0f2149); }
  .feature-art.sunset { background: linear-gradient(180deg, #4a2a3b, #2b1a33); }
  .feature-art.night { background: linear-gradient(180deg, #23235a, #141838); }
}
.feature-art img.screen { width: 62%; border-radius: 24px; box-shadow: var(--e2); border: 6px solid #10151f; }
.feature-art img.notif { width: 88%; align-self: center; margin-top: -28px; border-radius: 22px; box-shadow: var(--e2); }
.feature-body { padding: 20px; }
.feature h3 { font-size: 20px; line-height: 25px; font-weight: 700; margin: 0 0 6px; }
.feature p { color: var(--secondary); margin: 0; font-size: 16px; line-height: 22px; }

/* Plus strip */
.ribbon {
  position: relative; overflow: hidden;
  border-radius: var(--radius); padding: 32px 24px;
  background: linear-gradient(135deg, #0a30ab, #1561d8 60%, #2bb3d9);
  color: #fff; display: grid; gap: 24px; align-items: center;
}
@media (min-width: 720px) { .ribbon { grid-template-columns: 1fr auto; padding: 40px; } }
.ribbon h2 { color: #fff; }
.ribbon p { color: rgba(255, 255, 255, 0.82); margin: 0 0 8px; font-size: 17px; line-height: 24px; max-width: 34em; }
.ribbon a { color: #fff; font-weight: 600; }
.ribbon .crown { width: 140px; justify-self: center; filter: drop-shadow(0 12px 24px rgba(0, 0, 40, 0.35)); animation: bob 5s ease-in-out infinite; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.16); font-size: 15px; line-height: 20px; font-weight: 600; }

/* Support */
.support-grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .support-grid { grid-template-columns: 1fr 1.618fr; align-items: start; } }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--e1); padding: 20px; }
.contact { display: grid; gap: 16px; position: relative; }
.contact img { width: 88px; margin: -8px 0 -4px -8px; }
.contact h3 { font-size: 22px; line-height: 28px; margin: 0; }
.contact p { margin: 0; color: var(--secondary); }
.button {
  display: inline-flex; align-items: center; justify-content: center; justify-self: start;
  min-height: 48px; padding: 0 24px; border-radius: 24px;
  background: var(--accent); color: var(--accent-text); font-weight: 700; text-decoration: none;
}
.faq { padding: 4px 20px; }
details { border-top: 1px solid var(--hair); }
details:first-child { border-top: 0; }
summary {
  list-style: none; cursor: pointer; padding: 14px 0; min-height: 52px;
  font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 14px;
  background: var(--hair) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23668' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 16px; color: var(--secondary); line-height: 24px; }

footer { padding: 0 0 48px; color: var(--tertiary); font-size: 13px; line-height: 18px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; border-top: 1px solid var(--hair); padding-top: 24px; }
footer a { color: var(--secondary); text-decoration: none; }

/* ---------- Privacy ---------- */
.doc { max-width: 720px; padding: 32px var(--margin) 64px; }
.doc h1 { font-size: 34px; line-height: 41px; margin-top: 8px; }
.doc h2 { font-size: 22px; line-height: 28px; margin-top: 40px; }
.doc h3 { font-size: 17px; line-height: 22px; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--secondary); line-height: 24px; }
.doc strong { color: var(--label); }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }

/* Tables in Markdown pages */
.doc .table { overflow-x: auto; margin: 16px 0; background: var(--card); border-radius: 20px; box-shadow: var(--e1); }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 20px; }
.doc th, .doc td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--hair); color: var(--secondary); }
.doc th { border-top: 0; color: var(--label); font-weight: 700; white-space: nowrap; }
