/* Hyperdrive — shared styles. Tokens follow the Airo design system in hyperdrive-site-handoff.md. */

:root {
  --bg: #09090b;
  --bg-raised: #111114;
  --card: #131317;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;
  --primary: #a855f7;
  --primary-rgb: 168 85 247;
  --accent: #7c3aed;
  --ice: #c7ecff; /* the note in the app icon */
  --radius: 18px;
  --max: 1120px;
  --font-heading: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

html, body { overflow-x: clip; }

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(9 9 11 / 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 4px 16px rgb(var(--primary-rgb) / 0.35);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.15s, background-color 0.15s;
}

.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: rgb(255 255 255 / 0.06); }

.nav .btn { margin-left: 8px; }
.nav .btn-primary, .nav .btn-primary:hover { color: #fff; padding: 9px 16px; }

/* ---------- Buttons & badges ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background-color 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 6px 24px rgb(var(--primary-rgb) / 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 32px rgb(var(--primary-rgb) / 0.5); }

.btn-sm { padding: 9px 16px; font-size: 0.88rem; }
.btn-lg { padding: 15px 26px; font-size: 1rem; }

/* App Store CTA while the app is pre-launch: looks like the button, isn't a link. */
.btn-soon {
  background: rgb(255 255 255 / 0.06);
  border-color: var(--border-strong);
  color: var(--text);
  cursor: default;
}

.btn svg { width: 18px; height: 18px; flex: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgb(9 9 11 / 0.6);
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.4; } }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1.4;
}
.tag-free { color: var(--ice); background: rgb(199 236 255 / 0.1); }
.tag-pro { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.tag-ai { color: #f0abfc; background: rgb(240 171 252 / 0.12); }

.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.gradient-text {
  background: linear-gradient(120deg, #fff 10%, var(--ice) 45%, var(--primary) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 104px 0 96px;
  text-align: center;
}

.hero canvas.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero::before { /* glow orb */
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(900px, 140vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgb(var(--primary-rgb) / 0.28) 0%, rgb(124 58 237 / 0.12) 35%, transparent 65%);
  z-index: -1;
  pointer-events: none;
}

.hero::after { /* fade into page */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 140px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: -1;
}

.hero-icon {
  width: 112px;
  height: 112px;
  margin: 0 auto 28px;
  border-radius: 26px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 20px 60px rgb(var(--primary-rgb) / 0.45);
}

.hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.6rem);
  font-weight: 700;
  max-width: 14ch;
  margin: 22px auto 0;
}

.hero .lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 40rem;
  margin: 22px auto 0;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
}

.hero-cta small { color: var(--text-faint); font-size: 0.85rem; }

/* Page hero used on Pro / FAQ / Privacy */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  padding: 80px 0 48px;
}

.page-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(760px, 120vw);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at top, rgb(var(--primary-rgb) / 0.22), transparent 65%);
  z-index: -1;
  pointer-events: none;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-top: 14px;
}

.page-hero .lede {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 38rem;
  margin: 18px auto 0;
}

.pro-icon-wrap {
  position: relative;
  width: 128px;
  margin: 0 auto 28px;
}

.pro-icon-wrap img {
  width: 128px;
  height: 128px;
  border-radius: 30px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 24px 70px rgb(var(--primary-rgb) / 0.55);
}

.pro-icon-wrap .tag-pro {
  position: absolute;
  right: -14px;
  bottom: -8px;
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgb(var(--primary-rgb) / 0.6);
}

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section-tight { padding: 40px 0 72px; }

.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 48px;
}

.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p { color: var(--text-muted); margin-top: 14px; font-size: 1.05rem; }

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover { border-color: rgb(var(--primary-rgb) / 0.4); }

.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgb(var(--primary-rgb) / 0.12);
  border: 1px solid rgb(var(--primary-rgb) / 0.25);
  margin-bottom: 20px;
}

.card .icon svg { width: 22px; height: 22px; }

.card h3 { font-size: 1.25rem; }
.card p { color: var(--text-muted); margin-top: 10px; }

/* Theme gallery */
.themes {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.theme {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  transition: border-color 0.2s;
}

.theme:hover { border-color: rgb(var(--primary-rgb) / 0.4); }

.theme-swatch {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
}

.theme h3 {
  font-size: 1.02rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.theme p { color: var(--text-muted); font-size: 0.92rem; margin-top: 4px; line-height: 1.5; }

/* Steps / gestures */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.03), transparent);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.steps h3 { font-size: 1.05rem; }
.steps p { color: var(--text-muted); font-size: 0.92rem; margin-top: 6px; }

/* CTA banner */
.cta-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  border-radius: 28px;
  padding: 64px 28px;
  border: 1px solid rgb(var(--primary-rgb) / 0.35);
  background:
    radial-gradient(ellipse at top, rgb(var(--primary-rgb) / 0.35), transparent 60%),
    linear-gradient(160deg, #1a1030 0%, #0f0b1a 60%, var(--bg) 100%);
}

.cta-banner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.note a { color: var(--primary); text-decoration: none; font-weight: 500; }
.note a:hover { text-decoration: underline; }

.cta-banner p { color: var(--text-muted); max-width: 34rem; margin: 14px auto 28px; font-size: 1.05rem; }

.note {
  color: var(--text-faint);
  font-size: 0.88rem;
  text-align: center;
  max-width: 40rem;
  margin: 28px auto 0;
}

/* ---------- FAQ ---------- */

.faq { max-width: 780px; margin: 0 auto; }

.faq-group + .faq-group { margin-top: 44px; }

.faq-group h2 {
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s;
}

.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }

.faq summary:hover { color: #fff; }

.faq .answer {
  color: var(--text-muted);
  padding: 0 4px 22px;
}

.faq .answer p + p { margin-top: 10px; }
.faq .answer ul { margin: 10px 0 0; padding-left: 1.3em; }
.faq .answer li::marker { color: var(--primary); }
.faq .answer a { color: var(--primary); }



/* ---------- Legal / prose ---------- */

.prose {
  max-width: 760px;
  margin: 0 auto;
  color: #d4d4d8;
}

.prose h2 {
  font-size: 1.45rem;
  color: var(--text);
  margin: 48px 0 14px;
  scroll-margin-top: 88px;
}

.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 1.3em; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--primary); }
.prose strong { color: var(--text); }
.prose a { color: var(--primary); }

.summary-callout {
  max-width: 760px;
  margin: 0 auto 40px;
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid rgb(var(--primary-rgb) / 0.35);
  background: rgb(var(--primary-rgb) / 0.07);
  color: #d4d4d8;
}

.summary-callout strong { color: var(--primary); }
.summary-callout p { margin-top: 8px; }

.toc {
  max-width: 760px;
  margin: 0 auto 40px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-raised);
}

.toc h2 {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.toc ol {
  margin: 0;
  padding-left: 1.4em;
  columns: 2;
  column-gap: 32px;
  font-size: 0.93rem;
}

.toc a { color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: var(--text); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer .brand { font-size: 1rem; }
.site-footer .brand img { width: 28px; height: 28px; border-radius: 7px; box-shadow: none; }

.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.site-footer nav a:hover { color: var(--text); }

.footer-meta {
  width: 100%;
  color: var(--text-faint);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .badge .dot { animation: none; }
  .btn { transition: none; }
}

/* ---------- Responsive ---------- */

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

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .hero { padding: 72px 0 72px; }
  .hero-icon { width: 92px; height: 92px; border-radius: 22px; }
  .section { padding: 56px 0; }
  .card { padding: 24px; }
}

@media (max-width: 600px) {
  .site-header .container { height: 58px; }
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .nav { gap: 0; }
  .nav a { padding: 6px 9px; font-size: 0.9rem; }
  .header-download { display: none; }
  .steps { grid-template-columns: 1fr; }
  .footer-meta { flex-direction: column; }
}

/* ---------- Supernova (Pro app icon) ---------- */

.pro-icon-wrap.supernova img {
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 24px 70px rgb(234 179 8 / 0.45), 0 0 120px rgb(var(--primary-rgb) / 0.25);
}
