/* Font in locale (nessuna richiesta a servizi esterni) */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
}

/* ---------- Token ---------- */
  :root {
    --black: #000000;
    --charcoal: #15120c;
    --gold: #d4af37;
    --gold-foil: linear-gradient(180deg, #f6d96f 0%, #d4af37 48%, #b58c1c 100%);
    --gold-foil-diag: linear-gradient(155deg, #efcd5c 0%, #d4af37 52%, #b58c1c 100%);
    --gold-deep: #9c7a12;
    --gold-light: #f6d96f;
    --ivory: #f1e9d6;
    --muted: #b0a58c;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    --step--1: clamp(.78rem, .76rem + .08vw, .8125rem);
    --step-0: clamp(.9rem, .88rem + .1vw, .9375rem);
    --step-1: clamp(1rem, .95rem + .3vw, 1.125rem);
    --step-2: clamp(1.25rem, 1.1rem + .8vw, 1.6rem);
    --step-3: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem);
    --step-4: clamp(2rem, 1.4rem + 2.4vw, 3.1rem);

    --wrap: 62rem;
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --header-h: 4rem;
  }

  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
  body {
    margin: 0; background: var(--black); color: var(--ivory);
    font-family: var(--font-text); font-size: var(--step-0); line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  img, svg { max-width: 100%; display: block; }
  a { color: inherit; }
  h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
  ul, ol { padding: 0; list-style: none; }

  :focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; border-radius: 2px; }

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

  .skip {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--gold); color: var(--black); padding: .6rem 1rem; font-weight: 600; text-decoration: none;
  }
  .skip:focus { top: 1rem; }

  /* ---------- Bottoni ---------- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 2.4rem; padding: .45rem 1.1rem;
    font: 600 var(--step-0)/1.2 var(--font-text);
    text-decoration: none; cursor: pointer; text-align: center;
    border: 2px solid var(--gold); border-radius: 999px;
    transition: background-color .2s, color .2s, border-color .2s, filter .2s;
  }
  .btn-solid { background: var(--gold-foil); color: var(--black); }
  .btn-solid:hover { filter: brightness(1.12); }
  .btn-line { background: transparent; color: var(--ivory); }
  .btn-line:hover { background: var(--gold-foil); color: var(--black); }

  /* ---------- Header ---------- */
  .site-header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    background: var(--black); border-bottom: 1px solid rgba(212, 175, 55, .3);
  }
  .site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

  .brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
  .brand img { width: auto; }
  .brand .mark { height: 2.5rem; }
  .brand .wordmark { height: 2.3rem; }

  .nav { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2.8rem); }
  .nav a:not(.btn) {
    text-decoration: none; font-weight: 500; padding: .4rem 0;
    border-bottom: 2px solid transparent; transition: border-color .2s, color .2s;
  }
  .nav a:not(.btn):hover { color: var(--gold-light); border-color: var(--gold); }

  .menu-toggle {
    display: none; width: 2.4rem; height: 2.4rem; padding: 0;
    background: transparent; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); cursor: pointer;
  }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
    display: block; width: 18px; height: 2px; background: currentColor; margin-inline: auto; position: relative;
    transition: transform .2s, background-color .2s;
  }
  .menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
  .menu-toggle span::before { top: -6px; }
  .menu-toggle span::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] span { background: transparent; }
  .menu-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

  @media (max-width: 1020px) {
    .menu-toggle { display: block; }
    .nav {
      position: absolute; inset: var(--header-h) 0 auto 0;
      flex-direction: column; align-items: stretch; gap: 0;
      background: var(--black); padding: .5rem var(--gutter) 1.5rem;
      border-bottom: 1px solid rgba(212, 175, 55, .3); display: none;
    }
    .nav.open { display: flex; }
    .nav a:not(.btn) { padding: 1rem 0; font-size: var(--step-1); border-bottom: 1px solid rgba(241, 233, 214, .12); }
  }
  @media (max-width: 420px) { .brand { gap: .55rem; } .brand .mark { height: 2.2rem; } .brand .wordmark { height: 2rem; } }

  /* ---------- Hero ---------- */
  .hero { display: flex; flex-direction: column; min-height: min(calc(100svh - var(--header-h)), 34rem); padding-block: 0; }
  .hero-copy { flex: 1; display: grid; gap: 2rem; align-items: center; padding-block: clamp(1.5rem, 4vh, 2.5rem); }
  .hero h1 {
    font: 700 var(--step-4)/1.02 var(--font-display); font-variation-settings: "opsz" 144;
    letter-spacing: -.02em; max-width: 16ch; text-wrap: balance;
  }
  .hero-text { margin-top: .9rem; max-width: 46ch; color: var(--muted); font-size: var(--step-1); line-height: 1.5; }

  /* Tastiera */
  .keys-caption { text-align: center; font-size: var(--step--1); color: var(--muted); padding-bottom: .6rem; }
  .keyboard {
    position: relative; width: min(calc(100% - 2 * var(--gutter)), 28rem); height: 7rem; margin: 0 auto 2.25rem;
    display: flex; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  }
  .key-white {
    flex: 1 1 0; height: 100%; padding: 0; cursor: pointer;
    background: var(--gold-foil); border: 0; border-right: 2px solid var(--black); border-radius: 0 0 6px 6px;
    transform-origin: top; transition: transform .08s, filter .15s;
  }
  .key-white:last-child { border-right: 0; }
  .key-white.is-down { transform: translateY(4px); filter: brightness(.8); }
  .key-black {
    position: absolute; top: 0; height: 60%; padding: 0; cursor: pointer; z-index: 2; transform: translateX(-50%);
    background: var(--black); border: 1px solid var(--gold-deep); border-top: 0; border-radius: 0 0 6px 6px;
    transition: height .08s, background-color .15s;
  }
  .key-black.is-down { height: 57%; background: #2a2314; }

  @media (prefers-reduced-motion: no-preference) {
    .key-white { animation: glow 1s ease-out both; animation-delay: calc(var(--i) * 60ms + 500ms); }
    @keyframes glow { 0% { filter: brightness(1.45); } 100% { filter: brightness(1); } }
  }

  /* ---------- Sezioni ---------- */
  section { padding-block: clamp(2.25rem, 4.5vw, 3.5rem); }
  .section-title { font: 700 var(--step-3)/1.08 var(--font-display); letter-spacing: -.015em; text-wrap: balance; max-width: 18ch; }

  /* Percorsi */
  .paths-head { display: grid; gap: 1.25rem; margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
  .paths-head p { color: var(--muted); max-width: 52ch; }
  .areas { border-top: 1px solid var(--gold); }
  .area {
    display: grid; grid-template-columns: 1fr; gap: .6rem 2rem;
    padding-block: clamp(.9rem, 1.8vw, 1.25rem); border-bottom: 1px solid rgba(212, 175, 55, .35);
    transition: background-color .25s, padding-inline .25s;
  }
  .area h3 a { text-decoration: none; }
  .area h3 { font: 500 var(--step-2)/1.1 var(--font-display); color: var(--ivory); transition: color .25s; }
  .area .courses { font-weight: 600; color: var(--gold); }
  .area .detail { color: var(--muted); max-width: 44ch; }
  .area:hover { background: var(--charcoal); padding-inline: 1rem; }
  .area:hover h3 { color: var(--gold-light); }
  @media (min-width: 860px) {
    .area { grid-template-columns: 1.1fr 1.4fr; align-items: baseline; }
    .area .detail { grid-column: 2; }
    .area .courses { grid-column: 2; grid-row: 1; }
    .area h3 { grid-row: 1 / span 2; }
  }
  .paths-cta { margin-top: 1.25rem; }

  /* Academy */
  .about { background: var(--charcoal); }
  .about-text { display: grid; gap: 1.5rem; }
  .about-text p { max-width: 54ch; }
  .pillars { display: grid; gap: 1rem 2rem; margin-top: .5rem; }
  @media (min-width: 560px) { .pillars { grid-template-columns: 1fr 1fr; } }
  @media (min-width: 900px) { .pillars { grid-template-columns: repeat(4, auto); justify-content: start; gap: 1rem 2.5rem; } }
  .pillars li { border-left: 2px solid var(--gold); padding-left: 1rem; font-weight: 600; }

  /* Come si comincia */
  .start { background: var(--gold-foil-diag); color: var(--black); }
  .start .section-title { color: var(--black); max-width: 16ch; }
  .steps { margin-top: clamp(1.25rem, 2.5vw, 2rem); display: grid; gap: 2rem; counter-reset: step; }
  @media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
  .step { border-top: 2px solid var(--black); padding-top: 1.25rem; counter-increment: step; }
  .step::before { content: counter(step); display: block; font: 700 var(--step-3)/1 var(--font-display); margin-bottom: .75rem; }
  .step h3 { font: 700 var(--step-1)/1.2 var(--font-text); margin-bottom: .5rem; }
  .step p { max-width: 34ch; color: #1d1707; }

  /* Contatti */
  .contact-grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
  @media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.1fr; } }
  .contact-info { display: grid; gap: 2rem; align-content: start; }
  .contact-info dl { display: grid; gap: 1.25rem; }
  .contact-info dt { color: var(--gold); font-weight: 600; }
  .contact-info a { text-decoration-color: var(--gold); text-underline-offset: 4px; }

  form { display: grid; gap: 1.25rem; }
  label { display: grid; gap: .45rem; font-weight: 500; }
  input[type="text"], input[type="email"], textarea {
    width: 100%; font: inherit; color: var(--ivory);
    background: var(--charcoal); border: 1px solid rgba(212, 175, 55, .5); border-radius: 10px;
    padding: .85rem 1rem; min-height: 3rem;
  }
  textarea { min-height: 8.5rem; resize: vertical; }
  input::placeholder, textarea::placeholder { color: #81775f; }
  input:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; border-color: var(--gold-light); }
  .consent { grid-auto-flow: column; grid-template-columns: auto 1fr; align-items: start; gap: .75rem; font-weight: 400; font-size: var(--step--1); color: var(--muted); }
  .consent input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--gold); }
  .form-note { min-height: 1.5rem; color: var(--gold-light); font-size: var(--step--1); }
  form .btn { justify-self: start; }

  /* ---------- Menu: pagina corrente ---------- */
  .nav a[aria-current="page"]:not(.btn) { color: var(--gold-light); border-color: var(--gold); }

  /* ---------- Intestazione pagine interne ---------- */
  .page-head { padding-block: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 2.5vw, 1.75rem); border-bottom: 1px solid rgba(212, 175, 55, .3); }
  .page-head h1 {
    font: 700 var(--step-4)/1.04 var(--font-display); font-variation-settings: "opsz" 144;
    letter-spacing: -.02em; max-width: 16ch; text-wrap: balance;
  }
  .page-head p { margin-top: .8rem; max-width: 56ch; color: var(--muted); font-size: var(--step-1); line-height: 1.5; }

  /* ---------- Elenchi a righe (corsi, punti di forza) ---------- */
  .area-block + .area-block { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
  .area-block h2 { font: 700 var(--step-3)/1.1 var(--font-display); letter-spacing: -.015em; margin-bottom: 1.5rem; }
  .course-list { border-top: 1px solid var(--gold); }
  .course { display: grid; gap: .5rem 2rem; padding-block: 1.4rem; border-bottom: 1px solid rgba(212, 175, 55, .35); }
  .course h3 { font: 500 var(--step-1)/1.2 var(--font-display); color: var(--gold); }
  .course p { max-width: 52ch; }
  @media (min-width: 760px) { .course { grid-template-columns: 1fr 1.6fr; align-items: baseline; } }



  /* ---------- Foto della sala prove (Academy) ---------- */
  .room { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
  @media (min-width: 900px) { .room { grid-template-columns: 1fr 1.1fr; } }
  .course-list.stacked .course { grid-template-columns: 1fr; }
  .room-photo {
    aspect-ratio: 3 / 2; width: 100%; overflow: hidden;
    display: grid; place-items: center; text-align: center; padding: 1rem;
    border: 1px solid var(--gold); border-radius: .75rem;
    color: var(--muted); font-size: var(--step--1);
    background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(212, 175, 55, .08) 38px 40px);
  }
  .room-photo img { width: 100%; height: 100%; object-fit: cover; }

  /* ---------- Profili dei docenti ---------- */
  .teacher-list { display: grid; gap: clamp(1.75rem, 3.5vw, 2.5rem); }
  .teacher-profile { display: grid; gap: 1.25rem 2.5rem; padding-top: clamp(1.5rem, 3vw, 2.25rem); border-top: 1px solid rgba(212, 175, 55, .35); }
  .teacher-profile:first-child { border-top: 0; padding-top: 0; }
  @media (min-width: 760px) { .teacher-profile { grid-template-columns: 14rem 1fr; align-items: start; } }
  .teacher-photo {
    aspect-ratio: 4 / 5; width: 100%; max-width: 14rem; overflow: hidden;
    display: grid; place-items: center; text-align: center; padding: 1rem;
    border: 1px solid var(--gold); border-radius: 7rem 7rem .75rem .75rem;
    color: var(--muted); font-size: var(--step--1);
    background: repeating-linear-gradient(90deg, transparent 0 30px, rgba(212, 175, 55, .08) 30px 32px);
  }
  .teacher-photo img { width: 100%; height: 100%; object-fit: cover; }
  .teacher-profile h2 { font: 500 var(--step-2)/1.15 var(--font-display); }
  .teacher-role { margin-top: .25rem; color: var(--gold); font-weight: 600; }
  .experiences { display: grid; gap: .7rem; margin-top: 1.1rem; max-width: 56ch; }
  .experiences li { border-left: 2px solid var(--gold); padding-left: 1rem; }

  /* ---------- Invito finale ---------- */
  .cta-band { background: var(--charcoal); border-top: 1px solid rgba(212, 175, 55, .4); }
  .cta-inner { display: grid; gap: 2rem; align-items: center; }
  @media (min-width: 900px) { .cta-inner { grid-template-columns: minmax(14rem, 1fr) auto; } }
  .cta-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

  /* ---------- Footer ---------- */
  .site-footer { border-top: 1px solid rgba(212, 175, 55, .3); padding-block: 1.75rem 1.25rem; color: var(--muted); font-size: var(--step--1); }
  .footer-grid { display: grid; gap: 2rem; }
  @media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
  .site-footer h2 { font: 600 var(--step--1)/1.3 var(--font-text); color: var(--gold); margin-bottom: .75rem; }
  .site-footer ul { display: grid; gap: .4rem; }
  .site-footer a { text-decoration: none; }
  .site-footer a:hover { color: var(--gold-light); text-decoration: underline; text-underline-offset: 4px; }
  .site-footer .tagline { font-family: var(--font-display); font-style: italic; color: var(--gold); font-size: var(--step-1); margin-bottom: .75rem; }
  .footer-bottom { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(241, 233, 214, .12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
