/* Miami's own composition, with a little room for the page to move. */
.hero-inner {
  display: block;
}

/* A film-led opening: the MBU identity anchors the left, with event facts below. */
.hero-center {
  position: absolute;
  left: clamp(32px, 8vw, 150px);
  top: 51%;
  transform: translateY(-50%);
  text-align: left;
}

.hero-mark {
  display: block;
  width: clamp(350px, 39vw, 580px);
  max-width: none;
  aspect-ratio: 926.371 / 375.47;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.hero-mark img { width: 100%; height: 100%; object-fit: contain; }

.hero-event {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 40px);
  margin: 28px 0 0 4px;
}

.hero-date { margin: 0; font-size: clamp(23px, 2.1vw, 34px); }
.hero-place {
  max-width: none;
  margin: 0;
  padding-left: clamp(20px, 2.4vw, 40px);
  border-left: 1px solid #ffffff60;
  font-size: 11px;
  line-height: 1.6;
}

.hero-copyright { display: none; }
.hero-scene::after {
  background: linear-gradient(90deg, #0009, #0002 75%),
    linear-gradient(180deg, #0005, transparent 35%, #0003 65%, #000c);
}

/* The same four partners have equal room in the footer, at every width. */
footer .footer-partners {
  display: grid;
  grid-template-columns: 1.2fr .7fr 1.2fr 1.2fr;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
  width: min(480px, 100%);
  max-width: 100%;
  padding: 0;
}
.footer-partners li { min-width: 0; }
.footer-partners li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}
footer .footer-partners li img:last-child {
  display: block;
  width: 100%;
  height: 42px;
  object-fit: contain;
}

/* The course photograph carries the format, without an added logo shape. */
.loop-diagram {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 56px);
}

.loop-visual {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid #ffffff30;
  border-radius: 3px;
  transform: none;
}

.loop-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none;
}

.loop-facts {
  padding: 0 0 16px;
  border-left: 0;
  border-bottom: 1px solid var(--line);
  transform: none;
}

.loop-rules {
  margin: 0;
  transform: none;
  justify-self: end;
  line-height: 1.6;
}

/* Keep useful facts, and let the typography do the work. */
.location-type .type-hour b,
.location-type .type-loop b,
.location-type .type-miami b {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.location-type .type-hour b { font-size: 1.3em; }
.location-type .type-loop b { font-size: .65em; }
.location-type .type-miami b { font-size: .8em; }
.location-type { gap: 4px; }

#gallery-preview > .art-tile { border-radius: 3px; }

/* The outer line is a mask; motion is applied only to its inner text. */
.reveal-line {
  display: block;
  overflow: clip;
  padding-bottom: .05em;
  margin-bottom: -.05em;
}

.reveal-line > span { display: block; }

@media (min-width: 768px) and (max-width: 1199px) {
  .hero { min-height: 650px; }
  .hero-center { left: 7vw; top: 49%; }
  .hero-mark { width: clamp(350px, 48vw, 490px); }
}

@media (max-width: 991px) {
  .loop-diagram { gap: 28px; }
  .loop-facts { align-self: flex-start; }
  .loop-rules { align-self: flex-start; max-width: 340px; }
}

@media (max-width: 767px) {
  .hero { min-height: 700px; }
  .hero-center {
    left: 24px;
    right: 24px;
    top: 46%;
    width: auto;
    transform: translateY(-50%);
    text-align: center;
  }
  .hero-mark { width: min(350px, 100%); margin: 0 auto; }
  .hero-event { flex-direction: column; gap: 15px; margin: 26px 0 0; }
  .hero-date { margin: 0; font-size: clamp(25px, 7vw, 32px); }
  .hero-place { margin: 0; padding: 0; border: 0; font-size: 11px; }
  footer .footer-partners { gap: 18px; width: min(360px, 100%); }
  footer .footer-partners li img:last-child { height: 34px; }
  .hero-playback { bottom: 137px; }
  .loop-diagram { gap: 26px; }
  .loop-facts { font-size: 16px; }
  .loop-rules { font-size: 13px; }
}

/* Final MBU pass: keep the film and layout, sharpen the race-day signals. */
.hero-mark { margin-block: 0; }
.hero-kicker {
  margin: 0 0 clamp(12px,1.75vw,26px) 4px;
  color: #f8f2e7;
  font: 700 clamp(10px,.85vw,13px)/1.15 var(--mono);
  letter-spacing: .15em;
  text-shadow: 0 1px 12px #000,0 1px 2px #000;
}
.hero-start { display:block; margin-top:3px; color:#f8f2e7; }
.hero-place { text-shadow:0 1px 8px #000,0 1px 2px #000; }
.hero-playback { color:#f8f2e7; background:#080c0b8c; }
.mobile-register { display:none; }
.about-title { font-size:var(--heading); }
.about-intro {
  font-size:clamp(17px,1.5vw,23px);
  line-height:1.48;
  max-width:38em;
  color:#dfdfd9;
  text-transform:none;
  text-wrap:pretty;
  margin-top:clamp(25px,4vw,54px);
}
.number-middle p { line-height:1.45; }
footer .footer-partners { grid-column:2; }
.footer-links {
  grid-column:1/-1;
  grid-row:2;
  justify-self:center;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:14px 22px;
  padding-top:22px;
  max-width:90%;
  font:400 11px/1.4 var(--mono);
}
.footer-links a:hover { color:white; text-decoration:underline; text-underline-offset:4px; }
footer .footer-info { grid-row:1; grid-column:3; }
@media(max-width:991px) {
  .mobile-register {
    display:inline-flex; position:absolute; left:20px; top:18px;
    min-height:44px; padding:0 17px; font-size:12px;
    box-shadow:0 2px 16px #0004;
  }
  .site-header .menu-toggle { width:44px; height:44px; top:18px; right:16px; }
  .site-header .menu-toggle span { width:28px; left:8px; top:12px; }
  .site-header .menu-toggle span:nth-child(2) { top:21px; }
  .site-header .menu-toggle span:nth-child(3) { top:30px; }
  .site-header.scrolled { background:linear-gradient(#090b0be8,#090b0b00); }
  footer .footer-partners, footer .footer-info { grid-column:1; }
  footer .footer-partners { grid-row:1; }
  footer .footer-info { grid-row:3; }
  footer .footer-copyright { grid-row:4; }
  .footer-links { padding-top:10px; }
}
@media(max-width:767px) {
  .hero { min-height: min(690px,100svh); }
  .hero-center { top:44.5%; }
  .hero-kicker { margin-left:0; }
  .hero-event { gap:10px; margin-top:20px; }
  .hero-bottom { bottom:max(18px, env(safe-area-inset-bottom)); gap:20px; }
  .hero-playback { bottom:max(110px,calc(100svh * .13)); }
  .hero-playback .playback-label { font-size:9px; }
  .about { min-height:0; padding-bottom:68px; }
  .about-intro { font-size:16px; line-height:1.55; }
  .number-strip { margin-top:62px; }
  .number-middle { margin:20px 0 28px; }
  .number-middle p { margin:12px 0 0; }
  .gallery-section { padding-top:45px; }
}
@media(max-width:767px) and (max-height:570px) {
  .hero { min-height:560px; }
  .hero-center { top:43%; }
}

/* Keep an accessible pause off the hero, alongside other footer utilities. */
.footer-controls { grid-column:3; grid-row:1; display:flex; flex-direction:column; align-items:flex-end; gap:5px; }
.footer-controls .footer-info { font-size:14px; }
.footer-motion { color:var(--muted); min-height:24px; font:400 11px/1.2 var(--mono); }
.footer-motion:hover { color:#fff; }
@media(max-width:991px) { .footer-controls { grid-column:1; grid-row:3; align-items:center; } }

/* One exact logo sequence per loop, at a gentle speed. */
.partner-window .partner-track { transform:none; translate:none; animation:none; }
.partner-window .partner-track.partner-scroll-ready {
  animation: mbu-partners-left var(--partner-duration) linear infinite;
}
.partner-window:hover .partner-track.partner-scroll-ready { animation-play-state:running; }
.partner-window:focus-within .partner-track.partner-scroll-ready { animation-play-state:paused; }
@keyframes mbu-partners-left {
  from { transform:translateX(0); }
  to   { transform:translateX(calc(-1 * var(--partner-travel))); }
}
@media(prefers-reduced-motion:reduce) {
  html:not(.mbu-partner-motion-demo) .partner-window { mask-image:none; }
  html:not(.mbu-partner-motion-demo) .partner-window .partner-track { width:100%; flex-wrap:wrap; justify-content:center; }
  html:not(.mbu-partner-motion-demo) .partner-window .partner-track>span:nth-child(n+6) { display:none; }
  html.mbu-partner-motion-demo .partner-window .partner-track.partner-scroll-ready {
    animation: mbu-partners-left var(--partner-duration) linear infinite !important;
  }
  html.mbu-partner-motion-demo .partner-window:focus-within .partner-track.partner-scroll-ready {
    animation-play-state:paused !important;
  }
}

/* Keep race wayfinding separate from the brand mark and entry action. */
.site-header {
  display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center;
  column-gap:clamp(18px,3vw,52px);
  padding:0 var(--pad); min-height:72px;
  background:linear-gradient(180deg,#080a09bd,#080a0915);
}
.site-header.scrolled {
  background:#101110f2; box-shadow:inset 0 -1px #ffffff22;
  backdrop-filter:blur(12px);
}
.site-header .nav-brand {
  display:inline-flex; align-items:center; justify-self:start; min-height:44px;
  width:clamp(62px,5.5vw,90px);
}
.nav-brand img { display:block; width:100%; height:auto; }
.site-header .desktop-nav {
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; justify-content:normal;
  gap:clamp(16px,4vw,56px); height:72px; padding:0;
}
.site-header.scrolled .desktop-nav { height:72px; }
.site-header .nav-sections {
  justify-self:center; transform:none; gap:clamp(17px,2.4vw,38px);
  font-size:clamp(11px,.83vw,14px); color:#eeeae0e8;
}
.site-header .nav-sections a {
  display:inline-flex; align-items:center; padding:0; min-height:44px;
  text-decoration-thickness:1px; text-underline-offset:5px;
}
.site-header .nav-sections a:hover,.site-header .nav-sections a:focus-visible { text-decoration:underline; }
.site-header .nav-actions { gap:clamp(16px,2.4vw,33px); flex-direction:row-reverse; }
.site-header .nav-actions .languages { gap:5px; }
.site-header .languages button { padding:0 3px; min-height:44px; }
.site-header .lang-divider { opacity:.48; }
.site-header .nav-register,.site-header .mobile-register {
  border-radius:3px; min-width:0; min-height:40px; padding:0 15px;
  background:#f0ece0; border-color:#f0ece0; color:#141613;
  display:inline-flex; align-items:center; gap:7px;
  box-shadow:none; font-size:12px;
}
.site-header .nav-register:hover,.site-header .mobile-register:hover { background:#fff; color:#111; border-color:#fff; }
.site-header .nav-register::after,.site-header .mobile-register::after {
  content:""; width:10px; height:10px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 13 13 3M5 3h8v8' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 13 13 3M5 3h8v8' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.site-header .mobile-register { display:none; }
.menu-contact svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;display:block; }
@media(max-width:991px) {
  .site-header { height:66px; min-height:66px; grid-template-columns:1fr auto 44px; column-gap:8px; padding:0 16px 0 20px; }
  .site-header .desktop-nav { display:none; }
  .site-header .mobile-register { display:inline-flex; position:static; min-height:44px; }
  .site-header .menu-toggle { display:block; position:relative; top:auto; right:auto; align-self:center; }
  .site-header .menu-toggle span { width:22px; left:11px; top:17px; }
  .site-header .menu-toggle span:nth-child(2) { top:25px; }
}

/* Venue detail: make the real photos the focus, with one short race-day note. */
.location-section:has(.venue-field) { min-height:0; }
.location-grid:has(.venue-field) { row-gap:clamp(50px,6vw,104px); }
.location-grid .venue-tall:has(+ .venue-field) {
  grid-column:1/6; grid-row:2;
  width:100%; aspect-ratio:4/5; align-self:center; margin:0;
}
.venue-field {
  grid-column:7/13; grid-row:2; width:100%; max-width:640px;
  min-width:0; align-self:center;
}
.venue-field-photo figcaption {
  color:#f0ece0a8; font:400 11px/1.35 var(--mono); letter-spacing:.12em;
}
.venue-field-photo { margin:clamp(24px,3.3vw,48px) 0 0; }
.venue-field-frame { overflow:hidden; border-radius:3px; }
.venue-field-photo img {
  display:block; width:100%; height:auto; aspect-ratio:16/10; object-fit:cover;
  object-position:center 56%;
}
.venue-field-photo figcaption { margin-top:10px; }
@media(max-width:991px) {
  .location-grid .venue-tall:has(+ .venue-field) { grid-column:1/4; grid-row:3; }
  .venue-field { grid-column:4/7; grid-row:3; }
}
@media(max-width:670px) {
  .location-grid .venue-tall:has(+ .venue-field) { grid-column:1/7; grid-row:3; max-height:520px; }
  .venue-field { grid-column:1/7; grid-row:4; max-width:none; }
  .location-grid:has(.venue-field) { row-gap:35px; }
}

/* Three balanced columns keep the original footer lockup on the exact page center. */
footer.mbu-footer {
  display:block; min-height:0; padding:0 var(--pad); border-top:1px solid #f0ece030;
  background:#0e0f0d; color:#f0ece0;
}
.mbu-footer .footer-main {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,500px) minmax(0,1fr);
  grid-template-areas:"copyright partners social";
  align-items:center; gap:12px; padding:18px 0; max-width:1470px; margin-inline:auto;
}
.mbu-footer .footer-partners { grid-area:partners; justify-self:center; }
.mbu-footer .footer-copyright {
  grid-area:copyright; justify-self:start; font:400 11px/1.35 var(--mono); color:#f0ece0b5;
}
.mbu-footer .footer-links {
  grid-area:social; display:flex; justify-content:flex-end; justify-self:end;
  flex-wrap:wrap; gap:0; max-width:100%; padding:0;
}
.mbu-footer .footer-links a {
  display:inline-flex; align-items:center; justify-content:center; inline-size:44px; min-block-size:44px;
  color:#f0ece0; border-radius:3px;
}
.mbu-footer .footer-links a:hover { color:#fff; background:#f0ece014; }
.mbu-footer .footer-links svg { inline-size:21px; block-size:21px; fill:currentColor; display:block; pointer-events:none; }
.background-preferences { width:100%; max-width:1320px; margin:auto; padding:0 var(--pad); }
.background-motion { min-height:44px; margin-top:5px; font:400 11px/1.3 var(--mono); color:#f0ece0b5; text-decoration:underline; text-underline-offset:3px; }
.background-motion:hover { color:#fff; }
@media(max-width:1099px) {
  .mbu-footer .footer-main {
    grid-template-columns:minmax(0,1fr); grid-template-areas:"partners" "social" "copyright";
    justify-items:center; text-align:center; gap:3px; padding:18px 0 15px;
  }
  .mbu-footer .footer-copyright,.mbu-footer .footer-links { justify-self:center; }
  .mbu-footer .footer-links { justify-content:center; }
}

/* Neue Montreal for fast reading; the same mono used by the race clock for utilities. */
.site-header .nav-sections a {
  font-family:var(--text); font-weight:500; font-size:clamp(12px,.96vw,15px);
  letter-spacing:.065em; color:#f0ece0;
}
.site-header .nav-sections a:hover,.site-header .nav-sections a:focus-visible { color:#fff; }
.site-header .nav-sections { gap:clamp(21px,2.55vw,42px); }
.site-header .nav-actions .languages { align-items:center; gap:4px; }
.site-header .languages button { font-size:11px; min-width:24px; }
.site-header .languages button[aria-pressed=true] { color:#f0ece0; }
.site-header .nav-register,.site-header .mobile-register { letter-spacing:.045em; }
@media(min-width:992px) {
  .site-header .nav-brand { position:absolute; left:var(--pad); top:50%; transform:translateY(-50%); z-index:1; }
  .site-header .desktop-nav { grid-column:1/-1; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:0; }
  .site-header .nav-sections { grid-column:2; grid-row:1; }
  .site-header .nav-actions { grid-column:3; grid-row:1; justify-self:end; }
}


/* Small editorial title on film cards; stills stay image-only. */
.field-film-tile { isolation:isolate; }
.field-film-caption {
  position:absolute; inset:auto 0 0; z-index:2; display:grid; gap:5px;
  padding:clamp(10px,1.1vw,17px);
  background:linear-gradient(0deg,#10120fed,#10120f9c 62%,transparent);
  text-align:left; color:#f0ece0; pointer-events:none;
}
.field-film-caption strong { font:800 clamp(14px,1.5vw,24px)/1.08 var(--display); letter-spacing:-.025em; }
.field-film-runtime { font:400 clamp(8px,.69vw,11px)/1.15 var(--mono); letter-spacing:.025em; white-space:nowrap; }
@media(max-width:767px) { .field-film-caption { padding:9px; } }
#throwback { min-height:0; }
#throwback .grid-fade { display:none; }
#throwback .show-more { position:relative; top:auto; left:auto; bottom:auto; transform:none; display:flex; margin:24px auto 0; width:max-content; }

/* Give the partner strip its own beat after the FAQ, without stacking two large bottom gaps. */
.faq-section + .partners-section {
  min-height:0;
  padding-block-start:clamp(88px,7.5vw,142px);
  padding-block-end:clamp(52px,6vw,96px);
}
@media(max-width:767px) {
  .faq-section + .partners-section { padding-block-start:clamp(60px,12vw,82px); }
}

/* Yard milestone counter: retain the oversized type without squeezing decimals. */
.yard-milestones {
  grid-template-columns:minmax(0,1fr) clamp(172px,19vw,255px) minmax(0,1fr);
  column-gap:clamp(18px,2.4vw,38px);
  scroll-margin-top:86px;
}
.yard-milestones .number-side { min-width:0; }
.yard-milestones .number-side strong { display:block; white-space:nowrap; }
.yard-milestones .number-last>span { transform:none; }
.yard-milestones .mile-fraction { font-size:.41em; letter-spacing:-.055em; }
.yard-milestones .number-middle>span:first-child { display:block; }
.yard-milestones .milestone-story { margin:clamp(22px,3.3vw,48px) 0 0; min-height:56px; }
.yard-milestones .milestone-copy { margin:0 auto; max-width:25ch; color:#dfdfd9; font:400 clamp(13px,1.15vw,17px)/1.45 var(--text); text-wrap:balance; }
.milestone-controls:not([hidden]) { display:flex; gap:6px; width:max-content; margin:1px auto 0; }
.milestone-controls button:not([hidden]) { min-height:44px; min-width:44px; padding:0 8px; color:#c8c8bf; font:400 14px/1 var(--mono); }
.milestone-controls button:hover { color:#fff; text-decoration:underline; text-underline-offset:4px; }
.milestone-sr { position:absolute!important; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.apply-section .register-motto { margin:0 0 14px; color:#dfdfd9; font:400 11px/1.4 var(--mono); letter-spacing:.16em; }
@media(max-width:991px) {
  .yard-milestones .number-side strong { font-size:clamp(80px,23vw,170px); }
  .yard-milestones .number-middle { margin:14px 0 16px; }
  .yard-milestones .milestone-story { margin-top:12px; min-height:50px; }
  .milestone-controls button:not([hidden]) { min-width:44px; min-height:44px; }
}

/* Show the final color grade on every gallery tile, including expanded images. */
.gallery-section .art-tile.graded-tile img,
.overlay-art-grid .art-tile.graded-tile img { filter:brightness(.96); }
.gallery-section .art-tile.graded-tile:is(:hover,:focus-visible) img,
.overlay-art-grid .art-tile.graded-tile:is(:hover,:focus-visible) img { filter:brightness(1); }

/* The original hand-cut motto is a small signature, not a second headline. */
.hero-kicker-lettered img {
  display:block; width:clamp(150px,13vw,186px); height:auto;
  max-width:100%; filter:drop-shadow(0 1px 3px #000b);
}
@media (max-width:767px) {
  .hero-kicker-lettered img { width:132px; margin-inline:auto; }
}

/* Keep the new race-to-registration-to-gallery sequence close enough to read as one flow. */
#about + #apply {
  min-height: 0;
  padding-top: max(24px, calc(182px - clamp(80px, 8vw, 160px)));
  padding-bottom: clamp(72px, 8vw, 125px);
}
#apply + #throwback {
  padding-top: calc(170px - clamp(72px, 8vw, 125px));
}
@media (max-width: 991px) {
  #about + #apply {
    padding-top: 46px;
    padding-bottom: 80px;
  }
  #apply + #throwback { padding-top: 42px; }
}
@media (max-width: 767px) {
  #about + #apply { padding-top: 42px; }
  #apply + #throwback { padding-top: 25px; }
}
