/* L'Italica: tema ricavato dall'etichetta di Marta Ferroni e dai legni dello strumento */

@font-face { font-family: "Bodoni Moda"; src: url("fonts/bodoni-moda.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("fonts/bodoni-moda-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url("fonts/albert-sans.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  /* primitivi: legni e colori dell'etichetta */
  --abete: #f0e6cf;
  --abete-chiaro: #f7f1e3;
  --salvia: #41615a;
  --salvia-scuro: #2e4843;
  --pioppo: #e2c47c;
  --pero: #b0602f;
  --rosso-etichetta: #b84a38;
  --noce: #2b2621;
  --noce-medio: #5f554a;

  /* semantici */
  --bg: var(--abete);
  --bg-alt: var(--abete-chiaro);
  --text: var(--noce);
  --text-muted: var(--noce-medio);
  --link: var(--salvia-scuro);
  --hero-bg: var(--salvia);
  --hero-text: var(--abete-chiaro);
  --support-bg: var(--rosso-etichetta);
  --support-text: #fbf3e6;
  --rule: rgba(43, 38, 33, 0.18);
  --focus: var(--pioppo);

  /* componenti */
  --btn-bg: var(--salvia-scuro);
  --btn-text: var(--abete-chiaro);
  --btn-bg-hover: var(--noce);
  --btn-hero-bg: var(--pioppo);
  --btn-hero-text: var(--noce);

  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-body: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 34em;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section: clamp(4rem, 9vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  font-kerning: normal;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--noce); color: var(--abete); padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; margin: 0; font-optical-sizing: auto; }
h2 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); letter-spacing: -0.01em; max-width: 16ch; }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.2; }
h2 + p, h3 + p { margin: 1.1rem 0 0; max-width: var(--measure); }
p { margin: 0; }

.wrap { width: min(100% - 2 * var(--gutter), 76rem); margin-inline: auto; }
section { padding-block: var(--section); }

/* bottoni */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.5rem; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-text);
  font: 600 1rem/1 var(--font-body); text-decoration: none;
  transition: background-color .2s, transform .2s;
}
.btn:hover { background: var(--btn-bg-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 1em; height: 1em; }

/* invito alla lingua del browser */
.langbar {
  position: fixed; inset: 0 0 auto; z-index: 30; min-height: 2.75rem;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .25rem .75rem;
  padding: .5rem 3rem .5rem 1rem; background: var(--pioppo); color: var(--noce);
  font-size: .95rem; text-align: center;
}
.langbar[hidden] { display: none; }
.langbar a { color: var(--noce); font-weight: 600; }
.langbar-close {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  width: 2.25rem; height: 2.25rem; border: 0; background: transparent; color: var(--noce);
  font: 400 1.6rem/1 var(--font-body); cursor: pointer;
}
.has-langbar .site-head { top: 2.75rem; }

/* intestazione */
.site-head {
  position: absolute; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem var(--gutter);
  color: var(--hero-text);
}
.wordmark { font: italic 400 1.5rem/1 var(--font-display); color: inherit; text-decoration: none; }
.head-nav { display: flex; align-items: center; gap: 1.25rem; font-size: .95rem; }
.head-nav a { color: inherit; }
.lang a { text-decoration: none; opacity: .7; padding: .2rem .15rem; }
.lang a[aria-current="true"] { opacity: 1; text-decoration: underline; }
.head-cta { border: 1px solid rgba(247, 241, 227, .5); border-radius: 999px; padding: .5rem .95rem; text-decoration: none; }
.head-cta:hover { background: rgba(247, 241, 227, .12); }

/* hero */
.hero {
  background: var(--hero-bg); color: var(--hero-text);
  padding-block: 0; overflow: hidden; position: relative;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: var(--gutter);
  min-height: min(100svh, 62rem);
  padding-top: 5rem;
}
.hero-text { padding-block: 3rem; }
.hero h1 {
  font-size: clamp(4.2rem, 12vw, 10.5rem);
  font-weight: 400; font-style: italic; letter-spacing: -0.02em; line-height: .9;
  margin-left: -0.04em;
}
.hero-lead { margin-top: 1.6rem; font-size: clamp(1.15rem, 1.7vw, 1.35rem); line-height: 1.5; max-width: 28em; }
.hero-support {
  display: block; margin-top: 1.2rem; padding-left: 1rem;
  border-left: 3px solid var(--pioppo); color: var(--pioppo);
  font: 500 clamp(1.35rem, 2.1vw, 1.7rem)/1.3 var(--font-display); text-wrap: pretty;
}
.hero-actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.hero .btn { background: var(--btn-hero-bg); color: var(--btn-hero-text); }
.hero .btn:hover { background: var(--abete-chiaro); }
.price { font-size: .98rem; opacity: .9; }

.stage {
  position: relative; height: min(88svh, 56rem); align-self: end;
  perspective: 1300px; perspective-origin: 50% 40%;
  touch-action: pan-y; cursor: grab; user-select: none;
  /* il manico della foto e' tagliato: lo sfumo verso l'alto */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14%);
}
.stage.dragging { cursor: grabbing; }
/* la rotazione e' guidata da site.js (--a gradi Y, --x gradi X) */
.turn {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(var(--x, 0deg)) rotateY(var(--a, 0deg));
}
.shape {
  position: absolute; left: 50%; top: calc(-1 * var(--lift, 12%));
  height: 112%; aspect-ratio: 703 / 1275;
  transform: translateX(-50%); transform-style: preserve-3d;
}
.shape > * { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.shape img { max-width: none; }
.face-front, .sheen, .face-back, .slab { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face-front { transform: translateZ(1px); }
/* spessore: sagome della chitarra impilate in profondita', color pero sempre piu' scuro */
.slab {
  -webkit-mask: url("../img/hero-front.webp") center / 100% 100% no-repeat;
  mask: url("../img/hero-front.webp") center / 100% 100% no-repeat;
  background: hsl(22 58% calc(40% - var(--i) * 1.3%));
  transform: translateZ(calc(var(--i) * -2.2px));
}
.sheen {
  -webkit-mask: url("../img/hero-front.webp") center / 100% 100% no-repeat;
  mask: url("../img/hero-front.webp") center / 100% 100% no-repeat;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 250, 235, .28) 50%, transparent 62%) no-repeat;
  background-size: 300% 100%; background-position: var(--sx, 50%) 0;
  transform: translateZ(2px); opacity: var(--so, .6);
}
.face-back { object-fit: contain; transform: translateZ(-32px) rotateY(180deg); }
.stage-shadow {
  position: absolute; left: 22%; right: 22%; bottom: 2%; height: 4%;
  background: radial-gradient(closest-side, rgba(15, 25, 22, .5), transparent);
  transform: translateX(var(--sh, 0px)) scaleX(var(--s, 1));
}
.stage-controls {
  position: absolute; right: 0; bottom: 1.5rem; z-index: 2;
  display: flex; align-items: center; gap: .5rem; font-size: .9rem;
}
.stage-controls button {
  font: 500 .9rem/1 var(--font-body); color: var(--hero-text);
  background: rgba(46, 72, 67, .75); border: 1px solid rgba(247, 241, 227, .35);
  border-radius: 999px; padding: .55rem .9rem; cursor: pointer;
}
.stage-controls button[aria-pressed="true"] { background: var(--abete-chiaro); color: var(--noce); }
.stage-hint { margin-right: .4rem; opacity: .85; }
.photo-credit { position: absolute; left: 0; bottom: 1.6rem; font-size: .8rem; opacity: .7; }

/* ricavato */
.support { background: var(--support-bg); color: var(--support-text); }
.support a { color: inherit; }
.support h2 { max-width: 24ch; }
.support-lead { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.5; max-width: 36em; }
.support-logos {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem;
  background: var(--abete-chiaro); color: var(--noce); border-radius: 1.25rem;
  padding: 1.1rem 2rem 1.1rem 1.5rem;
}
.support-logos-label { font: italic 400 1.2rem/1.2 var(--font-display); }
.support-logos a { display: block; }
.support-logos a:first-of-type img { width: 7.5rem; height: 7.5rem; }
.support-logos a:last-of-type img { width: 16rem; height: auto; }
@media (max-width: 36rem) { .support-logos a:last-of-type img { width: 12rem; } .support-logos a:first-of-type img { width: 6rem; height: 6rem; } }
.support-grid { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.support-grid > div {
  background: #9c3b2c; border-top: 4px solid var(--pioppo);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
}
.support-grid h3 { font-size: clamp(1.6rem, 2.4vw, 2.05rem); line-height: 1.15; color: #fff8ec; }
.support-grid p { margin-top: 1rem; font-size: 1.06rem; line-height: 1.6; }
.next-edition { margin-top: clamp(2.5rem, 5vw, 3.5rem); font-size: 1.05rem; }

/* liutai */
.makers-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.names {
  list-style: none; padding: 0; margin: 2.5rem 0 0;
  columns: 2; column-gap: 2rem;
  font: 400 clamp(1.15rem, 1.6vw, 1.35rem)/1.75 var(--font-display);
}
.names li { break-inside: avoid; }
.leads { margin: 2.5rem 0 0; display: grid; gap: 1rem; }
.leads div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.leads dt { font-weight: 600; }
.leads dd { margin: 0; color: var(--text-muted); }
.label-fig { margin: 0; position: sticky; top: 2rem; }
.label-fig img { box-shadow: 0 20px 50px rgba(43, 38, 33, .18); }
figcaption { margin-top: .8rem; font-size: .92rem; color: var(--text-muted); line-height: 1.5; }

/* storia */
.history { background: var(--bg-alt); }
.timeline { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; gap: 0; max-width: 52rem; }
.timeline li { display: grid; grid-template-columns: 12rem 1fr; gap: 1.5rem; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.timeline time { font: 500 1.15rem/1.4 var(--font-display); }
.strip {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15rem, 22rem);
  gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem;
}
.strip figure { margin: 0; scroll-snap-align: start; }
.strip img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

/* legni */
.woods-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); }
.woods-text h3 { margin-top: 2.5rem; }
.specs { width: 100%; border-collapse: collapse; font-size: .98rem; }
.specs caption { text-align: left; font: 500 1.5rem/1.2 var(--font-display); margin-bottom: 1rem; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: .6rem 0; border-top: 1px solid var(--rule); }
.specs th { font-weight: 600; width: 38%; padding-right: 1rem; }
.specs-note { margin-top: .9rem; font-size: .88rem; color: var(--text-muted); }
.details { margin-top: clamp(3rem, 6vw, 5rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.25rem; }
.details figure { margin: 0; }
.details img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* video */
.videos { background: var(--salvia-scuro); color: var(--hero-text); }
.videos a { color: inherit; }
.video-grid { margin-top: 3rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem var(--gutter); }
.video { margin: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #1f302c; }
.video-frame img, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; color: var(--noce);
}
.video-play span {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--pioppo); border-radius: 999px; padding: .8rem 1.2rem; font: 600 .95rem/1 var(--font-body);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.video figcaption { color: rgba(247, 241, 227, .85); }
.video-note { margin-top: 2.5rem; font-size: .9rem; opacity: .8; }

/* domande */
.faq-list { margin-top: 2.5rem; max-width: 50rem; }
.faq-list details { border-top: 1px solid var(--rule); }
.faq-list details:last-child { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 1.2rem 2.5rem 1.2rem 0; position: relative;
  font: 500 clamp(1.2rem, 2vw, 1.45rem)/1.3 var(--font-display);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: .25rem; top: 1.05rem; font: 400 1.6rem/1 var(--font-body); color: var(--pero); }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { padding: 0 0 1.4rem; max-width: var(--measure); }

/* chiusura */
.closing { background: var(--hero-bg); color: var(--hero-text); text-align: left; }
.closing .btn { background: var(--btn-hero-bg); color: var(--btn-hero-text); margin-top: 2rem; }
.closing .btn:hover { background: var(--abete-chiaro); }
.closing h2 { max-width: 20ch; }

.site-foot { background: var(--noce); color: rgba(240, 230, 207, .82); font-size: .92rem; padding-block: 3.5rem; }
.site-foot a { color: var(--abete); }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem var(--gutter); }
.foot-grid h3 { font-size: 1.15rem; color: var(--abete); margin-bottom: .6rem; }

/* responsive */
@media (max-width: 60rem) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; padding-top: 5.5rem; gap: 0; }
  .hero-text { padding-block: 1rem 0; }
  .stage { height: 70svh; min-height: 30rem; margin-top: 2rem; overflow: hidden; --lift: 10%; }
  .photo-credit { bottom: 4.5rem; right: 0; left: auto; }
  .support-grid, .foot-grid { grid-template-columns: 1fr; }
  .makers-grid, .woods-grid { grid-template-columns: 1fr; }
  .label-fig { position: static; max-width: 26rem; }
  .video-grid { grid-template-columns: 1fr; }
}
@media (max-width: 36rem) {
  .head-cta { display: none; }
  .names { columns: 1; }
  .leads div, .timeline li { grid-template-columns: 1fr; gap: .25rem; }
  .details { grid-template-columns: 1fr; }
  .stage-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
