@import url('./palette.css');
/* Nuove home (ottobre 2026) — base comune alle 10 versioni del secondo giro (tutte dalla versione 1).
   Dieci palette chiare e luminose, senza rosa. Colore dei testi indipendente.
   Nome del sito sempre in alto al centro. Colori in palette.css. */
:root {
  --font: "Source Sans 3", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --mano: "Dancing Script", cursive;
  --serif: "Fraunces", Georgia, serif;
  --largo: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--beige); color: var(--ink); font: 16px/1.5 var(--font); }
img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, blockquote, figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
::selection { background: var(--acc); color: var(--beige); }
main { max-width: var(--largo); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }

/* Testata: logo, nome in alto al centro, sottotitolo, ruoli */
.testa { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: var(--largo); margin-inline: auto; padding: 36px clamp(16px, 4vw, 40px) 0; text-align: center; }
.logo { display: inline-block; flex: none; width: 92px; aspect-ratio: 303 / 128; background: var(--acc); -webkit-mask: url(../asset/topografico/logo-scuro.png) center / contain no-repeat; mask: url(../asset/topografico/logo-scuro.png) center / contain no-repeat; }
.nome { margin-top: 4px; font-weight: 800; font-stretch: 120%; font-size: clamp(1.55rem, 3.2vw, 2.4rem); line-height: 1.05; letter-spacing: .01em; text-transform: uppercase; color:var(--font-color, var(--acc)); }
.nome a { text-decoration: none; }
.sotto { font-family: var(--mono); font-size: .8rem; color: var(--tenue); }
.ruoli { font-family: var(--mono); font-size: .74rem; color:var(--font-color, var(--ocra)); }

/* Frase celebre: uniforme, in corsivo, al centro */
.frase { max-width: 62ch; margin: 28px auto 0; text-align: center; text-wrap: balance; font-family: var(--mano); font-weight: 600; font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.35; color: var(--ink); }
.frase p { display: inline; }
.frase p + p::before { content: " "; }

/* Le tre foto principali crescono con lo schermo, sempre in fila. */
.foto { display: flex; justify-content: center; gap: clamp(10px, 3.4vw, 40px); margin-top: 30px; }
.foto__f { display: block; width: min(28%, clamp(220px, 18vw, 480px)); aspect-ratio: 4 / 3; overflow: hidden; }
.foto__f img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.foto__f:hover img { transform: scale(1.04); }
.foto__f--1 img { object-position: 50% 35%; }
.foto__f--2 img { object-position: 50% 40%; }

/* Contenitori: riga di riquadri; le sottocategorie si aprono solo cliccando, sotto la riga */
/* Terzo giro (18/10): nove colonne uguali, allineate ai bordi della pagina, tutte dritte; ogni versione le veste a modo suo */
.contenitori { position: relative; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.c { text-decoration: none; }
.c--apre { display: contents; }
.c__btn, .c--link { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 112px; padding: 16px 6px 12px; text-align: center; text-decoration: none; background: var(--tinta); color: var(--su-tinta); transition: transform .2s, background .2s, color .2s, border-color .2s, box-shadow .2s; }
.c__btn[aria-expanded="true"] { box-shadow: inset 0 0 0 2px currentColor; }
.c__n { display: none; font-family: var(--mono); font-size: .7rem; color:var(--font-color, var(--ocra)); }
.c__nome { display: block; max-width: 100%; font-weight: 700; font-stretch: 85%; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; line-height: 1.2; }
.c__segno { position: relative; flex: none; width: 8px; height: 8px; margin-top: 2px; }
.c__segno::before, .c__segno::after { content: ""; position: absolute; inset: 3px 0; background: currentColor; transition: transform .25s; }
.c__segno::after { transform: rotate(90deg); }
.c__btn[aria-expanded="true"] .c__segno::after { transform: rotate(0); }
.c__sub { order: 99; grid-column: 1 / -1; padding: 16px 0 4px; }
.c__foto { display: none; }
.c__voci { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; }
.c__voci a { padding: 6px 12px; font-family: var(--mono); font-size: .78rem; text-decoration: none; border: 1.5px solid var(--acc); color:var(--font-color, var(--acc)); transition: background .2s, color .2s; }
.c__voci a:hover, .c__voci a:focus-visible { background: var(--acc); color: var(--beige); }
.c__voci .c__tutto { background: var(--acc); color: var(--beige); font-weight: 600; }
.c__voci .c__tutto::after { content: " →"; }
.c__voci .c__tutto:hover { background: var(--acc-scuro); }

/* Le 3 cose della home: breve descrizione, il resto dentro il contenitore */
.tre { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 36px); padding-top: clamp(48px, 7vw, 90px); }
.cosa__foto { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.cosa__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.cosa:hover .cosa__foto img { transform: scale(1.04); }
.cosa { display: flex; flex-direction: column; min-width: 0; }
.cosa__foto { flex: none; }
.cosa__testo { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding-top: 18px; }
.cosa__titolo { font-weight: 800; font-stretch: 112%; font-size: 1.12rem; line-height: 1.15; text-transform: uppercase; color:var(--font-color, var(--acc)); }
.cosa__titolo a { text-decoration: none; }
.cosa__titolo a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.cosa__descr { margin-top: 10px; font-size: .95rem; line-height: 1.65; max-width: 48ch; color: var(--tenue); }
.cosa__descr strong { color: var(--ink); font-weight: 600; }
.cosa__descr a { color:var(--font-color, var(--acc)); font-weight: 600; }
.cosa__link { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: auto; padding-top: 16px; }
.cosa__link a { font-family: var(--mono); font-size: .72rem; font-weight: 600; color:var(--font-color, var(--acc)); text-decoration: underline; text-decoration-color:var(--font-color, var(--ocra)); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.cosa__link a:hover { color: var(--ink); }

/* Sponsor: logo sfocato (in attesa di conferma) + riquadro per le palestre */
.sponsor { margin-top: clamp(48px, 6vw, 76px); padding-block: 30px clamp(40px, 5vw, 64px); border-top: 1px solid var(--linea); text-align: center; }
.sponsor__titolo { font-family: var(--mono); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--tenue); }
.sponsor__riquadri { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 18px; }
.sponsor__box { display: grid; place-items: center; width: 240px; height: 112px; padding: 18px 24px; overflow: hidden; border: 1.5px solid var(--linea); }
.sponsor__box--logo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; filter: blur(6px); opacity: .85; }
.sponsor__box--palestre span { font-weight: 800; font-stretch: 115%; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .04em; color:var(--font-color, var(--acc)); }

/* Piede */
.piede { padding: 28px 16px 40px; border-top: 1px solid var(--linea); text-align: center; font-family: var(--mono); font-size: .78rem; color: var(--tenue); }
.firma { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.firma img { width: 32px; height: 32px; }
.firma b { color:var(--font-color, var(--acc)); font-weight: 600; }

/* Barra della prova (solo anteprime): versione e colore */
.prova { position: fixed; right: 12px; bottom: 12px; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--ink); color: var(--beige); font: 600 .78rem var(--mono); border-radius: 99px; box-shadow: 0 6px 20px rgb(0 0 0 / .25); }
.prova a { padding: 0 6px; text-decoration: none; font-size: 1.05rem; line-height: 1; }
.prova__colori { display: flex; gap: 5px; margin-left: 4px; padding-left: 10px; border-left: 1px solid rgb(255 255 255 / .25); }
.prova__colori button { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .35); }
.prova__colori [data-p="terracotta"] { background: #a3452a; }
.prova__colori [data-p="blu"] { background: #233a5e; }
.prova__colori [aria-pressed="true"] { box-shadow: 0 0 0 2px var(--beige); }

/* Desktop: la pagina segue la larghezza disponibile con margini proporzionati. */
@media (min-width: 1051px) {
  :root { --largo: 100%; }
  main, .testa { padding-inline: clamp(40px, 4vw, 96px); }
}

@media (max-width: 760px) {
  .tre { grid-template-columns: 1fr; }
  .testa { padding-top: 18px; }
  .logo { width: 70px; }
  .contenitori { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .c__nome { font-size: .74rem; }
  .sponsor__box { width: 100%; max-width: 320px; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  .contenitori { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .nome { font-size: clamp(1.35rem, 6.2vw, 1.65rem); line-height: 1.15; text-wrap: balance; }
  .frase { margin-top: 22px; font-size: 1.35rem; }
  .foto { margin-top: 24px; }
  .contenitori { gap: 12px 10px; margin-top: 32px; }
  .c__btn, .c--link { min-height: 108px; }
  .c__nome { overflow-wrap: anywhere; }
  .tre { gap: 32px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Versioni "luminose" (5-10, richieste 17-18/10): fondo più chiaro, linee e bordi leggeri nel colore della palette, foto più vive */
.luminosa { --beige: var(--beige-luce); --tinta: var(--tinta-luce); --su-tinta: var(--font-color, var(--acc)); --linea: color-mix(in srgb, var(--acc) 22%, transparent); --bordo: color-mix(in srgb, var(--acc) 50%, transparent); }
body.nv.luminosa::after { opacity: .03; }
.luminosa :is(.foto__f, .cosa__foto) img { filter: brightness(1.06) saturate(1.08); }
.luminosa .sponsor__box { border-color: var(--linea); }
