/* Tunes — page chrome. The components bring their own styles; this file is
   only the page scaffolding they sit in. */

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

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

body {
  margin: 0;
  background: var(--tn-ground);
  color: var(--ink);
  font: var(--text-body);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--tn-gutter);
}

.section { padding-block: var(--space-12); }
.section--tight { padding-block: var(--space-10); }
.section + .section { padding-top: 0; }

/* A section head sitting directly above a full-bleed strip: the head brings
   its own space-8 beneath it, so the block only pads its outer edges. */
.gallery-block { padding-block: var(--space-12); }
.gallery-block > .wrap { padding-bottom: 0; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: var(--layer-curtain);
  background: var(--surface-raised); color: var(--ink); padding: var(--space-3) var(--space-5);
  font-size: 14px; font-weight: 600;
}
.skip:focus { left: var(--space-4); top: var(--space-4); }

/* ---------- the quote band ---------- */

.band {
  display: grid; justify-items: center; gap: var(--space-5);
  padding: var(--space-12) var(--tn-gutter);
  background: var(--surface-raised); text-align: center;
}
.band__quote {
  margin: 0; max-width: 24ch;
  font-family: var(--font-display); font-weight: 400;
  font-size: 32px; line-height: 1.24; color: var(--ink);
}
@media (min-width: 768px) { .band__quote { font-size: 44px; line-height: 1.12; } }
.band__meta {
  margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-muted);
}

/* ---------- course page ---------- */

.prose { max-width: 62ch; margin-inline: auto; }
.prose p { margin: 0 0 var(--space-5); font: var(--text-body); font-family: var(--font-sans); }
.prose p:last-child { margin-bottom: 0; }

.course-cta { display: flex; justify-content: center; padding-block: var(--space-10) 0; }

.sib { display: grid; gap: var(--space-4); }
.sib__list { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.sib__list a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--line-hairline); text-decoration: none;
  font-size: 14px; font-weight: 500;
}
.sib__list a:hover { background: var(--surface-raised); }
.sib__list a[aria-current] { background: var(--tn-brand); color: var(--ink-inverse); border-color: transparent; }

/* ---------- enquiry form ---------- */

.form { display: grid; gap: var(--space-5); max-width: 560px; }
.field { display: grid; gap: var(--space-2); }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font: var(--text-body); font-family: var(--font-sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-hairline);
  border-radius: var(--radius-xs); padding: var(--space-3) var(--space-4);
  min-height: 44px; width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; box-shadow: 0 0 0 2px var(--focus-ring-offset), 0 0 0 4px var(--focus-ring);
}
.form__note { margin: 0; font-size: 14px; color: var(--ink-muted); }
.form__status { margin: 0; font-size: 14px; font-weight: 600; }
.form__status[data-state="ok"] { color: var(--state-ok); }
.form__status[data-state="error"] { color: var(--state-error); }

/* ---------- footer ---------- */

.foot { background: var(--surface-raised); color: var(--ink); margin-top: var(--space-16); }
.foot__inner {
  display: grid; gap: var(--space-8); padding-block: var(--space-10);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .foot__inner { grid-template-columns: 1.2fr 1fr 1fr; } }
.foot__brand { display: grid; gap: var(--space-4); justify-items: start; }
.foot h2 {
  margin: 0 0 var(--space-3); font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-muted);
}
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; }
.foot ul a {
  display: inline-flex; align-items: center; min-height: 44px;
}
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot address { font-style: normal; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.foot__legal {
  border-top: 1px solid var(--line-hairline);
  padding-block: var(--space-5);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4);
  justify-content: space-between; font-size: 13px; color: var(--ink-muted);
}
.foot__legal a { display: inline-flex; align-items: center; min-height: 44px; }
.foot__preview {
  background: var(--wood-brown); color: var(--on-wood-brown);
  padding: var(--space-3) var(--tn-gutter); text-align: center;
  font-size: 13px; letter-spacing: .02em;
}

/* ---------- track pages ---------- */

/* Each track page shows every course in one row on a wide screen — five
   Eastern, three Western — instead of the four-column default, which would
   orphan one Eastern card and leave a Western column empty. */
@media (min-width: 1000px) {
  body[data-track="east"] #courses .tn-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  body[data-track="west"] #courses .tn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Five across leaves ~200px per card at 1440px, so the name steps down a
     little to keep "Carnatic Vocal" on one line and the bars level. */
  body[data-track="east"] #courses .tn-card__name { font-size: clamp(16px, 1.3vw, 21px); }
}

/* ---------- utilities ---------- */

.center { text-align: center; }
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- course page: timetable and the two-way call to action ---------- */

.course-timetable { max-width: 62ch; margin: var(--space-8) auto 0; }
.course-timetable .tn-timetable { max-width: none; }
.course-timetable:empty { display: none; }
.course-cta { flex-direction: column; align-items: center; gap: var(--space-3); }
.course-cta__alt {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--font-sans); font-size: 14px; color: var(--ink-muted);
  text-decoration: underline; text-decoration-color: var(--line-gold); text-underline-offset: 4px;
}
.course-cta__alt:hover { color: var(--ink); }

/* ---------- landing page: the closing strip ---------- */

#visit { border-top: 1px solid var(--line-hairline); }
