/* ============================================================
   MusicOfEveryone — Homepage Styles
   ============================================================ */

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

:root {
  --green-dark: #215c3f;
  --green: #2d7b51;
  --green-soft: #eaf6ef;
  --green-accent: #6dbb8c;
  --blue: #5d88f2;
  --purple: #8a6ce8;
  --text-dark: #203229;
  --text-mid: #6c7a72;
  --white: #ffffff;
  --bg-soft: #f8fbf8;
  --border: #e2ece5;
  --shadow: 0 18px 44px rgba(32, 50, 41, 0.08);
  --radius: 28px;
  --radius-md: 22px;
  --radius-sm: 18px;
  --font-main: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background: var(--bg-soft);
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: .96rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--green);
  border-color: var(--green);
}

.btn-outline-dark {
  background: var(--white);
  color: var(--text-dark);
  border-color: #d5e3d9;
}

.btn-outline-dark:hover {
  border-color: var(--green-dark);
  color: var(--green-dark);
}

#header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 236, 229, 0.9);
}

#header.scrolled {
  box-shadow: 0 12px 32px rgba(32, 50, 41, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(180deg, #68bb84 0%, var(--green-dark) 100%);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  box-shadow: 0 12px 22px rgba(45, 123, 81, 0.25);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text strong {
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--green-dark);
}

.logo-text small {
  margin-top: 4px;
  font-size: .7rem;
  letter-spacing: .28em;
  color: #909b94;
}

nav { position: relative; }
nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

nav a {
  position: relative;
  padding: 8px 0;
  color: var(--text-dark);
  font-size: .96rem;
  font-weight: 600;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--green-dark);
  transition: width .2s ease;
}

nav a:hover,
nav a.active { color: var(--green-dark); }
nav a:hover::after,
nav a.active::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-dark);
}

#hero {
  padding: 32px 0 120px;
  background:
    radial-gradient(circle at 18% 20%, rgba(105, 192, 132, 0.18), transparent 24%),
    radial-gradient(circle at 82% 26%, rgba(161, 138, 237, 0.18), transparent 22%),
    linear-gradient(135deg, #f8fff8 0%, #eef8f0 52%, #f4efff 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}

.hero-copy h1 {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: clamp(2.8rem, 6vw, 5.15rem);
  line-height: .96;
  letter-spacing: -.04em;
  color: var(--green-dark);
  text-transform: uppercase;
}

.hero-copy p {
  max-width: 480px;
  margin-top: 26px;
  color: var(--text-mid);
  font-size: 1.1rem;
}

.hero-cta { margin-top: 28px; }

.hero-showcase {
  position: relative;
  min-height: 520px;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.hero-orb-green {
  width: 300px;
  height: 300px;
  top: 90px;
  left: 60px;
  background: radial-gradient(circle, rgba(164, 225, 184, 0.9) 0%, rgba(164, 225, 184, 0.18) 68%, transparent 100%);
}

.hero-orb-purple {
  width: 230px;
  height: 230px;
  right: 12px;
  top: 110px;
  background: radial-gradient(circle, rgba(202, 183, 255, 0.75) 0%, rgba(202, 183, 255, 0.12) 70%, transparent 100%);
}

.floating-note {
  position: absolute;
  font-size: 2rem;
  color: rgba(45, 123, 81, 0.55);
  animation: floatNote 4.8s ease-in-out infinite;
}

.note-one { top: 52px; left: 96px; }
.note-two { top: 104px; right: 124px; animation-delay: .7s; }
.note-three { top: 280px; right: 34px; animation-delay: 1.4s; }

.hero-character {
  position: absolute;
  bottom: 0;
  width: 180px;
  border-radius: 36px;
  padding: 26px 18px 18px;
  box-shadow: var(--shadow);
  color: var(--white);
  overflow: hidden;
}

.hero-character::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 50%;
  width: 72px;
  height: 72px;
  margin-left: -36px;
  border-radius: 50%;
  background: #ffdbbe;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.15);
}

.hero-character::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 86px;
  width: 120px;
  height: 168px;
  margin-left: -60px;
  border-radius: 34px 34px 24px 24px;
  background: rgba(255, 255, 255, 0.24);
}

.character-badge,
.character-caption {
  position: relative;
  z-index: 2;
  display: inline-flex;
}

.character-badge {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: .78rem;
  font-weight: 700;
}

.character-caption {
  margin-top: 230px;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.4;
}

.hero-guitar {
  left: 36px;
  height: 350px;
  background: linear-gradient(180deg, #ffb44f 0%, #f08538 100%);
}

.hero-guitar::after {
  background:
    linear-gradient(180deg, rgba(255, 197, 116, 0.95) 0%, rgba(217, 101, 36, 0.95) 100%);
}

.hero-guitar .character-badge::after {
  content: '🎸';
  margin-left: 8px;
}

.hero-keyboard {
  left: 206px;
  height: 392px;
  background: linear-gradient(180deg, #ffb9d6 0%, #ff88b4 100%);
  z-index: 2;
}

.hero-keyboard::after {
  background:
    linear-gradient(180deg, rgba(255, 217, 233, 0.95) 0%, rgba(239, 112, 161, 0.96) 100%);
}

.hero-keyboard .character-badge::after {
  content: '🎹';
  margin-left: 8px;
}

.hero-laptop {
  right: 56px;
  height: 366px;
  background: linear-gradient(180deg, #53565d 0%, #1d2025 100%);
}

.hero-laptop::after {
  background:
    linear-gradient(180deg, rgba(101, 106, 118, 0.96) 0%, rgba(26, 29, 35, 0.98) 100%);
}

.hero-laptop .character-badge::after {
  content: '💻';
  margin-left: 8px;
}

#levels {
  padding: 0 0 36px;
  margin-top: -74px;
  position: relative;
  z-index: 3;
}

.levels-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.level-pill {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.level-circle {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: .96rem;
  font-weight: 800;
  text-align: center;
  flex-shrink: 0;
}

.level-copy strong {
  display: block;
  font-size: 1rem;
  color: var(--text-dark);
}

.level-copy span {
  display: block;
  margin-top: 4px;
  color: var(--text-mid);
  font-size: .93rem;
}

.level-green .level-circle { background: var(--green-dark); }
.level-blue .level-circle { background: var(--blue); }
.level-purple .level-circle { background: var(--purple); }

#features {
  padding-top: 28px;
}

.info-panels-section {
  padding-top: 10px;
  padding-bottom: 26px;
}

.info-panels-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.info-panel-card {
  padding: 22px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(32, 50, 41, 0.05);
  scroll-margin-top: 112px;
}

.info-panel-label {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: .78rem;
  font-weight: 700;
}

.info-panel-card h2 {
  margin-top: 14px;
  font-size: 1rem;
  line-height: 1.4;
}

.info-panel-card p {
  margin-top: 10px;
  color: var(--text-mid);
  font-size: .92rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  padding: 24px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(32, 50, 41, 0.05);
}

.feature-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 1.6rem;
}

.feature-card h2 {
  margin-top: 18px;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text-dark);
}

.feature-card p {
  margin-top: 10px;
  color: var(--text-mid);
  font-size: .92rem;
}

#courses {
  padding-top: 36px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-title-inline {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--green-dark);
  line-height: 1.2;
}

.section-link {
  color: var(--green-dark);
  font-weight: 700;
  white-space: nowrap;
}

.section-link:hover {
  color: var(--green);
}

.featured-courses-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.featured-course-card {
  position: relative;
  min-height: 360px;
  padding: 22px;
  border-radius: 30px;
  overflow: hidden;
  color: var(--white);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.featured-course-card::before,
.featured-course-card::after {
  content: '';
  position: absolute;
  z-index: 0;
}

.featured-course-card::before {
  width: 88px;
  height: 88px;
  top: 42px;
  left: 50%;
  margin-left: -44px;
  border-radius: 50%;
  background: #ffddc1;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.13);
}

.featured-course-card::after {
  width: 166px;
  height: 240px;
  left: 50%;
  top: 96px;
  margin-left: -83px;
  border-radius: 42px 42px 22px 22px;
  background: rgba(255, 255, 255, 0.18);
}

.featured-course-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 25, 21, 0.02) 0%, rgba(17, 25, 21, 0.18) 38%, rgba(17, 25, 21, 0.9) 100%);
  z-index: 1;
}

.featured-course-badge,
.featured-course-content {
  position: relative;
  z-index: 2;
}

.featured-course-badge {
  position: absolute;
  left: 22px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: .78rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.featured-course-content {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 58px;
}

.featured-course-content small {
  display: inline-block;
  margin-bottom: 10px;
  font-size: .74rem;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, 0.82);
}

.featured-course-content h3 {
  font-size: 1.35rem;
  line-height: 1.2;
}

.featured-course-content p {
  margin-top: 8px;
  font-size: .92rem;
  color: rgba(255, 255, 255, 0.84);
}

.theme-vocals {
  background: linear-gradient(180deg, #7c4ff0 0%, #5034a8 48%, #2e173e 100%);
}

.theme-vocals::after {
  background: linear-gradient(180deg, rgba(197, 138, 255, 0.9) 0%, rgba(108, 61, 200, 0.92) 100%);
}

.theme-piano {
  background: linear-gradient(180deg, #f0f2f5 0%, #555b68 45%, #181c24 100%);
}

.theme-piano::after {
  background: linear-gradient(180deg, rgba(226, 229, 236, 0.95) 0%, rgba(35, 39, 49, 0.98) 100%);
}

.theme-violin {
  background: linear-gradient(180deg, #88d3a5 0%, #4f9a69 45%, #163526 100%);
}

.theme-violin::after {
  background: linear-gradient(180deg, rgba(199, 159, 126, 0.95) 0%, rgba(116, 70, 39, 0.96) 100%);
}

.theme-recorder {
  background: linear-gradient(180deg, #8fda79 0%, #469c42 52%, #173525 100%);
}

.theme-recorder::after {
  background: linear-gradient(180deg, rgba(112, 204, 95, 0.95) 0%, rgba(42, 104, 41, 0.98) 100%);
}

#footer {
  background: #1d2b23;
  color: rgba(255, 255, 255, 0.76);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
  gap: 28px;
  padding: 64px 0 36px;
}

.footer-brand .logo { margin-bottom: 18px; }
.footer-brand .logo-text strong { color: var(--white); }
.footer-brand .logo-text small { color: rgba(255, 255, 255, 0.5); }
.footer-brand p { max-width: 360px; }

.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.footer-socials a:hover {
  background: var(--green);
}

.footer-col h4,
.footer-map h4 {
  color: var(--white);
  margin-bottom: 14px;
  font-size: 1rem;
}

.footer-col li + li,
.footer-contact li + li { margin-top: 10px; }
.footer-col a { color: rgba(255, 255, 255, 0.76); }
.footer-col a:hover { color: var(--green-accent); }

.footer-contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.footer-map {
  padding: 26px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-map iframe,
.footer-map .map-embed {
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: .88rem;
}

.footer-bottom a { color: rgba(255, 255, 255, 0.7); }
.footer-bottom a:hover { color: var(--green-accent); }

#scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--green-dark);
  color: var(--white);
  box-shadow: 0 16px 30px rgba(33, 92, 63, 0.26);
  cursor: pointer;
  z-index: 999;
}

#scroll-top.visible { display: flex; }

.alert {
  padding: 14px 18px;
  border-radius: 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: .95rem;
}

.alert-success { background: #dff5e8; color: #0e5f35; border: 1px solid #c7ead7; }
.alert-danger { background: #fde2e2; color: #8f2222; border: 1px solid #f7bcbc; }
.alert-warning { background: #fff4d6; color: #93660d; border: 1px solid #f4dd98; }

.alert-close {
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: .7;
}

@keyframes floatNote {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .floating-note { animation: none; }
}

@media (min-width: 900.01px) and (max-width: 1180px) {
  .header-inner { flex-wrap: wrap; padding: 18px 0; }
  .logo { order: 1; }
  .header-actions { order: 2; }
  nav { order: 3; width: 100%; }
  nav ul { justify-content: center; gap: 18px; }
  .hamburger { order: 4; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-cta { margin-left: auto; margin-right: auto; }
  .hero-showcase { max-width: 620px; width: 100%; margin: 0 auto; }
  .levels-list { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .info-panels-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-courses-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-cta { margin-left: auto; margin-right: auto; }
  .hero-showcase { max-width: 620px; width: 100%; margin: 0 auto; }
  .levels-list { grid-template-columns: 1fr; }
  .featured-courses-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-panels-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-inner {
    min-height: 84px;
  }

  nav ul { display: none; }

  .hamburger { display: inline-flex; }

  nav.open ul {
    display: flex;
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  #hero { padding: 24px 0 110px; }
  .hero-showcase {
    min-height: 420px;
  }
  .hero-character {
    width: 148px;
    border-radius: 28px;
  }
  .hero-guitar { left: 0; height: 298px; }
  .hero-keyboard { left: 126px; height: 336px; }
  .hero-laptop { right: 0; height: 312px; }
  .hero-character::before {
    width: 58px;
    height: 58px;
    margin-left: -29px;
  }
  .hero-character::after {
    top: 78px;
    width: 96px;
    height: 142px;
    margin-left: -48px;
  }
  .character-caption { margin-top: 196px; font-size: .76rem; }
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  section { padding: 72px 0; }
  .header-actions { display: none; }
  .container { padding: 0 18px; }
  .logo-text strong { font-size: 1.16rem; }
  .logo-text small { letter-spacing: .22em; font-size: .62rem; }
  .hero-copy h1 { font-size: clamp(2.3rem, 12vw, 3.3rem); }
  .hero-copy p { font-size: 1rem; }
  .hero-showcase { min-height: 700px; }
  .hero-orb-green { width: 220px; height: 220px; left: 50%; margin-left: -110px; top: 38px; }
  .hero-orb-purple { width: 180px; height: 180px; right: 24px; top: 188px; }
  .floating-note { font-size: 1.6rem; }
  .hero-character {
    position: absolute;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(220px, 82vw);
  }
  .hero-guitar { top: 42px; bottom: auto; }
  .hero-keyboard { top: 236px; bottom: auto; }
  .hero-laptop { top: 438px; bottom: auto; }
  .character-caption { margin-top: 214px; }
  #levels { margin-top: -34px; }
  .level-pill { align-items: flex-start; }
  .features-grid,
  .info-panels-grid,
  .featured-courses-grid,
  .footer-top { grid-template-columns: 1fr; }
  .section-head,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
