/* ==========================================================================
   Extra Ride — extraride.com.br — single stylesheet
   Tokens and measurements from `_design/README.md` (hi-fi handoff).
   Breakpoints are desktop-first: 1100 · 900 · 640 · 360.
   ========================================================================== */

/* ------------------------------------------------------------------ Fonts */

/* Variable Montserrat (100–900), Google Fonts subsets.
   The browser only downloads latin-ext if the page uses one of its characters. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* ------------------------------------------------------------------ Tokens */

:root {
  --primary: #2E3192;        /* main blue */
  --navy: #1B1D45;           /* text and dark backgrounds */
  --green: #8DC63F;          /* brand green */
  --green-light: #C9F08F;    /* eyebrow on dark backgrounds */
  --petrol: #003F5C;         /* top bar and footer */
  --on-petrol: #CFE6EE;
  --teal: #3ED6CB;           /* top bar marker */

  --text-2: #3A3E66;
  --text-3: #555A80;
  --on-primary: #E4E6F7;
  --on-primary-2: #C8CBEA;

  --surface-alt: #F3F5FA;
  --border: #E3E6F0;
  --border-strong: #D7DBEA;
  --image-empty: #DDE1EF;
  --image-empty-dark: #2A2D63;

  --container: 1240px;
  --gutter: 40px;
  --header-height: 84px;

  --shadow-hero: 0 30px 70px rgba(27, 29, 69, .22);
  --shadow-float: 0 18px 40px rgba(10, 12, 60, .3);
  --shadow-card: 0 20px 50px rgba(27, 29, 69, .07);
}

/* ------------------------------------------------------------------ Base */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--navy);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { opacity: .8; }

h1, h2, h3, p, ol, dl, dd { margin: 0; }
ol { padding: 0; list-style: none; }

h2 {
  font-size: 42px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -1.4px;
  text-wrap: balance;
}

p { text-wrap: pretty; }

[hidden] { display: none !important; }

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

main > section { scroll-margin-top: var(--header-height); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 14px;
}
.skip-link:focus { top: 12px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.text-primary { color: var(--primary); }
.nowrap { white-space: nowrap; }

.stack-6, .stack-10, .stack-16, .stack-20, .stack-22, .stack-36, .stack-40, .stack-48 {
  display: flex;
  flex-direction: column;
}
.stack-6 { gap: 6px; }
.stack-10 { gap: 10px; }
.stack-16 { gap: 16px; }
.stack-20 { gap: 20px; }
.stack-22 { gap: 22px; }
.stack-36 { gap: 36px; }
.stack-40 { gap: 40px; }
.stack-48 { gap: 48px; }

.grid-2, .grid-3 { display: grid; }
.grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Eyebrow: 34×3 green dash + upper-case label. Repeated in every section. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--primary);
}
.eyebrow::before {
  content: '';
  flex: 0 0 34px;
  height: 3px;
  background: var(--green);
}
.eyebrow--light { color: var(--green-light); }

.label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

/* Decorative green ring. */
.ring {
  position: absolute;
  border-radius: 50%;
  border-style: solid;
  border-color: var(--green);
  pointer-events: none;
}

/* ------------------------------------------------------------------ Buttons */

.btn {
  display: inline-block;
  border-radius: 100px;
  font-weight: 800;
  white-space: nowrap;
  font-family: inherit;
  cursor: pointer;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--outline { border: 2px solid var(--border-strong); color: var(--navy); }
.btn--ghost {
  border: 2px solid rgba(255, 255, 255, .5);
  background: transparent;
  color: #fff;
  font-size: 14.5px;
  padding: 14px 28px;
}
.btn--ghost:hover { opacity: .8; }
.btn--nav { padding: 12px 24px; }
.btn--lg { font-size: 15px; padding: 16px 30px; }
.btn--lg.btn--outline { padding: 14px 28px; }
.btn--md { font-size: 14.5px; padding: 14px 26px; }

/* ------------------------------------------------------------------ Top bar */

.topbar { background: var(--petrol); color: #fff; }
.topbar__inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
}
.topbar__brand { display: flex; align-items: center; gap: 10px; }
.topbar__dot { flex: 0 0 8px; height: 8px; border-radius: 2px; background: var(--teal); }
.topbar__text { color: var(--on-petrol); white-space: nowrap; }
.topbar__links { display: flex; gap: 22px; white-space: nowrap; }
.topbar__links a { color: #fff; }

/* ------------------------------------------------------------------ Header */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  padding-top: 12px;
  padding-bottom: 12px;
  padding-left: 32px;
  padding-right: 32px;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header__logo { flex: 0 0 auto; }
.header__logo img { height: 44px; width: auto; }
.header__nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}
.header__nav a:not(.btn) { color: var(--navy); }

/* ------------------------------------------------------------------ Hero */

.hero { position: relative; overflow: hidden; }
.hero__inner {
  position: relative;
  padding-top: 80px;
  padding-bottom: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.hero__text { display: flex; flex-direction: column; gap: 26px; }
.hero__badge {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--green);
  color: var(--navy);
  border-radius: 100px;
  padding: 10px 22px 10px 12px;
}
.hero__badge-number {
  background: var(--navy);
  color: #fff;
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.5px;
}
.hero__badge-label { font-size: 16px; font-weight: 800; white-space: nowrap; }
.hero__title {
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -2px;
  text-wrap: balance;
}
.hero__lead {
  font-size: 19px;
  line-height: 1.55;
  font-weight: 500;
  max-width: 540px;
  color: var(--text-2);
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__media { position: relative; }
.hero__ring { width: 420px; height: 420px; border-width: 56px; right: -170px; top: -150px; }
.hero__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: var(--image-empty);
  box-shadow: var(--shadow-hero);
}
.hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__card {
  position: absolute;
  left: -24px;
  bottom: 28px;
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-float);
}
.hero__card-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--green-light);
}
.hero__card-title { font-size: 17px; font-weight: 800; }

/* ------------------------------------------------------------------ Sections */

.section { padding: 104px 0; }
.section--alt { background: var(--surface-alt); }
.section--primary { position: relative; overflow: hidden; background: var(--primary); color: #fff; }
.section--primary .container { position: relative; }
.section--navy { background: var(--navy); color: #fff; }

.section-head { gap: 64px; align-items: end; }
.section-head__lead { font-size: 16.5px; line-height: 1.65; color: var(--text-2); }
.section--primary .section-head__lead { color: var(--on-primary); }

/* ------------------------------------------------------------------ Projects */

.projects { gap: 24px; }
.project {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}
.project__media { position: relative; aspect-ratio: 16 / 10; background: var(--image-empty); }
.project__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project__tag {
  position: absolute;
  left: 18px;
  top: 18px;
  background: var(--green);
  color: var(--navy);
  border-radius: 100px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  white-space: nowrap;
}
.project__body { padding: 30px 32px 32px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.project h3 { font-size: 30px; line-height: 1.1; font-weight: 900; letter-spacing: -1px; }
.project__body p { font-size: 15.5px; line-height: 1.6; color: var(--text-2); }

/* Always 3 columns, mobile included. */
.project__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.project__stats > div { padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.project__stats > div:first-child { padding-left: 0; }
.project__stats > div:last-child { padding-right: 0; }
.project__stats > div + div { border-left: 1px solid var(--border); }
.project__stats dt { font-size: 24px; font-weight: 900; letter-spacing: -.8px; color: var(--primary); }
.project__stats dd { font-size: 12.5px; font-weight: 600; color: var(--text-3); }

.project__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: auto;
}
.project__value { display: flex; flex-direction: column; gap: 2px; }
.project__value .label { color: var(--text-3); }
.project__amount { font-size: 22px; font-weight: 900; letter-spacing: -.5px; }

/* ------------------------------------------------------------------ How to sponsor */

.ring--bottom { width: 520px; height: 520px; border-width: 64px; right: -240px; bottom: -280px; }

.steps { gap: 16px; }
.step {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step__number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: var(--navy);
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step__text { font-size: 16px; line-height: 1.5; font-weight: 600; text-wrap: pretty; }

.sponsor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .2);
  padding-top: 28px;
}
.sponsor-footer__example { font-size: 16px; line-height: 1.5; max-width: 720px; }
.sponsor-footer__legal { font-size: 12px; line-height: 1.5; color: var(--on-primary-2); max-width: 360px; }

/* ------------------------------------------------------------------ 2025 edition */

.edition { padding: 104px 0 56px; }
.edition__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 64px;
  align-items: center;
}
.edition__lead { font-size: 17px; line-height: 1.65; color: var(--text-2); }
.edition__credits {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}
.edition__credits .label { margin-right: 8px; }

.edition__numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.number { border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.number--primary { background: var(--primary); color: #fff; }
.number--navy { background: var(--navy); color: #fff; }
.number--soft { background: var(--surface-alt); }
.number__value { font-size: 44px; font-weight: 900; letter-spacing: -1.6px; line-height: 1; }
.number--navy .number__value { color: var(--green); }
.number__value--time {
  font-size: 30px;
  letter-spacing: -1px;
  line-height: normal;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.number__label { font-size: 13.5px; font-weight: 600; }
.number--primary .number__label, .number--navy .number__label { color: var(--on-primary-2); }

/* ------------------------------------------------------------------ Results */

.results { padding: 56px 0 104px; }
.results__title { font-size: 34px; line-height: 1.1; letter-spacing: -1.2px; }

.podiums { gap: 20px; }
.podium {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.podium__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-3);
}
.podium__list { display: flex; flex-direction: column; gap: 14px; }
/* 44px | 1fr | auto at every width. */
.podium__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}
.podium__position {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 900;
}
.podium__position--first { background: var(--green); color: var(--navy); }
.podium__athlete { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.podium__name { font-size: 16px; font-weight: 800; line-height: 1.25; }
.podium__meta { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.podium__time {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.4px;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.download {
  background: var(--surface-alt);
  border-radius: 18px;
  padding: 26px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.download__title { font-size: 18px; font-weight: 900; letter-spacing: -.3px; }
.download__text { font-size: 14px; line-height: 1.5; color: var(--text-3); }
.download__button { padding: 15px 28px; }

/* ------------------------------------------------------------------ Photos */

.gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.gallery-head__count { font-size: 14px; font-weight: 600; color: var(--on-primary-2); }

.album { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.album__item {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  overflow: hidden;
  background: var(--image-empty-dark);
  cursor: zoom-in;
}
.album__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Without JS every photo is shown and each one links to its large version. */
.js .album:not(.is-expanded) .album__item[data-extra] { display: none; }

.album-toggle { align-self: center; }

/* ------------------------------------------------------------------ Contact */

.contact { padding: 96px 0; }
.ring--top { width: 520px; height: 520px; border-width: 64px; right: -220px; top: -260px; }
.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 64px;
  align-items: center;
}
.contact__title { font-size: 46px; line-height: 1.05; letter-spacing: -1.6px; }
.contact__lead { font-size: 17px; line-height: 1.6; color: var(--on-primary); max-width: 520px; }
.contact__card {
  background: #fff;
  color: var(--navy);
  border-radius: 18px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.label--card { font-size: 11px; letter-spacing: 1.8px; color: var(--text-3); }
.contact__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-radius: 100px;
  font-weight: 800;
  font-size: 15px;
  color: var(--navy);
}
.contact__link--whatsapp { background: var(--green); padding: 15px 24px; }
.contact__link--email { border: 1.5px solid var(--border-strong); padding: 14px 24px; }
.contact__note { font-size: 13px; line-height: 1.5; color: var(--text-3); }

/* ------------------------------------------------------------------ Footer */

.footer { background: var(--petrol); color: var(--on-petrol); }
.footer__inner {
  padding-top: 36px;
  padding-bottom: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.6;
}
.footer__brand { display: flex; align-items: center; gap: 20px; }
.footer__brand img { height: 34px; width: auto; }
.footer__ica { display: flex; align-items: center; gap: 14px; }
.footer__ica-logo { height: 36px; width: auto; background: #fff; border-radius: 6px; padding: 4px 8px; }

/* ------------------------------------------------------------------ Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 56px 72px;
  background: rgba(10, 12, 40, .94);
  color: #fff;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox__nav, .lightbox__close {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 22px;
}
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__close {
  right: 16px;
  top: 12px;
  height: 40px;
  padding: 0 16px;
  border-radius: 100px;
  font-size: 13px;
}
.lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  color: var(--on-primary-2);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ ≤1100px */

@media (max-width: 1100px) {
  .header__nav { display: none; }
  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero__text { position: relative; z-index: 1; }
}

/* ------------------------------------------------------------------ ≤900px */

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .header__inner { padding-left: 20px; padding-right: 20px; }

  /* 2- and 3-column grids reflow on their own. The hero stays at 1 column. */
  .grid-2, .grid-3, .edition__inner, .edition__numbers, .contact__inner, .album {
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  }

  .eyebrow, .topbar__text { white-space: normal; }

  .hero__title { font-size: 38px; letter-spacing: -1px; }
  h2, .results__title, .contact__title { font-size: 28px; letter-spacing: -.6px; }
}

/* ------------------------------------------------------------------ ≤640px */

@media (max-width: 640px) {
  .grid-2, .grid-3, .edition__inner, .edition__numbers, .contact__inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .album { grid-template-columns: 1fr 1fr; }
  .hero__ring { display: none; }
  .hero__title { font-size: 31px; }
}

/* ------------------------------------------------------------------ ≤360px */

@media (max-width: 360px) {
  .download__button { white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
