/* =======================================================================
   Clayton Scott Music — site styles
   Design: cool & minimal. White background, navy accent, Inter typography.
   ======================================================================= */

/* ---------- Fonts (self-hosted) ---------- */
/* Source Sans 3 — body */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/SourceSans3-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/SourceSans3-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/SourceSans3-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/SourceSans3-Bold.woff2") format("woff2");
}

/* Cormorant Garamond — headings */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-MediumItalic.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-Bold.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  --bg:          #ffffff;
  --surface:     #f6f7f9;
  --text:        #1a1a1a;
  --text-muted:  #4a5160;
  --accent:      #1e3a5f;
  --accent-soft: #e8eef6;
  --border:      #e4e7ec;
  --focus:       #1e3a5f;

  --page-max:    1100px;
  --prose-max:   72ch;

  --radius:      6px;
  --radius-lg:   10px;

  --step-0: 1rem;          /* 16px */
  --step-1: 1.0625rem;     /* 17px — body */
  --step-2: 1.375rem;      /* 22px — lede */
  --step-3: 1.875rem;      /* 30px — h2/h3 (serif reads smaller) */
  --step-4: 2.75rem;       /* 44px — h1 */
  --step-5: 3.75rem;       /* 60px — hero */

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
           Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3 {
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.15;
  margin: 1.6em 0 0.4em;
  font-weight: 600;
  letter-spacing: 0;
}
h1 {
  font-size: var(--step-4);
  font-weight: 500;
  margin-top: 0;
}
h2 { font-size: var(--step-3); font-weight: 500; }
h3 { font-size: var(--step-2); font-weight: 600; line-height: 1.25; }
h4 {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 2em 0 0.5em;
}

p { margin: 0 0 1.1em; }
strong, b { font-weight: 600; }

ul, ol { padding-left: 1.35em; margin: 0 0 1.1em; }
li { margin: 0.25em 0; }

blockquote {
  margin: 1.5em 0;
  padding: 0.5em 0 0.5em 1.25em;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  font-style: italic;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

:focus-visible { outline-offset: 2px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5em 1em;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { left: 0.5em; top: 0.5em; }

/* ---------- Layout containers ---------- */
.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.prose { max-width: var(--prose-max); }

/* ---------- Site header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.brand .brand-sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Nav */
.site-nav { display: flex; align-items: center; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45em 0.75em;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface); }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.nav-list > li { margin: 0; position: relative; }

.nav-list a,
.nav-list > li > details > summary {
  display: block;
  padding: 0.5em 0.85em;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  white-space: nowrap;
  cursor: pointer;
}
.nav-list a:hover,
.nav-list > li > details > summary:hover {
  background: var(--surface);
  color: var(--accent);
}
.nav-list a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Dropdown (Programs) */
.nav-list details { position: relative; }
.nav-list details > summary {
  list-style: none;
}
.nav-list details > summary::-webkit-details-marker { display: none; }
.nav-list details > summary::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-left: 0.4em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .15s ease;
}
.nav-list details[open] > summary::after { transform: rotate(-135deg) translateY(1px); }

.nav-list .submenu {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ---------- Hero / page intro ---------- */
.hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, var(--step-5));
  line-height: 1.1;
  margin-bottom: 0.25em;
}
.hero p {
  font-size: var(--step-2);
  color: var(--text-muted);
  margin-bottom: 0;
}
.hero-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  display: block;
}
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-image { max-width: 400px; margin: 0 auto; }
}

/* ---------- Content wrapper ---------- */
/* Keep .container's horizontal padding; add vertical only. */
.page {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}
.page-header {
  margin-bottom: 2rem;
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin: 0 0 0.3em; max-width: 24ch; }
.page-header .lede { font-size: var(--step-2); color: var(--text-muted); max-width: 60ch; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 2rem 0;
}
.card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.card h3 { margin-top: 0; font-size: var(--step-1); }
.card p { color: var(--text-muted); margin-bottom: 0.75em; }
.card .card-link {
  font-weight: 600;
  text-decoration: none;
}
.card .card-link::after { content: " \2192"; }
.card .card-link:hover { text-decoration: underline; }

/* ---------- Side-by-side content + image ---------- */
.with-image {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
}
.with-image > img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}
.with-image.right-image > :first-child { order: 1; }
.with-image.right-image > :last-child  { order: 2; }

@media (max-width: 720px) {
  .with-image { grid-template-columns: 1fr; }
  .with-image > img { max-width: 400px; margin: 0 auto; }
}

/* ---------- Testimonials ---------- */
.testimonial-nav {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}
.testimonial-nav ul {
  list-style: none;
  margin: 0.5em 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.testimonial-nav li { margin: 0; }
.testimonial-nav a { font-weight: 500; }

.testimonials-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 5rem;
}
.quote {
  margin: 1.25em 0 1.5em;
  padding: 0;
  color: var(--text);
}
.quote-text { margin: 0 0 0.25em; }
.quote-attr {
  display: block;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95em;
}

.back-to-top {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9em;
  color: var(--text-muted);
}

/* ---------- Lists (programs, clients) ---------- */
.structured-list {
  margin: 1.25em 0 2em;
}
.structured-list h3 {
  margin-top: 1.5em;
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
}
.structured-list ul { padding-left: 1.2em; }

/* ---------- Schedule ---------- */
.schedule-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.schedule-tabs a {
  padding: 0.6em 1em;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.schedule-tabs a:hover { color: var(--accent); }
.schedule-tabs a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.event-list > li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(170px, 220px) 1fr;
  gap: 1.5rem;
}
.event-date {
  color: var(--text-muted);
  font-size: 0.95em;
  font-variant-numeric: tabular-nums;
}
.event-title { font-weight: 600; margin: 0 0 0.25em; }
.event-loc { color: var(--text-muted); font-size: 0.95em; }

@media (max-width: 640px) {
  .event-list > li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* ---------- Photo gallery ---------- */
.photo-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin: 1.5rem 0;
}
.photo-grid a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .15s ease;
}
.photo-grid a:hover { transform: translateY(-2px); }
.photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.photo-event-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  grid-auto-rows: 1fr;
  margin: 1.5rem 0;
}
.photo-event-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease;
  height: 100%;
}
.photo-event-card:hover { transform: translateY(-2px); }
.photo-event-card .thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.photo-event-card .thumbs img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  min-width: 0;
}
.photo-event-card .label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95em;
  line-height: 1.35;
}

.photo-page img {
  margin: 1.5rem auto;
  border-radius: var(--radius-lg);
}
.photo-page figure {
  margin: 0 0 2rem;
  text-align: center;
}
.photo-page figcaption {
  color: var(--text-muted);
  font-size: 0.95em;
  margin-top: 0.5em;
}
.photo-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 4rem;
  color: var(--text-muted);
  font-size: 0.9em;
}
.site-footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer a { color: inherit; }

/* ---------- Mobile nav ---------- */
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }

  .site-nav .nav-list {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.75rem 1rem;
    gap: 0.15rem;
    display: none;
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
  }
  .site-nav.open .nav-list { display: flex; }

  .nav-list a,
  .nav-list > li > details > summary { padding: 0.75em 0.9em; }

  .nav-list .submenu { padding-left: 1rem; }
}

@media (min-width: 881px) {
  .nav-toggle { display: none; }

  /* desktop dropdown */
  .nav-list details > .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.35rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 20;
  }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
