/* ============================================================
   Susanna Soffiantini — sito personale
   Design tokens & global styles
   ============================================================ */

:root {
  /* Color */
  --bg: #FAFAF8;          /* avorio caldo */
  --bg-2: #F4F2EC;        /* off-ivory per sezioni */
  --ink: #1A1A18;         /* quasi-nero */
  --ink-2: #5A5A55;       /* testo secondario */
  --ink-3: #8E8B82;       /* didascalie / muted */
  --rule: #E4E1D8;        /* hairline */
  --accent: #7A2232;      /* bordeaux */
  --accent-soft: #A04B57; /* hover bordeaux */
  --hover: var(--accent); /* colore hover dei link/testi */
  /* Superfici gestite dalla palette (con fallback sensati) */
  --field-bg: var(--bg-2);       /* sfondo input / textarea / option */
  --btn-bg: var(--accent);       /* sfondo pulsanti */
  --btn-hover: var(--accent-soft); /* sfondo pulsanti hover */

  /* Type — 4 ruoli: titoli / sottotitoli / corpo / interfaccia.
     --subhead e --body ripiegano su --serif finché non impostati (look attuale). */
  --serif: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --subhead: var(--serif);
  --body: var(--serif);
  --hero: var(--sans);   /* occhiello strumenti nella hero — ruolo a sé */

  /* Scale */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 56px);

  /* Motion */
  --ease: cubic-bezier(.2,.6,.2,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
a:hover { border-bottom-color: var(--hover); }

::selection { background: var(--accent); color: var(--bg); }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  letter-spacing: .005em;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.serif-title {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: .02em;
}

.smallcaps {
  font-variant: small-caps;
  letter-spacing: .08em;
}

.caption {
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: .02em;
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,250,248,.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-nav.scrolled {
  border-bottom-color: var(--rule);
  background: rgba(250,250,248,.94);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 76px;
}
.brand {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 0;
}
.brand:hover { color: var(--ink); }

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  list-style: none;
  padding: 0;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink-2);
  padding: 4px 0;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--hover);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 12px;
  letter-spacing: .12em;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
  margin-left: 4px;
}
.lang-switch button {
  background: none;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink-3);
  padding: 4px 6px;
  cursor: pointer;
  text-transform: uppercase;
  transition: color .2s var(--ease);
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] {
  color: var(--accent);
}
.lang-switch .sep {
  color: var(--rule);
  user-select: none;
}
.nav-lang { display: flex; align-items: center; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 6px;
  margin-left: auto;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: 120px;
  padding: 56px 0 40px;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 12.5px;
  letter-spacing: .02em;
}
.footer-inner {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--serif);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-size: 13px;
}
.footer-meta { display: flex; gap: 24px; flex-wrap: wrap; }

/* ============================================================
   HERO (Home)
   ============================================================ */
.hero {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(64px, 10vw, 140px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 40fr 60fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: end;
}
.hero-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #1A1A18;
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: grayscale(20%) contrast(1.02);
  transition: transform 1.2s var(--ease);
}
.hero-photo:hover img { transform: scale(1.02); }
.hero-photo .photo-caption {
  position: absolute;
  bottom: 12px;
  left: 14px;
  color: rgba(250,250,248,.62);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero-text { padding-bottom: 12px; }
.hero-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: .98;
  letter-spacing: .02em;
  margin-bottom: 28px;
  text-wrap: balance;
}
.hero-name .ln { display: block; }
.hero-instruments {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 36px;
}
.hero-instruments .dot {
  display: inline-block;
  margin: 0 10px;
  color: var(--accent);
}
.hero-bio {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink);
  max-width: 56ch;
  font-style: italic;
  letter-spacing: .005em;
}

/* ============================================================
   CONCERTI LIST (shared between home + concerti page)
   ============================================================ */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.section-head h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 300;
  letter-spacing: .015em;
}
.section-head .link-more {
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
}
.section-head .link-more:hover {
  color: var(--hover);
  border-bottom-color: var(--hover);
}

.concerti-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.concerto {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.concerto:last-child { border-bottom: 0; }
.concerto.past { opacity: .42; }

.concerto-date {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--accent);
}
.concerto.past .concerto-date { color: var(--ink-3); }
.concerto-date .day {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0;
  font-weight: 400;
  margin-right: 8px;
  color: var(--ink);
}
.concerto.past .concerto-date .day { color: var(--ink-2); }
.concerto-date .yr {
  margin-left: 6px;
  color: var(--ink-3);
}

.concerto-main h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 400;
  margin-bottom: 4px;
  letter-spacing: .005em;
  text-wrap: balance;
}
.concerto-venue {
  font-size: 13.5px;
  color: var(--ink-2);
}
.concerto-note {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: .01em;
}

.concerto-meta {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.concerto-meta a {
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}
.concerto-meta a:hover { color: var(--hover); border-bottom-color: var(--hover); }

/* skeleton */
.skeleton-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.skeleton-row span {
  display: block;
  height: 14px;
  background: linear-gradient(90deg, var(--rule) 0%, #EFECE3 50%, var(--rule) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
.skeleton-row span:nth-child(1) { width: 70%; }
.skeleton-row span:nth-child(2) { width: 90%; }
.skeleton-row span:nth-child(3) { width: 60px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   CONCERTO DETAIL / LIST THUMB
   ============================================================ */
.concerto-thumb {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  background: var(--bg-2);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.concerto-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(40%) contrast(1.02);
  transition: filter .3s var(--ease);
}
.concerto:hover .concerto-thumb img { filter: none; }
.concerto.has-thumb {
  grid-template-columns: 96px 180px 1fr auto;
}
.concerto-main a.detail-link {
  color: inherit;
  border-bottom: 0;
}
.concerto-main a.detail-link:hover h3 { color: var(--hover); }

.concerto-cover {
  margin: 0 0 48px;
  max-width: 880px;
}
.concerto-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.concerto-body {
  font-family: var(--serif);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  max-width: 64ch;
  letter-spacing: .005em;
}
.concerto-body p { margin: 0 0 1.1em; }
.concerto-body strong { font-weight: 500; color: var(--ink); }
.concerto-body em { font-style: italic; color: var(--ink); }
.concerto-body a { border-bottom: 1px solid var(--accent); padding-bottom: 1px; color: var(--accent); }
.concerto-body a:hover { background: var(--hover); color: var(--bg); }
.concerto-body code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: .92em;
  background: var(--bg-2);
  padding: 1px 6px;
  border: 1px solid var(--rule);
}
.concerto-body pre {
  background: var(--bg-2);
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  overflow-x: auto;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: .9em;
  line-height: 1.45;
}
.concerto-body ul, .concerto-body ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.concerto-body img { max-width: 100%; margin: 1.4em 0; }
.concerto-body blockquote {
  border-left: 2px solid var(--accent);
  margin: 1.4em 0;
  padding: 8px 22px;
  font-style: italic;
  color: var(--ink-2);
}

@media (max-width: 900px) {
  .concerto.has-thumb { grid-template-columns: 1fr; }
  .concerto-thumb { width: 100%; height: 180px; }
}

/* ============================================================
   PAGE HEADER (interior pages)
   ============================================================ */
.page-head {
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--rule);
}
.page-head .eyebrow { margin-bottom: 16px; display: block; }
.page-head h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1;
  letter-spacing: .015em;
  margin-bottom: 24px;
}
.page-head .lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--ink-2);
  max-width: 64ch;
  line-height: 1.5;
}

.section { padding-top: clamp(56px, 7vw, 96px); }

.subhead {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}
.subhead h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
}
.subhead .count {
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* ============================================================
   FILTERS (Concerti)
   ============================================================ */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.filters .lbl { color: var(--ink-3); margin-right: 8px; }
.filters button {
  background: none;
  border: 1px solid var(--rule);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ink-2);
  padding: 8px 14px;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.filters button:hover { color: var(--ink); border-color: var(--ink-3); }
.filters button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ============================================================
   MEDIA (videos + audio)
   ============================================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 40px) clamp(24px, 3.5vw, 56px);
}
.video-card {
  cursor: pointer;
  display: block;
  background: none;
  border: 0;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
}
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1A1A18;
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%) contrast(1.02) brightness(.92);
  transition: filter .35s var(--ease), transform 1s var(--ease);
}
.video-card:hover .video-thumb img {
  filter: grayscale(0%) contrast(1.05) brightness(1);
  transform: scale(1.02);
}
.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.play-mark::before {
  content: "";
  width: 64px;
  height: 64px;
  border: 1px solid rgba(250,250,248,.7);
  border-radius: 50%;
  background: rgba(26,26,24,.18);
  backdrop-filter: blur(2px);
}
.play-mark::after {
  content: "";
  position: absolute;
  width: 0; height: 0;
  border-left: 14px solid var(--bg);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
}
.video-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  margin-top: 16px;
  letter-spacing: .005em;
}
.video-card .meta {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 6px;
}
.video-card .desc {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 8px;
  max-width: 56ch;
}

/* audio */
.audio-list { list-style: none; padding: 0; margin: 0; }
.audio-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.audio-row:last-child { border-bottom: 0; }
.audio-idx {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink-3);
}
.audio-meta h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  margin-bottom: 2px;
}
.audio-meta p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
}
.audio-row audio {
  width: 320px;
  max-width: 100%;
  height: 36px;
  filter: grayscale(100%);
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20,20,18,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 4vw;
}

/* Anteprima immagine (pagina Download) */
.img-lightbox {
  position: fixed; inset: 0;
  background: rgba(20,20,18,.92);
  display: none;
  place-items: center;
  z-index: 110;
  padding: 4vw;
}
.img-lightbox.open { display: grid; }
.img-lightbox img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
}
.img-lb-close {
  position: fixed;
  top: 18px; right: 22px;
  background: none; border: 0;
  color: var(--bg, #fff);
  font-size: 26px; line-height: 1;
  cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  width: min(1100px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
}
.lightbox iframe {
  width: 100%; height: 100%;
  border: 0;
}
.lightbox-close {
  position: absolute;
  top: -40px; right: 0;
  background: none;
  border: 0;
  color: var(--bg);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 0;
}
.lightbox-close:hover { color: var(--accent-soft); }

/* ============================================================
   DOWNLOAD
   ============================================================ */
.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
}
.download-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.download-card:last-child { border-bottom: 1px solid var(--rule); }
.dl-thumb {
  aspect-ratio: 3 / 4;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.dl-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.6s var(--ease);
}
.dl-thumb img:hover {
  filter: grayscale(0%);
}
.dl-thumb.doc {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
}
.dl-thumb.doc span {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--ink-3);
}
.dl-meta h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 4px;
}
.dl-meta .meta {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.dl-meta p {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 0 16px;
  max-width: 50ch;
}
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: none;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.dl-btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-bottom-color: var(--ink);
}
.dl-btn .arrow {
  display: inline-block;
  transition: transform .25s var(--ease);
}
.dl-btn:hover .arrow { transform: translateY(2px); }

.dl-notice {
  margin-top: 56px;
  padding: 28px 32px;
  background: var(--bg-2);
  border-left: 2px solid var(--accent);
  font-size: 14px;
  color: var(--ink-2);
  max-width: 70ch;
}

/* ============================================================
   CONTATTI
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact-intro p {
  font-family: var(--serif);
  font-size: clamp(17px, 1.4vw, 20px);
  font-style: italic;
  color: var(--ink-2);
  margin: 0 0 24px;
  line-height: 1.55;
  max-width: 38ch;
}
.contact-details {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.contact-details dt {
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.contact-details dd {
  margin: 0 0 22px;
  font-size: 15.5px;
}
.contact-details dd a { border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.contact-details dd a:hover { border-bottom-color: var(--accent); color: var(--accent); }

form.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: stretch;
}
.contact-col-fields { display: grid; gap: 22px; align-content: start; }
.contact-col-msg { display: flex; flex-direction: column; gap: 22px; }
.field-msg { flex: 1; grid-template-rows: auto 1fr; }
.field-msg textarea { height: 100%; min-height: 220px; }
@media (max-width: 820px) {
  form.contact { grid-template-columns: 1fr; gap: 22px; }
  .field-msg textarea { min-height: 160px; }
}
.field { display: grid; gap: 8px; }
.field label {
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background-color: var(--field-bg);
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  border-radius: 0;
  outline: 0;
  transition: border-color .2s var(--ease);
}
.field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
                    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 14px) 18px, calc(100% - 8px) 18px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
/* Menu a tendina nativo: colori espliciti così le voci restano leggibili
   (il tema scuro renderebbe testo chiaro su sfondo bianco del menu nativo). */
.field select option {
  color: var(--ink);
  background: var(--field-bg);
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-bottom-color: var(--accent); }

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 16px 28px;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--bg);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
  justify-self: start;
}
.form-submit:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.form-submit:disabled { opacity: .5; cursor: progress; }

.form-confirm {
  margin-top: 18px;
  padding: 16px 20px;
  background: var(--bg-2);
  border-left: 2px solid var(--accent);
  font-size: 14px;
  color: var(--ink);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .3s var(--ease), max-height .3s var(--ease), margin-top .3s var(--ease), padding .3s var(--ease);
}
.form-confirm.show {
  opacity: 1;
  max-height: 200px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { max-width: 360px; }

  .download-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }

  .concerto, .skeleton-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .concerto-meta { margin-top: 4px; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: 12px var(--gutter) 20px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s var(--ease), opacity .2s var(--ease);
    margin: 0;
  }
  .nav-links.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    display: block;
    padding: 20px 2px;
    border-bottom: 1px solid var(--rule);
    font-size: 21px;
    letter-spacing: .02em;
    color: var(--ink);
  }
  /* Selezione lingua dentro il menu mobile */
  .nav-lang {
    border-bottom: 0;
    padding-top: 18px;
    justify-content: center;
  }
  .nav-lang .lang-switch {
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
    gap: 6px;
    font-size: 19px;
    justify-content: center;
  }
  .nav-lang .lang-switch button { padding: 12px 18px; font-size: 19px; }
  .nav-lang .lang-switch .sep { color: var(--rule); }
}

@media (max-width: 768px) {
  .audio-row { grid-template-columns: 32px 1fr; }
  .audio-row audio { grid-column: 1 / -1; width: 100%; }
  .download-card { grid-template-columns: 80px 1fr; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 44px; }
  .lang-switch button { padding: 4px 6px; }
}

/* Mobile: testi più grandi e leggibili nelle pagine interne */
@media (max-width: 640px) {
  /* Etichette e occhielli */
  .eyebrow { font-size: 14px; letter-spacing: .15em; }

  /* Ledes / intro */
  .lede,
  .page-head .lede { font-size: 20px; line-height: 1.55; }

  /* Home (leggero aumento) */
  .hero-instruments { font-size: 15px; }
  .hero-bio { font-size: 20px; line-height: 1.5; }

  /* Titoli di sezione */
  .section-head h2 { font-size: 31px; }

  /* Concerti */
  .concerto-main h3 { font-size: 23px; }
  .concerto-venue { font-size: 16px; }
  .concerto-note  { font-size: 15px; }
  .concerto-body  { font-size: 19px; line-height: 1.62; }

  /* Biografia — sezione container (header .page-head invariato) */
  .bio-body p { font-size: 22px; line-height: 1.64; }
  .bio-aside { font-size: 16.5px; line-height: 1.6; }
  .facts dt { font-size: 13px; letter-spacing: .18em; }
  .facts .place { font-size: 14px; }
  .facts .teachers { font-size: 18px; line-height: 1.6; }
  .prize-list .yr { font-size: 18px; }
  .prize-list .rank { font-size: 13px; }
  .bio-aside .dl-btn { font-size: 14px; }
  .bio-pull blockquote { font-size: 25px; }

  /* Media */
  .video-card h3   { font-size: 24px; }
  .video-card .desc { font-size: 16.5px; }
  .video-card .meta { font-size: 13.5px; }
  .audio-meta h3 { font-size: 21px; }
  .audio-meta p  { font-size: 15px; }

  /* Download */
  .dl-meta h3   { font-size: 24px; }
  .dl-meta p    { font-size: 16.5px; }
  .dl-meta .meta { font-size: 13.5px; }

  /* Contatti */
  .contact-intro p { font-size: 20px; line-height: 1.6; }
  .contact-details { display: none; }   /* nascosta su mobile */
  .field label { font-size: 14px; letter-spacing: .04em; }
  .field input, .field select, .field textarea { font-size: 17px; }
}

/* ============================================================
   BIOGRAFIA — page
   ============================================================ */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.bio-body {
  max-width: 64ch;
}
/* Testo biografia: unico slot editabile (data-i18n-html="bio.body"),
   la lingua viene applicata via JS. */
.bio-body p {
  font-family: var(--serif);
  font-size: clamp(17px, 1.4vw, 20.5px);
  line-height: 1.6;
  margin: 0 0 1.15em;
  text-wrap: pretty;
  letter-spacing: .005em;
}
.bio-body .bio-body-text > p:first-child::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 4.2em;
  line-height: .82;
  padding: 6px 14px 0 0;
  font-weight: 400;
  color: var(--accent);
}
.bio-body p em {
  font-style: italic;
  color: var(--ink-2);
}

.bio-aside {
  position: sticky;
  top: 100px;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.55;
}
.bio-portrait {
  margin: 0 0 28px;
  aspect-ratio: 3 / 4;
  background: #1A1A18;
  overflow: hidden;
  position: relative;
}
.bio-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: grayscale(50%) contrast(1.02);
}
.bio-portrait figcaption {
  position: absolute;
  bottom: 10px;
  left: 12px;
  color: rgba(250,250,248,.6);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.facts { margin: 0 0 32px; padding: 0; }
.facts dt {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0; }
.facts ul { list-style: none; padding: 0; margin: 0; }
.facts li { padding: 3px 0; }
.facts .place {
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: .04em;
}
.facts .teachers {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: .005em;
  margin: 0;
}
.prize-list li {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  padding: 6px 0;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
}
.prize-list li:last-child { border-bottom: 0; }
.prize-list .yr {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--accent);
}
.prize-list .rank {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.bio-aside .dl-btn {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
  padding: 12px 16px;
}

/* full-width pull quote */
.bio-pull {
  margin: clamp(56px, 8vw, 96px) auto 0;
  max-width: 880px;
  text-align: center;
  padding: 0 var(--gutter);
}
.bio-pull blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 300;
  line-height: 1.35;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.bio-pull blockquote::before,
.bio-pull blockquote::after {
  content: "";
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent);
  margin: 24px auto;
}
.bio-pull cite {
  font-family: var(--sans);
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .bio-grid { grid-template-columns: 1fr; gap: 56px; }
  .bio-aside { position: static; }
  .bio-portrait { max-width: 260px; }
}

/* ============================================================
   PALETTE
   Le palette sono gestite dall'area riservata (admin/palette.php) e
   applicate a runtime da /api/palette.php (override di :root + eventuali
   correzioni componenti per le palette scure). I :root qui sopra restano
   come default se la palette attiva non fosse disponibile.
   ============================================================ */

/* ============================================================
   ACCENT FLOURISHES — sempre attivi (intensità "pronunciata")
   Filetto sull'eyebrow, barra accent su h1/h2, dates in accent
   ============================================================ */
.eyebrow {
  position: relative;
  padding-left: 32px;
}
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 22px;
  height: 1px;
  background: var(--accent);
}
.section-head h2,
.page-head h1 {
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  margin-left: -20px;
}
.hero-instruments { color: var(--accent); }
.link-more {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.concerto-date .day { color: var(--accent); }
.footer-brand { color: var(--accent); }

/* ============================================================
   TIPOGRAFIA
   I set di font sono gestiti dall'area riservata (admin/tipografia.php) e
   applicati a runtime da /api/typography.php (@import Google Fonts con
   display=swap + override di --serif / --sans, con fallback della stessa
   famiglia mostrato durante il caricamento). I :root iniziali restano di riserva.
   ============================================================ */

/* ============================================================
   TWEAKS PANEL
   ============================================================ */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--bg);
  border: 1px solid var(--rule);
  box-shadow: 0 24px 60px -16px rgba(20,18,12,.22), 0 2px 6px rgba(20,18,12,.06);
  z-index: 80;
  font-family: var(--sans);
  display: none;
}
.tweaks-panel.is-open { display: block; }

.tw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--rule);
}
.tw-title {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .04em;
  font-weight: 400;
}
.tw-close {
  background: none;
  border: 0;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1;
}
.tw-close:hover { color: var(--ink); }

.tw-body {
  padding: 18px;
  display: grid;
  gap: 22px;
}
.tw-label {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.tw-palettes {
  display: grid;
  gap: 6px;
}
.tw-palette {
  display: flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: 1px solid var(--rule);
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.tw-palette:hover { border-color: var(--ink-3); }
.tw-palette.is-active {
  border-color: var(--ink);
  background: var(--bg-2);
}
.tw-swatches {
  display: flex;
  flex-shrink: 0;
}
.tw-swatches i {
  display: block;
  width: 14px;
  height: 22px;
  border: 1px solid rgba(0,0,0,.08);
  margin-left: -1px;
}
.tw-swatches i:first-child { margin-left: 0; }
.tw-tweak-meta { line-height: 1.2; min-width: 0; }
.tw-tweak-name {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tw-tweak-sub {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .02em;
  margin-top: 2px;
}

/* Typography variant cards */
.tw-typesets {
  display: grid;
  gap: 6px;
}
.tw-typeset {
  display: flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: 1px solid var(--rule);
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.tw-typeset:hover { border-color: var(--ink-3); }
.tw-typeset.is-active {
  border-color: var(--ink);
  background: var(--bg-2);
}
.tw-type-preview {
  flex-shrink: 0;
  width: 44px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink);
}
.tw-typeset[data-typeset="cormorant"] .tw-type-preview { font-family: "Cormorant Garamond", serif; font-weight: 400; }
.tw-typeset[data-typeset="garamond"]  .tw-type-preview { font-family: "EB Garamond", serif;        font-weight: 400; }
.tw-typeset[data-typeset="playfair"]  .tw-type-preview { font-family: "Playfair Display", serif;   font-weight: 500; }

@media (max-width: 480px) {
  .tweaks-panel {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* ============================================================
   RUOLI TIPOGRAFICI (gestiti da admin/tipografia.php via /api/typography.php)
   --serif = Titoli · --subhead = Sottotitoli · --body = Corpo · --sans = Interfaccia
   Blocco additivo: sovrascrive le assegnazioni originali dove serve.
   ============================================================ */

/* Sottotitoli — intestazioni secondarie + numeri display */
h2, h3, h4,
.section-head h2, .subhead h2,
.concerto-main h3, .video-card h3, .audio-meta h3, .dl-meta h3,
.concerto-date .day, .audio-idx, .prize-list .yr, .dl-thumb.doc span {
  font-family: var(--subhead);
}

/* Occhiello strumenti (hero) — ruolo a sé */
.hero-instruments { font-family: var(--hero); }

/* Corpo del testo — prosa editoriale */
.hero-bio,
.page-head .lede,
.concerto-body,
.contact-intro p,
.bio-body p,
.bio-pull blockquote,
.facts .teachers {
  font-family: var(--body);
}

/* ============================================================
   PROGETTI (blog) — griglia di card
   ============================================================ */
.progetti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}
.progetto-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.progetto-card:hover { border-color: var(--accent); }
.progetto-cover {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--rule);
}
.progetto-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease);
}
.progetto-card:hover .progetto-cover img { transform: scale(1.04); }
.progetto-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.progetto-date {
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .12em;
}
.progetto-body h2 {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}
.progetto-body a.detail-link { text-decoration: none; }
.progetto-body a.detail-link:hover h2 { color: var(--hover); }
.progetto-sommario {
  color: var(--ink-2);
  font-family: var(--body);
  line-height: 1.55;
  margin: 0;
}
.progetto-body .link-more { margin-top: auto; align-self: flex-start; }
.progetto-card.skeleton-card {
  min-height: 320px;
  background: linear-gradient(100deg, var(--bg-2) 30%, var(--rule) 50%, var(--bg-2) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-style: dashed;
}
@media (max-width: 640px) {
  .progetti-grid { grid-template-columns: 1fr; gap: 24px; }
  .progetto-body h2 { font-size: 23px; }
}
