/* OurSparks website. One stylesheet for every page.
   Colors come from the app (plum night, lilac cards, a purple accent).
   Contrast on --bg: --ink 16:1, --ink-2 10:1, --muted 7:1; white on
   --accent 5:1. Body text is 17px, the same as iOS. */

@font-face {
  font-family: "Lora";
  src: url("/fonts/Lora-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/fonts/Lora-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #140f1a;
  --bg-2: #1b1423;
  --surface: #241b2e;
  --surface-2: #2d2238;
  --line: rgba(255, 255, 255, 0.09);
  --ink: #f7f2fa;
  --ink-2: #d3c8df;
  --muted: #ab9fba;
  --accent: #8b45d3;
  --accent-2: #b98af0;
  --lilac: #ddcdf3;
  --lilac-ink: #2a1838;
  --pink: #f3cad9;
  --cream: #f3eadc;
  --cream-ink: #3a2a1e;
  --tape: rgba(255, 247, 236, 0.32);
  --radius: 22px;
  --wrap: 1120px;
  --display: "Lora", Georgia, "Times New Roman", serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-underline-offset: 3px; }
a:hover { color: #d2b3f7; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 10px 14px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ── Header ───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 15, 26, 0.82);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 12px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }
.nav .btn { margin-left: 8px; }
.menu-btn {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font-size: 20px;
}
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    padding: 12px 16px 20px; background: var(--bg-2); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; font-size: 17px; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #9a52e3; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn[aria-disabled="true"] { opacity: 0.7; cursor: default; }
.btn small { font-weight: 500; opacity: 0.8; }

/* ── Type ─────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(42px, 6.4vw, 76px); }
h2 { font-size: clamp(32px, 4.4vw, 52px); }
h3 { font-size: clamp(22px, 2.4vw, 28px); }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); line-height: 1.55; max-width: 38em; }
.eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--accent-2); margin: 0 0 14px; }
.muted { color: var(--muted); }

/* ── Hero ─────────────────────────────────────────── */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--lilac); }
.hero .lead { margin: 22px 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; color: var(--ink-2); font-size: 15px; }
.trust li { display: flex; gap: 10px; align-items: flex-start; }
.trust li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--accent) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg>') center / 11px no-repeat; }
.hero-shots { position: relative; height: 640px; }
.hero-shots .polaroid { position: absolute; width: 270px; }
.hero-shots .p1 { left: 18%; top: 10px; transform: rotate(-3deg); z-index: 3; }
.hero-shots .p2 { left: -2%; top: 140px; transform: rotate(-9deg); z-index: 2; width: 230px; }
.hero-shots .p3 { right: -2%; top: 120px; transform: rotate(7deg); z-index: 1; width: 230px; }
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-shots { height: 520px; max-width: 520px; margin: 0 auto; width: 100%; }
  .hero-shots .p1 { width: 230px; left: 28%; }
  .hero-shots .p2, .hero-shots .p3 { width: 190px; }
}
@media (max-width: 520px) {
  .hero { padding-top: 44px; }
  .hero-shots { height: 430px; }
  .hero-shots .p1 { width: 190px; left: 24%; }
  .hero-shots .p2, .hero-shots .p3 { width: 150px; }
}

/* ── Signature: app screens as taped polaroids ─────── */
.polaroid {
  margin: 0;
  background: var(--cream);
  padding: 9px 9px 36px;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  position: relative;
}
.polaroid img { border-radius: 4px; width: 100%; height: auto; background: #1b1423; }
.polaroid::before {
  content: "";
  position: absolute; top: -12px; left: 50%;
  width: 92px; height: 24px; margin-left: -46px;
  background: var(--tape);
  transform: rotate(-4deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.polaroid figcaption {
  position: absolute; left: 0; right: 0; bottom: 8px;
  text-align: center; font: italic 15px/1.2 var(--display); color: var(--cream-ink);
}

/* ── Sections ─────────────────────────────────────── */
section { padding: 88px 0; }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 0 48px; }
.section-head .lead { margin-top: 16px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step b { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 15px; margin-bottom: 14px; }
.step h3 { font-size: 22px; margin-bottom: 8px; }
.step p { margin: 0; color: var(--ink-2); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* Tour: text beside its screens, alternating sides. */
.tour-row { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 48px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); }
.tour-row:first-of-type { border-top: 0; }
.tour-row.flip .tour-text { order: 2; }
.tour-text h3 { margin-bottom: 14px; }
.tour-text p { color: var(--ink-2); margin: 0 0 16px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }
.shots { display: flex; justify-content: center; gap: 18px; align-items: flex-start; min-width: 0; }
/* Shrink to fit the column (three across), never wider than 230px. */
.shots .polaroid { flex: 0 1 230px; min-width: 0; }
.shots .polaroid:nth-child(1) { transform: rotate(-2.5deg); }
.shots .polaroid:nth-child(2) { transform: rotate(2deg); margin-top: 34px; }
.shots .polaroid:nth-child(3) { transform: rotate(-1deg); margin-top: 12px; }
.shots.one .polaroid { flex-basis: 290px; }
@media (max-width: 960px) {
  .tour-row { grid-template-columns: 1fr; gap: 32px; }
  .tour-row.flip .tour-text { order: 0; }
  .shots { overflow-x: auto; justify-content: flex-start; padding: 18px 4px 28px; scroll-snap-type: x mandatory; }
  .shots .polaroid { flex: 0 0 210px; scroll-snap-align: center; }
  .shots.one { justify-content: center; }
  .shots.one .polaroid { flex-basis: 250px; }
}

.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 20px; margin-bottom: 8px; font-family: var(--text); letter-spacing: 0; }
.card p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: 1fr; } }

.price {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 860px;
}
.price .card { padding: 30px; }
.price .amount { font: 700 46px/1 var(--display); margin: 10px 0 6px; }
.price .featured { background: var(--lilac); color: var(--lilac-ink); border-color: transparent; }
.price .featured p, .price .featured li { color: #3c2a4c; }
.price ul { margin: 16px 0 0; padding-left: 20px; }
@media (max-width: 760px) { .price { grid-template-columns: 1fr; } }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; margin-bottom: 10px; }
summary { cursor: pointer; list-style: none; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 17px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 24px; color: var(--accent-2); }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 18px; color: var(--ink-2); }

.final { text-align: center; }
.final .lead { margin: 16px auto 28px; }
.final .cta { justify-content: center; }

/* ── Legal and text pages ─────────────────────────── */
.doc { max-width: 780px; margin: 0 auto; padding: 56px 24px 96px; }
.doc h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 12px; }
.doc .updated { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: clamp(24px, 3vw, 30px); margin: 48px 0 14px; scroll-margin-top: 84px; }
.doc h3 { font-size: 20px; margin: 28px 0 10px; font-family: var(--text); letter-spacing: 0; }
.doc p, .doc li { color: var(--ink-2); font-size: 17px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--ink); }
.summary-box { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent-2); border-radius: 14px; padding: 18px 22px; margin: 24px 0; }
.summary-box p:last-child, .summary-box ul:last-child { margin-bottom: 0; }
.toc { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin: 24px 0 8px; }
.toc ol { margin: 8px 0 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 6px; font-size: 16px; break-inside: avoid; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
th { color: var(--ink); background: var(--surface); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

.invite-code { font: 700 clamp(34px, 7vw, 54px)/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.06em; background: var(--surface); border: 1px dashed var(--accent-2); border-radius: 18px; padding: 22px; text-align: center; margin: 20px 0; }

/* ── Footer ───────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; display: inline-block; padding: 4px 0; }
.footer-grid a:hover { color: var(--ink); }
.footer-note { margin-top: 36px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
