/* =========================================================
   Scuola di Musica Gabrieli — design system
   Palette: manuscript paper + stage teal + brass + rosewood
   Type: Fraunces (display) / Karla (body) / IBM Plex Mono (utility)
   Signature: concert-programme "ticket" cards with punched edge
   ========================================================= */

:root {
  --paper: #fbf4e8;
  --paper-raised: #ffffff;
  --paper-line: #e4d8bf;
  --ink: #241c15;
  --ink-soft: #5a5044;
  --teal: #1f4b4a;
  --teal-dark: #163534;
  --brass: #c89b3c;
  --brass-dark: #a37e2c;
  --rosewood: #8c3b2e;
  --rosewood-dark: #6f2d23;

  --font-display: "Fraunces", "Iowan Old Style", ui-serif, Georgia, serif;
  --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-s: 6px;
  --radius-m: 14px;
  --shadow-card: 0 12px 24px -14px rgba(36, 28, 21, 0.35);
  --shadow-pop: 0 20px 40px -18px rgba(36, 28, 21, 0.45);

  --wrap: 1180px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@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;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0 0 0.5em; color: var(--ink); }
p { margin: 0 0 1em; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 720px) { .wrap { padding-inline: 2rem; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.9em;
}
.eyebrow::before { content: "♪"; color: var(--brass); }

.section { padding-block: 3.5rem; }
.section--tight { padding-block: 2.25rem; }
.section--teal { background: var(--teal); color: var(--paper); }
.section--teal h2, .section--teal .eyebrow { color: var(--paper); }
.section--teal .eyebrow::before { color: var(--brass); }
.section-head { max-width: 640px; margin-bottom: 2.2rem; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.section-head p { color: var(--ink-soft); }
.section--teal .section-head p { color: #d8e6e5; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brass); color: var(--ink); }
.btn-primary:hover { background: var(--brass-dark); box-shadow: var(--shadow-card); }
.btn-outline { border-color: currentColor; color: inherit; background: transparent; }
.btn-outline:hover { background: rgba(0,0,0,0.06); }
.section--teal .btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-rosewood { background: var(--rosewood); color: var(--paper); }
.btn-rosewood:hover { background: var(--rosewood-dark); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--paper-line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.15; }
.brand-name small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-s);
  border: 1px solid var(--paper-line);
  background: transparent;
  color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="false"] .icon-close { display: none; }

.site-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(84vw, 340px);
  height: 100vh;
  background: var(--teal);
  color: var(--paper);
  padding: 5.5rem 1.75rem 2rem;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 60;
  overflow-y: auto;
}
.site-nav.is-open { transform: translateX(0); }
.site-nav a {
  display: block;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(251,244,232,0.15);
}
.site-nav a[aria-current="page"] { color: var(--brass); }
.site-nav .nav-cta { margin-top: 1.75rem; }
.nav-scrim {
  position: fixed; inset: 0; background: rgba(36,28,21,0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.28s ease; z-index: 55;
}
.nav-scrim.is-open { opacity: 1; pointer-events: auto; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-scrim { display: none; }
  .site-nav {
    position: static; width: auto; height: auto; transform: none;
    background: transparent; color: var(--ink); padding: 0;
    display: flex; align-items: center; gap: 1.9rem;
  }
  .site-nav a { font-family: var(--font-body); font-size: 0.98rem; font-weight: 700; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { border-color: var(--brass); }
  .site-nav .nav-cta { margin-top: 0; padding: 0.5em 1.5em; border-bottom: none; }
}

/* ---------- hero / rotating banner ---------- */
.hero-banner {
  position: relative;
  overflow: hidden;
  height: min(86vh, 620px);
  min-height: 420px;
  color: var(--paper);
  isolation: isolate;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  z-index: 1;
}
.hero-slide.is-active { opacity: 1; z-index: 2; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(36,28,21,0.15) 0%, rgba(36,28,21,0.15) 45%, rgba(22,53,52,0.92) 100%);
}
.hero-content {
  position: relative; z-index: 10;
  height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 3.25rem;
}
.hero-content .eyebrow { color: var(--paper); }
.hero-content h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.6rem);
  color: var(--paper);
  max-width: 16ch;
  margin-bottom: 0.4em;
}
.hero-content p { max-width: 46ch; color: #f1e9d8; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.4rem; }

.hero-dots {
  position: absolute; z-index: 10; bottom: 1.5rem; right: 1.25rem;
  display: flex; gap: 0.5rem;
}
.hero-dots button {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(251,244,232,0.55);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.hero-dots button.is-active { color: var(--brass); }

@media (min-width: 900px) {
  .hero-content { padding-bottom: 4.5rem; }
  .hero-dots { right: 2rem; bottom: 2.25rem; }
}

/* ---------- stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  padding-block: 2.25rem;
  border-bottom: 1px solid var(--paper-line);
}
.stat-strip .stat { text-align: center; }
.stat .num { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--rosewood); display: block; }
.stat .label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- ticket card (signature component) ---------- */
.ticket-row {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .ticket-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ticket-row { grid-template-columns: repeat(3, 1fr); } }

.ticket-card {
  position: relative;
  display: flex;
  background: var(--paper-raised);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ticket-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.ticket-date {
  flex: 0 0 84px;
  background: var(--teal);
  color: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  position: relative;
}
.ticket-date .giorno { font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.ticket-date .mese { font-size: 0.72rem; letter-spacing: 0.1em; margin-top: 0.35em; }
.ticket-perforation {
  position: absolute; top: 0; bottom: 0; right: -1px; width: 1px;
  background-image: radial-gradient(circle, var(--paper) 3px, transparent 3.5px);
  background-size: 100% 18px;
  background-repeat: repeat-y;
}
.ticket-body { padding: 1.1rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.ticket-body h3 { font-size: 1.15rem; margin-bottom: 0.35em; }
.ticket-body .meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--teal); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5em; }
.ticket-body p.desc { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 0; }
.ticket-details { margin-top: 0.75em; }
.ticket-details summary { cursor: pointer; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rosewood); list-style: none; }
.ticket-details summary::-webkit-details-marker { display: none; }
.ticket-details summary::after { content: " ▾"; }
.ticket-details[open] summary::after { content: " ▴"; }
.ticket-details p { margin: 0.6em 0 0; font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- teacher card ---------- */
.teacher-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.teacher-card {
  background: var(--paper-raised);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.teacher-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--teal); }
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; }
.teacher-info { padding: 1.1rem 1.25rem 1.4rem; }
.teacher-info h3 { font-size: 1.15rem; margin-bottom: 0.1em; }
.teacher-info .strumento { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rosewood); display: block; margin-bottom: 0.6em; }
.teacher-info p { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 0; }

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-grid figure {
  margin: 0; border-radius: var(--radius-s); overflow: hidden; aspect-ratio: 4 / 3;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-grid a:hover img { transform: scale(1.06); }

/* ---------- schedule (orario) ---------- */
.schedule-note {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--rosewood);
  background: #f5e6d8;
  border: 1px dashed var(--rosewood);
  border-radius: var(--radius-s);
  padding: 0.8rem 1rem;
  margin-bottom: 2rem;
  display: inline-block;
}
.course-filter { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.5rem; }
.course-filter-btn {
  font-family: var(--font-mono); font-size: 0.8rem; padding: 0.5em 1.1em;
  border: 1px solid var(--teal); border-radius: 999px; color: var(--teal);
  background: transparent; cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.course-filter-btn:hover { background: rgba(0,0,0,0.05); }
.course-filter-btn.is-active { background: var(--teal); color: var(--paper); }
.schedule-empty { margin-top: 1rem; color: var(--ink-soft); font-style: italic; }
.schedule-wrap { overflow-x: auto; border-radius: var(--radius-m); box-shadow: var(--shadow-card); }
.schedule-table { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--paper-raised); }
.schedule-table th, .schedule-table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--paper-line); font-size: 0.92rem; }
.schedule-table thead th {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem;
  background: var(--teal); color: var(--paper); border-bottom: none;
}
.schedule-table td.time { font-family: var(--font-mono); color: var(--teal); white-space: nowrap; }
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table tr:nth-child(even) td { background: #f7f0e2; }

/* ---------- courses list ---------- */
.course-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.5rem; }
.course-pill {
  font-family: var(--font-mono); font-size: 0.8rem; padding: 0.5em 1em;
  border: 1px solid var(--teal); border-radius: 999px; color: var(--teal);
}

.course-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.course-card {
  background: var(--paper-raised);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.course-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--teal); }
.course-photo img { width: 100%; height: 100%; object-fit: cover; }
.course-info { padding: 1.1rem 1.25rem 1.4rem; }
.course-info h3 { font-size: 1.15rem; margin-bottom: 0.4em; }
.course-info p { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 0; }

/* ---------- notice / disclaimer ---------- */
.notice {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  color: var(--rosewood);
  background: #f5e6d8;
  border: 1px dashed var(--rosewood);
  border-radius: var(--radius-s);
  padding: 1.1rem 1.3rem;
  margin-bottom: 2rem;
  display: block;
}

/* ---------- map / dove siamo ---------- */
.map-frame {
  border: 0; width: 100%; height: 380px; border-radius: var(--radius-m); box-shadow: var(--shadow-card);
}
.directions-card {
  background: var(--paper-raised);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.75rem;
}
.directions-card dt { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; color: var(--rosewood); letter-spacing: 0.06em; margin-top: 1rem; }
.directions-card dt:first-child { margin-top: 0; }
.directions-card dd { margin: 0.2rem 0 0; }

/* ---------- forms ---------- */
.contact-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; } }
.form-field { margin-bottom: 1.2rem; }
.form-field label { display: block; font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4em; color: var(--teal); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 0.75em 0.9em; border: 1px solid var(--paper-line); border-radius: var(--radius-s);
  font: inherit; background: var(--paper-raised); color: var(--ink);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.form-consent { display: flex; align-items: flex-start; gap: 0.6em; font-size: 0.86rem; color: var(--ink-soft); }
.form-consent input { width: auto; margin-top: 0.25em; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); }

.contact-card { background: var(--teal); color: var(--paper); border-radius: var(--radius-m); padding: 1.75rem; box-shadow: var(--shadow-card); }
.contact-card h3 { color: var(--paper); }
.contact-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.contact-list a, .contact-list > div { text-decoration: none; display: flex; flex-direction: column; gap: 0.15rem; }
.contact-list .k { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brass); display: block; }
.contact-list .v { font-weight: 700; }

/* ---------- CTA strip ---------- */
.cta-strip { background: var(--rosewood); color: var(--paper); border-radius: var(--radius-m); padding: 2.25rem; text-align: center; }
.cta-strip h2 { color: var(--paper); font-size: clamp(1.4rem, 4vw, 2rem); }
.cta-strip .btn-primary { background: var(--paper); color: var(--rosewood); }
.cta-strip .btn-primary:hover { background: var(--brass); color: var(--ink); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #efe6d6; padding-block: 3rem 2rem; }
.footer-grid { display: grid; gap: 2.25rem; grid-template-columns: 1fr; margin-bottom: 2.5rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h4 { color: var(--brass); font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.9em; }
.site-footer a { text-decoration: none; color: #efe6d6; opacity: 0.9; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.footer-links li { margin-bottom: 0.5em; }
.footer-social { display: flex; gap: 0.9rem; margin-top: 0.5rem; }
.footer-social a { width: 38px; height: 38px; border: 1px solid #4a4032; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.footer-bottom { border-top: 1px solid #3c3327; padding-top: 1.5rem; font-size: 0.82rem; color: #b9ac93; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- page hero (interior pages) ---------- */
.page-hero { background: var(--teal); color: var(--paper); padding-block: 3.5rem 2.75rem; }
.page-hero h1 { color: var(--paper); font-size: clamp(1.9rem, 5vw, 2.8rem); }
.page-hero p { color: #d8e6e5; max-width: 60ch; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--brass); color: var(--ink);
  padding: 0.8em 1.2em; z-index: 100; border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { left: 0; }

/* ---------- pagine di testo (Chi siamo, Statuto) ---------- */
.prose { max-width: 70ch; }
.prose p { margin-bottom: 1.1em; }
.prose h2, .prose h3 { margin: 1.6em 0 0.5em; }
.prose ul, .prose ol { margin: 0 0 1.1em 1.3em; }
