/* Ascend Quests — public site shared styles.
   Tokens below are copied from the app's own styles/design-tokens.css
   (not linked — this site is served from web/ as the Cloudflare Pages
   root, so a path outside web/ would 404 once deployed). Keep these in
   sync by hand if the app's palette changes. */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('../fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('../fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/plusjakartasans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/plusjakartasans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/plusjakartasans-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/plusjakartasans-cyrillic.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

:root {
  color-scheme: dark;

  --bg-deep-space: #121614;
  --bg-canvas-dark: #171C19;
  --bg-surface-elevated: #1F2622;
  --bg-glass-card: rgba(28, 35, 31, 0.88);
  --glass-border-subtle: rgba(120, 160, 131, 0.18);
  --glass-border-active: rgba(120, 160, 131, 0.35);
  --glass-border-gold: rgba(194, 142, 43, 0.35);

  --accent-sage: #62A87C;
  --accent-sage-dark: #4E8B65;
  --accent-sage-glow: rgba(98, 168, 124, 0.30);
  --accent-terracotta: #C86D51;
  --accent-purple: #7E6B8F;
  --accent-cyan: #5E939C;
  --accent-emerald: #528E65;
  --accent-crimson: #B85042;
  --accent-crimson-tint: #F0B4AC;

  --gold-100: #F5D67B;
  --gold-300: #E5A93C;
  --gold-500: #C28E2B;

  --text-main: #F4F6F4;
  --text-muted: #9BA89F;
  --text-secondary: #AEBBB3;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 20px;
  --text-xl: 26px;
  --text-2xl: 34px;
  --text-3xl: 44px;
  --text-4xl: 58px;

  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 72px;
  --space-4xl: 112px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-deep-space);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space-md);
  letter-spacing: -0.01em;
}

p { margin: 0 0 var(--space-md); color: var(--text-secondary); }

a {
  color: var(--accent-sage);
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color var(--transition), text-decoration-color var(--transition);
}
a:hover { text-decoration-color: currentColor; text-decoration-line: underline; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-sage);
  color: #0c110d;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 22, 20, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border-subtle);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
  gap: var(--space-sm) var(--space-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--text-main); }
.brand__mark { width: 32px; height: 32px; flex: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.site-nav a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { color: var(--text-main); }

.simple-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.simple-nav a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.simple-nav a:hover { color: var(--text-main); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--glass-border-active);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-canvas-dark);
    border-bottom: 1px solid var(--glass-border-subtle);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .site-nav.is-open { max-height: 360px; }
  .site-nav a {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--glass-border-subtle);
  }
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
  line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-sage), var(--accent-sage-dark));
  color: #0c1410;
  box-shadow: 0 8px 24px -8px var(--accent-sage-glow);
}
.btn-primary:hover { box-shadow: 0 10px 28px -6px var(--accent-sage-glow); color: #0c1410; }

.btn-ghost {
  background: rgba(244, 246, 244, 0.04);
  border-color: var(--glass-border-active);
  color: var(--text-main);
}
.btn-ghost:hover { background: rgba(244, 246, 244, 0.08); color: var(--text-main); }

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

.hero {
  position: relative;
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
  overflow: clip;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: url('../images/night_nature_bg.webp') center/cover no-repeat;
  opacity: 0.28;
  z-index: -2;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,22,20,0.55) 0%, var(--bg-deep-space) 92%);
  z-index: -1;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-2xl);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-300);
  background: rgba(194, 142, 43, 0.12);
  border: 1px solid var(--glass-border-gold);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-lg);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw + 1rem, var(--text-4xl));
  color: var(--text-main);
}
.hero h1 .accent { color: var(--accent-sage); }

.hero__lede {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 46ch;
  margin-bottom: var(--space-xl);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-lg);
}

.hero__note {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.hero__phone-stage {
  display: flex;
  justify-content: center;
}

/* ── Phone mockup frame ─────────────────────────────────────────────── */

.phone-frame {
  position: relative;
  width: min(320px, 78vw);
  border-radius: 42px;
  background: linear-gradient(155deg, #2a322c, #0d100e);
  padding: 12px;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.6),
    0 0 0 1px rgba(120,160,131,0.15);
}
.phone-frame__screen {
  border-radius: 32px;
  overflow: hidden;
  background: var(--bg-canvas-dark);
  aspect-ratio: 430 / 932;
}
.phone-frame__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.phone-frame__notch {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #0d100e;
  border-radius: var(--radius-pill);
  z-index: 2;
}

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

.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}
.section--alt {
  background: var(--bg-canvas-dark);
  border-top: 1px solid var(--glass-border-subtle);
  border-bottom: 1px solid var(--glass-border-subtle);
}

.section__head {
  max-width: 640px;
  margin: 0 auto var(--space-2xl);
  text-align: center;
}
.section__head h2 {
  font-size: clamp(1.6rem, 3vw + 1rem, var(--text-2xl));
  color: var(--text-main);
}
.section__head p {
  font-size: var(--text-base);
}

/* ── How it works ───────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.step {
  background: var(--bg-glass-card);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  background: rgba(98,168,124,0.14);
  color: var(--accent-sage);
  font-family: var(--font-heading);
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.step h3 {
  font-size: var(--text-lg);
  color: var(--text-main);
}

.step p { margin-bottom: 0; font-size: var(--text-sm); }

/* ── Feature grid ───────────────────────────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
  border-color: var(--glass-border-active);
}

.feature-card__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: rgba(98,168,124,0.14);
  color: var(--accent-sage);
  margin-bottom: var(--space-md);
  flex: none;
}
.feature-card__icon svg { width: 22px; height: 22px; }

.feature-card h3 {
  font-size: var(--text-base);
  color: var(--text-main);
  margin-bottom: var(--space-xs);
}
.feature-card p { font-size: var(--text-sm); margin-bottom: 0; }

.feature-card--premium {
  border-color: var(--glass-border-gold);
}
.feature-card--premium .feature-card__icon {
  background: rgba(194,142,43,0.16);
  color: var(--gold-300);
}
.feature-card__badge {
  display: inline-block;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-300);
  background: rgba(194,142,43,0.14);
  border: 1px solid var(--glass-border-gold);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-sm);
}

/* ── Category chips ─────────────────────────────────────────────────── */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-2xl);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(244,246,244,0.05);
  border: 1px solid var(--glass-border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
}

/* ── Screenshot showcase ────────────────────────────────────────────── */

.showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
.showcase .phone-frame { width: 100%; }
.showcase figure { margin: 0; text-align: center; }
.showcase figcaption {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 600;
}

/* ── Privacy summary cards ─────────────────────────────────────────── */

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
.privacy-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.privacy-card h3 {
  font-size: var(--text-base);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.privacy-card p { font-size: var(--text-sm); margin-bottom: 0; }

/* ── FAQ ────────────────────────────────────────────────────────────── */

.faq {
  max-width: 780px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--glass-border-subtle);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-lg) var(--space-xs);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--accent-sage);
  transition: transform var(--transition);
  flex: none;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 var(--space-xs) var(--space-lg);
  font-size: var(--text-sm);
}

/* ── CTA banner ─────────────────────────────────────────────────────── */

.cta-banner {
  text-align: center;
  background: linear-gradient(135deg, rgba(98,168,124,0.14), rgba(194,142,43,0.08));
  border: 1px solid var(--glass-border-active);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-lg);
}
.cta-banner h2 { color: var(--text-main); }
.cta-banner p { max-width: 52ch; margin-left: auto; margin-right: auto; }

.privacy-cta {
  text-align: center;
  margin-top: var(--space-xl);
}

.error-page__cta {
  margin-top: var(--space-lg);
}

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

.site-footer {
  border-top: 1px solid var(--glass-border-subtle);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  background: var(--bg-canvas-dark);
}
.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}
.site-footer a { color: var(--text-secondary); font-size: var(--text-sm); text-decoration: none; }
.site-footer a:hover { color: var(--text-main); }
.site-footer__fine {
  font-size: var(--text-xs);
  color: var(--text-muted);
  border-top: 1px solid var(--glass-border-subtle);
  padding-top: var(--space-lg);
}
.site-footer__fine p { margin-bottom: var(--space-xs); font-size: var(--text-xs); color: var(--text-muted); }
/* Minimal-footer pages (404, delete-account, confirm) skip the links row
   above the fine print, so there's no divider/gap to carry. */
.site-footer__fine--bare { border-top: none; padding-top: 0; }

/* ── Prose (privacy policy) ────────────────────────────────────────── */

.prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose h1 { font-size: clamp(1.8rem, 3vw + 1rem, var(--text-2xl)); color: var(--text-main); }
.prose h2 {
  font-size: var(--text-lg);
  color: var(--text-main);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--glass-border-subtle);
}
.prose h2:first-of-type { border-top: none; padding-top: 0; margin-top: var(--space-xl); }
.prose h3 { font-size: var(--text-base); color: var(--text-main); margin-top: var(--space-lg); }
.prose p, .prose li { color: var(--text-secondary); font-size: var(--text-sm); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: var(--space-xs); }
.prose strong { color: var(--text-main); }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-lg) 0;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td {
  text-align: left;
  padding: var(--space-sm);
  border: 1px solid var(--glass-border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
}
.prose th { color: var(--text-main); background: rgba(244,246,244,0.04); }
.prose .meta {
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

/* ── 404 ────────────────────────────────────────────────────────────── */

.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}
.error-page .eyebrow { margin-bottom: var(--space-md); }
.error-page h1 { font-size: var(--text-3xl); }

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__phone-stage { order: -1; margin-bottom: var(--space-lg); }
  .showcase { grid-template-columns: repeat(2, 1fr); }
  .privacy-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
  .showcase { grid-template-columns: 1fr; }
  .site-footer__grid { flex-direction: column; }
}

/* ── Motion ─────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
