/* ==========================================================================
   LODO SPORT — base: token, reset, tipografia, utility
   I colori sono token: ogni stagione li ridefinisce in seasons.css
   ========================================================================== */

:root {
  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --f-tag: "Sedgwick Ave Display", "Permanent Marker", "Brush Script MT", cursive;

  --frame: 1360px;
  --gutter: clamp(16px, 3.2vw, 44px);
  --header-h: 76px;
  --bar-h: 0px;
  --cut: 16px;
  --radius: 7px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --shadow: 0 40px 90px -40px rgb(8 16 24 / .65);
}

html.has-season-bar { --bar-h: 52px; }

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + var(--header-h) + 12px); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-backdrop);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color .8s var(--ease);
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 82%;
  text-transform: uppercase;
  line-height: .9;
  letter-spacing: -.012em;
}
p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
s { text-decoration-thickness: 1px; }
::selection { background: var(--c-chip); color: var(--c-chip-ink); }
:focus-visible { outline: 2px solid var(--c-hi); outline-offset: 3px; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- tipografia ---------- */
.mono {
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.mono--xs { font-size: 10px; }
.mono--s { font-size: 12px; }
.muted { color: var(--c-muted); }
.faint { color: var(--c-faint); }
.br::before { content: "[\00a0"; }
.br::after { content: "\00a0]"; }

.display-xl, .display-l, .display-m, .display-s {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 82%;
  text-transform: uppercase;
  line-height: .9;
  letter-spacing: -.012em;
}
.display-xl { font-size: clamp(46px, 6.6vw, 104px); }
.display-l  { font-size: clamp(38px, 4.9vw, 74px); }
.display-m  { font-size: clamp(28px, 3.2vw, 46px); }
.display-s  { font-size: clamp(22px, 2.2vw, 30px); }
.tm { font-size: .4em; vertical-align: 1.15em; margin-left: .05em; letter-spacing: 0; font-weight: 600; }

.lead {
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--c-muted);
  max-width: 62ch;
}

/* ---------- utility ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 1000;
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--c-chip); color: var(--c-chip-ink);
  font: 500 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; padding-inline: var(--gutter); }

/* angoli tagliati (chamfer) come nel template */
.chamfer {
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

/* foto "gradate" con il colore della stagione */
.graded { position: relative; overflow: hidden; background: var(--grade); isolation: isolate; }
.graded > img, .graded > picture > img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(var(--grade-sat)) contrast(1.06);
}
.graded::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--grade); mix-blend-mode: color; opacity: var(--grade-amt);
  transition: background-color .8s var(--ease), opacity .8s var(--ease);
}

/* ---------- pulsanti ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 16px; border-radius: var(--radius);
  background: var(--c-chip); color: var(--c-chip-ink);
  font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap;
  transition: transform .3s var(--ease), background-color .3s, color .3s, box-shadow .3s;
}
.pill svg { width: 14px; height: 14px; flex: none; }
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: translateY(0); }
.pill--lg { height: 48px; padding: 0 24px; font-size: 12px; }
.pill--ghost { background: transparent; color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-line); }
.pill--ghost:hover { box-shadow: inset 0 0 0 1px var(--c-text); }
.pill--hi { background: var(--c-hi); color: var(--c-ink); }
.pill[disabled], .pill[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: var(--radius);
  background: var(--c-chip); color: var(--c-chip-ink);
  transition: transform .3s var(--ease);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn__badge {
  position: absolute; top: -7px; right: -7px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--c-hi); color: var(--c-ink);
  font: 600 10px/1 var(--f-mono);
  box-shadow: 0 0 0 2px var(--c-hero-b);
  transform: scale(0); transition: transform .35s var(--ease);
}
.icon-btn__badge.is-on { transform: scale(1); }
.icon-btn__badge.is-bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* pulsante poligonale "aggiungi al carrello" del template */
.buy { display: inline-flex; align-items: center; gap: 18px; text-align: left; color: var(--c-text); }
.buy__shape { position: relative; flex: none; width: var(--buy-size, 92px); aspect-ratio: 1; display: grid; place-items: center; }
.buy__poly {
  position: absolute; inset: 0; width: 100%; height: 100%;
  fill: transparent; stroke: currentColor; stroke-width: 1.1; vector-effect: non-scaling-stroke;
  transition: transform .8s var(--ease), fill .35s;
}
.buy__arrow { width: 26%; height: 26%; transition: transform .4s var(--ease); }
.buy:hover .buy__poly, .buy:focus-visible .buy__poly { transform: rotate(30deg); fill: rgb(255 255 255 / .12); }
.buy:hover .buy__arrow, .buy:focus-visible .buy__arrow { transform: translate(3px, -3px); }
.buy__label { display: block; font: 400 11px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.buy__price { display: block; margin-top: 4px; font: 400 clamp(18px, 1.7vw, 23px)/1.15 var(--f-mono); letter-spacing: .03em; }
.buy__price s { font-size: .62em; color: var(--c-faint); margin-left: 8px; }
.buy--sm { --buy-size: 58px; gap: 14px; }
.buy--sm .buy__price { font-size: 15px; }
.buy.is-done .buy__poly { fill: var(--c-hi); stroke: var(--c-hi); }
.buy.is-done .buy__arrow { color: var(--c-ink); }

/* ---------- graffiti spray ---------- */
.graffiti { position: absolute; pointer-events: none; overflow: visible; color: var(--c-text); }
.graffiti text { font-family: var(--f-tag); }

/* ---------- comparsa allo scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- moduli ---------- */
.field { display: grid; gap: 7px; }
.field > label, .field__label { font: 400 10px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: rgb(255 255 255 / .06); color: var(--c-text);
  font: 400 13px/1.4 var(--f-mono); letter-spacing: .02em;
  transition: border-color .25s, background-color .25s;
}
textarea.input { height: auto; min-height: 150px; padding: 13px 14px; resize: vertical; line-height: 1.6; }
select.input {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.6'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
select.input option { color: #111; }
.input::placeholder { color: var(--c-faint); }
.input:hover { border-color: var(--c-muted); }
.input:focus { outline: none; border-color: var(--c-text); background-color: rgb(255 255 255 / .1); }
.input[aria-invalid="true"] { border-color: #ff8a7a; }
.check { display: flex; gap: 10px; align-items: flex-start; font: 400 11px/1.6 var(--f-mono); color: var(--c-muted); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--c-hi); flex: none; }
.check a { color: var(--c-text); text-decoration: underline; text-underline-offset: 3px; }
