/* ===== TOKENS ===== */
:root {
  --bg-0:         #06060F;
  --bg-1:         #0D0D20;
  --bg-2:         #141428;
  --bg-3:         #1E1E3C;
  --border-dim:   #2A2A50;
  --border-teal:  #00D4B8;
  --teal:         #00D4B8;
  --teal-glow:    rgba(0, 212, 184, 0.22);
  --ember:        #FF8040;
  --ember-glow:   rgba(255, 128, 64, 0.20);
  --text-strong:  #EAEAF4;
  --text-body:    #B4B4CC;
  --text-muted:   #6A6A94;
  --header-h:     52px;
  --radius-sm:    4px;
  --radius-md:    8px;
}

/* ===== RESET / BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-0);
  color: var(--text-body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-strong);
  line-height: 1.2;
}
h1 { font-size: clamp(1.75rem, 6vw, 3rem); }
h2 { font-size: clamp(1.25rem, 4vw, 2rem); }
h3 { font-size: 1rem; letter-spacing: 0.08em; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.section-eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.6rem;
}

/* ===== STICKY HEADER ===== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(6, 6, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 100;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.header-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); }
.header-name {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-strong);
}
#site-header nav { display: none; gap: 1.75rem; }
#site-header nav a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 150ms ease;
}
#site-header nav a:hover { color: var(--teal); }
@media (min-width: 768px) {
  #site-header { padding: 0 2rem; }
  #site-header nav { display: flex; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
  position: relative;
  min-height: 44px;
  min-width: 44px;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
/* Google Play — neon teal outline */
.btn-play {
  background: rgba(0, 212, 184, 0.08);
  border-color: var(--teal);
  color: var(--teal);
}
.btn-play:hover {
  background: rgba(0, 212, 184, 0.16);
  box-shadow: 0 0 18px var(--teal-glow), 0 0 6px var(--teal-glow);
  text-decoration: none;
}
.btn-play:active { background: rgba(0, 212, 184, 0.25); }
/* corner spark */
.btn-play::after, .btn-appstore::after {
  content: "✦";
  position: absolute;
  top: -7px; right: -7px;
  font-size: 0.65rem;
  color: var(--teal);
  line-height: 1;
  background: var(--bg-0);
  padding: 1px 2px;
}
/* App Store disabled */
.btn-appstore {
  background: #2A2A2A;
  border-color: #404040;
  color: #D0D0D0;
  opacity: 0.55;
  filter: grayscale(0.6);
  cursor: not-allowed;
}
.btn-appstore::after { color: #808080; }
/* small header CTA */
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.75rem; }
.btn-outline {
  background: transparent;
  border-color: var(--border-teal);
  color: var(--teal);
}
.btn-outline:hover { background: rgba(0,212,184,0.08); text-decoration: none; }

/* store button inner layout */
.store-btn-inner { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.store-btn-sub { font-size: 0.65rem; letter-spacing: 0.05em; opacity: 0.8; }
.store-btn-name { font-size: 0.95rem; font-weight: 700; }

/* ===== HERO ===== */
#hero {
  padding: calc(var(--header-h) + 3rem) 0 3rem;
  background:
    radial-gradient(ellipse 70% 50% at 80% 40%, rgba(0,212,184,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(255,128,64,0.05) 0%, transparent 60%),
    var(--bg-0);
}
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.hero-text { display: flex; flex-direction: column; gap: 1.25rem; }
.hero-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.hero-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-dim);
  box-shadow: 0 0 12px var(--teal-glow);
}
.hero-app-name {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-body);
  max-width: 44ch;
  line-height: 1.7;
}
.hero-divider {
  width: 40px;
  height: 1px;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  opacity: 0.7;
}
.hero-cta-row { display: flex; flex-direction: column; gap: 0.85rem; }
.hero-banner-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-teal);
  box-shadow: 0 0 28px var(--teal-glow), 0 0 8px var(--teal-glow);
}
.hero-banner { width: 100%; display: block; }
@media (min-width: 500px) {
  .hero-cta-row { flex-direction: row; }
}
@media (min-width: 768px) {
  #hero { padding-top: calc(64px + 4rem); padding-bottom: 4.5rem; }
  :root { --header-h: 64px; }
  .hero-inner {
    display: grid;
    grid-template-columns: 55fr 45fr;
    align-items: center;
    gap: 3.5rem;
  }
  .hero-icon { width: 68px; height: 68px; }
}
@media (min-width: 1024px) {
  .hero-inner { gap: 5rem; }
}

/* ===== FEATURES ===== */
#features {
  padding: 5rem 0;
  background: var(--bg-1);
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header p {
  max-width: 52ch;
  margin: 0.75rem auto 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}
.feature-card:hover {
  border-color: var(--teal);
  box-shadow: 0 0 16px var(--teal-glow);
  background: var(--bg-3);
}
.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.feature-card h3 {
  color: var(--text-strong);
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}
.feature-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
@media (min-width: 640px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== DOWNLOAD CTA ===== */
#download {
  padding: 5.5rem 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0,212,184,0.07) 0%, transparent 70%),
    var(--bg-0);
  text-align: center;
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
}
#download h2 { font-size: clamp(1.4rem, 5vw, 2.4rem); margin-bottom: 0.75rem; }
#download .section-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 48ch;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.download-btn-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 420px) { .download-btn-row { flex-direction: row; justify-content: center; } }

/* ===== ABOUT ===== */
#about {
  padding: 5rem 0;
  background: var(--bg-1);
}
.about-inner {
  max-width: 680px;
  margin: 0 auto;
}
.about-inner h2 { margin-bottom: 1.25rem; }
.about-inner p { color: var(--text-body); line-height: 1.8; margin-bottom: 1rem; }
.about-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--teal);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-0);
  border-top: 1px solid var(--border-dim);
  padding: 2.5rem 1.25rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  opacity: 0.85;
}
.footer-brand span {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.footer-links a { font-size: 0.8rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--teal); }
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ===== STICKY MOBILE BOTTOM CTA ===== */
#sticky-bottom-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(13, 13, 32, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-dim);
  padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  z-index: 90;
  transform: translateY(100%);
  transition: transform 300ms ease;
}
#sticky-bottom-cta.is-visible { transform: translateY(0); }
.sticky-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.sticky-label strong { color: var(--text-strong); display: block; font-size: 0.85rem; }
.sticky-cta-btn { flex-shrink: 0; padding: 0.55rem 1.1rem; }
@media (min-width: 768px) { #sticky-bottom-cta { display: none !important; } }
/* ensure last section clears the sticky bar on mobile */
footer { padding-bottom: calc(2.5rem + 90px); }
@media (min-width: 768px) { footer { padding-bottom: 2.5rem; } }

/* ===== SCROLL REVEAL (neon flicker blur fade-in) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(18px);
    transition: opacity 550ms ease, filter 550ms ease, transform 550ms ease;
  }
  .reveal.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}
