/* ============================================================
   Treble Music Conservatory — design tokens
   Emerald grounds, ivory grounds, gold foil, brass, oxblood.
   Bodoni Moda for headlines, Archivo (tracked caps) for labels/body.
   ============================================================ */

:root {
  --emerald: #081F19;
  --emerald-deep: #081F19;
  --ivory: #F4EFE1;
  --ivory-panel: #EFE8D6;
  --gold: #C6A15B;
  --brass: #7A5C1F;
  --oxblood: #5C2029;
  --ink-on-ivory: #23302A;      /* body text on ivory, darker than the brand's #33463D floor */
  --ink-min: #33463D;           /* brand minimum body-text darkness on ivory */
  --ivory-on-emerald: #EFE8D6;

  --section-padding: 120px;
  --gutter: 72px;
  --rule: 1px solid rgba(198, 161, 91, 0.4);
  --rule-on-emerald: 1px solid rgba(198, 161, 91, 0.35);

  --font-display: 'Bodoni Moda', 'Times New Roman', serif;
  --font-body: 'Archivo', -apple-system, Helvetica, Arial, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink-on-ivory);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: 0.005em;
}

h1 { font-size: clamp(2.4rem, 4.2vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }

p { max-width: 62ch; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.9em;
}

.on-emerald .eyebrow { color: var(--gold); }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 900px) {
  :root { --gutter: 28px; --section-padding: 72px; }
}

/* ---------- Buttons: outlined, small caps, never filled ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95em 1.8em;
  border: 1px solid var(--emerald);
  color: var(--emerald);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--emerald); color: var(--ivory); }

.on-emerald .btn {
  border-color: var(--gold);
  color: var(--gold);
}
.on-emerald .btn:hover { background: var(--gold); color: var(--emerald-deep); }

.btn-quiet {
  border-color: var(--brass);
  color: var(--brass);
}
.btn-quiet:hover { background: var(--brass); color: var(--ivory); }

/* ---------- Header ---------- */
.site-header {
  background: var(--emerald);
  color: var(--ivory-on-emerald);
  padding: 22px 0;
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ivory-on-emerald);
}
.brand .crest { width: 30px; height: 30px; flex-shrink: 0; object-fit: contain; }

.brand-name {
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.main-nav { display: flex; gap: 34px; align-items: center; }
.main-nav a {
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-on-emerald);
  opacity: 0.85;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  opacity: 1;
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 760px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--emerald);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 20px;
    border-top: var(--rule-on-emerald);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px var(--gutter); border-bottom: none; width: 100%; }
  .nav-toggle { display: inline-block; }
}

/* ---------- Sections ---------- */
.section {
  padding: var(--section-padding) 0;
}
.section.on-emerald {
  background: var(--emerald);
  color: var(--ivory-on-emerald);
}
.section.on-emerald p { color: rgba(239, 232, 214, 0.82); }
.section.on-panel { background: var(--ivory-panel); }
.section + .section { border-top: none; }

.rule {
  border: none;
  border-top: var(--rule);
  margin: 0;
}
.on-emerald .rule { border-top: var(--rule-on-emerald); }

/* ---------- Hero ---------- */
.hero {
  background: var(--emerald);
  color: var(--ivory-on-emerald);
  padding: 90px 0 var(--section-padding);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 { margin-bottom: 0.4em; }
.hero .lede { font-size: 1.05rem; color: rgba(239, 232, 214, 0.85); margin-bottom: 1.8em; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.photo-slot {
  aspect-ratio: 4 / 5;
  background: repeating-linear-gradient(
    45deg,
    rgba(198, 161, 91, 0.14),
    rgba(198, 161, 91, 0.14) 10px,
    rgba(198, 161, 91, 0.05) 10px,
    rgba(198, 161, 91, 0.05) 20px
  );
  border: 1px solid rgba(198, 161, 91, 0.4);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  overflow: hidden;
  position: relative;
}
.photo-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.on-panel .photo-slot, .section:not(.on-emerald) .photo-slot {
  background: repeating-linear-gradient(
    45deg,
    rgba(122, 92, 31, 0.10),
    rgba(122, 92, 31, 0.10) 10px,
    rgba(122, 92, 31, 0.02) 10px,
    rgba(122, 92, 31, 0.02) 20px
  );
  border-color: rgba(122, 92, 31, 0.35);
}
.photo-slot span {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}
.on-emerald .photo-slot span { color: var(--gold); }

/* ---------- Two-up feature rows ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: var(--gutter);
  align-items: center;
}
.feature-row.reverse { grid-template-columns: 0.85fr 1fr; }
.feature-row.reverse .feature-copy { order: 2; }
@media (max-width: 860px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-copy { order: 0; }
}
.feature-copy p { color: var(--ink-min); }
.on-emerald .feature-copy p { color: rgba(239, 232, 214, 0.82); }

/* ---------- Program cards ---------- */
.program-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(122, 92, 31, 0.3);
  border: var(--rule);
}
@media (max-width: 700px) { .program-grid { grid-template-columns: 1fr; } }
.program-card {
  background: var(--ivory);
  padding: 44px;
}
.program-card h3 { margin-bottom: 0.3em; }
.program-meta {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1em;
}
.program-card p { color: var(--ink-min); margin-bottom: 1.4em; font-size: 0.95rem; }
.program-card .program-fee {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--emerald);
  margin: -0.6em 0 0.3em;
}
.program-card .program-reg-note,
.slot-option .slot-reg-note {
  font-size: 0.78rem;
  color: var(--ink-min);
  margin: 0 0 1.2em;
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.fee-table th, .fee-table td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(8,31,25,0.12);
}
.fee-table th {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 500;
}
.fee-table td:first-child { font-family: var(--font-display); font-size: 1.05rem; }
.fee-table td:not(:first-child) { text-align: right; font-family: var(--font-display); font-size: 1.05rem; }
.fee-table td:last-child { color: var(--emerald); }
.fee-table th:not(:first-child) { text-align: right; }
.fee-table-note { color: var(--ink-min); font-size: 0.88rem; }

/* ---------- Quote block ---------- */
.quote-block {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.quote-block blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-style: italic;
  margin: 0 0 0.6em;
  line-height: 1.4;
}
.quote-block cite {
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}
.on-emerald .quote-block cite { color: var(--gold); }

/* ---------- Faculty ---------- */
.faculty-card { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
@media (max-width: 640px) { .faculty-card { grid-template-columns: 1fr; } }
.faculty-card .photo-slot { aspect-ratio: 1 / 1; }

/* Real uploaded photos use the same frame as the placeholders, without the
   diagonal hatch — border, aspect ratio and spacing stay consistent either way. */
.photo-real {
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(122, 92, 31, 0.35);
  overflow: hidden;
}
.faculty-card .photo-real { aspect-ratio: 1 / 1; }
.photo-real img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.faculty-role { color: var(--brass); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.8em; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field.full { grid-column: 1 / -1; }
label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
}
.on-emerald label { color: var(--gold); }
input, textarea, select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid rgba(122, 92, 31, 0.4);
  background: var(--ivory);
  color: var(--ink-on-ivory);
}
.on-emerald input, .on-emerald textarea, .on-emerald select {
  background: rgba(244, 239, 225, 0.06);
  border-color: rgba(198, 161, 91, 0.4);
  color: var(--ivory-on-emerald);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
textarea { resize: vertical; min-height: 120px; }

.form-note { font-size: 0.85rem; color: var(--ink-min); margin-top: -6px; }
.form-status {
  margin-top: 18px;
  font-size: 0.85rem;
  padding: 12px 16px;
  border-left: 3px solid var(--gold);
  display: none;
}
.form-status.show { display: block; }
.form-status.error { border-left-color: var(--oxblood); color: var(--oxblood); }
.form-status.success { border-left-color: var(--brass); }

/* ---------- Slot picker (audition booking) ---------- */
.slot-list { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 6px; }
.slot-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid rgba(122, 92, 31, 0.35);
  cursor: pointer;
  background: var(--ivory);
}
.slot-option:hover { border-color: var(--gold); }
.slot-option.selected { border-color: var(--emerald); background: var(--ivory-panel); }
.slot-option .slot-time { font-family: var(--font-display); font-size: 1.05rem; }
.slot-option .slot-program { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass); }
.slot-empty { color: var(--ink-min); font-size: 0.9rem; padding: 20px; border: 1px dashed rgba(122,92,31,0.4); }

.audition-steps { display: flex; gap: 10px; margin-bottom: 40px; flex-wrap: wrap; }
.audition-step {
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 14px; border: 1px solid rgba(122,92,31,0.3); color: var(--ink-min);
}
.audition-step.active { border-color: var(--emerald); color: var(--emerald); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--emerald-deep);
  color: rgba(239, 232, 214, 0.7);
  padding: 64px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1em;
}
.footer-grid a, .footer-grid p { text-decoration: none; font-size: 0.9rem; color: rgba(239, 232, 214, 0.75); margin: 0 0 0.5em; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom {
  border-top: var(--rule-on-emerald);
  padding-top: 24px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.narrow { max-width: 640px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Keep the fee table inside the screen on phones */
@media (max-width: 480px) {
  .fee-table th, .fee-table td { padding-left: 6px; padding-right: 6px; }
  .fee-table th { font-size: 0.62rem; letter-spacing: 0.08em; }
  .fee-table td:first-child, .fee-table td:not(:first-child) { font-size: 0.92rem; }
  .fee-table .fee-was { display: block; margin-right: 0 !important; }
}
