/* ============================================================
   GUITAR MENTOR — Marketing site base styles (LIGHT theme)
   White canvas, soft pastel washes, PlugAI gradient accents.
   Phone screens stay dark (scoped in phone.css).
   ============================================================ */

:root {
  /* Surfaces (light) */
  --bg:            #FFFFFF;
  --bg-2:          #FAF9FE;
  --surface:       #FFFFFF;
  --surface-2:     #F5F3FC;
  --surface-3:     #ECEAF7;
  --hairline:      rgba(20,16,40,0.08);
  --hairline-2:    rgba(20,16,40,0.14);

  /* Text (dark on light) */
  --text:          #16121F;
  --text-2:        #565070;
  --text-3:        #6F6987;
  --text-on-accent:#0B0B0E;

  /* Brand */
  --violet:        #6B5BFF;
  --violet-deep:   #5A48E6;
  --cyan:          #0FA9CE;
  --pink:          #F0468C;
  --purple:        #A24BFF;
  --sky:           #2BB8E0;
  --amber:         #E08A1E;
  --emerald:       #10A969;
  --rose:          #F0466A;

  /* PlugAI signature gradient (fills) */
  --plug-grad: linear-gradient(110deg, #FF6FB5 0%, #C77DFF 48%, #5DDDFF 100%);
  /* Deeper gradient for TEXT on white (enough contrast) */
  --plug-grad-text: linear-gradient(110deg, #F0468C 0%, #A24BFF 50%, #0FA9CE 100%);
  --plug-grad-soft: linear-gradient(110deg, rgba(240,70,140,0.10), rgba(162,75,255,0.09), rgba(15,169,206,0.08));
  --violet-cyan: linear-gradient(120deg, #6B5BFF 0%, #0FA9CE 100%);

  /* Feature accents */
  --feat-chords-a: #0FA9CE; --feat-chords-b: #12A88E;
  --feat-rhythm-a: #F08A1E; --feat-rhythm-b: #E0A91E;
  --feat-ear-a:    #8B5CF6; --feat-ear-b:    #A855F7;
  --feat-songs-a:  #F0468C; --feat-songs-b:  #F0466A;

  /* Type */
  --font-display: 'Clash Display', 'General Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ui:      'General Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Radii */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px; --r-pill: 999px;

  /* Motion — exponential ease-out (no bounce) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Layout */
  --maxw: 1180px;
  --nav-h: 68px;

  /* Shadows / glows */
  --shadow-sm: 0 2px 10px -4px rgba(20,16,40,0.12);
  --shadow-lg: 0 30px 70px -24px rgba(20,16,40,0.28);
  --shadow-phone: 0 40px 90px -30px rgba(60,40,120,0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 18px); }

/* Keyboard focus: visible ring on interactive elements, hidden for mouse/touch */
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible, .btn-app:focus-visible, .plug-badge:focus-visible,
.nav-links a:focus-visible, .footer-links a:focus-visible { outline-offset: 4px; }

/* Visually-hidden (screen-reader only) */
.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;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: rgba(162,75,255,0.18); color: var(--text); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; color: var(--text); }

.display {
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -0.03em; }
.h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.35rem); color: var(--text-2); line-height: 1.5; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}
.mono { font-family: var(--font-mono); }

/* Tabular figures so numbers don't jitter (counters, prices, stats) */
.counter-num, .amt, [data-countup], .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* Gradient text — solid fallback first so text never goes invisible
   on engines without background-clip:text support */
.grad-text { color: var(--purple); }
.grad-text-vc { color: var(--violet); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad-text {
    background: var(--plug-grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .grad-text-vc {
    background: var(--violet-cyan);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: clamp(72px, 11vw, 150px) 0; position: relative; }
.section-tight { padding: clamp(48px, 7vw, 90px) 0; }
.center { text-align: center; }
.muted { color: var(--text-2); }

/* ---------- Aurora background (light pastel) ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; background: var(--bg); }
.aurora::before, .aurora::after {
  content: ''; position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: 0.5;
}
.aurora::before {
  width: 55vw; height: 55vw; top: -16vw; left: -6vw;
  background: radial-gradient(circle, rgba(162,75,255,0.18), transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.aurora::after {
  width: 48vw; height: 48vw; top: 4vw; right: -12vw;
  background: radial-gradient(circle, rgba(15,169,206,0.16), transparent 65%);
  animation: drift2 30s ease-in-out infinite alternate;
}
.aurora-pink {
  position: absolute; width: 42vw; height: 42vw; bottom: -14vw; left: 30vw;
  background: radial-gradient(circle, rgba(240,70,140,0.12), transparent 65%);
  filter: blur(100px); border-radius: 50%;
  animation: drift3 32s ease-in-out infinite alternate;
}
.grain { display: none; }

@keyframes drift1 { to { transform: translate(7vw, 5vw) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-5vw, 7vw) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-9vw, -3vw) scale(1.2); } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  /* don't transition backdrop-filter — re-rasterising the blur every frame jitters on mobile */
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s;
  border-bottom: 1px solid transparent;
  /* promote to its own compositor layer so scrolling/animations behind it don't repaint the bar */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.nav.scrolled {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 4px 24px -16px rgba(20,16,40,0.3);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.02em; color: var(--text); }
.brand img { width: 32px; height: 32px; filter: drop-shadow(0 2px 8px rgba(162,75,255,0.3)); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 0.94rem; color: var(--text-2); padding: 8px 14px; border-radius: var(--r-pill);
  transition: color 0.2s, background 0.2s; font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: rgba(20,16,40,0.05); }
.nav-links a.active { color: var(--violet); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 12px; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); position: relative; transition: 0.25s; }
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: var(--text); transition: 0.25s; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: var(--r-pill); font-weight: 600; font-size: 0.96rem;
  transition: transform 0.22s var(--ease), box-shadow 0.3s var(--ease), background 0.25s; white-space: nowrap;
  font-family: var(--font-ui);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--plug-grad); color: #1a0b2e; box-shadow: 0 10px 30px -8px rgba(199,125,255,0.55); }
.btn-primary:hover { box-shadow: 0 16px 44px -10px rgba(199,125,255,0.7); transform: translateY(-2px); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--hairline-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-lg { padding: 16px 30px; font-size: 1.02rem; }

/* App Store badge — deep brand violet pill */
.btn-app {
  display: inline-flex; align-items: center; gap: 11px; padding: 10px 20px;
  border-radius: 13px; background: linear-gradient(135deg, #6B5BFF 0%, #5A48E6 60%, #4733C7 100%); color: #fff; font-weight: 500;
  transition: transform 0.18s, box-shadow 0.25s; border: none;
  box-shadow: 0 8px 22px -10px rgba(90,72,230,0.6);
}
.btn-app:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px rgba(90,72,230,0.7); }
.btn-app .apple { width: 22px; height: 26px; flex-shrink: 0; }
.btn-app .lbl { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.btn-app .lbl small { font-size: 0.6rem; font-weight: 400; letter-spacing: 0.02em; opacity: 0.92; margin-bottom: 3px; }
.btn-app .lbl strong { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; }
/* Google Play badge — graphite pill with Android green icon */
.btn-app.btn-android { background: linear-gradient(135deg, #2B2D33 0%, #1F2024 100%); box-shadow: 0 8px 22px -10px rgba(20,22,28,0.55); }
.btn-app.btn-android:hover { box-shadow: 0 16px 38px -12px rgba(20,22,28,0.65); }
.btn-app .droid { width: 22px; height: 22px; flex-shrink: 0; color: #3DDC84; }

/* App-review-pending note */
.review-note { display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: var(--r-pill);
  background: rgba(240,138,30,0.1); border: 1px solid rgba(240,138,30,0.32); color: #b8721a; font-size: 0.84rem; font-weight: 500; }
.review-note .rd { width: 8px; height: 8px; border-radius: 50%; background: #F08A1E; box-shadow: 0 0 10px rgba(240,138,30,0.7); flex-shrink: 0; animation: livepulse 2.2s ease-out infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(240,138,30,0.5); } 100% { box-shadow: 0 0 0 10px rgba(240,138,30,0); } }
.footer-bottom .review-note { font-size: 0.8rem; }

/* ---------- PlugAI badge ---------- */
.plug-badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px 7px 9px;
  border-radius: var(--r-pill); background: var(--surface);
  border: 1px solid var(--hairline-2); font-size: 0.82rem; font-weight: 500;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s; color: var(--text); box-shadow: var(--shadow-sm);
}
.plug-badge:hover { border-color: rgba(162,75,255,0.5); box-shadow: 0 8px 26px -10px rgba(162,75,255,0.4); transform: translateY(-1px); }
.plug-badge img { width: 22px; height: 22px; }
.plug-badge .grad-text { font-weight: 600; }

/* ---------- Chips / pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--hairline); font-size: 0.82rem; color: var(--text-2); font-weight: 500; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 28px;
  transition: transform 0.32s var(--ease), border-color 0.3s, box-shadow 0.32s var(--ease);
  box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-4px); border-color: var(--hairline-2); box-shadow: var(--shadow-lg); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding: 64px 0 40px; margin-top: 40px; position: relative; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h5 { font-family: var(--font-ui); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; font-weight: 600; }
.footer-links { display: flex; flex-direction: column; gap: 11px; }
.footer-links a { color: var(--text-2); font-size: 0.94rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--violet); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 54px; padding-top: 28px; border-top: 1px solid var(--hairline); color: var(--text-3); font-size: 0.86rem; flex-wrap: wrap; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.in { opacity: 1; transform: none; transition: transform 0.75s cubic-bezier(0.16,1,0.3,1); }
.js .reveal.in[data-delay="1"] { transition-delay: 0.07s; }
.js .reveal.in[data-delay="2"] { transition-delay: 0.14s; }
.js .reveal.in[data-delay="3"] { transition-delay: 0.21s; }
.js .reveal.in[data-delay="4"] { transition-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .js .reveal, .js .reveal.in { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  /* Phones: swap the live backdrop-blur for a near-solid bar — the blur repaints
     every scroll frame over the aurora + phone demos and causes visible jitter. */
  .nav.scrolled {
    background: rgba(255,255,255,0.94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav-links, .nav-cta .btn-app { display: none; }
  .nav-toggle { display: flex; }
  .nav-menu-open .nav-links {
    display: flex; flex-direction: column; position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(20px); padding: 16px 24px 28px; gap: 4px;
    border-bottom: 1px solid var(--hairline); box-shadow: var(--shadow-lg);
  }
  .nav-menu-open .nav-links a { padding: 13px 14px; font-size: 1.05rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}
