/* PeekAway website — colors mirror PeekAwayCore/Design/PeekAwayTheme.swift.
   The brand canvas is night-bound in both system appearances, like the app. */
:root {
  color-scheme: dark;
  --bg: #050e18;            /* PeekAwayPalette.background */
  --bg-deep: #020812;       /* backgroundDeep */
  --sky-top: #061321;       /* night sky gradient stops */
  --sky-mid: #04101b;
  --sky-bottom: #030b15;
  --surface: #102231;       /* elevatedSurface */
  --accent: #a9ddf8;        /* accent */
  --accent-bright: #c5ecff; /* accentBright */
  --accent-muted: #83c7ec;  /* accentMuted */
  --glass-tint: 118 189 229;/* glassTint #76BDE5 */
  --text: #f5fafd;          /* primaryText */
  --text-2: #dfeaf0;        /* secondaryText */
  --text-3: #c1d0d9;        /* tertiaryText */
  --divider: rgb(221 244 255 / 0.16);
  --highlight: rgb(255 255 255 / 0.26);
  --faint: rgb(217 243 255 / 0.13);
  --r-control: 16px;
  --r-panel: 22px;
  --r-hero: 28px;
  --r-card: 30px;
  --inset: 24px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-2);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 45% at 100% 0%, rgb(var(--glass-tint) / 0.11), transparent 70%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 50%, var(--sky-bottom) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-bright); }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { text-wrap: balance; color: var(--text); line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
p { margin: 0; }

.sky {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.page { position: relative; z-index: 1; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 14px; border-radius: 12px; background: var(--surface); color: var(--text);
}
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.0625rem; }
.brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 0.5px var(--highlight); }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--text-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--faint); }

/* Glass surfaces (PeekAwaySurfaceLevel.glass / .mineral) */
.glass {
  background: rgb(var(--glass-tint) / 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 0.8px solid var(--highlight);
  border-radius: var(--r-panel);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.10), 0 18px 40px -24px rgb(0 0 0 / 0.7);
}
.mineral {
  background: rgb(16 34 49 / 0.82);
  border: 1px solid var(--divider);
  border-radius: var(--r-panel);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
}

.eyebrow {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
}
.lead { font-size: 1.1875rem; color: var(--text-2); }
.muted { color: var(--text-3); }
.small { font-size: 0.875rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r-control);
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 0;
}
.btn-primary {
  color: var(--bg); background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), 0 10px 30px -12px rgb(169 221 248 / 0.55);
}
.btn-primary:hover { color: var(--bg); filter: brightness(1.05); }
.btn-ghost { color: var(--text); background: var(--faint); border: 0.8px solid var(--divider); }
.btn-ghost:hover { color: var(--text); background: rgb(231 248 255 / 0.18); }

/* App Store placeholder: swap for Apple's official badge + link at launch. */
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 20px 8px 16px; border-radius: 14px;
  background: #000; color: #fff; border: 1px solid rgb(255 255 255 / 0.45);
  text-decoration: none; cursor: default; font: inherit;
}
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-badge small { font-size: 0.6875rem; letter-spacing: 0.02em; color: rgb(255 255 255 / 0.82); }
.store-badge strong { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; }

/* Sections */
section { padding: 48px 0; }
.section-head { max-width: 620px; margin: 0 auto 28px; text-align: center; }
.section-head h2 { font-size: clamp(1.75rem, 5vw, 2.5rem); margin-top: 8px; }
.section-head p { margin-top: 12px; color: var(--text-3); }

/* Hero */
.hero { padding: 40px 0 56px; text-align: center; }
.hero-icon {
  width: 112px; height: 112px; margin: 0 auto 28px; border-radius: 26px;
  box-shadow: 0 0 0 0.8px rgb(255 255 255 / 0.35), 0 0 60px -6px rgb(169 221 248 / 0.45), 0 24px 50px -20px rgb(0 0 0 / 0.8);
}
.hero h1 { font-size: clamp(2.375rem, 9vw, 4.25rem); max-width: 12ch; margin: 0 auto; }
.hero .lead { max-width: 34ch; margin: 18px auto 0; }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 32px; }
.hero-note { margin-top: 16px; font-size: 0.9375rem; color: var(--text-3); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.step { padding: 24px; position: relative; }
.step-num {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px;
  font-weight: 700; color: var(--bg); background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  margin-bottom: 16px;
}
.step h3 { font-size: 1.25rem; }
.step p { margin-top: 8px; color: var(--text-3); }

/* Sessions */
.sessions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.session-card {
  position: relative; margin: 0; border-radius: var(--r-card); overflow: hidden;
  aspect-ratio: 2 / 3; background: var(--surface);
}
.session-card::after {
  content: ""; position: absolute; inset: 1px; border-radius: calc(var(--r-card) - 1px);
  border: 1.25px solid rgb(255 255 255 / 0.42); pointer-events: none;
}
.session-card img { width: 100%; height: 100%; object-fit: cover; }
.session-card figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 14px 14px;
  background: linear-gradient(180deg, transparent, rgb(2 8 17 / 0.82) 45%, rgb(2 8 17 / 0.94));
}
.session-card strong { display: block; color: var(--text); font-size: 1rem; line-height: 1.25; }
.session-card span { display: block; color: var(--text-2); font-size: 0.8125rem; margin-top: 2px; }
.highlights { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.highlights li { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; }
.highlights svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 2px; }
.disclaimer { margin-top: 18px; text-align: center; font-size: 0.875rem; color: var(--text-3); }

/* Pricing */
.plans { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.plan { padding: 26px 24px; position: relative; display: flex; flex-direction: column; gap: 4px; }
.plan.featured {
  border-color: rgb(197 236 255 / 0.55);
  background: linear-gradient(180deg, rgb(var(--glass-tint) / 0.18), rgb(var(--glass-tint) / 0.07));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.16), 0 0 0 1px rgb(169 221 248 / 0.18), 0 24px 60px -28px rgb(169 221 248 / 0.45);
}
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plan h3 { font-size: 1.125rem; }
.tag {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; padding: 5px 10px; border-radius: 999px;
  color: var(--bg); background: linear-gradient(180deg, var(--accent-bright), var(--accent));
}
.plan .price { margin-top: 10px; color: var(--text); font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.plan p { color: var(--text-3); font-size: 0.9375rem; }
.plan .save { color: var(--accent-bright); font-weight: 600; }
.fine { max-width: 620px; margin: 22px auto 0; text-align: center; font-size: 0.875rem; color: var(--text-3); }

/* Closing CTA */
.closing { text-align: center; padding: 40px 24px; border-radius: var(--r-hero); }
.closing h2 { font-size: clamp(1.625rem, 5vw, 2.25rem); }
.closing p { margin: 10px auto 24px; max-width: 40ch; color: var(--text-3); }

/* Footer */
.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--divider); margin-top: 32px; }
.site-footer .wrap { display: grid; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.site-footer p { font-size: 0.8125rem; color: var(--text-3); max-width: 70ch; }

/* Legal + support documents */
.doc { max-width: 760px; margin: 0 auto; padding: 24px 0 24px; }
.doc-head { padding: 24px 0 28px; }
.doc-head h1 { font-size: clamp(2rem, 7vw, 3rem); margin-top: 8px; }
.doc-head p { margin-top: 12px; color: var(--text-3); }
.doc-body { padding: 28px 22px; }
.doc-body h2 { font-size: 1.3125rem; margin: 36px 0 10px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { font-size: 1.0625rem; margin: 22px 0 6px; }
.doc-body p, .doc-body ul, .doc-body ol { margin: 0 0 14px; }
.doc-body ul, .doc-body ol { padding-left: 1.25rem; }
.doc-body li { margin-bottom: 6px; }
.doc-body li::marker { color: var(--accent-muted); }
.doc-body strong { color: var(--text); }
.callout { padding: 16px 18px; border-radius: var(--r-control); background: var(--faint); border: 0.8px solid var(--divider); margin: 0 0 18px; }
.callout p:last-child { margin-bottom: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; margin: 0 0 8px !important; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--faint); color: var(--text-2); text-decoration: none; font-size: 0.875rem; }
.toc a:hover { color: var(--text); }

/* FAQ */
.faq-group { margin-top: 28px; }
.faq-group h2 { font-size: 1.125rem; margin: 0 0 12px; color: var(--accent); letter-spacing: 0; }
.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--r-control); padding: 0; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 48px 18px 18px; position: relative;
  color: var(--text); font-weight: 600; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 18px 18px; color: var(--text-2); }
.faq .answer p + p, .faq .answer p + ol, .faq .answer ol + p { margin-top: 10px; }
.faq .answer ol { padding-left: 1.25rem; margin: 0; }
.contact { margin-top: 32px; padding: 26px 22px; text-align: center; }
.contact h2 { font-size: 1.375rem; }
.contact p { margin-top: 8px; color: var(--text-3); }
.contact .btn { margin-top: 18px; }

/* Wider screens */
@media (min-width: 640px) {
  .wrap { padding: 0 var(--inset); }
  .sessions { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .highlights { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: 1fr 1fr; }
  .doc-body { padding: 40px 44px; }
  .footer-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
}
@media (min-width: 900px) {
  section { padding: 64px 0; }
  .hero { padding: 72px 0 80px; }
  .hero-icon { width: 136px; height: 136px; border-radius: 31px; }
  .hero-cta { flex-direction: row; justify-content: center; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .step { padding: 28px; }
}

/* Accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--divider); }
}
@media (forced-colors: active) {
  .glass, .mineral, .session-card, .store-badge { border: 1px solid CanvasText; }
}

.faq-group { padding: 0; }
