/* Wordmark e C con fulmine: tracciati reali dal file logo_cykeln.svg (nessun font). Layout: barra fissa (hamburger + logo C a sinistra, prossima gara e contatti a destra) sopra l'Hero con CYKELN animato; il menu si apre a tutta pagina da un cerchio che parte dall'hamburger. Scelta consapevole: look unico, chiaro per la pagina e verde petrolio scuro per il menu. */
:root {
  --bg: #eef1f0;
  --fg: #12292b;
  --muted: #4f6465;
  --team-teal: #17403f;
  --team-coral: #ef4b50;
  --team-pink: #f6b4b6;
  --team-aqua: #8cc9cd;
  --menu-bg: #10292a;
  --menu-fg: #eef1f0;
  --menu-muted: #8fa6a7;
  --menu-line: rgba(238, 241, 240, 0.16);
  --font-display: "Montserrat", "Arial Black", Impact, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bar-h: 72px;
  color-scheme: light;
}
body.locked { overflow: hidden; }
.bar :focus-visible, .menu :focus-visible, .time :focus-visible, .timem :focus-visible, .hero :focus-visible, .cue:focus-visible { outline: 3px solid var(--team-aqua); outline-offset: 3px; }

/* barra */
.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: calc(var(--bar-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  color: var(--fg);
  transition: color 0.4s ease;
}
.bar[data-open="true"] { color: var(--menu-fg); }
.bar-l, .bar-r { display: flex; align-items: center; gap: 14px; min-width: 0; }
.burger {
  position: relative;
  width: 48px; height: 48px;
  border: 0; background: transparent; color: inherit; cursor: pointer;
  border-radius: 50%;
}
.burger span {
  position: absolute; left: 13px; right: 13px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1);
}
.burger span:nth-child(1) { top: 20px; }
.burger span:nth-child(2) { top: 27px; }
.bar[data-open="true"] .burger span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.bar[data-open="true"] .burger span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
.logo { display: block; height: 46px; }
.logo svg { display: block; height: 100%; width: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--team-coral); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.cta {
  font-size: 15px; font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--team-coral); padding-bottom: 3px;
}
.cta:hover { color: var(--team-coral); }
@media (max-width: 640px) { .chip { display: none; } }

/* hero */
.hero { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(20px, 3.5vw, 36px); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.wordmark { display: block; width: 100%; height: auto; max-width: 100%; }
.foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; }
.foot p { margin: 0; max-width: 34ch; font-size: clamp(18px, 2.2vw, 22px); font-weight: 500; text-wrap: balance; }

/* movimento: l'immagine è larga 1500 e alta 1547 unità */
.panx { animation: panx 7s ease-in-out infinite alternate; }
.pany { animation: pany 11s ease-in-out infinite alternate; }
@keyframes panx { from { transform: translateX(-470px); } to { transform: translateX(-30px); } }
@keyframes pany { from { transform: translateY(-420px); } to { transform: translateY(-760px); } }
.lpx { animation: lpx 5s ease-in-out infinite alternate; }
.lpy { animation: lpy 8s ease-in-out infinite alternate; }
@keyframes lpx { from { transform: translateX(-140px); } to { transform: translateX(-10px); } }
@keyframes lpy { from { transform: translateY(-150px); } to { transform: translateY(-10px); } }
.tpx { animation: tpx 7s ease-in-out infinite alternate; }
.tpy { animation: tpy 10s ease-in-out infinite alternate; }
@keyframes tpx { from { transform: translateX(-300px); } to { transform: translateX(-30px); } }
@keyframes tpy { from { transform: translateY(-380px); } to { transform: translateY(-120px); } }

/* menu */
.menu {
  position: fixed; inset: 0; z-index: 50;
  background: var(--menu-bg); color: var(--menu-fg);
  overflow-y: auto;
  clip-path: circle(0px at 40px 40px);
  visibility: hidden;
  transition: clip-path 0.8s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s linear 0.8s;
}
.menu[data-open="true"] {
  clip-path: circle(160% at 40px 40px);
  visibility: visible;
  transition: clip-path 0.8s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s;
}
.menu-in {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-content: center;
  padding-top: calc(var(--bar-h) + 24px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  max-width: 1280px; margin: 0 auto;
}
@media (max-width: 860px) { .menu-in { grid-template-columns: minmax(0, 1fr); align-content: start; } }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.links li { overflow: hidden; }
.links a {
  display: inline-block;
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase; text-decoration: none;
  font-size: clamp(30px, 6vw, 68px); line-height: 1.12;
  transform: translateY(105%);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.25s ease;
  transition-delay: calc(0.25s + var(--i) * 0.05s), 0s;
}
.menu[data-open="true"] .links a { transform: translateY(0); }
.links a:hover { color: var(--team-coral); }
.side { display: flex; flex-direction: column; min-width: 0; opacity: 0; transition: opacity 0.6s ease 0.5s; }
.menu[data-open="true"] .side { opacity: 1; }
.block { border-top: 1px solid var(--menu-line); padding: 18px 0 22px; display: flex; flex-direction: column; gap: 10px; }
.block:first-child { border-top: 0; padding-top: 0; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--menu-muted); }
.tile { display: block; width: 100%; height: auto; border-radius: 4px; }
.block h3 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.block p { margin: 0; color: var(--menu-muted); font-size: 15px; }
.social { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; font-weight: 600; }
.social a { text-decoration: none; border-bottom: 1px solid var(--menu-line); padding-bottom: 2px; }
.social a:hover { color: var(--team-coral); border-color: var(--team-coral); }

@media (prefers-reduced-motion: reduce) {
  .panx, .pany, .lpx, .lpy, .tpx, .tpy, .dot { animation: none; }
  .menu, .menu[data-open="true"] { transition: none; }
  .links a, .side { transition: none; }
}

/* ===== Hero a tutta altezza: testi a sinistra in alto, scritta ancorata in fondo a tutta larghezza ===== */
:root { --pad: clamp(20px, 3.2vw, 96px); --m: clamp(10px, 0.75vw, 20px); }
.hero {
  max-width: none; margin: 0;
  min-height: 100vh; min-height: 100svh;
  box-sizing: border-box;
  display: flex; flex-direction: column;
  gap: clamp(24px, 4vw, 72px);
  padding-top: calc(var(--bar-h) + clamp(8px, 2.6vw, 56px));
  padding-bottom: max(var(--m), env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--m), env(safe-area-inset-left, 0px));
  padding-right: max(var(--m), env(safe-area-inset-right, 0px));
}
.hero-top {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(14px, min(5.5vw, 11vh), 120px);
  padding-left: calc(var(--pad) - var(--m));
  padding-right: calc(var(--pad) - var(--m));
}
.hero .lead-block { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(12px, 1.8vw, 32px); }
.hero .eyebrow { font-size: clamp(14px, min(1.8vw, 3.9vh), 44px); letter-spacing: 0.12em; line-height: 1.1; font-weight: 600; }
.hero .lead {
  margin: 0; max-width: 26em;
  font-size: clamp(20px, min(4.2vw, 8.4vh), 96px); line-height: 1.15; font-weight: 500; letter-spacing: -0.01em;
  text-wrap: balance;
  animation: lead-in 1.8s cubic-bezier(0.3, 0.1, 0.2, 1) 0.5s both;
}
@keyframes lead-in { from { opacity: 0; } to { opacity: 1; } }
.hero .cta { font-size: clamp(15px, 1.2vw, 22px); }
.hero .wordmark { margin-top: auto; }

/* ===== Telefono (sotto 700px): solo la C con il fulmine, grande, inclinata, in basso ===== */
.hero-c { display: none; }
.cpx { transform: translateX(-700px); animation: cpx 9s ease-in-out infinite alternate; }
.cpy { transform: translateY(-400px); animation: cpy 14s ease-in-out infinite alternate; }
@keyframes cpx { from { transform: translateX(-560px); } to { transform: translateX(-800px); } }
@keyframes cpy { from { transform: translateY(-150px); } to { transform: translateY(-830px); } }
@media (max-width: 699px) {
  .hero {
    --cw: min(100vw, 560px); --ch: calc(var(--cw) * 1.043); --tilt: -15deg; --bleed: 0.2; --shift: -0.38;
    position: relative; overflow: hidden;
    padding-top: calc(var(--bar-h) + 8px);
    padding-bottom: calc(var(--ch) * (1 - var(--bleed)) + 16px);
  }
  .hero .wordmark { display: none; }
  .hero .hero-c {
    display: block; position: absolute; left: calc((100% - var(--cw)) / 2 + var(--cw) * var(--shift)); width: var(--cw); height: var(--ch);
    bottom: calc(var(--ch) * var(--bleed) * -1);
    transform: rotate(var(--tilt)); transform-origin: 50% 50%; pointer-events: none;
  }
  .hero-top { gap: clamp(28px, 13.5svh, 120px); }
  .hero .eyebrow { font-size: clamp(14px, 4.6vw, 22px); letter-spacing: 0.1em; }
  .hero .lead { font-size: clamp(21px, 6.6vw, 36px); max-width: none; }
  .hero .cta { font-size: 15px; }
}

/* ===== Hamburger a tre trattini (2px, come l'icona che gira) ===== */
.burger span { transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.25s ease; }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 23px; }
.burger span:nth-child(3) { top: 30px; }
.bar[data-open="true"] .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bar[data-open="true"] .burger span:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.bar[data-open="true"] .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Richiami: fumetto sul desktop, freccia sul telefono ===== */
.tip { display: none; position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; will-change: transform; }
.tip-in {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 9px 15px 9px 16px; background: var(--menu-bg); color: var(--menu-fg);
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  border-radius: 18px 18px 18px 3px; transform-origin: 0 100%;
  opacity: 0; transform: scale(0.6);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.tip svg { width: 12px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tip.is-on .tip-in { opacity: 1; transform: scale(1); }
.tip.is-flip .tip-in { border-radius: 18px 18px 3px 18px; transform-origin: 100% 100%; }
@media (hover: hover) and (pointer: fine) and (min-width: 700px) {
  .tip { display: block; }
  .hero .wordmark { cursor: pointer; }
}
.hero .wordmark { transition: filter 0.6s ease; }
.hero .wordmark.is-awake { filter: saturate(1.45) contrast(1.04); }

.cue {
  display: none; position: fixed; z-index: 30; width: 44px; text-decoration: none; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 6px;
  color: var(--fg); right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  opacity: 0; animation: cue-in 0.8s ease 3s both;
}
.cue-label { writing-mode: vertical-rl; white-space: nowrap; font-size: 14px; font-weight: 600; letter-spacing: 0.06em; line-height: 1; }
.cue svg { flex: none; width: 24px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: cue-bob 1.8s ease-in-out 3.8s infinite; }
.cue.is-gone { opacity: 0; animation: none; pointer-events: none; }
@keyframes cue-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cue-bob { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(5px); } }
@media (hover: none), (max-width: 699px) { .cue { display: flex; } }
@media (hover: none) and (min-width: 700px) { .cue { right: var(--pad); bottom: calc((100vw - 2 * var(--m)) * 316 / 1837 + var(--m) + 14px); } }
.next { background: var(--menu-bg); color: var(--menu-fg); min-height: 70vh; padding: clamp(48px, 8vw, 120px) var(--pad); }
.next h2 { margin: 0 0 16px; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(28px, 4vw, 56px); }
.next p { margin: 0; max-width: 40ch; color: var(--menu-muted); }
html { scroll-behavior: smooth; }

/* ===== Font dei titoli = quello del logo (Montserrat Black) e menu tutto in maiuscolo ===== */
.links a { font-size: clamp(34px, 7.2vw, 92px); line-height: 1.08; letter-spacing: -0.005em; }
.menu .block h3 { font-size: 17px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.3; }
.menu .block p { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.menu .social { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.t-title { font-size: clamp(26px, 3.2vw, 48px); line-height: 1.08; letter-spacing: -0.005em; }
.next h2 { letter-spacing: -0.005em; }

/* ===== Nuovo sfondo (2000x849): spostamenti ricalcolati sulle sue proporzioni ===== */
.panx { transform: translateX(-300px); }  .pany { transform: translateY(-300px); }
.lpx  { transform: translateX(-300px); }  .lpy  { transform: translateY(-50px); }
.tpx  { transform: translateX(-300px); }  .tpy  { transform: translateY(-100px); }
@keyframes panx { from { transform: translateX(-120px); } to { transform: translateX(-900px); } }
@keyframes pany { from { transform: translateY(-120px); } to { transform: translateY(-700px); } }
@keyframes lpx  { from { transform: translateX(-40px); }  to { transform: translateX(-600px); } }
@keyframes lpy  { from { transform: translateY(-10px); }  to { transform: translateY(-100px); } }
@keyframes tpx  { from { transform: translateX(-30px); }  to { transform: translateX(-560px); } }
@keyframes tpy  { from { transform: translateY(-10px); }  to { transform: translateY(-190px); } }
@keyframes cpx  { from { transform: translateX(-650px); } to { transform: translateX(-900px); } }
@keyframes cpy  { from { transform: translateY(-40px); }  to { transform: translateY(-220px); } }
.cpx { transform: translateX(-780px); }  .cpy { transform: translateY(-130px); }

/* ===== Cronologia per telefono (sotto 900px): schermo diviso in due, sopra l'anno scelto, sotto gli anni da scorrere col tocco ===== */
.timem { display: none; }
@media (max-width: 899px) {
  .timem {
    display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 70;
    background: var(--menu-bg); color: var(--menu-fg);
    clip-path: circle(0px at var(--ox, 90%) var(--oy, 36px)); visibility: hidden;
    transition: clip-path 0.75s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s linear 0.75s;
  }
  .timem[data-open="true"] {
    clip-path: circle(160% at var(--ox, 90%) var(--oy, 36px)); visibility: visible;
    transition: clip-path 0.75s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s;
  }
}
.timem-bar {
  flex: none; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: calc(56px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(14px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--menu-line);
}
.timem-note { margin: 0; max-width: 26ch; font-size: 12px; line-height: 1.4; color: var(--menu-muted); }
.timem-close { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 6px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.timem-close svg { width: 22px; height: 22px; }
.timem-view {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px));
}
.timem-photo { position: relative; flex: none; height: clamp(96px, 21svh, 220px); overflow: hidden; border-radius: 4px; background: var(--team-teal); }
.timem-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s ease; }
.timem-slide.is-active { opacity: 1; }
.timem-slide svg { display: block; width: 100%; height: 100%; }
.timem-copy > * { transition: opacity 0.18s ease, transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1); }
.timem-copy.is-out > * { opacity: 0; transform: translateY(calc(var(--dir, 1) * 10px)); }
.timem-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.timem-y { font-family: var(--font-display); font-weight: 900; font-size: clamp(46px, 14.5vw, 70px); line-height: 0.9; letter-spacing: -0.03em; color: var(--team-coral); font-variant-numeric: tabular-nums; }
.timem-t { margin: 0; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(15px, 4.3vw, 21px); line-height: 1.14; text-wrap: balance; }
.timem-d { margin: 0 0 12px; max-width: 46ch; font-size: 15px; line-height: 1.55; }
.timem-l { display: inline-block; padding-bottom: 3px; border-bottom: 2px solid var(--team-coral); font-size: 15px; font-weight: 600; text-decoration: none; }
.timem-l[hidden] { display: none; }
.timem-wheel {
  --ih: 58px; --wh: clamp(240px, 43svh, 390px);
  position: relative; flex: none; box-sizing: border-box; height: calc(var(--wh) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--menu-line);
}
.timem-picker {
  height: var(--wh); overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none; touch-action: pan-y;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26%, #000 74%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 26%, #000 74%, transparent 100%);
}
.timem-picker::-webkit-scrollbar { display: none; }
.timem-years { list-style: none; margin: 0; padding: calc((var(--wh) - var(--ih)) / 2) 0; }
.timem-years li { height: var(--ih); display: flex; align-items: center; justify-content: center; scroll-snap-align: center; scroll-snap-stop: always; }
.timem-yr {
  border: 0; background: transparent; color: var(--menu-fg); cursor: pointer; padding: 4px 22px; -webkit-tap-highlight-color: transparent;
  font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 9.4vw, 44px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  opacity: max(0.12, calc(1 - var(--d, 0) * 0.4)); transform: scale(calc(1 - min(var(--d, 0), 3) * 0.1));
}
.timem-yr:focus-visible { outline: 3px solid var(--team-aqua); outline-offset: 2px; border-radius: 4px; }
.timem-wheel::before, .timem-wheel::after { content: ""; position: absolute; top: calc(var(--wh) / 2 - 1px); width: 26px; height: 2px; background: var(--team-coral); pointer-events: none; }
.timem-wheel::before { left: max(20px, env(safe-area-inset-left, 0px)); }
.timem-wheel::after { right: max(20px, env(safe-area-inset-right, 0px)); }
.timem-now {
  position: absolute; left: 50%; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 2;
  border: 0; border-bottom: 2px solid var(--team-coral); background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; padding: 0 0 3px; cursor: pointer; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.timem-now.is-on { opacity: 1; pointer-events: auto; }
.timem-close:focus-visible, .timem-l:focus-visible, .timem-now.bar :focus-visible, .menu :focus-visible, .time :focus-visible, .timem :focus-visible, .hero :focus-visible, .cue:focus-visible { outline: 3px solid var(--team-aqua); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .timem-slide, .timem-copy > *, .timem-now { transition: none; }
}

/* ===== Cronologia "ritorno al futuro" (solo desktop) ===== */
.timebtn {
  display: none; position: relative; isolation: isolate; overflow: hidden; align-items: center;
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
  padding: 10px 15px; border-radius: 2px;
}
/* Telefono: solo la scritta, che compare in dissolvenza */
.tagline { display: none; border: 0; background: transparent; color: inherit; font-family: inherit; cursor: pointer; padding: 12px 2px; -webkit-tap-highlight-color: transparent; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; animation: tag-in 1.6s ease 0.5s both; }
@keyframes tag-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 899px) { .tagline { display: block; } }
@media (min-width: 900px) { .timebtn { display: inline-flex; } }

.time {
  display: none;
  position: fixed; inset: 0; z-index: 70;
  background: var(--menu-bg); color: var(--menu-fg);
  clip-path: circle(0px at var(--ox, 50%) var(--oy, 36px));
  visibility: hidden;
  transition: clip-path 0.85s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s linear 0.85s;
  overflow: hidden;
}
.time[data-open="true"] {
  clip-path: circle(160% at var(--ox, 50%) var(--oy, 36px));
  visibility: visible;
  transition: clip-path 0.85s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s;
}
@media (min-width: 900px) { .time { display: block; } }
.time-in {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(340px, 38vw) minmax(190px, 0.8fr);
  gap: clamp(24px, 4.5vw, 80px);
  align-items: center;
  max-width: 1440px; margin: 0 auto;
  padding: calc(var(--bar-h) + 8px) max(32px, env(safe-area-inset-right, 0px)) calc(var(--bar-h) + 8px) max(32px, env(safe-area-inset-left, 0px));
  opacity: 0; transition: opacity 0.5s ease 0.35s;
}
.time[data-open="true"] .time-in { opacity: 1; }

.t-note { position: absolute; top: 30px; left: max(32px, env(safe-area-inset-left, 0px)); z-index: 2; margin: 0; max-width: 56ch; font-size: 13px; line-height: 1.45; color: var(--menu-muted); }
.t-close {
  position: absolute; top: 20px; right: max(24px, env(safe-area-inset-right, 0px)); z-index: 2;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 6px;
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600;
}
.t-close svg { width: 22px; height: 22px; }
.t-close:hover { color: var(--team-pink); }

.t-copy { min-width: 0; align-self: center; }
.t-title {
  margin: 0 0 18px;
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(24px, 2.7vw, 40px); line-height: 1.12; text-wrap: balance;
}
.t-text { margin: 0 0 22px; max-width: 38ch; font-size: 17px; line-height: 1.6; color: var(--menu-fg); }
.t-link {
  display: inline-block; font-size: 15px; font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--team-coral); padding-bottom: 3px;
}
.t-link:hover { color: var(--team-pink); }
.t-link[hidden] { display: none; }
.t-copy > * { transition: opacity 0.22s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.t-copy.is-out > * { opacity: 0; transform: translateY(calc(var(--dir, 1) * 14px)); }

.t-photo { position: relative; }
.t-frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--team-teal); }
.t-slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; transform: translateY(28px) scale(1.04);
  transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.t-slide svg { display: block; width: 100%; height: 100%; }
.t-slide.is-above { transform: translateY(-28px) scale(1.04); }
.t-slide.is-active { opacity: 1; transform: none; }
.time.is-run .t-slide { transition-duration: 0.1s; }
.time.is-run .t-copy > * { transition-duration: 0.08s; }
.t-cap { margin: 12px 0 0; font-size: 13px; color: var(--menu-muted); }

.t-wheel {
  position: relative; height: min(74vh, 660px);
  --ih: 76px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
  touch-action: none; cursor: grab; user-select: none;
}
.t-wheel.is-drag { cursor: grabbing; }
.t-wheel::before {
  content: ""; position: absolute; left: 0; top: 50%; width: clamp(28px, 4vw, 64px); height: 2px;
  background: var(--team-coral); transform: translateY(-1px);
}
.t-list {
  list-style: none; margin: 0; padding: 0;
  position: absolute; right: 8px; top: 50%; margin-top: calc(var(--ih) / -2);
  transform: translateY(calc(var(--i, 0) * var(--ih) * -1));
  transition: transform var(--dur, 0.55s) cubic-bezier(0.2, 0.7, 0.2, 1);
}
.t-list li { height: var(--ih); display: flex; justify-content: flex-end; align-items: center; }
.t-year {
  border: 0; background: transparent; color: var(--menu-fg); cursor: pointer;
  font-family: var(--font-display); font-weight: 900; font-variant-numeric: tabular-nums;
  font-size: clamp(30px, 3.3vw, 52px); line-height: 1; letter-spacing: -0.02em;
  padding: 6px 2px; border-radius: 4px;
  opacity: max(0.1, calc(1 - var(--d, 0) * 0.34));
  transform: scale(calc(1 - min(var(--d, 0), 3) * 0.07)); transform-origin: right center;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.t-year:hover { opacity: max(0.55, calc(1 - var(--d, 0) * 0.34)); }
.t-year[aria-current="true"] { opacity: 1; }
.t-year:focus-visible { outline: 3px solid var(--team-aqua); outline-offset: 2px; }

.t-now {
  position: absolute; left: max(32px, env(safe-area-inset-left, 0px)); bottom: 32px; z-index: 2;
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600;
  border-bottom: 2px solid var(--team-coral); padding: 0 0 3px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.t-now.is-on { opacity: 1; pointer-events: auto; }
.t-now:hover { color: var(--team-pink); }
.t-hint { position: absolute; right: max(32px, env(safe-area-inset-right, 0px)); bottom: 32px; margin: 0; font-size: 13px; color: var(--menu-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  .time, .time[data-open="true"], .time-in, .t-slide, .t-list, .t-year, .t-copy > *, .t-now { transition: none; }
  html { scroll-behavior: auto; }
  .burger span, .tip-in, .hero .wordmark { transition: none; }
  .cue { animation: none; opacity: 1; }
  .cue svg { animation: none; }
  .cue.is-gone { opacity: 0; }
  .tagline, .hero .lead, .cpx, .cpy { animation: none; }
  .timebtn:hover::before { clip-path: inset(0 0 0 0); }
}


/* ===== Adattamento al tema ===== */
/* Nel prototipo i link ereditavano il colore; qui il tema li colora, quindi si ripristina dentro i componenti. */
.bar a, .menu a, .time a, .timem a, .hero a, .cue, .tip { color: inherit; text-decoration: none; }
.hero a.cta { border-bottom: 2px solid var(--team-coral); }
.menu .links a { text-decoration: none; }
/* La barra è fissa: il contenuto parte sotto di lei. La home ha l'hero, che gestisce da sé lo spazio. */
.wp-site-blocks > main { padding-top: var(--bar-h); }
body.home .wp-site-blocks > main { padding-top: 0; }
.hero { padding-top: calc(var(--bar-h) + clamp(28px, 7vw, 80px)); padding-bottom: 0; }
.admin-bar .bar { top: 32px; }
@media (max-width: 782px) { .admin-bar .bar { top: 46px; } }
/* Sulle pagine interne la barra ha un fondo, così il testo non ci scorre sotto. Sulla home lo prende appena si scorre (dopo 8 px). */
.bar { transition: color 0.4s ease, background-color 0.3s ease, border-color 0.3s ease; border-bottom: 1px solid transparent; }
body:not(.home) .bar, .bar.is-scrolled { background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom-color: #c9d3d1; }
.bar[data-open="true"] { background: transparent !important; border-bottom-color: transparent !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu .side .block h3 a { text-decoration: none; }
.menu .tile-img { display: block; width: 100%; aspect-ratio: 400 / 220; object-fit: cover; }

/* Foto vere nella cronologia */
.t-slide img, .timem-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }


/* ===== Menu: sta tutto nello schermo (niente scorrimento), foto piccola, icone social sotto i link ===== */
.menu { overflow-y: auto; }
.menu-in { min-height: 100svh; box-sizing: border-box; padding-top: calc(var(--bar-h) + 16px + env(safe-area-inset-top, 0px)); padding-bottom: clamp(16px, 4svh, 40px); }
.menu-main { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.links a { font-size: clamp(30px, min(6vw, 9.2svh), 68px); line-height: 1.1; }
.menu .side { justify-content: center; }
.menu .tile-img { height: clamp(96px, 22svh, 210px); aspect-ratio: auto; width: 100%; object-fit: cover; }
.menu .block { padding: clamp(10px, 2svh, 18px) 0 clamp(12px, 2.4svh, 22px); gap: 8px; }
.menu .block h3 { font-size: clamp(14px, 2.2svh, 17px); }
.menu-social { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: clamp(14px, 3svh, 32px); }
.menu-social__group { display: inline-flex; align-items: center; gap: 4px; }
.menu-social__group > span { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--menu-muted); margin-right: 6px; }
.menu-social a { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--menu-fg); transition: color .2s, background-color .2s; }
.menu-social a:hover { color: var(--team-coral); background: rgba(238, 241, 240, .08); }
.menu-social svg { width: 22px; height: 22px; fill: currentColor; }
.menu-social { opacity: 0; transition: opacity .6s ease .6s; }
.menu[data-open="true"] .menu-social { opacity: 1; }
@media (max-width: 860px) {
  .menu-in { gap: clamp(12px, 2.5svh, 28px); align-content: start; }
  .links a { font-size: clamp(30px, min(11vw, 7.4svh), 56px); }
  .menu .tile-img { height: clamp(72px, 14svh, 150px); }
}
@media (max-height: 900px) and (max-width: 860px) { .menu .side .block:nth-child(2) { display: none; } .menu .tile-img { height: clamp(56px, 10svh, 100px); } .links a { font-size: clamp(24px, 6svh, 46px); } .menu-in { gap: 10px; } .menu-social { margin-top: 10px; } }
@media (prefers-reduced-motion: reduce) { .menu-social { transition: none; } }

/* ===== «Dal 2012»: gli anni 2013… scorrono sullo sfondo del pulsante, corallo trasparente, dall'alto verso il basso, sempre (anche con il mouse sopra) ===== */
.timebtn > span:not(.by), .tagline > span:not(.by) { position: relative; z-index: 1; }
.by { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; display: flex; justify-content: center; font-size: 24px; letter-spacing: 0.02em;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%); }
.by-col { flex: 0 0 auto; }
.by-track { display: flex; flex-direction: column; align-items: center; font-family: var(--font-display); font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; color: rgba(239, 75, 80, 0.34);
  will-change: transform; transform: translate3d(0, -50%, 0); animation: hy-down var(--by-dur, 36s) linear infinite; }
.by-track span { display: block; }
@keyframes hy-down { from { transform: translate3d(0, -50%, 0); } to { transform: translate3d(0, 0, 0); } }
.tagline { position: relative; overflow: hidden; isolation: isolate; padding: 9px 12px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { .by-track { animation: none; transform: none; } }

.hero .lead { font-family: var(--font-display); font-weight: 800; max-width: 22em; text-wrap: balance; }
@media (max-width: 699px) { .hero .lead { max-width: none; } }
.hero .lead em { font-style: italic; }

/* ===== Cronologia «Dal 2012»: nessuna nota in alto e solo la X per chiudere ===== */
.t-close { padding: 0 8px; }
/* Telefono: barra più bassa; anno a cavallo della foto, titolo che parte accanto all'anno */
.timem-bar { min-height: calc(44px + env(safe-area-inset-top, 0px)); justify-content: flex-end; border-bottom: 0; }
.timem-close { min-width: 44px; min-height: 44px; justify-content: center; padding: 0 12px 0 8px; }
.timem-view { gap: 0; padding-top: 2px; padding-bottom: 8px; }
.timem-photo { height: clamp(110px, 24svh, 230px); }
.timem-photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(to top, rgba(16, 41, 42, 0.82), transparent); pointer-events: none; z-index: 1; }
.timem-copy { --yfs: clamp(46px, 14.5vw, 70px); position: relative; z-index: 2; margin-top: calc(var(--yfs) * -0.5); }
.timem-head { align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.timem-y { font-size: var(--yfs); text-shadow: 0 2px 16px rgba(16, 41, 42, 0.65); }
.timem-t { margin-top: calc(var(--yfs) * 0.1); text-shadow: 0 1px 10px rgba(16, 41, 42, 0.7); }
.timem-d { margin-bottom: 8px; font-size: 14px; line-height: 1.45; }

/* Menu a una colonna (telefono e tablet in verticale): le icone social si tolgono, ci sono già nel piè di pagina, e così le voci (con «Tracce») respirano */
@media (max-width: 860px) { .menu-social { display: none; } }
