/* ============================================================================
   LyricGlow — marketing site styles
   Neon-glow aesthetic · light/dark themes · GPU-friendly animations
   ============================================================================ */

/* ---- Theme tokens --------------------------------------------------------- */
:root {
  --brand-cyan: #00d6e6;
  --brand-purple: #7c5cff;
  --brand-magenta: #ff4ecd;
  /* light default = bold blue → violet → orange; dark overrides to neon below */
  --brand-grad: linear-gradient(112deg, #1f7bff, #8453ff 46%, #ff7a1f);

  /* light (default) — vibrant blue + orange, high impact */
  --bg: #eef0f8;
  --bg-2: #e3e7f3;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-solid: #ffffff;
  --border: rgba(20, 30, 70, 0.12);
  --text: #0f1119;
  --text-dim: #3c4256;
  --shadow: 0 22px 50px -20px rgba(30, 60, 140, 0.26);
  --glow-opacity: 0.46;
  --blob-1: #4f9dff;   /* blue */
  --blob-2: #ffab57;   /* orange */
  --blob-3: #ab8cff;   /* violet bridge */
  --mark: #1f7bff;     /* blue mark — strong on light */
  --grid-line: rgba(20, 24, 60, 0.05);
}

:root[data-theme="dark"] {
  --brand-grad: linear-gradient(115deg, var(--brand-cyan), var(--brand-purple) 55%, var(--brand-magenta));
  --bg: #07070d;
  --bg-2: #0c0c16;
  --surface: rgba(22, 23, 38, 0.55);
  --surface-solid: #14151f;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f5ff;
  --text-dim: #9aa0c0;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
  --glow-opacity: 0.42;
  --blob-1: var(--brand-cyan);   /* full brand glows read fine on black */
  --blob-2: var(--brand-magenta);
  --blob-3: var(--brand-purple);
  --mark: var(--brand-cyan);
  --grid-line: rgba(255, 255, 255, 0.035);
}

/* ---- Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.container { width: min(1140px, 92vw); margin-inline: auto; }
.section { padding: clamp(4rem, 10vw, 8rem) 0; position: relative; }

.gradient-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1f6fff;
  margin-bottom: 1rem;
}
:root[data-theme="dark"] .eyebrow { color: var(--brand-cyan); }

/* ---- Animated background glow blobs --------------------------------------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-fx::before {
  /* subtle dotted grid */
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--grid-line) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: var(--glow-opacity);
  will-change: transform;
}
.blob.b1 { width: 42vw; height: 42vw; left: -12vw; top: -10vw; background: var(--blob-1); animation: float1 22s ease-in-out infinite; }
.blob.b2 { width: 36vw; height: 36vw; right: -10vw; top: 8vh; background: var(--blob-2); animation: float2 26s ease-in-out infinite; }
.blob.b3 { width: 34vw; height: 34vw; left: 26vw; bottom: -14vw; background: var(--blob-3); animation: float3 30s ease-in-out infinite; }

@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6vw, 5vh) scale(1.1); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-5vw, 7vh) scale(1.15); } }
@keyframes float3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4vw, -6vh) scale(1.08); } }

/* ---- Nav ------------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}
/* background + blur + border only appear once you scroll */
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.15rem; font-family: "Space Grotesk", sans-serif; }
.brand .logo { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a.navlink { color: var(--text-dim); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a.navlink:hover { color: var(--text); }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--text);
  transition: transform 0.3s, background 0.3s, border-color 0.3s;
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.05); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.4rem; border-radius: 14px; font-weight: 600; font-size: 0.98rem;
  cursor: pointer; border: 1px solid transparent; transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--brand-purple) 70%, transparent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -10px color-mix(in srgb, var(--brand-purple) 85%, transparent); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); backdrop-filter: blur(8px); }
.btn-ghost:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand-cyan) 50%, var(--border)); }
/* official-style store badges */
.btn-store { position: relative; background: #0b0b10; color: #fff; border-color: rgba(255,255,255,0.16); box-shadow: var(--shadow); padding: 0.65rem 1.25rem; gap: 0.7rem; }
.btn-store:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.32); }
.btn-store svg { width: 26px; height: 26px; flex: none; }
.btn-store.appstore.disabled { opacity: 0.82; }
.btn-store.appstore.disabled:hover { transform: none; border-color: rgba(255,255,255,0.16); }
/* official downloaded store badges (images) */
.store-badge { display: inline-flex; position: relative; transition: transform 0.2s ease; will-change: transform; }
.store-badge img { display: block; width: auto; height: 56px; }
.store-badge.appstore-soon img { height: 40px; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge.appstore-soon { opacity: 0.85; cursor: not-allowed; }
.store-badge.appstore-soon:hover { transform: none; }

.coming-tag {
  position: absolute; top: -12px; right: -10px;
  background: linear-gradient(120deg, var(--brand-purple), var(--brand-magenta));
  color: #fff; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.01em;
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 6px 18px -5px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.btn .store-sub { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.12; }
.btn .store-sub small { font-size: 0.62rem; opacity: 0.92; font-weight: 500; letter-spacing: 0.04em; }
.btn .store-sub b { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.btn.disabled { opacity: 0.62; cursor: not-allowed; }
.btn.disabled:hover { transform: none; }

/* ---- Hero ----------------------------------------------------------------- */
.hero { padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: 1.3rem; }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--text-dim); max-width: 34ch; margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hero-note { margin-top: 1.4rem; font-size: 0.85rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.5rem; }
/* mini LyricGlow lyric-line mark with an outward-radiating ring pulse */
.glow-mark-wrap { position: relative; display: inline-flex; flex: none; }
.glow-mark-wrap::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px;
  transform: translate(-50%, -50%); border-radius: 50%;
  animation: pulseRing 2.2s ease-out infinite;
}
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mark) 75%, transparent); }
  70% { box-shadow: 0 0 0 15px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.glow-mark { position: relative; z-index: 1; width: 22px; height: 22px; color: var(--mark); }
.glow-mark path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; opacity: 0.55; }
.glow-mark .gm-on { stroke-width: 3; opacity: 1; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--mark) 70%, transparent)); }

/* ---- Phone mockup --------------------------------------------------------- */
.phone-wrap { display: grid; place-items: center; }
.phone {
  position: relative;
  width: 290px; aspect-ratio: 9 / 19.5;
  border-radius: 42px;
  background: #05060a;
  border: 9px solid #1b1c26;
  box-shadow: var(--shadow), 0 0 80px -20px color-mix(in srgb, var(--brand-purple) 60%, transparent);
  overflow: hidden;
  animation: phoneFloat 7s ease-in-out infinite;
  will-change: transform;
}
@keyframes phoneFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
.phone .notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 46%; height: 22px; background: #0a0a10; border-radius: 0 0 14px 14px; z-index: 3; }
.aod { position: absolute; inset: 0; padding: 44px 22px 26px; display: flex; flex-direction: column; color: #fff; }
.aod .lyrics { display: flex; flex-direction: column; gap: 14px; text-align: center; margin: auto 0; transition: opacity 0.45s ease; }
.aod .lyrics.switching { opacity: 0; }
.aod .line { font-size: 0.82rem; color: rgba(255,255,255,0.42); transition: color 0.4s; }
.aod .line.active { font-size: 1.18rem; font-weight: 800; letter-spacing: -0.01em; }
.aod .line.active .w { color: rgba(255,255,255,0.5); transition: color 0.25s; }
/* word-by-word neon highlight loop (per-word delay set in script.js) */
.aod .line.active .w { animation: wordGlow 6s linear infinite; }
@keyframes wordGlow {
  0%, 6% { color: rgba(255,255,255,0.5); text-shadow: none; }
  10%, 78% { color: var(--brand-cyan); text-shadow: 0 0 14px color-mix(in srgb, var(--brand-cyan) 70%, transparent); }
  100% { color: rgba(255,255,255,0.5); text-shadow: none; }
}
.aod .nowplaying { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.66rem; letter-spacing: 0.14em; color: var(--brand-cyan); opacity: 0.8; text-transform: uppercase; font-weight: 600; }

/* tap-to-preview full-screen (mobile only) */
.phone-hint, .close-hint { display: none; }
@media (max-width: 900px) {
  .phone { cursor: pointer; }
  .phone-hint {
    display: block; text-align: center; margin-top: 1rem;
    font-size: 0.82rem; color: var(--text-dim); font-weight: 500;
  }
  body.phone-expanded { overflow: hidden; }
  body.phone-expanded .phone-hint { visibility: hidden; }

  .phone.expanded {
    position: fixed; inset: 0; z-index: 300;
    width: 100vw; height: 100dvh; max-width: none;
    aspect-ratio: auto; border: none; border-radius: 0; box-shadow: none;
    animation: phoneExpand 0.3s ease forwards;
  }
  @keyframes phoneExpand { from { opacity: 0.5; transform: scale(0.95); } to { opacity: 1; transform: none; } }
  .phone.expanded .notch { display: none; }
  .phone.expanded .aod { padding: 10vh 7vw; }
  .phone.expanded .aod .lyrics { gap: 3.4vh; }
  .phone.expanded .aod .line { font-size: clamp(1rem, 4.4vw, 1.4rem); }
  .phone.expanded .aod .line.active { font-size: clamp(1.5rem, 6.8vw, 2.3rem); line-height: 1.2; }
  .phone.expanded .aod .nowplaying { font-size: 0.8rem; }
  .phone.expanded .close-hint {
    display: block; position: absolute; left: 0; right: 0; bottom: 3vh;
    text-align: center; font-size: 0.78rem; letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.42);
  }
}

/* ---- Feature cards -------------------------------------------------------- */
.section-head { text-align: center; max-width: 42ch; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 1rem; }
.section-head p { color: var(--text-dim); font-size: 1.08rem; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.8rem;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), border-color 0.35s, box-shadow 0.35s;
  will-change: transform;
}
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--brand-cyan) 45%, var(--border)); box-shadow: var(--shadow); }
.card .icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem; background: color-mix(in srgb, var(--brand-purple) 16%, transparent); color: var(--brand-purple); }
:root[data-theme="dark"] .card .icon { color: var(--brand-cyan); background: color-mix(in srgb, var(--brand-cyan) 14%, transparent); }
.card .icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.card p { color: var(--text-dim); font-size: 0.96rem; }

/* ---- How it works --------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: step; }
.step { position: relative; padding: 1.8rem; border-radius: 22px; border: 1px solid var(--border); background: var(--surface); }
.step .num { font-family: "Space Grotesk", sans-serif; font-size: 2.6rem; font-weight: 700; line-height: 1; margin-bottom: 0.8rem; }
.step h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.step p { color: var(--text-dim); font-size: 0.95rem; }

/* ---- CTA ------------------------------------------------------------------ */
.cta {
  text-align: center;
  border-radius: 32px;
  padding: clamp(2.5rem, 6vw, 5rem) 1.5rem;
  background:
    radial-gradient(circle at 30% 0%, color-mix(in srgb, var(--brand-purple) 15%, transparent), transparent 55%),
    radial-gradient(circle at 80% 100%, color-mix(in srgb, var(--brand-cyan) 12%, transparent), transparent 50%),
    var(--surface-solid);
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
.cta p { color: var(--text-dim); max-width: 46ch; margin: 0 auto 2rem; }
.cta .hero-cta { justify-content: center; }

/* ---- Footer --------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding: 3rem 0 2.5rem; margin-top: 2rem; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; }
.footer .brand { margin-bottom: 0.6rem; }
.footer p.tag { color: var(--text-dim); font-size: 0.9rem; max-width: 30ch; }
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 0.9rem; }
.footer-col a { display: block; color: var(--text); opacity: 0.78; margin-bottom: 0.55rem; font-size: 0.95rem; transition: opacity 0.2s, color 0.2s; }
.footer-col a:hover { opacity: 1; color: var(--brand-purple); }
:root[data-theme="dark"] .footer-col a:hover { color: var(--brand-cyan); }
.footer-bottom { margin-top: 2.5rem; text-align: center; color: var(--text-dim); font-size: 0.85rem; }

/* ---- Legal pages ---------------------------------------------------------- */
.legal { max-width: 760px; margin-inline: auto; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.5rem; }
.legal .updated { color: var(--text-dim); margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.4rem; margin: 2.2rem 0 0.7rem; }
.legal p, .legal li { color: var(--text-dim); margin-bottom: 0.8rem; }
.legal ul { padding-left: 1.3rem; }
.legal a { color: var(--brand-purple); }
:root[data-theme="dark"] .legal a { color: var(--brand-cyan); }
.legal .back { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 2rem; color: var(--text-dim); font-weight: 500; }
.legal .back:hover { color: var(--text); }

/* ---- Scroll reveal -------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-cta, .hero-note { justify-content: center; }
  .hero-note { flex-direction: column; gap: 0.55rem; } /* mark centered above the wrapping text */
  .phone-wrap { order: -1; margin-bottom: 1.5rem; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav-links .navlink { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
  .btn { padding: 0.8rem 1.1rem; }
}

/* ---- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .aod .line.active .w { color: var(--brand-cyan); }
}
