@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --ink: #101412;
  --paper: #f3f1ea;
  --lime: #d6ff31;
  --moss: #617053;
  --line: rgba(16, 20, 18, .18);
  --wrap: min(1220px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", system-ui, sans-serif; font-size: 16px; line-height: 1.55; }
img, video { display: block; width: 100%; }
a { color: inherit; }
button { font: inherit; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-160%); background: var(--lime); padding: 10px 14px; color: var(--ink); }
.skip-link:focus { transform: none; }

.site-header { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; color: white; border-bottom: 1px solid rgba(255,255,255,.18); transition: background .25s, padding .25s; }
.site-header.is-scrolled { background: rgba(16,20,18,.94); padding-block: 12px; backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid currentColor; border-radius: 50%; font-size: .72rem; letter-spacing: -.04em; }
nav { display: flex; align-items: center; gap: 24px; }
nav a { text-decoration: none; font-size: 1rem; font-weight: 700; color: var(--lime); letter-spacing: .015em; }
nav a:hover, nav a:focus-visible { text-decoration: underline; text-underline-offset: 5px; }
.nav-email { white-space: nowrap; }
.nav-strava { padding: 10px 16px; border: 1px solid var(--lime); border-radius: 999px; }

.hero { position: relative; min-height: 100svh; overflow: hidden; display: flex; align-items: flex-end; padding: 140px max(24px, calc((100vw - 1220px)/2)) 58px; color: white; background: var(--ink); }
.hero-photo, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-photo { object-position: 60% 42%; }
.hero-shade { background: linear-gradient(90deg, rgba(8,12,9,.9) 0%, rgba(8,12,9,.48) 46%, rgba(8,12,9,.08) 78%), linear-gradient(0deg, rgba(8,12,9,.64), transparent 45%); }
.route-line { position: absolute; inset: auto -3vw 6vh auto; width: 68vw; opacity: .9; }
.route-line path { fill: none; stroke: var(--lime); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 12 16; animation: route 24s linear infinite; }
@keyframes route { to { stroke-dashoffset: -400; } }
.hero-copy { position: relative; z-index: 2; width: min(700px, 75vw); }
.eyebrow, .section-kicker, .ride-meta, .ride-type { margin: 0 0 16px; text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; }
.eyebrow { color: var(--lime); }
h1, h2, h3 { font-family: "Archivo Black", Impact, sans-serif; font-weight: 400; line-height: .93; text-transform: uppercase; letter-spacing: -.045em; }
h1 { margin: 0; font-size: clamp(5rem, 14vw, 11rem); }
h1 span { color: var(--lime); }
.hero-intro { max-width: 570px; margin: 24px 0 30px; font-size: clamp(1.05rem, 1.8vw, 1.35rem); line-height: 1.45; }
.button { display: inline-flex; gap: 24px; align-items: center; padding: 14px 18px; background: var(--lime); color: var(--ink); text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; border: 0; }
.button:hover { filter: brightness(.9); }
.button--dark { background: var(--ink); color: white; }
.hero-note { position: absolute; right: max(24px, calc((100vw - 1220px)/2)); bottom: 58px; z-index: 2; display: flex; gap: 14px; align-items: flex-start; font-size: .85rem; }
.hero-note p { margin: 0; }
.number { color: var(--lime); font-weight: 700; }

.ticker { overflow: hidden; background: var(--lime); padding: 12px 0; font-family: "Archivo Black", Impact, sans-serif; white-space: nowrap; }
.ticker div { width: max-content; animation: marquee 25s linear infinite; }
.ticker span { margin: 0 20px; }
@keyframes marquee { to { transform: translateX(-50%); } }

.intro, .rides, .gallery { padding-block: 120px; }
.section-kicker { color: var(--moss); }
.intro-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 8vw; align-items: end; }
h2 { margin: 0; font-size: clamp(3rem, 7.2vw, 7rem); }
.intro-copy { font-size: 1.18rem; max-width: 520px; }
.intro-copy p:first-child { margin-top: 0; }
.muted { color: #617067; font-size: .94rem; }
.section-head { display: flex; justify-content: space-between; gap: 40px; align-items: end; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(2.8rem, 5.5vw, 5.6rem); }
.section-note { max-width: 310px; color: #657068; }
.text-link { font-weight: 700; text-underline-offset: 5px; }

.ride-card { display: grid; grid-template-columns: 1.55fr .85fr; min-height: 560px; margin-bottom: 32px; background: #dbe1d3; }
.ride-card--reverse { grid-template-columns: .85fr 1.55fr; }
.ride-card--reverse > img { grid-column: 2; grid-row: 1; }
.ride-card--reverse .ride-card__content { grid-column: 1; grid-row: 1; }
.ride-card--reverse .ride-map { grid-row: 2; }
.ride-card > img { height: 100%; min-height: 460px; object-fit: cover; }
.ride-card__content { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 5vw, 72px); }
.ride-card h3 { margin: 0 0 38px; font-size: clamp(2.1rem, 3.7vw, 4rem); }
.ride-card dl { display: grid; gap: 16px; margin: 0 0 40px; }
.ride-card dl div { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ride-card dt { color: #667067; }
.ride-card dd { margin: 0; font-weight: 700; }
.ride-card .button { align-self: flex-start; }
.map-note { margin: -20px 0 30px; max-width: 720px; color: #617067; }
.ride-map { grid-column: 1 / -1; padding: 18px; background: #e9ecdf; }
.route-map { position: relative; z-index: 0; width: 100%; height: 350px; background: #dbe4d8; }
.route-map::before { content: 'Loading ride map…'; position: absolute; inset: 0; display: grid; place-items: center; color: #526355; font-size: .9rem; }
.route-map.leaflet-container::before { display: none; }
.route-map .leaflet-control-attribution { font-size: 10px; }
.more-rides { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin: 84px 0 28px; }
.more-rides h3 { margin: 0; font-size: clamp(2rem, 3.5vw, 3.7rem); }
.more-rides p:last-child { max-width: 280px; color: #617067; }
.ride-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ride-small { min-width: 0; background: #e2e7db; }
.ride-small__copy { padding: 28px 32px 30px; }
.ride-small h4 { margin: 0 0 18px; font-family: 'Archivo Black', Impact, sans-serif; font-size: clamp(1.5rem, 2.2vw, 2.35rem); line-height: 1.05; text-transform: uppercase; letter-spacing: -.04em; }
.ride-small__copy > p:not(.ride-meta) { margin: 0 0 18px; font-weight: 600; }
.ride-small__copy span { color: #829080; padding-inline: 4px; }
.ride-small a { font-weight: 700; text-underline-offset: 4px; }
.ride-small .route-map { height: 320px; }

.latest-rides { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 7vw, 110px); align-items: center; margin-top: 88px; padding: clamp(30px, 5vw, 72px); background: #dbe1d3; scroll-margin-top: 90px; }
.latest-rides h3 { margin: 0 0 28px; font-size: clamp(2.8rem, 5vw, 5.5rem); }
.latest-rides__copy > p:not(.section-kicker) { max-width: 470px; margin: 0 0 22px; font-size: 1.1rem; }
.latest-rides__embed { display: flex; justify-content: center; align-items: center; min-height: 486px; padding: 16px; background: #f3f1ea; }
.latest-rides iframe { display: block; width: 300px; max-width: 100%; height: 454px; border: 0; background: white; }

.films { padding-block: 120px; color: white; background: var(--ink); }
.films .section-kicker { color: var(--lime); }
.films .section-note { color: #a7b0aa; }
.film-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.film { margin: 0; }
.film video { aspect-ratio: 16/9; object-fit: cover; background: #050706; }
.film--large video { aspect-ratio: 16/9; }
.film figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; padding: 12px 2px; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }
.film figcaption span { color: var(--lime); }
.film figcaption small { color: #a7b0aa; font-size: inherit; margin-left: auto; }

.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 250px; gap: 14px; }
.gallery-item { position: relative; grid-column: span 4; overflow: hidden; padding: 0; border: 0; background: #ccc; cursor: zoom-in; text-align: left; }
.gallery-item--wide { grid-column: span 8; }
.gallery-item--tall { grid-row: span 2; }
.gallery-item img { height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.75,.2,1); }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.035); }
.gallery-item span { position: absolute; left: 14px; bottom: 14px; padding: 6px 9px; background: rgba(16,20,18,.84); color: white; text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; }

.profile { padding-block: 110px; background: var(--lime); }
.profile-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 8vw; align-items: end; }
.profile h2 { font-size: clamp(3.2rem, 7vw, 7rem); }
.profile-copy { font-size: 1.2rem; }
.profile-copy .button { margin-top: 24px; background: var(--ink); color: white; }

footer { padding: 34px 0; background: var(--ink); color: white; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 28px; font-size: .83rem; }

.lightbox { position: fixed; inset: 0; width: min(1120px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; background: #0b0e0c; color: white; box-shadow: 0 30px 100px rgba(0,0,0,.6); overflow: auto; }
.lightbox::backdrop { background: rgba(5,8,6,.88); backdrop-filter: blur(8px); }
.lightbox img { width: 100%; max-height: calc(100dvh - 100px); object-fit: contain; }
.lightbox p { margin: 0; padding: 14px 18px; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }
.lightbox-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--lime); color: var(--ink); cursor: pointer; box-shadow: 0 3px 18px rgba(0,0,0,.35); }
.lightbox-close span { display: block; font: 400 2rem/1 Arial, sans-serif; transform: translateY(-1px); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .65s ease, transform .65s ease; }
.reveal.in-view { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  :root { --wrap: min(100% - 28px, 660px); }
  .site-header { padding: 14px; }
  nav { gap: 12px; }
  nav a:not(.nav-strava):not(.nav-email) { display: none; }
  .brand span:last-child { display: none; }
  .hero { min-height: 860px; padding-inline: 18px; }
  .hero-photo { object-position: 66% 50%; }
  .hero-shade { background: linear-gradient(0deg, rgba(8,12,9,.92) 0%, rgba(8,12,9,.45) 66%, rgba(8,12,9,.14)); }
  .hero-copy { width: 100%; }
  h1 { font-size: clamp(4.5rem, 25vw, 8rem); }
  .hero-note { display: none; }
  .route-line { width: 120vw; bottom: 14vh; }
  .intro, .rides, .gallery, .films { padding-block: 78px; }
  .intro-grid, .profile-inner { grid-template-columns: 1fr; gap: 38px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .ride-card, .ride-card--reverse { grid-template-columns: 1fr; }
  .ride-card--reverse > img, .ride-card--reverse .ride-card__content, .ride-card--reverse .ride-map { grid-column: auto; grid-row: auto; }
  .ride-card > img { min-height: 320px; max-height: 500px; }
  .more-rides { align-items: flex-start; flex-direction: column; }
  .ride-grid { grid-template-columns: 1fr; }
  .latest-rides { grid-template-columns: 1fr; margin-top: 58px; gap: 30px; }
  .latest-rides__embed { min-height: 0; }
  .film-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 220px; }
  .gallery-item, .gallery-item--wide { grid-column: span 1; }
  .gallery-item--tall { grid-row: span 1; }
  .gallery-item:first-child { grid-column: span 2; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 400px) {
  .site-header { flex-wrap: wrap; row-gap: 8px; }
  .site-header nav { width: 100%; flex-wrap: wrap; gap: 8px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
