/* ============================================================
   Drew's School of Music — shared styles
   Brand colors sampled directly from the official logo.
   ============================================================ */

:root {
  /* Brand palette (sampled from logo) */
  --forest-900: #102A1C;
  --forest-800: #1B4630;
  --sage-700: #2E7C4E;   /* accessible accent: buttons, links, icons */
  --sage-500: #4CAE72;   /* decorative only — do not use for small text */
  --sage-100: #E8F5EC;
  --sage-50: #F5FAF7;
  --white: #FFFFFF;
  --ink: #14261C;
  --ink-soft: #45564C;

  /* Type */
  --font-heading: "DM Serif Display", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing (4/8 rhythm) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  /* Layout */
  --container: 1160px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(16, 42, 28, 0.08);
  --shadow-md: 0 8px 24px rgba(16, 42, 28, 0.12);
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--forest-900);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  font-weight: 400;
}

h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); }
h3 { font-size: 1.35rem; }

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

.text-lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

a {
  color: var(--sage-700);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--forest-900); }

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

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -60px;
  background: var(--forest-900);
  color: var(--white);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 150ms ease-out;
}
.skip-link:focus { top: var(--space-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 150ms ease-out, background-color 150ms ease-out, color 150ms ease-out, box-shadow 150ms ease-out;
  touch-action: manipulation;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--sage-700);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #266741; color: var(--white); box-shadow: var(--shadow-md); }

.btn-on-dark {
  background: var(--white);
  color: var(--forest-900);
}
.btn-on-dark:hover { background: var(--sage-100); color: var(--forest-900); }

.btn-outline {
  background: transparent;
  border-color: var(--sage-700);
  color: var(--sage-700);
}
.btn-outline:hover { background: var(--sage-700); color: var(--white); }

.btn-outline-on-dark {
  background: transparent;
  border-color: rgba(255,255,255,0.6);
  color: var(--white);
}
.btn-outline-on-dark:hover { background: rgba(255,255,255,0.12); border-color: var(--white); color: var(--white); }

.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(16, 42, 28, 0.08);
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--forest-900);
  flex-shrink: 0;
}
.brand:hover { color: var(--forest-900); }
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-700);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links .mobile-only-cta { display: none; }
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--sage-700);
  border-bottom-color: var(--sage-700);
}

.nav-actions { display: flex; align-items: center; gap: var(--space-2); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.nav-toggle:hover { background: var(--sage-100); }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3);
    gap: 0;
    transform: translateX(100%);
    transition: transform 220ms ease-out;
    overflow-y: auto;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a {
    padding: 16px 4px;
    border-bottom: 1px solid var(--sage-100);
    font-size: 1.1rem;
  }
  .nav-links .btn { margin-top: var(--space-2); }
  .nav-links .mobile-only-cta { display: block; }
  .nav-toggle { display: inline-flex; }
  .nav-actions .btn-primary.header-apply { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(120% 140% at 15% 0%, var(--forest-800) 0%, var(--forest-900) 60%);
  color: var(--white);
  padding: var(--space-7) 0 var(--space-6);
  position: relative;
  overflow: hidden;
}
.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-6);
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  color: var(--sage-500);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
}
.hero h1 { color: var(--white); margin-bottom: var(--space-2); }
.hero .text-lead { color: rgba(255,255,255,0.85); max-width: 46ch; }
.hero-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-4); }
.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art svg { width: 100%; max-width: 340px; height: auto; }

.page-hero {
  background: linear-gradient(160deg, var(--forest-900), var(--forest-800));
  color: var(--white);
  padding: var(--space-6) 0 var(--space-5);
  text-align: center;
}
.page-hero h1 { color: var(--white); }
.page-hero .text-lead { color: rgba(255,255,255,0.85); margin: 0 auto; text-align: center; }

/* ---------- Sections ---------- */
.section { padding: var(--space-6) 0; }
.section-tint { background: var(--sage-50); }
.section-dark { background: var(--forest-900); color: var(--white); }
.section-dark h2 { color: var(--white); }
.section-dark .text-lead { color: rgba(255,255,255,0.8); }

.section-head {
  max-width: 700px;
  margin: 0 auto var(--space-5);
  text-align: center;
}
.section-head.align-left { margin-left: 0; text-align: left; }

.eyebrow {
  display: block;
  color: var(--sage-700);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: var(--space-1);
}
.section-dark .eyebrow { color: var(--sage-500); }

/* ---------- Grids & Cards ---------- */
.grid {
  display: grid;
  gap: var(--space-3);
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-art { order: -1; max-width: 220px; margin: 0 auto var(--space-3); }
}

.card {
  background: var(--white);
  border: 1px solid var(--sage-100);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.icon-badge {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--sage-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
  color: var(--sage-700);
}
.icon-badge svg { width: 28px; height: 28px; }

.instructor-card {
  background: var(--white);
  border: 1px solid var(--sage-100);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  box-shadow: var(--shadow-sm);
}
.monogram {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--sage-500), var(--sage-700));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.3rem;
}
.instructor-card h3 { margin-bottom: 2px; font-size: 1.1rem; }
.instructor-card .instrument { color: var(--sage-700); font-weight: 600; font-size: 0.92rem; }

/* ---------- Forms hub (Enroll page) ---------- */
.form-card {
  background: var(--white);
  border: 2px solid var(--sage-100);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.form-card .tag {
  display: inline-block;
  background: var(--sage-100);
  color: var(--sage-700);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: var(--space-2);
  align-self: flex-start;
}
.form-card p { color: var(--ink-soft); }
.form-card .btn { margin-top: auto; align-self: flex-start; }

.callout {
  background: var(--sage-100);
  border-left: 4px solid var(--sage-700);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-5) 0;
}
.callout h3 { margin-bottom: var(--space-1); }
.callout p { color: var(--ink-soft); margin-bottom: var(--space-1); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Story page ---------- */
.story-block {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-6);
  align-items: center;
}
.story-block.reverse .photo-frame { order: 2; }
@media (max-width: 860px) {
  .story-block, .story-block.reverse .photo-frame { grid-template-columns: 1fr; order: 0; }
}

.photo-frame {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--sage-500), var(--forest-800));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
}
.photo-frame .frame-monogram {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  margin-bottom: var(--space-1);
}
.photo-frame .frame-label {
  font-weight: 600;
  font-size: 0.95rem;
}
.photo-frame .frame-hint {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  margin-top: var(--space-1);
}

.pull-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2vw + 1rem, 2rem);
  color: var(--forest-900);
  border-left: 4px solid var(--sage-700);
  padding-left: var(--space-3);
  margin: var(--space-5) 0;
  line-height: 1.45;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--sage-100);
}
.timeline li {
  position: relative;
  padding: 0 0 var(--space-4) var(--space-4);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sage-700);
  border: 2px solid var(--white);
}
.timeline .when {
  display: block;
  color: var(--sage-700);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.contact-list li {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--sage-100);
}
.contact-list .icon-badge { margin-bottom: 0; width: 44px; height: 44px; flex-shrink: 0; }
.contact-list a { font-weight: 600; }
.map-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--sage-100);
  box-shadow: var(--shadow-sm);
}
.map-frame iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }

/* ---------- Sticky mobile apply bar ---------- */
.mobile-cta-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: var(--white);
  border-top: 1px solid var(--sage-100);
  padding: 10px var(--space-2);
  box-shadow: 0 -6px 18px rgba(16,42,28,0.1);
}
@media (max-width: 860px) {
  .mobile-cta-bar { display: block; }
  body { padding-bottom: 72px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-900);
  color: rgba(255,255,255,0.85);
  padding: var(--space-6) 0 var(--space-4);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-4); } }

.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: var(--space-2); }
.footer-brand img { width: 44px; height: 44px; border-radius: 10px; }
.footer-brand span { font-family: var(--font-heading); color: var(--white); font-size: 1.2rem; }

.site-footer h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.site-footer a:hover { color: var(--sage-500); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge-list { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-list span {
  background: var(--sage-100);
  color: var(--sage-700);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
}
