/* ClearSpiral — shared styles
   Brand: Deep Indigo night sky, violet spectrum, moonlight gold, lavender calm.
   Typography: Apple system stack for native Safari rendering. */

:root {
  --bg-deep: #0E0B1A;
  --bg-midnight: #1A1530;
  --bg-card: #16122A;
  --bg-card-2: #1F1938;
  --violet-900: #2E1065;
  --violet-800: #4C1D95;
  --violet-700: #5B21B6;
  --violet-600: #6D28D9;
  --violet-500: #7C3AED;
  --violet-400: #8B5CF6;
  --violet-300: #A78BFA;
  --violet-200: #C4B5FD;
  --violet-100: #DDD6FE;
  --violet-50:  #EDE9FE;
  --lavender-wash: #F5F3FF;
  --moon-gold: #FCD34D;
  --teal: #14E8C8;
  --text: #F5F3FF;
  --text-muted: #C4B5FD;
  --text-soft: #A78BFA;
  --border: rgba(196, 181, 253, 0.14);
  --border-strong: rgba(196, 181, 253, 0.28);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-soft: 0 10px 30px -10px rgba(76, 29, 149, 0.55);
  --shadow-glow: 0 0 80px rgba(124, 58, 237, 0.35);

  --maxw: 1120px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                  "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  background-image:
    radial-gradient(ellipse 900px 600px at 15% -10%, rgba(76, 29, 149, 0.35), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 10%, rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(ellipse 1200px 800px at 50% 110%, rgba(46, 16, 101, 0.5), transparent 60%);
  background-attachment: fixed;
}

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

a {
  color: var(--violet-200);
  text-decoration: none;
  transition: color 160ms ease;
}
a:hover { color: var(--moon-gold); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 0.6em;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ───────── Header / Nav ───────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  background: rgba(14, 11, 26, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: var(--shadow-soft);
}

.brand .brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 24px 20px;
    background: rgba(14, 11, 26, 0.96);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 220ms ease, background 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  color: #0E0B1A;
  background: linear-gradient(135deg, var(--moon-gold) 0%, #F59E0B 100%);
  box-shadow: 0 12px 30px -12px rgba(252, 211, 77, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); color: #0E0B1A; }

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.btn-apple {
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 12px 22px;
}
.btn-apple:hover { color: #fff; background: #111; }

/* ───────── Hero ───────── */
.hero {
  padding: 88px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.10);
  color: var(--violet-100);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.hero-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--moon-gold);
  box-shadow: 0 0 12px var(--moon-gold);
}
.hero h1 span.grad {
  background: linear-gradient(120deg, var(--moon-gold) 0%, var(--violet-200) 60%, var(--violet-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 28px;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.hero-microcopy {
  font-size: 0.88rem;
  color: var(--text-soft);
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1 / 1;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.55), transparent 60%);
  filter: blur(40px);
  z-index: 0;
}
.hero-art img {
  position: relative;
  z-index: 1;
  width: min(420px, 86%);
  border-radius: 32px;
  box-shadow: var(--shadow-glow), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
}

@media (max-width: 820px) {
  .hero { padding: 56px 0 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { order: -1; aspect-ratio: auto; }
  .hero-art img { width: 180px; border-radius: 24px; }
}

/* ───────── Sections ───────── */
section { padding: 72px 0; }

.section-title {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}
.section-title .eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moon-gold);
  margin-bottom: 12px;
}
.section-title p { color: var(--text-muted); font-size: 1.05rem; }

/* ───────── Cards / Features grid ───────── */
.grid {
  display: grid;
  gap: 20px;
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, rgba(31, 25, 56, 0.7), rgba(22, 18, 42, 0.7));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid var(--border-strong);
  color: var(--moon-gold);
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 8px; color: var(--text); }
.card p { margin: 0; color: var(--text-muted); font-size: 0.98rem; }

/* ───────── Split / Feature rows ───────── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.feature-row:first-of-type { border-top: 0; }
.feature-row.reverse .feature-media { order: 2; }

.feature-media {
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(76, 29, 149, 0.35), rgba(14, 11, 26, 0.6));
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.feature-media img { width: 60%; opacity: 0.95; }

.feature-copy h2 { margin-bottom: 12px; }
.feature-copy .tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-200);
  margin-bottom: 12px;
}
.feature-copy ul {
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}
.feature-copy li {
  position: relative;
  padding: 8px 0 8px 28px;
  color: var(--text-muted);
}
.feature-copy li::before {
  content: "";
  position: absolute;
  left: 0; top: 17px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--moon-gold), transparent 70%);
}

@media (max-width: 820px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 28px; }
  .feature-row.reverse .feature-media { order: 0; }
}

/* ───────── FAQ ───────── */
.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 12px;
  background: rgba(22, 18, 42, 0.55);
  transition: border-color 200ms ease, background 200ms ease;
}
.faq details[open] {
  border-color: var(--border-strong);
  background: rgba(31, 25, 56, 0.7);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--violet-200);
  transition: transform 200ms ease;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  margin: 12px 0 0;
  color: var(--text-muted);
}

/* ───────── Generic text pages (legal / support) ───────── */
.page-head {
  padding: 72px 0 24px;
  text-align: center;
}
.page-head p { color: var(--text-muted); max-width: 640px; margin: 0 auto; }

.prose {
  max-width: 780px;
  margin: 0 auto;
  padding: 16px 0 64px;
}
.prose h2 {
  margin-top: 40px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.prose h3 { margin-top: 28px; color: var(--violet-100); }
.prose ul { padding-left: 22px; color: var(--text-muted); }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--moon-gold); text-decoration: underline; text-underline-offset: 3px; }
.prose .meta {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

/* ───────── Contact / Support blocks ───────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  background: linear-gradient(180deg, rgba(31, 25, 56, 0.7), rgba(22, 18, 42, 0.7));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: left;
}
.contact-card h3 {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.contact-card .email {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(252, 211, 77, 0.12);
  border: 1px solid rgba(252, 211, 77, 0.4);
  color: var(--moon-gold);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ───────── CTA banner ───────── */
.cta-banner {
  margin: 24px auto 0;
  max-width: var(--maxw);
  border-radius: var(--radius-xl);
  padding: 56px 40px;
  text-align: center;
  background:
    radial-gradient(ellipse at top left, rgba(124, 58, 237, 0.45), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(252, 211, 77, 0.18), transparent 60%),
    rgba(22, 18, 42, 0.8);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.cta-banner h2 { margin-bottom: 10px; }
.cta-banner p { max-width: 520px; margin: 0 auto 24px; }

/* ───────── Footer ───────── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 48px 0 40px;
  color: var(--text-soft);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-200);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--moon-gold); }
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.85rem;
}

/* ───────── Stats strip ───────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
  max-width: 900px;
  margin: 40px auto 0;
}
@media (max-width: 720px) { .stats { grid-template-columns: 1fr 1fr; } }

.stat {
  padding: 20px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(22, 18, 42, 0.5);
}
.stat .num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--moon-gold);
  letter-spacing: -0.02em;
}
.stat .label { font-size: 0.82rem; color: var(--text-muted); }

/* ───────── Reduced motion ───────── */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Screen-reader only helper */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
