/* ==========================================================================
   Unionbike Reborn — Racing paddock reborn
   Mobile-first. Tokens-driven. Vanilla CSS.
   ========================================================================== */

:root {
  /* Palette — livrea da paddock */
  --asphalt-900: #14140f;   /* base scura calda */
  --asphalt-850: #1a1a14;
  --asphalt-800: #20201a;   /* superfici rialzate / card */
  --asphalt-700: #2c2c23;   /* bordi / linee */
  --asphalt-600: #3a3a30;

  --signal:      #ffc400;   /* giallo segnale (energia brand) */
  --signal-deep: #e0a800;
  --carena:      #e4231e;   /* rosso carena (accento su scuro) */
  --carena-deep: #9a1410;   /* rosso profondo per testo su chiaro/giallo (AA) */

  --concrete:    #c2c0b4;   /* grigio caldo — testo secondario su scuro */
  --concrete-dim:#8f8d82;
  --paper:       #f5f3ea;   /* off-white */
  --paper-2:     #ece9dd;   /* fondo sezione chiara */
  --ink:         #16160f;   /* testo su chiaro */
  --ink-soft:    #4a473c;   /* testo secondario su chiaro */

  /* Tipografia */
  --font-display: "Saira Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Misure */
  --wrap: 1180px;
  --pad-x: 20px;
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 64px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  color: var(--paper);
  background: var(--asphalt-900);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.04; }
p { margin: 0; }
button { font-family: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--signal);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 700;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ----- Tipografia condivisa ----- */
.overline,
.section-kicker,
.entra-kicker {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  font-size: .82rem;
  color: var(--signal);
  margin: 0 0 14px;
}
.section-kicker.dark { color: var(--carena-deep); }

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .018em;
  font-size: clamp(2rem, 7vw, 3.4rem);
  color: var(--paper);
}
.section-title.dark { color: var(--ink); }

.section-lead {
  margin-top: 18px;
  max-width: 60ch;
  color: var(--concrete);
  font-size: 1.06rem;
}
.section-lead.dark { color: var(--ink-soft); }

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 16, 11, .92);
  border-bottom: 1px solid var(--asphalt-700);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 1.18rem;
  color: var(--paper);
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
}
.brand-text em { color: var(--signal); font-style: normal; }

.nav-desktop { display: none; }

.nav-desktop a {
  font-weight: 600;
  font-size: .98rem;
  color: var(--concrete);
  padding: 8px 2px;
  transition: color .2s var(--ease);
}
.nav-desktop a:hover { color: var(--paper); }
.nav-desktop .nav-cta {
  margin-left: 8px;
  padding: 10px 20px;
  background: var(--signal);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-family: var(--font-display);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.nav-desktop .nav-cta:hover { background: #ffd23d; transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 11px;
  background: transparent;
  border: 1px solid var(--asphalt-600);
  border-radius: 10px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--paper);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav — overlay a tutto schermo (robusto, niente translateY math) */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 88px 28px 40px;
  background: rgba(16, 16, 11, .985);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s var(--ease), visibility .28s var(--ease);
}
.nav-mobile.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-mobile a {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 2rem;
  color: var(--paper);
  padding: 12px 0;
  border-bottom: 1px solid var(--asphalt-700);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile .nav-cta {
  margin-top: 22px;
  color: var(--signal);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 1.02rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease),
              transform .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary {
  background: var(--signal);
  color: var(--ink);
}
.btn-primary:hover { background: #ffd23d; transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--asphalt-600);
}
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); }
.btn-dark {
  background: var(--asphalt-900);
  color: var(--signal);
}
.btn-dark:hover { background: #0c0c08; transform: translateY(-2px); }

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 3px solid var(--signal);
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% center;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16,16,11,.55) 0%, rgba(16,16,11,.2) 30%, rgba(16,16,11,.82) 78%, rgba(16,16,11,.96) 100%),
    linear-gradient(90deg, rgba(16,16,11,.7) 0%, rgba(16,16,11,0) 65%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  padding-bottom: 56px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.7rem, 11vw, 5.6rem);
  letter-spacing: .005em;
  color: var(--paper);
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.hero-title .hl { color: var(--signal); }
.hero-sub {
  margin-top: 22px;
  max-width: 54ch;
  font-size: 1.12rem;
  color: var(--concrete);
}
.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ----- Sezioni generiche ----- */
.section { padding: 76px 0; }
.section.how { background: var(--paper-2); color: var(--ink); }

/* Concept / valori grids */
.grid-3 {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.feature,
.value {
  background: var(--asphalt-800);
  border: 1px solid var(--asphalt-700);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
}
.feature-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .76rem;
  color: var(--ink);
  background: var(--signal);
  padding: 4px 11px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.feature h3,
.value h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.42rem;
  letter-spacing: .01em;
  color: var(--paper);
  margin-bottom: 9px;
}
.feature p,
.value p { color: var(--concrete); font-size: 1rem; }

.value {
  background: var(--asphalt-850);
}
.value h3 { color: var(--signal); }

/* ----- Come funziona (light) ----- */
.steps {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.step {
  background: var(--paper);
  border: 1px solid #d9d5c6;
  border-radius: var(--radius);
  padding: 26px 24px;
}
.step-mark {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: 1.05rem;
  color: var(--carena-deep);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--signal);
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.34rem;
  color: var(--ink);
  margin-bottom: 8px;
}
.step p { color: var(--ink-soft); }

.how-split {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.how-col {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.how-col h4 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.5rem;
  color: var(--signal);
  margin-bottom: 10px;
}
.how-col p { color: var(--concrete); }

/* ----- Storia / heritage ----- */
.storia { background: var(--asphalt-850); }
.gallery {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.g-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--asphalt-700);
  background: var(--asphalt-800);
}
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.g-wide img  { aspect-ratio: 3 / 2; }
.g-tall img  { aspect-ratio: 4 / 5; }
.g-podium img { object-position: center 12%; }
.g-team img   { object-position: center 30%; }
.storia-foot {
  margin-top: 24px;
  color: var(--concrete-dim);
  font-size: .98rem;
  max-width: 56ch;
}

/* ----- Entra (yellow drenched) ----- */
.entra {
  background: var(--signal);
  color: var(--ink);
  text-align: center;
  padding: 84px 0;
}
.entra-inner { max-width: 760px; margin-inline: auto; }
.entra-kicker { color: var(--carena-deep); }
.entra-title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.1rem, 8vw, 3.7rem);
  letter-spacing: .018em;
  color: var(--ink);
}
.entra-sub {
  margin: 20px auto 30px;
  max-width: 52ch;
  font-size: 1.1rem;
  color: #3a2f00;
  font-weight: 500;
}
.entra-wa {
  margin-top: 26px;
  font-weight: 600;
  color: #3a2f00;
}
.entra-wa .wa-num {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .03em;
  font-size: 1.5rem;
  color: var(--ink);
  margin-top: 4px;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--asphalt-900);
  border-top: 1px solid var(--asphalt-700);
  padding-top: 56px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
.footer-logo { width: 96px; border-radius: 12px; margin-bottom: 14px; }
.footer-tag { color: var(--concrete); max-width: 30ch; }
.footer-col h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .92rem;
  color: var(--signal);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: var(--concrete);
  padding: 9px 0;
  transition: color .2s var(--ease);
}
.footer-col a:hover { color: var(--paper); }
.footer-line { color: var(--concrete); }
.footer-line.muted { color: var(--concrete-dim); }
.footer-line.small { font-size: .88rem; margin-top: 10px; }
.footer-strong {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .03em;
  font-size: 1.3rem;
  color: var(--paper);
  margin: 2px 0 8px;
}
.footer-social { display: flex; gap: 12px; }
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--asphalt-800);
  border: 1px solid var(--asphalt-700);
  color: var(--concrete);
  cursor: default;
}

.footer-bottom {
  margin-top: 44px;
  padding: 22px var(--pad-x);
  border-top: 1px solid var(--asphalt-700);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.footer-copy { color: var(--concrete-dim); font-size: .9rem; }
.footer-credit { color: var(--concrete-dim); font-size: .9rem; }
.footer-credit a { color: var(--signal); font-weight: 600; }
.footer-credit a:hover { text-decoration: underline; }

/* ----- Reveal on scroll ----- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Breakpoints
   ========================================================================== */
@media (min-width: 600px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .how-split { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 768px) {
  body { font-size: 18px; }
  :root { --pad-x: 32px; --header-h: 72px; }

  .hamburger { display: none; }
  .nav-mobile { display: none; }
  .nav-desktop { display: inline-flex; align-items: center; gap: 28px; }

  .section { padding: 100px 0; }
  .entra { padding: 110px 0; }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }

  .hero-content { padding-top: 140px; padding-bottom: 72px; }
}

@media (min-width: 1024px) {
  .hero-sub { font-size: 1.2rem; }
  .section-lead { font-size: 1.15rem; }
}
