@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: light;
    --paper: #f6f3ef;
    --paper-deep: #ece8e3;
    --white: #fff;
    --ink: #30383e;
    --ink-soft: #62696d;
    --line: #d8d5d0;
    --red: #e31e24;
    --red-dark: #bd1218;
    --shadow: 0 16px 48px rgba(45, 53, 58, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background-color: var(--paper);
    color: var(--ink);
    font: 16px/1.55 Inter, system-ui, sans-serif;
    background-image:
        radial-gradient(circle at 15% 0%, rgba(255,255,255,.9), transparent 30%),
        repeating-radial-gradient(ellipse at 25% 20%, transparent 0 42px, rgba(48,56,62,.035) 43px 44px, transparent 45px 71px);
}
a { color: inherit; }
.top-line { height: 4px; background: var(--red); }
.content-wrap, .site-header { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 34px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-family: 'Barlow Condensed', sans-serif; font-size: 1.55rem; letter-spacing: .14em; }
.brand b { display: grid; place-items: center; min-width: 35px; height: 26px; padding: 0 7px; background: var(--red); color: white; font: 700 .75rem/1 Inter, sans-serif; letter-spacing: .02em; border-block: 3px solid white; outline: 1px solid var(--ink); }
.site-header nav { display: flex; gap: 25px; margin-left: auto; }
.site-header nav a { text-decoration: none; color: var(--ink-soft); font-size: .88rem; font-weight: 600; }
.site-header nav a:hover { color: var(--red); }
.nav-donate { text-decoration: none; color: var(--red); border: 1px solid var(--red); padding: 9px 15px; border-radius: 4px; font-weight: 700; font-size: .84rem; }

.hero { width: 100%; background: #f4f1ed; border-block: 1px solid var(--line); }
.hero img { display: block; width: 70%; height: auto; margin-inline: auto; }
.live-section { padding-block: 64px 48px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.section-heading h1, .section-heading h2 { margin: 2px 0 0; font-family: 'Barlow Condensed', sans-serif; font-weight: 600; letter-spacing: .02em; line-height: 1; }
.section-heading h1 { font-size: clamp(2.3rem, 5vw, 4.3rem); }
.section-heading h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.eyebrow { margin: 0; text-transform: uppercase; color: var(--red); font: 700 .75rem/1.3 Inter, sans-serif; letter-spacing: .18em; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(227,30,36,.12); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(227,30,36,0); } }
.time-box { min-width: 245px; border-left: 3px solid var(--red); padding: 3px 0 4px 20px; }
.time-box .live-label { margin: 0 0 10px; color: var(--red); font: 700 .74rem/1.3 Inter,sans-serif; text-transform: uppercase; letter-spacing: .16em; }
.time-box #elapsed { display: block; white-space: nowrap; font: 600 clamp(2rem,3.2vw,3.15rem)/.92 'Barlow Condensed', sans-serif; letter-spacing: -.02em; }
.time-box #elapsed.countdown { color: var(--red); font-size: clamp(1.6rem,2.55vw,2.35rem); }
.time-box small { color: var(--ink-soft); font-size: .76rem; }

.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.status-grid article { position: relative; min-width: 0; overflow: hidden; background: rgba(255,255,255,.76); border: 1px solid var(--line); border-radius: 8px; padding: 23px 20px 19px; box-shadow: 0 8px 25px rgba(45,53,58,.045); }
.status-grid article > div { white-space: nowrap; font-family: 'Barlow Condensed', sans-serif; line-height: 1; }
.status-grid strong { font-size: clamp(2rem, 4vw, 3.15rem); font-weight: 600; letter-spacing: -.02em; }
.status-grid article > div span { color: var(--ink-soft); font-size: 1.1rem; }
.status-grid article > div b { color: var(--ink); font-weight: 500; }
.status-grid small { display: block; margin-top: 9px; color: var(--ink-soft); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.status-grid i { position: absolute; inset: auto 0 0; display: block; height: 4px; background: #dedbd7; }
.status-grid i span { display: block; height: 100%; width: 0; background: var(--red); transition: width .9s ease; }
.eta-panel { margin-top: 12px; padding: 15px 18px; border: 1px solid var(--line); border-left: 2px solid var(--red); border-radius: 7px; background: rgba(255,255,255,.58); }
.eta-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.eta-heading h2 { margin: 2px 0 0; font: 600 1.35rem/1 'Barlow Condensed',sans-serif; text-transform: uppercase; letter-spacing: .035em; }
.eta-heading > p { max-width: 390px; margin: 0; color: var(--ink-soft); font-size: .7rem; text-align: right; }
.eta-grid { display: grid; grid-template-columns: .85fr .85fr 1.3fr; gap: 10px; margin-top: 12px; }
.eta-grid > div { min-width: 0; padding-right: 14px; border-right: 1px solid var(--line); }
.eta-grid > div:last-child { padding-right: 0; border-right: 0; }
.eta-grid small { display: block; margin-bottom: 2px; color: var(--ink-soft); font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.eta-grid strong { font: 600 clamp(1.25rem,2.2vw,1.8rem)/1 'Barlow Condensed',sans-serif; letter-spacing: -.01em; }
.eta-grid span { margin-left: 4px; color: var(--ink-soft); font-size: .64rem; font-weight: 600; }
.eta-arrival strong { color: var(--red); text-transform: capitalize; }
.live-status { display: flex; align-items: center; gap: 9px; margin: 17px 0 0; color: var(--ink-soft); font-size: .82rem; }
.live-status > span { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #9ca1a3; }
.live-status.active > span { background: var(--red); }

.route-section { padding-block: 32px 72px; }
.section-copy { max-width: 430px; margin: 0; color: var(--ink-soft); font-size: .9rem; }
.trail-signs { display: flex; flex-wrap: wrap; gap: 9px; margin: -5px 0 17px; }
.trail-signs > span { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 12px; border: 1px solid var(--ink); border-radius: 3px; background: rgba(255,255,255,.82); color: var(--ink-soft); font: 600 .76rem/1.2 Inter,sans-serif; box-shadow: 3px 3px 0 rgba(48,56,62,.1); }
.trail-signs b { color: var(--ink); }
.trail-mark i { width: 28px; height: 17px; border-block: 5px solid white; background: var(--red); outline: 1px solid var(--ink); }
.panel { background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.map-panel { position: relative; }
.map-panel::before { content: ''; position: absolute; z-index: 500; inset: 0 0 auto; height: 3px; background: var(--red); pointer-events: none; }
#map { height: min(60vh, 590px); min-height: 390px; }
#map .leaflet-tile-pane { filter: grayscale(.65) saturate(.55) contrast(.92); }
#map .leaflet-control-zoom a { color: var(--ink); }
.current-marker { background: var(--red); border: 3px solid white; border-radius: 50%; box-shadow: 0 0 0 2px var(--ink), 0 0 0 9px rgba(227,30,36,.18); }
.profile-panel { margin-top: 14px; padding: 23px 25px 18px; box-shadow: 0 8px 28px rgba(45,53,58,.06); }
.profile-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.profile-title h3 { margin: 0; font: 600 1.25rem 'Barlow Condensed', sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.profile-title > span { color: var(--ink-soft); font-size: .72rem; }
.route-key { display: inline-block; width: 17px; height: 3px; margin: 0 5px 2px 10px; vertical-align: middle; }
.route-key.done { background: var(--red); }
.route-key.ahead { background: #8e9497; }
#profile { width: 100%; display: block; }
.route-story { margin-top: 16px; padding: 24px 25px 29px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.63); overflow: hidden; }
.route-story-heading { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2px 30px; align-items: end; }
.route-story-heading .eyebrow { grid-column: 1; }
.route-story-heading h3 { grid-column: 1; margin: 3px 0 0; font: 600 1.65rem/1 'Barlow Condensed',sans-serif; text-transform: uppercase; letter-spacing: .035em; }
.route-story-heading > p:last-child { grid-column: 2; grid-row: 1 / 3; margin: 0; color: var(--ink-soft); font-size: .82rem; }
.route-milestones { --route-progress: 0%; position: relative; height: 170px; margin-top: 25px; }
.route-milestones::before,.route-milestones::after { content: ''; position: absolute; top: 83px; left: 0; height: 4px; border-radius: 3px; }
.route-milestones::before { width: 100%; background: #c8c9c8; }
.route-milestones::after { width: var(--route-progress); background: var(--red); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.route-milestone { position: absolute; z-index: 1; top: 76px; left: var(--position); transform: translateX(-50%); }
.route-milestone i { display: block; width: 18px; height: 18px; border: 4px solid var(--paper); border-radius: 50%; background: #9da1a2; box-shadow: 0 0 0 1px #73797c; transition: background .35s, transform .35s; }
.route-milestone > span { position: absolute; left: 50%; bottom: 25px; min-width: 95px; transform: translateX(-50%); color: var(--ink-soft); text-align: center; line-height: 1.15; }
.route-milestone.below > span { top: 26px; bottom: auto; }
.route-milestone > span b,.route-milestone > span small { display: block; }
.route-milestone > span b { color: inherit; font: 600 .88rem/1.15 'Barlow Condensed',sans-serif; text-transform: uppercase; }
.route-milestone > span b span { position: static; display: block; transform: none; line-height: 1.15; }
.route-milestone > span small { margin-top: 3px; font-size: .62rem; }
.route-milestone.first { transform: none; }
.route-milestone.first > span { left: 0; transform: none; text-align: left; }
.route-milestone.last { transform: translateX(-100%); }
.route-milestone.last > span { left: auto; right: 0; transform: none; text-align: right; }
.route-milestone.passed i { background: var(--red); box-shadow: 0 0 0 1px var(--red-dark); }
.route-milestone.passed span { color: var(--ink); }
.route-milestone.current i { transform: scale(1.3); animation: milestone-pulse 1.7s infinite; }
.route-milestone.current span b { color: var(--red); }
@keyframes milestone-pulse { 50% { box-shadow: 0 0 0 9px rgba(227,30,36,0); } 0%,100% { box-shadow: 0 0 0 2px var(--red),0 0 0 5px rgba(227,30,36,.18); } }

.about-section { border-block: 1px solid var(--line); background: rgba(255,255,255,.62); padding-block: 75px; }
.about-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(45px, 8vw, 110px); align-items: center; }
.about-grid h2 { margin: 5px 0 24px; font: 600 clamp(2.7rem, 6vw, 4.8rem)/.95 'Barlow Condensed', sans-serif; }
.about-grid p { max-width: 680px; color: var(--ink-soft); }
.support-card { position: relative; background: var(--ink); color: white; padding: 34px; border-radius: 8px; box-shadow: var(--shadow); }
.support-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .07; background: repeating-radial-gradient(ellipse at 10% 80%, transparent 0 35px, white 36px 37px, transparent 38px 58px); }
.support-card > * { position: relative; z-index: 1; }
.support-card h3 { margin: 25px 0 10px; font: 600 2.1rem/1.05 'Barlow Condensed', sans-serif; }
.support-card p { color: #cbd0d2; font-size: .9rem; }
.support-logo { color: white; font-size: 1.8rem; }
.support-logo b { outline-color: #92979a; }
.button { display: flex; align-items: center; justify-content: center; width: 100%; padding: 14px 17px; margin-top: 10px; border: 1px solid transparent; border-radius: 4px; text-align: center; text-decoration: none; font-weight: 750; font-size: .86rem; }
.button.primary { justify-content: space-between; margin-top: 22px; background: var(--red); color: white; }
.button.primary:hover { background: var(--red-dark); }
.hashtag { display: block; margin-top: 16px; color: #cbd0d2; text-align: center; text-decoration: none; font-size: .78rem; letter-spacing: .08em; }
.facebook-cta-wrap { margin-top: 32px; }
.facebook-cta { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 22px; width: 100%; min-height: 112px; padding: 24px 30px; border: 1px solid #596166; border-radius: 8px; background: var(--ink); color: white; box-shadow: var(--shadow); text-decoration: none; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.facebook-cta::before { content: ''; position: absolute; z-index: -1; width: 280px; height: 280px; left: -90px; top: -120px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 42px 22px 0 -41px rgba(255,255,255,.12), 84px 44px 0 -83px rgba(255,255,255,.12), 126px 66px 0 -125px rgba(255,255,255,.12); }
.facebook-cta::after { content: ''; position: absolute; z-index: -1; inset: 0 0 0 auto; width: 7px; background: var(--red); }
.facebook-cta:hover { transform: translateY(-2px); border-color: #858c90; background: #252c30; }
.facebook-cta-icon { flex: 0 0 auto; display: grid; place-items: end center; width: 52px; height: 52px; border-radius: 50%; background: var(--red); color: white; font: 800 2.45rem/.9 Arial,sans-serif; }
.facebook-cta-copy { display: flex; flex-direction: column; gap: 4px; }
.facebook-cta-copy small { color: #cbd0d2; font-size: .73rem; letter-spacing: .08em; text-transform: uppercase; }
.facebook-cta-copy strong { font: 600 clamp(1.55rem,3vw,2.2rem)/1 'Barlow Condensed',sans-serif; }
.facebook-cta-arrow { margin-left: auto; padding-right: 8px; color: var(--red); font-size: 2rem; font-weight: 300; }

.gallery-section { padding-block: 75px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-placeholder { grid-column: 1 / -1; min-height: 220px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed #bbb7b1; border-radius: 8px; color: var(--ink-soft); text-align: center; background: rgba(255,255,255,.42); }
.gallery-placeholder span { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--red); border-radius: 50%; color: var(--red); font-size: 1.7rem; font-weight: 300; }
.gallery-placeholder strong { color: var(--ink); font: 600 1.45rem 'Barlow Condensed', sans-serif; }
.gallery-placeholder small { font-size: .78rem; }
.gallery-item { position: relative; display: block; width: 100%; overflow: hidden; padding: 0; border: 0; border-radius: 6px; background: var(--white); color: var(--ink); text-align: left; font: inherit; cursor: zoom-in; box-shadow: 0 7px 22px rgba(45,53,58,.09); }
.gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.025); }
.gallery-item span { display: block; padding: 11px 13px; font-size: .78rem; }
.popup-photo-link { display: block; cursor: zoom-in; }
.popup-photo { display: block; width: 220px; max-width: 100%; max-height: 180px; object-fit: cover; margin-bottom: 7px; }
.photo-modal[hidden] { display: none; }
.photo-modal { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: 58px 24px 20px; background: rgba(12,16,18,.94); overflow: hidden; }
.photo-modal-content { display: grid; grid-template-rows: minmax(0,1fr) auto; justify-items: center; gap: 10px; width: min(1200px,100%); height: calc(100dvh - 78px); min-height: 0; margin: 0; }
#photo-modal-image { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; box-shadow: 0 12px 50px rgba(0,0,0,.5); }
.photo-modal-content p { max-width: 900px; max-height: 3.2em; overflow: auto; margin: 0; color: #fff; text-align: center; font-size: .9rem; }
.photo-modal-close { position: fixed; z-index: 1; top: 12px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(25,29,31,.75); color: #fff; font: 300 2rem/1 Arial,sans-serif; cursor: pointer; }
.photo-modal-close:hover,.photo-modal-close:focus-visible { border-color: #fff; background: var(--red); outline: none; }
body.photo-modal-open { overflow: hidden; }
.hidden { display: none !important; }

.private-page { min-height: 100vh; display: grid; place-items: center; padding: 22px; border-top: 4px solid var(--red); }
.private-card { width: min(520px,100%); padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.private-card h1 { margin: 18px 0 5px; font: 600 2rem 'Barlow Condensed',sans-serif; }
.private-card h2 { margin-top: 28px; font: 600 1.35rem 'Barlow Condensed',sans-serif; text-transform: uppercase; }
.private-card label { display: block; margin-top: 15px; font-weight: 700; }
.private-card input,.private-card textarea { width: 100%; margin-top: 6px; padding: 12px; border: 1px solid #b9b6b2; border-radius: 4px; background: #faf9f7; color: var(--ink); font: inherit; }
.private-card small { display: block; margin-top: 4px; color: var(--ink-soft); font-weight: 400; }
.private-card .button { border: 0; cursor: pointer; }
.private-logout { width: 100%; margin-top: 18px; padding: 9px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; }
.form-ok { color: #187a43; }.form-error { color: var(--red-dark); }
.diagnostics-card { width: min(920px,100%); }
.gps-health { color: #187a43; font-weight: 700; }.gps-health i { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: #1a9a55; }
.diagnostics-card dl { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.diagnostics-card dl div { padding: 10px 12px; background: var(--paper); border-radius: 4px; }.diagnostics-card dt { color: var(--ink-soft); font-size: .72rem; text-transform: uppercase; }.diagnostics-card dd { margin: 3px 0 0; font-weight: 700; }
.diagnostics-card details { margin-top: 8px; border: 1px solid var(--line); border-radius: 4px; }.diagnostics-card summary { padding: 10px; cursor: pointer; }.diagnostics-card pre { overflow: auto; margin: 0; padding: 12px; background: #282e32; color: #eef1f2; font-size: .72rem; }
.visits-table { overflow-x: auto; }
.visits-table table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.visits-table th,.visits-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.visits-table th { color: var(--ink-soft); font-size: .68rem; text-transform: uppercase; }

footer { border-top: 3px solid var(--red); background: var(--ink); color: white; }
.footer-inner { min-height: 105px; display: flex; align-items: center; gap: 32px; }
.footer-inner p { color: #bfc5c7; margin-right: auto; }
.footer-inner > a { color: white; font-weight: 700; text-decoration: none; }
.technical-note { margin: 0; padding: 10px 20px; border-top: 1px solid #474e52; color: #9ca3a6; text-align: center; font-size: .72rem; }

@media (max-width: 900px) {
    .site-header nav { display: none; }
    .nav-donate { margin-left: auto; }
    .status-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; }
    .support-card { max-width: 580px; }
    .route-story { overflow-x: auto; }
    .route-story-heading { min-width: 800px; }
    .route-milestones { min-width: 800px; }
}

@media (max-width: 1399px) {
    .hero img { width: 100%; }
}

@media (max-width: 600px) {
    .content-wrap, .site-header { width: min(100% - 24px, 1180px); }
    .site-header { min-height: 59px; }
    .site-header .brand { font-size: 1.12rem; gap: 6px; }
    .site-header .brand b { min-width: 28px; height: 21px; font-size: .62rem; }
    .nav-donate { padding: 7px 10px; font-size: .72rem; }
    .live-section { padding-block: 40px 35px; }
    .live-heading { align-items: flex-start; flex-direction: column; }
    .time-box { min-width: 0; width: 100%; }
    .time-box #elapsed { font-size: clamp(2.2rem,12vw,3.4rem); }
    .time-box #elapsed.countdown { font-size: clamp(1.75rem,9vw,2.65rem); }
    .status-grid { gap: 8px; }
    .status-grid article { padding: 17px 13px 16px; }
    .status-grid strong { font-size: clamp(1.65rem, 9vw, 2.5rem); }
    .status-grid article > div span { font-size: .88rem; }
    .status-grid small { font-size: .61rem; letter-spacing: .07em; }
    .eta-panel { padding: 14px 13px; }
    .eta-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .eta-heading h2 { font-size: 1.25rem; }
    .eta-heading > p { text-align: left; }
    .eta-grid { grid-template-columns: 1fr 1fr; }
    .eta-grid > div:nth-child(2) { padding-right: 0; border-right: 0; }
    .eta-grid > .eta-arrival { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); }
    .eta-grid strong { font-size: clamp(1.3rem,6vw,1.75rem); }
    .section-heading:not(.live-heading) { align-items: flex-start; flex-direction: column; }
    #map { min-height: 360px; height: 55vh; }
    .profile-panel { padding-inline: 10px; }
    .profile-title > span { display: none; }
    .route-section { padding-bottom: 50px; }
    .trail-signs > span { flex: 1 1 100%; }
    .route-story { padding-inline: 14px; }
    .about-section { padding-block: 52px; }
    .support-card { padding: 25px; }
    .facebook-cta-wrap { margin-top: 30px; }
    .facebook-cta { min-height: 100px; gap: 14px; padding: 20px 18px; }
    .facebook-cta-icon { width: 42px; height: 42px; font-size: 2rem; }
    .facebook-cta-copy small { font-size: .61rem; }
    .facebook-cta-arrow { display: none; }
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .photo-modal { padding: 58px 8px 10px; }
    .photo-modal-content { height: calc(100dvh - 68px); }
    .photo-modal-close { top: 9px; right: 9px; }
    .footer-inner { padding-block: 28px; flex-direction: column; align-items: flex-start; gap: 8px; }
    .footer-inner p { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .live-dot { animation: none; }
    .route-milestone.current i { animation: none; }
    * { transition-duration: 0s !important; }
}
