/* ============================================================
   Guitar Academy — Base: reset, tipografia, layout, header, footer
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, select, textarea, button { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul[class], ol[class] { list-style: none; padding: 0; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: var(--lh-head); font-weight: 700; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--fs-hero); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { max-width: 62ch; }
em.display-serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: 0; font-style: italic; }
::selection { background: var(--amber); color: var(--on-amber); }

/* ---------- Accessibilità: salto al contenuto ---------- */
.skip-link {
  position: absolute; left: var(--s-4); top: -60px; z-index: 200;
  background: var(--ink); color: var(--cream);
  padding: var(--s-3) var(--s-5); border-radius: var(--r-1);
  font-weight: 600; text-decoration: none; transition: top var(--t-fast);
}
.skip-link:focus { top: var(--s-3); box-shadow: var(--ring); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad-x); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: clamp(56px, 9vw, 104px); }
.section--white { background: var(--surface); }
.section--dark { background: var(--dark); color: var(--cream-2); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--cream); }
.section--alt { background: var(--amber-tint); }

.section-head { max-width: 780px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .lede { margin-top: var(--s-4); color: var(--ink-2); font-size: var(--fs-lead); max-width: 60ch; }
.section-head--center .lede { margin-inline: auto; }
.section-head .lede a { color: var(--amber-deep); }

/* Etichetta di sezione (kicker) */
.kicker {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: var(--track-kicker); text-transform: uppercase;
  color: var(--amber-deep); margin-bottom: var(--s-3);
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--amber); border-radius: 2px; }
.kicker--plain::before { display: none; }
.section--dark .kicker { color: var(--amber); }

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--fs-small); color: var(--muted); margin-bottom: var(--s-5); }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--amber-deep); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: var(--z-head);
  background: rgba(251, 247, 239, .92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.site-head.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(25, 21, 16, .35); }
.site-head__inner { display: flex; align-items: center; gap: var(--s-5); min-height: var(--head-h); }

.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; flex-shrink: 0; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--dark); color: var(--amber);
  font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: -.02em;
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.06rem; letter-spacing: -.01em; line-height: 1.1; color: var(--ink); }
.brand-sub { display: block; font-family: var(--font-body); font-weight: 500; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: clamp(4px, 1.4vw, 26px); }
.site-nav a {
  display: inline-block; padding: var(--s-2) 2px; text-decoration: none;
  font-size: .94rem; font-weight: 600; color: var(--ink-2);
  position: relative; white-space: nowrap;
  transition: color var(--t-fast);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 2px;
  background: var(--amber); border-radius: 2px; transition: right var(--t-med);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { right: 0; }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after { right: 0; background: var(--ink); }

.head-actions { display: flex; align-items: center; gap: var(--s-4); margin-left: var(--s-2); flex-shrink: 0; }
.head-tel { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; font-weight: 700; font-size: .92rem; color: var(--ink); }
.head-tel .ico { color: var(--amber-deep); }
.head-tel:hover { color: var(--amber-deep); }

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: var(--s-2); margin-left: auto; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform var(--t-fast), opacity var(--t-fast); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile */
@media (max-width: 1080px) {
  .head-tel { display: none; }
}
@media (max-width: 940px) {
  .site-nav {
    position: fixed; inset: var(--head-h) 0 auto 0; z-index: var(--z-menu);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-2);
    margin-left: 0;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: var(--s-3) var(--pad-x) var(--s-5); }
  .site-nav a { display: block; padding: var(--s-4) 0; font-size: 1.12rem; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .site-nav .nav-cta-mobile { display: block; }
  .nav-toggle { display: flex; margin-left: 0; }
  .head-actions { margin-left: auto; }
}
@media (max-width: 640px) {
  .brand-sub { display: none; }
  .brand-mark { width: 40px; height: 40px; border-radius: 11px; }
}
@media (max-width: 600px) {
  .site-head__inner { gap: 12px; }
  .head-actions .btn { min-height: 40px; padding-inline: 12px; font-size: .85rem; border-radius: 10px; }
}
@media (max-width: 460px) {
  .brand-name { display: none; }
}
@media (max-width: 360px) {
  .site-head__inner { gap: 10px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .head-actions .btn { padding-inline: 10px; font-size: .8rem; }
}
@media (min-width: 941px) {
  .nav-cta-mobile { display: none !important; }
}
.nav-cta-mobile { margin-top: var(--s-4); }
.nav-cta-mobile .btn { width: 100%; justify-content: center; }

/* ---------- Footer ---------- */
.site-foot { background: var(--dark); color: var(--cream-2); padding-top: clamp(48px, 7vw, 80px); }
.site-foot__grid {
  display: grid; grid-template-columns: 1.9fr 1fr 1fr 1.4fr;
  gap: var(--s-7); padding-bottom: clamp(40px, 6vw, 64px);
}
.site-foot h2 { color: var(--cream); font-size: 1.05rem; margin-bottom: var(--s-4); }
.site-foot h2 span { color: var(--amber); }
.site-foot a { color: var(--cream-2); text-decoration: none; transition: color var(--t-fast); }
.site-foot a:hover { color: var(--amber); }
.site-foot li { margin-bottom: var(--s-2); font-size: .95rem; }
.site-foot .foot-brand p { margin-top: var(--s-4); font-size: .95rem; }
.foot-contacts li { display: flex; gap: var(--s-3); align-items: baseline; }
.foot-contacts .ico { flex-shrink: 0; color: var(--amber); }
.foot-contacts strong { color: var(--cream); font-weight: 700; }
.foot-note { font-size: var(--fs-small); color: var(--cream-2); opacity: .75; margin-top: var(--s-2); }
.foot-social { display: flex; gap: var(--s-3); margin-top: var(--s-5); }
.foot-social a {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--dark-line);
  display: grid; place-items: center; color: var(--cream);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.foot-social a:hover { background: var(--dark-2); border-color: var(--amber); color: var(--amber); }
.site-foot__bottom {
  border-top: 1px solid var(--dark-line);
  padding-block: var(--s-5);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6);
  align-items: center; justify-content: space-between;
  font-size: var(--fs-small); color: var(--cream-2); opacity: .8;
}
.site-foot__bottom .legal { display: flex; gap: var(--s-5); }
.site-foot__bottom .legal a:hover { color: var(--amber); }

@media (max-width: 900px) {
  .site-foot__grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
}
@media (max-width: 560px) {
  .site-foot__grid { grid-template-columns: 1fr; }
}

/* ---------- Utility ---------- */
.grid { display: grid; gap: var(--s-5); }
.mt-1 { margin-top: var(--s-5); }
.mt-2 { margin-top: var(--s-7); }
.ta-c { text-align: center; }
.no-scroll { overflow: hidden; }

.ico { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico--sm { width: 17px; height: 17px; }
.ico--lg { width: 26px; height: 26px; }

/* Micro-interazione rivelazione (disattivata con reduced-motion) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
