/* VELOCE — racing heritage cycling apparel
   Palette: warm paper #f5f1e8 · racing red #d7263d · midnight slate #1b2432
   Type: Archivo (expanded/black) + Bodoni Moda italic accents */

:root {
  --paper: #f5f1e8;
  --paper-2: #ece5d4;
  --red: #d7263d;
  --red-deep: #a91d30;
  --slate: #1b2432;
  --slate-2: #232e40;
  --slate-3: #2c394f;
  --cream: #f0e9d8;
  --ink-dim: #5c5648;
  --paper-dim: #b9b3a4;

  /* velocity signal (written by main.js every frame) */
  --vskew: 0deg;
  --vblur: 0px;
  --vtrack: 0em;

  /* the racing line: every diagonal in the site uses this rake */
  --rake: 3.5vw;

  --font-body: "Archivo", system-ui, sans-serif;
  --font-italic: "Bodoni Moda", Didot, serif;
  --ease-slip: cubic-bezier(.22, .9, .24, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--slate);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: var(--red); color: var(--paper); }

img, svg { display: block; max-width: 100%; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip {
  position: fixed; top: -100%; left: 1rem; z-index: 100;
  background: var(--slate); color: var(--paper);
  padding: .6rem 1.1rem; font-weight: 700; text-decoration: none;
  transition: top .2s;
}
.skip:focus-visible { top: 1rem; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

/* ── film grain ───────────────────────────────────────────── */
.grain {
  position: fixed; inset: -50%; width: 200%; height: 200%;
  pointer-events: none; z-index: 60; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ── velocity-reactive type ───────────────────────────────── */
.velo {
  transform: skewX(var(--vskew));
  filter: blur(var(--vblur));
  will-change: transform, filter;
}
.ht-word { letter-spacing: calc(.01em + var(--vtrack)); }
@media (prefers-reduced-motion: reduce) {
  .velo { transform: none !important; filter: none !important; }
  .ht-word { letter-spacing: .01em; }
}

/* ── nav ──────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem clamp(1.25rem, 4vw, 3rem);
  transition: background .35s var(--ease-slip), box-shadow .35s;
}
.nav.scrolled {
  background: rgba(245, 241, 232, .92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(27, 36, 50, .14);
}
.mark {
  display: flex; align-items: center; gap: .5rem;
  text-decoration: none; color: var(--slate);
}
.mark-flag { width: 26px; height: 26px; }
.mark-word {
  font-stretch: 125%;
  font-weight: 900; font-size: 1.15rem; letter-spacing: .06em;
}
.nav nav { display: flex; align-items: center; gap: clamp(.9rem, 2.4vw, 1.9rem); }
.nav nav a {
  color: var(--slate); text-decoration: none; font-weight: 500; font-size: .95rem;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
  transition: border-color .25s;
}
.nav nav a:hover { border-color: var(--red); }
.nav-cta {
  background: var(--red); color: var(--paper) !important;
  padding: .5rem .95rem !important; font-weight: 700 !important;
  transform: skewX(-8deg);
  transition: background .25s !important;
}
.nav-cta:hover { background: var(--red-deep); border-color: transparent !important; }
@media (max-width: 640px) {
  .nav nav a:not(.nav-cta) { display: none; }
}

/* ── speedometer HUD ──────────────────────────────────────── */
.speedo {
  position: fixed; right: clamp(.8rem, 2.5vw, 2rem); bottom: clamp(.8rem, 2.5vw, 2rem);
  z-index: 55; width: clamp(88px, 10vw, 118px); pointer-events: none;
  filter: drop-shadow(0 4px 14px rgba(27, 36, 50, .22));
}
.speedo svg { width: 100%; height: auto; overflow: visible; }
.speedo-arc { stroke: rgba(27, 36, 50, .18); stroke-width: 7; stroke-linecap: round; }
.speedo-arc-hot {
  stroke: var(--red); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 236; stroke-dashoffset: 236;
}
.speedo-ticks line { stroke: var(--slate); stroke-width: 2; opacity: .55; }
.speedo-needle {
  stroke: var(--slate); stroke-width: 3.5; stroke-linecap: round;
  transform-origin: 60px 60px; transform: rotate(-135deg);
}
.speedo-hub { fill: var(--red); stroke: var(--paper); stroke-width: 2; }
.speedo-read {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; padding-bottom: 13%;
  color: var(--slate); line-height: 1;
}
.speedo-read span {
  font-stretch: 125%; font-weight: 900;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-variant-numeric: tabular-nums;
}
.speedo-read small { font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; margin-top: 2px; }
.speedo-odo {
  margin-top: .35rem; text-align: center; font-size: .6rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-dim); font-variant-numeric: tabular-nums;
}

/* ── buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: .8rem 1.5rem; text-decoration: none; text-align: center;
  transform: skewX(-8deg); transition: transform .25s var(--ease-slip), background .25s, color .25s;
}
.btn:hover { transform: skewX(-8deg) translateX(4px); }
.btn-red { background: var(--red); color: var(--paper); }
.btn-red:hover { background: var(--red-deep); }
.btn-slate { background: var(--slate); color: var(--paper); }
.btn-slate:hover { background: var(--slate-3); }
.btn-paper { background: var(--paper); color: var(--slate); }
.btn-paper:hover { background: var(--cream); }
.btn-ghost {
  background: transparent; color: var(--slate);
  box-shadow: inset 0 0 0 2px var(--slate);
}
.btn-ghost:hover { background: var(--slate); color: var(--paper); }

/* ── reveal ───────────────────────────────────────────────── */
.rv { opacity: 0; translate: 0 26px; transition: opacity .8s var(--ease-slip), translate .8s var(--ease-slip); }
.rv.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; translate: none; transition: none; }
}

/* ── diagonal sections — the racing line ─────────────────── */
.diag { position: relative; }
.diag-slate {
  background: var(--slate); color: var(--paper);
  clip-path: polygon(0 var(--rake), 100% 0, 100% 100%, 0 100%);
  margin-top: calc(-1 * var(--rake));
  padding: calc(var(--rake) + clamp(3.5rem, 8vw, 6.5rem)) 0 clamp(3.5rem, 8vw, 6.5rem);
}
.diag-paper {
  background: var(--paper);
  clip-path: polygon(0 var(--rake), 100% 0, 100% 100%, 0 100%);
  margin-top: calc(-1 * var(--rake));
  padding: calc(var(--rake) + clamp(3.5rem, 8vw, 6.5rem)) 0 clamp(3.5rem, 8vw, 6.5rem);
}
.diag-red {
  background: var(--red); color: var(--paper);
  clip-path: polygon(0 var(--rake), 100% 0, 100% 100%, 0 100%);
  margin-top: calc(-1 * var(--rake));
}

.eyebrow {
  font-size: .82rem; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 700; margin-bottom: 1.1rem;
}
.diag-paper .eyebrow { color: var(--red); }
.diag-slate .eyebrow { color: #e88a97; }

.sec-title {
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(2.4rem, 6.5vw, 4.8rem);
  line-height: .95; letter-spacing: .005em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}
.sec-lede { max-width: 46rem; font-size: 1.1rem; margin-bottom: 2.4rem; }
em { font-family: var(--font-italic); font-style: italic; font-weight: 500; letter-spacing: .01em; }

/* ── hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  padding: 7rem clamp(1.25rem, 4vw, 3rem) 6rem;
  background: var(--paper);
}
.hero-stripes {
  position: absolute; inset: -20%;
  background:
    linear-gradient(115deg,
      transparent 0 55%,
      var(--red) 55% 58.5%,
      transparent 58.5% 61%,
      var(--slate) 61% 62.6%,
      transparent 62.6% 64%,
      rgba(215, 38, 61, .35) 64% 64.8%,
      transparent 64.8%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 14%, #000 20%, #000 78%, transparent 90%);
  mask-image: linear-gradient(to bottom, transparent 14%, #000 20%, #000 78%, transparent 90%);
  pointer-events: none;
}
.hero-inner { position: relative; isolation: isolate; text-align: center; max-width: 62rem; }
.hero-inner::before {
  content: ""; position: absolute; inset: -16% -22%; z-index: -1;
  background: radial-gradient(ellipse at center, var(--paper) 42%, rgba(245, 241, 232, .82) 62%, rgba(245, 241, 232, 0) 78%);
}
.hero-kicker {
  font-size: .85rem; letter-spacing: .26em; text-transform: uppercase;
  font-weight: 700; color: var(--red); margin-bottom: 1.4rem;
}
.hero-title { line-height: .9; margin-bottom: 1.8rem; }
.ht-line { display: block; overflow: visible; }
.ht-word {
  display: inline-block;
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(4.2rem, 16.5vw, 13.5rem);
  color: var(--slate);
  text-transform: uppercase;
}
.ht-sub {
  display: block; margin-top: .6rem;
  font-size: clamp(1.3rem, 3.4vw, 2.4rem);
  color: var(--red);
}
.ht-sub em { font-weight: 600; }
.hero-sub { max-width: 40rem; margin: 0 auto 2.2rem; font-size: 1.12rem; }
.hero-sub strong { color: var(--red-deep); }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-hint {
  position: absolute; bottom: 2rem; left: 50%; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-dim);
}
.hero-hint svg { animation: hint-bob 2.2s var(--ease-slip) infinite; }
@keyframes hint-bob {
  0%, 100% { translate: 0 0; opacity: .9; }
  50% { translate: 0 8px; opacity: .4; }
}
@media (prefers-reduced-motion: reduce) { .hero-hint svg { animation: none; } }

/* ── manifesto ────────────────────────────────────────────── */
.manifesto-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: clamp(1.4rem, 3.5vw, 3rem); max-width: 60rem;
  color: #d8d3c6;
}
.manifesto-cols em { color: var(--paper); }
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1.5rem; margin-top: 3rem;
  border-top: 1px solid rgba(245, 241, 232, .22); padding-top: 2rem;
}
.stat-row dt {
  font-stretch: 125%; font-weight: 900;
  font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--red);
  line-height: 1;
}
.stat-row dt { color: #ef5567; }
.stat-row dd { font-size: .9rem; color: #b8b2a3; margin-top: .35rem; }

/* ── marquee stripe ───────────────────────────────────────── */
.stripe { overflow: hidden; padding: calc(var(--rake) + 1.2rem) 0 calc(var(--rake) + 1.4rem); }
.stripe-track { display: flex; white-space: nowrap; width: max-content; }
.stripe-run {
  font-stretch: 125%; font-weight: 900;
  font-size: clamp(1.5rem, 3.6vw, 2.6rem); text-transform: uppercase;
  letter-spacing: .04em; color: var(--paper); padding-right: 1rem;
}
.stripe-run em { text-transform: none; font-weight: 600; }

/* ── shop ─────────────────────────────────────────────────── */
.kits {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: clamp(1.4rem, 3vw, 2.4rem);
}
.kit {
  background: #fffdf7;
  border: 1px solid rgba(27, 36, 50, .14);
  box-shadow: 6px 6px 0 rgba(27, 36, 50, .1);
  display: flex; flex-direction: column;
  transition: box-shadow .3s var(--ease-slip), translate .3s var(--ease-slip);
}
.kit:hover { translate: -3px -3px; box-shadow: 10px 10px 0 rgba(215, 38, 61, .28); }
.kit-art {
  background:
    linear-gradient(115deg, transparent 0 78%, rgba(215, 38, 61, .12) 78% 82%, transparent 82% 85%, rgba(27, 36, 50, .1) 85% 87%, transparent 87%),
    var(--paper-2);
  padding: 1.4rem 1.4rem .6rem;
}
.kit-art svg { width: 100%; height: auto; }
.kit-body { padding: 1.4rem 1.5rem 1.7rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.kit-body h3 {
  font-stretch: 125%; font-weight: 900;
  font-size: 1.35rem; text-transform: uppercase; letter-spacing: .02em;
}
.kit-body h3 em { text-transform: none; font-size: 1.05rem; color: var(--red); letter-spacing: 0; }
.kit-body p { font-size: .97rem; color: var(--ink-dim); flex: 1; }
.kit-row { display: flex; align-items: baseline; justify-content: space-between; }
.kit-price {
  font-stretch: 125%; font-weight: 900; font-size: 1.5rem;
}
.kit-sizes { font-size: .85rem; letter-spacing: .12em; color: var(--ink-dim); }
.kit-add { width: 100%; }
.kit-add[disabled] { background: var(--red); cursor: default; }
.kit-add[disabled]:hover { transform: skewX(-8deg); }
.shop-note { margin-top: 2.2rem; font-size: 1rem; color: var(--ink-dim); min-height: 1.6em; }
.shop-note strong { color: var(--red-deep); }

/* ── palmarès timeline ────────────────────────────────────── */
.timeline { list-style: none; position: relative; max-width: 54rem; margin-top: 1rem; }
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 5.4rem;
  width: 2px; background: linear-gradient(var(--red) 0 70%, rgba(215,38,61,.25));
  transform: skewX(-8deg);
}
.tl-item {
  display: grid; grid-template-columns: 4rem 1fr; gap: 2.6rem;
  padding: 1.4rem 0; position: relative;
}
.tl-item::before {
  content: ""; position: absolute; left: 5.05rem; top: 2.1rem;
  width: 12px; height: 12px; background: var(--paper);
  border: 3px solid var(--red); transform: rotate(45deg) skew(-4deg, -4deg);
}
.tl-year {
  font-stretch: 125%; font-weight: 900;
  font-size: 1.25rem; color: #ef5567; text-align: right; padding-top: 1.35rem;
  font-variant-numeric: tabular-nums;
}
.tl-card {
  background: var(--slate-2); border: 1px solid rgba(245, 241, 232, .12);
  padding: 1.3rem 1.5rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - .8rem), calc(100% - .8rem) 100%, 0 100%);
}
.tl-card h3 {
  font-stretch: 125%; font-weight: 700;
  font-size: 1.1rem; text-transform: uppercase; letter-spacing: .03em;
  margin-bottom: .4rem; color: var(--paper);
}
.tl-card p { font-size: .97rem; color: #c9c3b5; }
@media (max-width: 560px) {
  .timeline::before { left: 0; }
  .tl-item { grid-template-columns: 1fr; gap: .3rem; padding-left: 1.6rem; }
  .tl-item::before { left: -.32rem; top: .85rem; }
  .tl-year { text-align: left; padding-top: 0; }
}

/* ── size guide ───────────────────────────────────────────── */
.table-scroll { overflow-x: auto; border: 1px solid rgba(27, 36, 50, .16); box-shadow: 6px 6px 0 rgba(27, 36, 50, .08); }
table { border-collapse: collapse; width: 100%; min-width: 34rem; background: #fffdf7; }
th, td { padding: .85rem 1.1rem; text-align: left; font-size: .97rem; }
thead th {
  background: var(--slate); color: var(--paper);
  font-stretch: 125%; font-weight: 700;
  text-transform: uppercase; font-size: .8rem; letter-spacing: .08em;
}
tbody tr:nth-child(even) { background: var(--paper); }
tbody th { font-weight: 900; font-stretch: 125%; color: var(--red-deep); }
tbody tr { border-top: 1px solid rgba(27, 36, 50, .1); }
.sizes-note { margin-top: 1.6rem; font-size: .95rem; color: var(--ink-dim); }

/* ── cta ──────────────────────────────────────────────────── */
.cta { padding: calc(var(--rake) + clamp(3.5rem, 8vw, 6.5rem)) 0 clamp(4rem, 9vw, 7rem); }
.cta .sec-lede { color: #ffe3e7; }
.cta-form { display: flex; gap: .9rem; flex-wrap: wrap; max-width: 34rem; }
.cta-form input {
  flex: 1 1 14rem; border: 0; padding: .85rem 1.1rem;
  font-family: var(--font-body); font-size: 1rem;
  background: var(--paper); color: var(--slate);
  transform: skewX(-8deg);
}
.cta-form input::placeholder { color: var(--ink-dim); }
.cta-form input:focus-visible { outline: 3px solid var(--slate); }
.cta-confirm { margin-top: 1.2rem; font-weight: 700; min-height: 1.6em; }
.cta-confirm em { font-weight: 600; }

/* ── footer ───────────────────────────────────────────────── */
.footer { background: var(--slate); color: #c9c3b5; padding: 3rem 0 3.5rem; font-size: .93rem; }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2rem;
}
.footer-mark {
  font-stretch: 125%; font-weight: 900;
  font-size: 1.3rem; color: var(--paper); margin-bottom: .5rem;
}
.footer-mark em { font-size: 1rem; color: #ef5567; }
.footer a { color: var(--paper); text-decoration-color: var(--red); text-underline-offset: 3px; }
.footer a:hover { color: #ef5567; }
.footer-meta p { margin-bottom: .35rem; }

/* ── guide page ───────────────────────────────────────────── */
.guide-main { padding: 8rem 0 4rem; }
.guide-main .wrap { max-width: 52rem; }
.guide-title {
  font-stretch: 125%; font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: .98;
  text-transform: uppercase; margin-bottom: .8rem;
}
.guide-sub { color: var(--ink-dim); margin-bottom: 3rem; font-size: 1.05rem; }
.guide-sec { margin-bottom: 2.8rem; }
.guide-sec h2 {
  font-stretch: 125%; font-weight: 900;
  font-size: 1.3rem; text-transform: uppercase; letter-spacing: .02em;
  color: var(--slate); margin-bottom: .7rem;
  border-bottom: 2px solid var(--red); display: inline-block; padding-bottom: .2rem;
}
.guide-sec h3 { font-size: 1.02rem; margin: 1rem 0 .3rem; font-weight: 700; }
.guide-sec p, .guide-sec li { color: #3d3a32; font-size: 1rem; }
.guide-sec ul, .guide-sec ol { padding-left: 1.3rem; margin: .5rem 0; }
.guide-sec li { margin-bottom: .35rem; }
.guide-sec code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em;
  background: var(--paper-2); padding: .1em .35em; border-radius: 3px;
}
.guide-swatches { display: flex; gap: .8rem; flex-wrap: wrap; margin: .8rem 0; }
.guide-swatch { width: 7.5rem; padding: .7rem .8rem; font-size: .78rem; font-weight: 700; transform: skewX(-8deg); }
.guide-swatch span { display: inline-block; transform: skewX(8deg); }

/* ── 404 ──────────────────────────────────────────────────── */
.lost {
  min-height: 100svh; display: grid; place-items: center; text-align: center;
  padding: 2rem; position: relative; overflow: hidden; background: var(--paper);
}
.lost-inner { position: relative; isolation: isolate; }
.lost-inner::before {
  content: ""; position: absolute; inset: -14% -18%; z-index: -1;
  background: radial-gradient(ellipse at center, var(--paper) 48%, rgba(245, 241, 232, 0) 74%);
}
.lost-code {
  font-stretch: 125%; font-weight: 900;
  font-size: clamp(6rem, 24vw, 16rem); line-height: 1; color: var(--slate);
}
.lost h1 { font-size: clamp(1.3rem, 3.5vw, 2rem); margin: .6rem 0 1rem; }
.lost p:not(.lost-code) { max-width: 32rem; margin: 0 auto 2rem; color: var(--ink-dim); }

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .speedo { width: 78px; }
  .speedo-odo { display: none; }
}
