/* ============================================================
   Noise Tuition - landing page styles
   Theme: single dark theme, locked (brand decision)
   Shape system: buttons pill, cards 16px, inputs 10px
   Accent: one accent only (#22C55E)
   ============================================================ */

/* Self-hosted variable fonts (latin subset, straight from Google Fonts v2).
   Keeps the third-party request off the critical path and out of the privacy story. */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/work-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg:            #0F0F23;
  --surface:       #1B1B30;
  --surface-2:     #16162A;
  --border:        rgba(99, 102, 241, 0.22);
  --text:          #F8FAFC;
  --text-muted:    #94A3B8;
  /* Rebrand palette: Soundwave Cyan, deepened for hovers (see maintenance page) */
  --accent:        #0D9CC2;
  --accent-strong: #0B7FA0;
  --on-accent:     #062029;

  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Work Sans", system-ui, sans-serif;

  --radius-card: 16px;
  --radius-input: 10px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 7rem;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 var(--space-2); }

a { color: inherit; }

.container {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.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;
}

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 200ms var(--ease), background-color 200ms var(--ease),
              border-color 200ms var(--ease);
}

.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover { background: var(--accent-strong); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(248, 250, 252, 0.28);
}
.btn-ghost:hover { border-color: rgba(248, 250, 252, 0.6); }

.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.9375rem; }
.btn-block { width: 100%; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 72rem;
  margin-inline: auto;
  padding: 0.9rem clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.brand-mark { width: 42px; height: 32px; object-fit: contain; flex: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.nav-links a:not(.btn) {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 200ms var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--text); }

/* Log in sits apart from the section links, next to the CTA.
   It's a dropdown: parents go to Backstage, schools to the schools portal. */
.login-menu { position: relative; }

.login-menu .nav-login {
  color: var(--text);
  margin-left: 0.75rem;
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 200ms var(--ease);
}
.login-menu .nav-login::-webkit-details-marker { display: none; }

.login-menu .nav-login::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 200ms var(--ease);
}
.login-menu[open] .nav-login::after { transform: rotate(-135deg) translateY(-2px); }

.login-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.7rem);
  min-width: 11rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.4rem;
  display: grid;
  gap: 2px;
  box-shadow: 0 12px 32px rgba(5, 5, 15, 0.5);
  z-index: 20;
}

.login-dropdown a {
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9375rem;
}
.login-dropdown a:hover { background: rgba(248, 250, 252, 0.07); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  padding: 0.4rem;
  cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

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

.hero { padding-block: var(--space-5) var(--space-2); }

/* pull the section after the hero up toward the equalizer */
.hero + .section { padding-top: var(--space-4); }

.hero-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--space-5);
  align-items: center;
}

.hero-copy h1 { max-width: 14ch; }

.hero-sub {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 42ch;
  margin-bottom: var(--space-4);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.hero-visual {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 9 / 11;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* keep faces in frame when the mobile 4:3 crop trims the portrait source */
  object-position: center top;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(30, 27, 75, 0.55), rgba(15, 15, 35, 0.15) 55%, rgba(13, 156, 194, 0.18));
  pointer-events: none;
}

/* Equalizer strip: the logo's bars, live. Bars idle-dance and surge toward the pointer */
.hero-eq { margin-top: var(--space-4); }

.hero-eq canvas {
  display: block;
  width: 100%;
  height: 76px;
}

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

.section { padding-block: var(--space-6); }

.section-alt { background: var(--surface-2); }

.section-head {
  max-width: 46ch;
  margin-bottom: var(--space-5);
}
.section-head p { color: var(--text-muted); margin-bottom: 0; }

/* ---------- Lessons bento ---------- */

/* 5 tiles fill a 3x3 grid exactly: guitar 2x2, drums, vocals, piano, wide 1x2 */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 250px;
  gap: var(--space-2);
}

.tile {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid var(--border);
  isolation: isolate;
}

.tile-lg { grid-column: span 2; grid-row: span 2; }
.tile-wide { grid-column: span 2; }

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) contrast(1.05);
  transition: transform 400ms var(--ease), filter 400ms var(--ease);
  z-index: -1;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(15, 15, 35, 0.2), rgba(15, 15, 35, 0.88) 78%);
}

.tile:hover img { transform: scale(1.04); filter: grayscale(0.1) contrast(1.05); }
.tile-body {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: var(--space-3);
}
.tile-body h3 { margin-bottom: 0.25rem; }
.tile-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: 34ch;
}

/* ---------- How it works ---------- */

.how-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-5);
  align-items: start;
}

.how-intro { position: sticky; top: 6rem; }
.how-intro p { color: var(--text-muted); margin-bottom: 0; }
.how-intro .btn { margin-top: 1.5rem; }

.how-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
  counter-reset: how;
}

.how-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-4);
}

.how-list h3 { margin-bottom: 0.35rem; }
.how-list p { margin: 0; color: var(--text-muted); }

/* Heroicons in a tinted plate above each step heading */
.how-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(13, 156, 194, 0.14);
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.how-icon svg { width: 22px; height: 22px; }

/* ---------- Testimonials ---------- */

.quotes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.quote { margin: 0; }

.quote blockquote { margin: 0 0 var(--space-2); }

.quote blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
}

.quote figcaption {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.quote figcaption span {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
}

/* ---------- Partner schools marquee ---------- */

.partners .section-head { margin-bottom: var(--space-4); }

.partner-marquee {
  overflow: hidden;
  padding-block: var(--space-1);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* One wrapper holds the list twice; animating it by exactly -50% loops seamlessly.
   Plain percentage keyframes only: iOS Safari drops keyframes that use var()/calc(). */
.partner-tracks {
  display: flex;
  width: max-content;
  animation: partner-scroll 45s linear infinite;
  will-change: transform;
}

.partner-track {
  display: flex;
  gap: var(--space-2);
  list-style: none;
  margin: 0 var(--space-2) 0 0;
  padding: 0;
  flex: none;
}

.partner-marquee-reverse .partner-tracks {
  animation-direction: reverse;
  animation-duration: 55s;
}

.partner-track li {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1.2rem 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  white-space: nowrap;
}

/* Each mark sits on a small white plate so dark crests stay legible on the dark chip */
.partner-track li img {
  width: 34px;
  height: 34px;
  flex: none;
  padding: 3px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 999px;
  object-fit: contain;
}

@keyframes partner-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Reduced motion: a finger-scrollable strip instead of an animated one */
@media (prefers-reduced-motion: reduce) {
  .partner-tracks { animation: none; }
  .partner-marquee {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .partner-marquee [aria-hidden="true"] { display: none; }
}

/* ---------- Pricing ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  align-items: stretch;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
}

.price-card-featured { border-color: rgba(13, 156, 194, 0.55); }

.price-flag {
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: var(--space-1);
}

.price {
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.price span {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
  margin-right: 0.35rem;
}

.price-card ul {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: grid;
  gap: 0.6rem;
  color: var(--text-muted);
  flex: 1;
}

.price-card ul li {
  padding-left: 1.5rem;
  position: relative;
}

.price-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.85rem;
  height: 0.5rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- For schools ---------- */

/* Same brand gradient as the closing band, so it reads as a design language, not a one-off */
.schools-band {
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(130% 110% at 85% 100%, rgba(6, 32, 41, 0.45) 0%, rgba(6, 32, 41, 0) 60%),
    linear-gradient(135deg, #0b7fa0 0%, #0c4453 100%);
  border-radius: var(--radius-card);
  padding: clamp(var(--space-4), 6vw, var(--space-5));
}

.schools-band p {
  color: rgba(248, 250, 252, 0.88);
  max-width: 60ch;
  margin-bottom: var(--space-3);
}

.schools-band .btn-ghost { border-color: rgba(248, 250, 252, 0.45); }

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

.faq-wrap { max-width: 46rem; }
.faq-wrap h2 { margin-bottom: var(--space-4); }

.faq-list { display: grid; gap: var(--space-2); }

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-2) var(--space-3);
}

.faq-list summary {
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: 0.35rem;
}

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

.faq-list summary::after {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 250ms var(--ease);
}

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

.faq-list details p {
  margin: var(--space-1) 0 var(--space-1);
  color: var(--text-muted);
}

/* ---------- Booking ---------- */

/* Closing band: the brand gradient from the maintenance page (Soundwave Cyan family) */
.section-book {
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(130% 110% at 85% 100%, rgba(6, 32, 41, 0.45) 0%, rgba(6, 32, 41, 0) 60%),
    linear-gradient(135deg, #0b7fa0 0%, #0c4453 100%);
}

.book-cta {
  text-align: center;
  max-width: 38rem;
}

.book-cta p {
  color: rgba(248, 250, 252, 0.88);
  margin-bottom: var(--space-4);
}

/* White pill on the gradient, matching the maintenance page action */
.section-book .btn-primary {
  background: #ffffff;
  color: #0c4453;
}
.section-book .btn-primary:hover { background: rgba(255, 255, 255, 0.88); }

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

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-5);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: var(--space-4);
  align-items: start;
}

.footer-brand p { color: var(--text-muted); margin: var(--space-2) 0 0; }

.footer-nav { display: grid; gap: 0.6rem; justify-items: start; }

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 200ms var(--ease);
}
.footer-nav a:hover { color: var(--text); }

.footer-contact { text-align: right; }
.footer-contact a { color: var(--text); text-decoration: none; font-weight: 500; }
.footer-contact a:hover { text-decoration: underline; }
.footer-contact p { color: var(--text-muted); font-size: 0.875rem; margin: var(--space-2) 0 0; }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .tile img, .faq-list summary::after { transition: none; }
}

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

@media (max-width: 1024px) {
  /* guitar full-width on top, remaining four tiles form a 2x2 grid */
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .tile-lg { grid-column: span 2; grid-row: span 1; }
  .tile-wide { grid-column: span 1; }
}

@media (max-width: 820px) {
  .hero { padding-block: var(--space-4) var(--space-5); }
  .hero-grid,
  .how-grid,
  .quotes { grid-template-columns: 1fr; }
  /* match the photo's own ratio so nothing is cropped: heads and keys both visible */
  .hero-visual { order: -1; }
  .how-intro { position: static; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 30rem; }
  .price-card-featured { order: -1; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-contact { text-align: left; }
  .section { padding-block: var(--space-5); }

  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--space-2) clamp(1rem, 4vw, 2rem) var(--space-3);
    gap: var(--space-2);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a:not(.btn) { padding-block: 0.4rem; font-size: 1.0625rem; }

  /* In the mobile menu the dropdown expands in place under the Log in row */
  .login-menu .nav-login {
    margin-left: 0;
    padding-block: 0.4rem;
    font-size: 1.0625rem;
  }
  .login-dropdown {
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0 0 0.2rem 1rem;
    gap: 0.3rem;
  }
  .login-dropdown a { padding: 0.3rem 0; }
}

@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
  .tile-lg, .tile-wide { grid-column: span 1; }
  .hero-actions .btn { width: 100%; }
}
