:root {
  --bg-base: #eef7f2;
  --bg-surface: #ffffff;
  --bg-band: #e2f1e9;
  --bg-band-alt: #f4fbf7;
  --text-primary: #1f2937;
  --text-muted: #4b5563;
  --text-light: #6b7280;
  --accent: #14532d;
  --accent-soft: #166534;
  --accent-light: #22c55e;
  --border: #bbf7d0;
  --border-subtle: #cbd5e1;
  --border-strong: #14532d;
  --tag-bg: #dcfce7;
  --tag-text: #14532d;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-base);
  line-height: 1.65;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  min-height: 100vh;
  padding: 18px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

@media (max-width: 640px) {
  body {
    padding: 6px;
  }
}

/* Master Outer Inset Frame */
.page-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  margin: 0 auto;
  max-width: 1240px;
  position: relative;
}

/* Header & Navigation */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 24px 28px 18px 28px;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.brand {
  text-align: left;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-symbol {
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: bold;
}

.brand-title {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--accent);
}

.brand-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-size: 1.25rem;
  width: 38px;
  height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Navigation Row */
.main-nav {
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 8px 24px;
  justify-content: center;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 4px 6px;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link.active {
  border-bottom: 2px solid var(--accent);
}

/* Bands & Containers */
.band {
  width: 100%;
  padding: 56px 24px;
}

.band-mint {
  background-color: var(--bg-band);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.band-white {
  background-color: var(--bg-surface);
}

.band-soft {
  background-color: var(--bg-band-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
}

.prose {
  max-width: 70ch;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.section-head h2 {
  font-size: 2rem;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Hero Section */
.hero-scene {
  position: relative;
  background-color: #0f2e1a;
  color: #ffffff;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  border-bottom: 1px solid var(--border-strong);
}

.hero-img-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: contrast(105%) saturate(90%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 46, 26, 0.75) 0%, rgba(15, 46, 26, 0.94) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 780px;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 700;
  color: #86efac;
  margin-bottom: 16px;
  display: inline-block;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.18;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.hero-content p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #d1fae5;
  margin-bottom: 28px;
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid var(--accent);
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #0f3e21;
}

.link-growing {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

.link-growing::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transition: transform 0.2s var(--ease);
  transform-origin: left;
}

.link-growing:hover::after {
  transform: scaleX(1.15);
}

/* Square Lesson Cards & Panels */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.lesson-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.lesson-card-mint {
  background: var(--bg-band);
  border: 1px solid var(--border);
}

.lesson-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.lesson-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  flex-grow: 1;
}

.study-badge {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Practice Sequence / Exercise List */
.step-sequence {
  list-style: none;
  counter-reset: exercise-counter;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step-item {
  counter-increment: exercise-counter;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 20px 20px 20px 64px;
  position: relative;
}

.step-item::before {
  content: counter(exercise-counter, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 18px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--accent);
}

.step-item h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--accent);
}

.step-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.step-prompt {
  background: var(--bg-base);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  font-size: 0.88rem;
  font-family: monospace;
  color: var(--accent);
}

/* Media + Text Split */
.media-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.media-split-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

/* Musical Phrase Diagram */
.notation-box {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  padding: 20px;
  font-family: monospace;
  margin: 20px 0;
}

.motif-display {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.motif-block {
  border: 1px solid var(--accent);
  background: var(--tag-bg);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: bold;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  background: #ffffff;
}

th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: var(--bg-band);
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  border-radius: 0;
}

.form-control:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.output-preview {
  margin-top: 24px;
  background: #ffffff;
  border: 1px dashed var(--accent);
  padding: 16px;
  font-family: monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  display: none;
}

/* Accordion FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  background: #ffffff;
}

.faq-trigger {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-trigger:hover {
  color: var(--accent);
  background: var(--bg-band-alt);
}

.faq-symbol {
  font-size: 1.2rem;
  color: var(--accent);
}

.faq-body {
  padding: 0 20px 16px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: none;
}

.faq-item.active .faq-body {
  display: block;
}

/* Footer */
.site-footer {
  background: #0d2816;
  color: #e2f1e9;
  padding: 48px 28px 32px 28px;
  border-top: 2px solid var(--accent);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-col p {
  color: #a7d7ba;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav a {
  color: #cbd5e1;
  text-decoration: none;
}

.footer-nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid #1c4b2b;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: #8bbfa0;
}

.footer-bottom a {
  color: #d1fae5;
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }
  .main-nav {
    display: none;
    padding-top: 10px;
  }
  .main-nav.open {
    display: block;
  }
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .media-split {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
