/* ════════════════════════════════════════════════════════════
   global.css — Flash Frog Music
   Brand tokens, reset, typography, and shared utilities.
   Loaded on every page.
   ════════════════════════════════════════════════════════════ */

/* ── Brand color tokens ──────────────────────────────────────
   Source of truth for every color used across the site.
   The app (cloud) should mirror these exactly.
   ─────────────────────────────────────────────────────────── */
:root {
  /* Primary palette */
  --blue:      #1b7dc2;
  --orange:    #f68b29;
  --teal:      #4dd0d8;
  --purple:    #a158ed;
  --gray:      #f5f5f7;   /* Apple Gray — backgrounds, cards */

  /* Neutrals */
  --dark:      #494948;   /* nav bg, footer bg, secondary text */
  --text:      #231f20;   /* primary body copy */
  --text-dark: #1d1d1e;   /* hero & section headings (near-black) */
  --white:     #ffffff;

  /* Semantic aliases */
  --green:     #80b843;   /* Flash Frog band, Add to Cart, carousel arrows */
  --green-hover: #699838;   /* green button hover state */
                          /* intentionally outside primary palette —
                             used for music/teacher-specific CTAs only  */

  /* Nav CTA pill */
  --nav-cta-bg:    #f68b29;
  --nav-cta-hover: #d4731f;

  /* Scroll-button blue — same as --blue; kept as alias for readability */
  --scroll-btn-bg:    #1b7dc2;
  --scroll-btn-hover: #155f96;

  /* Typography */
  --font:         Helvetica, Arial, sans-serif;
  --font-display: Helvetica, Arial, sans-serif;
  --font-body:    Helvetica, Arial, sans-serif;

  /* Font-size scale */
  --fs-nav:        15px;
  --fs-body-sm:    13px;
  --fs-body:       15px;
  --fs-body-md:    17px;
  --fs-body-lg:    22px;
  --fs-label:      12px;
  --fs-heading-sm: 24px;
  --fs-heading-md: clamp(22px, 2.8vw, 40px);
  --fs-heading-lg: clamp(32px, 4vw, 52px);
  --fs-hero:       clamp(36px, 4.8vw, 68px);

  /* Spacing */
  --page-gutter:   70px;
  --page-max:      1440px;
  --section-pad-v: 80px;

  /* Transitions */
  --transition-fast:   0.15s;
  --transition-normal: 0.2s;
  --transition-slow:   0.35s;

  /* Border radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-pill: 33px;
}


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

:focus         { outline: none; }
:focus-visible { outline: none; }


/* ── Base body ───────────────────────────────────────────────── */
html {
  overflow-x: clip;   /* clip doesn't break position:sticky unlike hidden */
  max-width: 100%;
}
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text);
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}


/* ── Anchor scroll offset (sticky nav compensation) ─────────── */
.scroll-target {
  scroll-margin-top: 64px;
}


/* ── Shared section typography ───────────────────────────────── */
.section-eyebrow {
  font-family: var(--font);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: var(--fs-heading-lg);
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-body {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  max-width: 560px;
}


/* ── Scroll-reveal utility ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s ease-out, transform 0.85s ease-out;
}
.reveal.visible  { opacity: 1; transform: none; }
.reveal-delay-1  { transition-delay: 0.1s; }
.reveal-delay-2  { transition-delay: 0.2s; }
.reveal-delay-3  { transition-delay: 0.3s; }


/* ── Shared button styles ────────────────────────────────────── */
.nav-btn-outline {
  font-family: var(--font);
  font-size: var(--fs-nav);
  font-weight: 400;
  color: white;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  padding: 7px 22px;
  white-space: nowrap;
  transition: background var(--transition-fast);
}
.nav-btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: white; }

.nav-btn-orange {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: white;
  text-decoration: none;
  background: var(--nav-cta-bg);
  border-radius: var(--radius-pill);
  padding: 13px 28px;
  white-space: nowrap;
  transition: background var(--transition-fast);
}
.nav-btn-orange:hover { background: var(--nav-cta-hover); color: white; }

/* Accent color utility */
.accent { color: var(--blue); }


/* ── Responsive token overrides ──────────────────────────────── */
@media (max-width: 1080px) {
  :root {
    --page-gutter:   32px;
    --section-pad-v: 64px;
  }
  /* Hide outline button in nav at tablet width */
  #top-nav-band .nav-buttons .nav-btn-outline { display: none; }
}

/* ── iPad mini nav fix (~768-900px): tighten links ── */
@media (max-width: 900px) {
  /* outline button already hidden above */
}

/* ── Hamburger menu ───────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 8px;
  margin-left: auto;
  flex-shrink: 0;
  height: 100%;
  align-self: stretch;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
/* Animate to X when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-mobile-drawer {
  display: none;
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  background: var(--dark);
  z-index: 10002; /* above score-preview-logo (10000) and nav band (10001) */
  flex-direction: column;
  padding: 16px 24px 24px;
  gap: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.nav-mobile-drawer.open { display: flex; }
.nav-mobile-drawer a {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  color: white;
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  opacity: 0.9;
}
.nav-mobile-drawer a:last-child { border-bottom: none; }
.nav-mobile-drawer a:hover { opacity: 1; }
.nav-mobile-drawer .drawer-cta {
  margin-top: 16px;
  background: var(--nav-cta-bg);
  color: white;
  border-radius: 9999px;
  padding: 12px 24px;
  text-align: center;
  border-bottom: none;
  font-size: 16px;
}
.nav-mobile-drawer .drawer-create-acct {
  margin-top: 16px;
  background: transparent;
  color: white;
  border-radius: 9999px;
  padding: 12px 24px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.6);
  font-size: 16px;
}
.nav-mobile-drawer .drawer-create-acct:hover { background: rgba(255,255,255,0.12); }

/* Surface Duo (540px) and phone (480px) — show hamburger */
@media (max-width: 600px) {
  :root {
    --page-gutter:   20px;
    --section-pad-v: 56px;
  }
  .nav-hamburger                 { display: flex; }
  #top-nav-band .nav-links       { display: none; }
  #top-nav-band .nav-buttons     { display: none; }
  /* nav-buttons hidden here, so show Start Free and Create Account in drawer */
  .nav-mobile-drawer .drawer-cta         { display: block; }
  .nav-mobile-drawer .drawer-create-acct { display: block; }
}

/* At tablet sizes where hamburger shows but nav-buttons remain visible:
   hide Start Free and Create Account from drawer to avoid duplication */
@media (min-width: 601px) {
  .nav-mobile-drawer .drawer-cta         { display: none; }
  .nav-mobile-drawer .drawer-create-acct { display: none; }
}

@media (max-width: 480px) {
  :root {
    --page-gutter:   16px;
    --section-pad-v: 48px;
  }
}
