:root {
  --pine: #10271f;
  --pine-deep: #091913;
  --pine-mid: #1e4335;
  --lime: #c9f149;
  --lime-dark: #a9d22e;
  --paper: #f4f1e8;
  --white: #fff;
  --ink: #17231e;
  --muted: #68766f;
  --line: rgba(16, 39, 31, .17);
  --display: "Oswald", Impact, sans-serif;
  --body: "Figtree", Arial, sans-serif;
  --wrap: min(1180px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--body); }
body.menu-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.wrap { width: var(--wrap); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 200; top: 12px; left: 12px; transform: translateY(-150%); padding: 10px 16px; background: var(--lime); color: var(--pine); font-weight: 800; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: fixed; z-index: 100; inset: 0 0 auto; height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1340px) / 2)); color: #fff; transition: background .25s, box-shadow .25s, height .25s; }
.site-header.scrolled { height: 70px; background: rgba(9,25,19,.96); box-shadow: 0 12px 35px rgba(0,0,0,.18); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; line-height: 1; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; background: var(--white); color: var(--pine); }
.brand-mark img { width: 40px; height: auto; }
.brand strong, .brand small { display: block; letter-spacing: .08em; }
.brand strong { font: 700 1.05rem/1 var(--display); }
.brand small { margin-top: 4px; font: 600 .72rem/1 var(--body); color: var(--lime); letter-spacing: .25em; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { position: relative; text-decoration: none; font-size: .9rem; font-weight: 700; }
.main-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px; background: var(--lime); transition: right .2s; }
.main-nav a:not(.nav-cta):hover::after, .main-nav a:not(.nav-cta):focus-visible::after { right: 0; }
.nav-cta { padding: 11px 18px; background: var(--lime); color: var(--pine); }
.menu-toggle { display: none; width: 46px; height: 46px; padding: 11px; border: 0; background: transparent; }
.menu-toggle > span:not(.sr-only) { display: block; height: 2px; margin: 5px 0; background: #fff; transition: transform .2s, opacity .2s; }

.hero { position: relative; min-height: 850px; height: 100svh; max-height: 1020px; display: flex; align-items: center; overflow: hidden; color: #fff; background: var(--pine); }
.hero-photo, .hero-overlay, .terrain-lines { position: absolute; inset: 0; }
.hero-photo { background: url("../assets/img/hpImageTrail.jpeg") center 39% / cover no-repeat; transform: scale(1.01); }
.hero-overlay { background: linear-gradient(90deg, rgba(4,19,14,.94) 0%, rgba(8,24,18,.77) 42%, rgba(8,22,17,.12) 80%), linear-gradient(0deg, rgba(6,22,16,.76) 0%, transparent 43%); }
.terrain-lines { left: 48%; opacity: .2; background: repeating-radial-gradient(ellipse at 80% 40%, transparent 0 38px, rgba(201,241,73,.28) 40px 41px); transform: rotate(-7deg) scale(1.25); }
.hero-content { position: relative; z-index: 2; padding-bottom: 40px; }
.eyebrow { margin: 0 0 18px; color: var(--lime); font-size: .77rem; font-weight: 800; letter-spacing: .21em; text-transform: uppercase; }
.eyebrow.dark { color: #4f6c2e; }
.hero h1, h2 { margin: 0; font-family: var(--display); font-weight: 700; line-height: .94; letter-spacing: -.025em; }
.hero h1 { max-width: 800px; font-size: clamp(4.6rem, 10.5vw, 9.6rem); }
.hero h1 span, h2 span { color: var(--lime-dark); }
.hero-lead { max-width: 610px; margin: 28px 0 30px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: rgba(255,255,255,.84); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 25px; border: 2px solid transparent; text-decoration: none; font-weight: 800; transition: transform .2s, background .2s, color .2s; }
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button-primary { background: var(--lime); color: var(--pine); }
.button-primary:hover { background: #dcff6a; }
.button-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.button-ghost:hover { background: #fff; color: var(--pine); }
.event-strip { position: absolute; z-index: 3; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, auto); background: var(--paper); color: var(--ink); }
.event-strip > div { min-width: 230px; padding: 21px 29px; border-left: 1px solid var(--line); }
.event-strip span, .event-strip strong { display: block; }
.event-strip span { margin-bottom: 4px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.event-strip strong { font-size: .95rem; }

.countdown-band { background: var(--lime); color: var(--pine); }
.countdown-wrap { min-height: 142px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.countdown-wrap > p { margin: 0; }
.countdown-wrap > p strong, .countdown-wrap > p span { display: block; }
.countdown-wrap > p strong { font: 700 1.8rem/1 var(--display); text-transform: uppercase; }
.countdown-wrap > p span { margin-top: 8px; font-size: .9rem; }
.countdown { display: grid; grid-template-columns: repeat(4, 100px); }
.countdown > div { text-align: center; border-left: 1px solid rgba(16,39,31,.28); }
.countdown strong, .countdown span { display: block; }
.countdown strong { font: 700 2.35rem/1 var(--display); }
.countdown span { margin-top: 7px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }

.section { padding: 120px 0; }
.section-heading { max-width: 700px; margin-bottom: 56px; }
.section-heading h2, .story-content h2, .venue-copy h2, .registration-section h2 { font-size: clamp(3.1rem, 6vw, 5.8rem); }
.section-heading > p:last-child { max-width: 630px; margin: 24px 0 0; color: var(--muted); font-size: 1.08rem; }
.section-heading.left { margin: 0; }
.route-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: stretch; }
.route-card { position: relative; min-height: 480px; display: flex; flex-direction: column; padding: 30px 26px 25px; background: #fff; border-top: 5px solid var(--pine); box-shadow: 0 18px 50px rgba(16,39,31,.08); transition: transform .25s, box-shadow .25s; }
.route-card:hover { transform: translateY(-8px); box-shadow: 0 26px 60px rgba(16,39,31,.14); }
.route-card.featured { border-color: var(--lime-dark); }
.popular { position: absolute; top: -32px; left: -5px; right: -5px; height: 28px; display: grid; place-items: center; background: var(--lime-dark); color: var(--pine); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.route-top { min-height: 62px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.route-number, .route-icon { font: 700 3.2rem/1 var(--display); color: var(--lime-dark); }
.route-icon { color: var(--lime-dark); }
.utmb-badge, .status-badge { padding: 6px 8px; border: 1px solid var(--line); color: var(--pine); font-size: .62rem; font-weight: 900; line-height: 1; letter-spacing: .09em; }
.status-badge { border-color: rgba(255,107,53,.35); color: #b9441b; }
.route-card h3 { margin: 20px 0 0; font: 700 1.5rem/1.1 var(--display); text-transform: uppercase; }
.route-distance { margin: 8px 0 18px; font: 700 2rem/1 var(--display); }
.route-card > p:not(.route-distance) { color: var(--muted); }
.route-card dl { margin: auto 0 0; }
.route-card dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .8rem; }
.route-card dt { color: var(--muted); }
.route-card dd { margin: 0; font-weight: 800; text-align: right; }
.route-registration { width: 100%; margin-top: 20px; }
.note { max-width: 780px; margin: 26px 0 0; color: var(--muted); font-size: .85rem; }

.story-section { display: grid; grid-template-columns: 1fr 1fr; min-height: 760px; background: var(--pine); color: #fff; }
.story-photo { min-height: 650px; background: linear-gradient(0deg, rgba(11,29,22,.28), transparent), url("../assets/img/home/home1.jpg") 52% center / cover no-repeat; }
.story-content { display: flex; flex-direction: column; justify-content: center; padding: 80px clamp(40px, 7vw, 110px); }
.story-content h2 { margin-bottom: 35px; }
.story-content p { max-width: 670px; color: rgba(255,255,255,.7); }
.story-content .story-big { color: #fff; font-size: 1.18rem; font-weight: 600; }
.story-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 38px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.18); }
.story-facts strong, .story-facts span { display: block; }
.story-facts strong { font: 700 2.6rem/1 var(--display); color: var(--lime); }
.story-facts span { margin-top: 9px; color: rgba(255,255,255,.68); font-size: .8rem; }

.schedule-section { background: #fff; }
.schedule-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; align-items: start; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 125px 1fr; position: relative; min-height: 116px; padding-bottom: 28px; }
.timeline li::before { content: ""; position: absolute; top: 12px; left: 108px; bottom: 0; width: 1px; background: var(--line); }
.timeline li::after { content: ""; position: absolute; top: 7px; left: 102px; width: 13px; height: 13px; background: var(--lime-dark); border: 4px solid #fff; box-shadow: 0 0 0 1px var(--lime-dark); border-radius: 50%; }
.timeline li:last-child::before { display: none; }
.timeline li > span { padding-right: 35px; color: #577036; font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; text-align: right; }
.timeline li > div { padding-left: 35px; }
.timeline strong { font: 700 1.35rem/1.1 var(--display); text-transform: uppercase; }
.timeline p { margin: 10px 0 0; color: var(--muted); }

.rules-section { position: relative; overflow: hidden; background: var(--pine-deep); color: #fff; }
.rules-section::after { content: "42.5"; position: absolute; right: -30px; top: 10px; color: rgba(201,241,73,.035); font: 700 25rem/1 var(--display); }
.section-heading.light { position: relative; z-index: 1; }
.section-heading.light > p:last-child { color: rgba(255,255,255,.62); }
.rules-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.rules-grid details { border-top: 1px solid rgba(255,255,255,.25); }
.rules-grid summary { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; font: 600 1.2rem var(--display); text-transform: uppercase; list-style: none; }
.rules-grid summary::-webkit-details-marker { display: none; }
.rules-grid summary span { color: var(--lime); font: 400 1.7rem var(--body); transition: transform .2s; }
.rules-grid details[open] summary span { transform: rotate(45deg); }
.details-content { padding: 0 22px 25px 0; color: rgba(255,255,255,.68); }
.details-content p { margin-top: 0; }
.details-content ul { padding-left: 21px; }
.details-content li + li { margin-top: 8px; }

.venue-section { overflow: hidden; }
.venue-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 85px; align-items: center; }
.venue-copy h2 { margin-bottom: 28px; }
.venue-lead { font-size: 1.16rem; color: var(--muted); }
.venue-list { margin: 35px 0; padding: 0; list-style: none; }
.venue-list li { display: flex; align-items: center; gap: 17px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.venue-list span { color: #58742d; font: 700 .8rem var(--display); }
.text-link { display: inline-flex; gap: 10px; text-underline-offset: 5px; font-weight: 800; }
.venue-map { position: relative; min-height: 530px; background: var(--pine); overflow: hidden; }
.venue-map svg { position: absolute; width: 100%; height: 100%; }
.contours { fill: none; stroke: rgba(201,241,73,.17); stroke-width: 2; }
.route-line { fill: none; stroke: var(--lime); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 10 13; }
.map-pulse { fill: rgba(201,241,73,.16); stroke: rgba(201,241,73,.5); stroke-width: 1; }
.map-pin { fill: var(--lime); }
.map-label { position: absolute; top: calc(56% + 35px); left: calc(47% + 25px); padding: 15px 19px; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.map-label small, .map-label strong, .map-label span { display: block; }
.map-label small { color: #58742d; font-size: .65rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.map-label strong { margin-top: 3px; font: 700 1.35rem var(--display); }
.map-label span { color: var(--muted); font-size: .75rem; }

.registration-section { padding: 105px 0; color: #fff; background: var(--pine-mid); }
.registration-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 100px; align-items: center; }
.registration-section .eyebrow, .registration-section h2 span { color: var(--lime); }
.registration-copy p { max-width: 560px; margin: 0 0 25px; font-size: 1.1rem; }
.contact-link { display: block; width: fit-content; margin-top: 18px; font-weight: 700; text-underline-offset: 4px; }

.site-footer { padding: 55px 0 35px; background: var(--pine-deep); color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 35px; align-items: center; }
.brand-footer .brand-mark { width: 42px; height: 42px; }
.footer-inner > p { margin: 0; color: rgba(255,255,255,.58); font-size: .86rem; }
.footer-links { display: flex; gap: 25px; font-size: .86rem; font-weight: 700; }
.copyright { grid-column: 1 / -1; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.12); }

:focus-visible { outline: 3px solid var(--lime-dark); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

@media (max-width: 1080px) {
  .main-nav { gap: 19px; }
  .route-grid { grid-template-columns: 1fr 1fr; gap: 35px 14px; }
  .route-card { min-height: 430px; }
  .story-section { grid-template-columns: .8fr 1.2fr; }
  .story-facts { grid-template-columns: 1fr; }
  .story-facts div { display: flex; align-items: center; gap: 16px; }
  .story-facts span { margin: 0; }
}

@media (max-width: 820px) {
  :root { --wrap: min(100% - 32px, 680px); }
  .site-header { height: 70px; padding-inline: 16px; background: rgba(9,25,19,.9); }
  .menu-toggle { display: block; }
  .menu-toggle[aria-expanded="true"] > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .main-nav { position: fixed; inset: 70px 0 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 30px 24px; background: var(--pine-deep); transform: translateX(100%); transition: transform .25s; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 16px 4px; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 1.1rem; }
  .main-nav .nav-cta { margin-top: 20px; padding: 15px; text-align: center; }
  .hero { min-height: 780px; height: 100svh; align-items: flex-start; padding-top: 165px; }
  .hero-photo { background-position: 56% center; }
  .hero-overlay { background: linear-gradient(90deg, rgba(4,19,14,.92), rgba(8,24,18,.34)), linear-gradient(0deg, rgba(6,22,16,.9), transparent 65%); }
  .hero h1 { font-size: clamp(3.8rem, 17vw, 6.6rem); }
  .hero-lead { max-width: 520px; }
  .event-strip { left: 0; grid-template-columns: 1fr 1fr; }
  .event-strip > div { min-width: 0; padding: 16px 18px; }
  .event-strip > div:last-child { display: none; }
  .countdown-wrap { min-height: 175px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 22px; padding-block: 28px; }
  .countdown { width: 100%; grid-template-columns: repeat(4, 1fr); }
  .countdown > div:first-child { border-left: 0; }
  .section { padding: 85px 0; }
  .story-section { grid-template-columns: 1fr; }
  .story-photo { min-height: 510px; }
  .story-content { padding: 70px 24px; }
  .story-facts { grid-template-columns: repeat(3, 1fr); }
  .story-facts div { display: block; }
  .story-facts span { margin-top: 9px; }
  .schedule-layout, .venue-layout, .registration-inner { grid-template-columns: 1fr; gap: 60px; }
  .rules-grid { grid-template-columns: 1fr; }
  .venue-map { min-height: 450px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-links { justify-content: flex-end; }
  .copyright { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .brand-mark { width: 42px; height: 42px; }
  .brand-mark img { width: 35px; height: auto; }
  .hero { min-height: 760px; padding-top: 125px; }
  .hero h1 { font-size: clamp(3.45rem, 17.5vw, 5rem); }
  .hero-lead { margin-top: 22px; font-size: 1rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr; width: min(100%, 300px); }
  .event-strip strong { font-size: .78rem; }
  .event-strip > div { padding: 13px 14px; }
  .countdown strong { font-size: 1.75rem; }
  .countdown span { font-size: .59rem; }
  .section-heading h2, .story-content h2, .venue-copy h2, .registration-section h2 { font-size: clamp(2.8rem, 14vw, 4.3rem); }
  .section-heading { margin-bottom: 42px; }
  .route-grid { grid-template-columns: 1fr; gap: 24px; }
  .route-card { min-height: 400px; }
  .popular { position: static; margin: -30px -26px 25px; }
  .story-photo { min-height: 420px; }
  .story-facts { grid-template-columns: 1fr; }
  .story-facts div { display: flex; }
  .timeline li { grid-template-columns: 80px 1fr; }
  .timeline li::before { left: 68px; }
  .timeline li::after { left: 62px; }
  .timeline li > span { padding-right: 24px; font-size: .62rem; }
  .timeline li > div { padding-left: 24px; }
  .venue-map { min-height: 380px; }
  .map-label { left: 26%; top: 61%; }
  .registration-section { padding: 80px 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .copyright { grid-column: 1; }
}
