/* Team Pandrover · pandrover.com
   Direction: poster. Red blocks, heavy type, photos pinned to a route line. */

:root {
    --red: #eb2020;
    --ink: #111111;
    --paper: #f7f5f0;
    --paper-dim: #d9d4ca;
    --muted: #6b665e;
    --muted-dark: #9a948a;
    --display: "Anton", Impact, "Arial Narrow", sans-serif;
    --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --marker: "Permanent Marker", "Comic Sans MS", cursive;
    --gutter: clamp(20px, 4vw, 56px);
    --wrap: 1440px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a { color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

::selection { background: var(--red); color: var(--paper); }

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 400;
    text-transform: uppercase;
    line-height: 0.9;
    margin: 0;
    letter-spacing: 0.01em;
}

h2 { font-size: clamp(56px, 7vw, 96px); }
h3 { font-size: clamp(34px, 3.4vw, 48px); margin-bottom: 14px; }

p { margin: 0 0 1em 0; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

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

.band { padding-block: clamp(64px, 8vw, 112px); }
.band-black { background: var(--ink); color: var(--paper); }
.band-black a { color: var(--red); }
.band-black a:hover { color: var(--paper); }
.band-red { background: var(--red); color: var(--ink); }
.band-red a { color: var(--ink); }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 32px;
    align-items: start;
}
.grid-2 > :first-child { grid-column: span 5; }
.grid-2 > :last-child { grid-column: 7 / span 6; }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.label, .tag {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.tag {
    background: var(--red);
    color: var(--paper);
    padding: 8px 14px;
    text-decoration: none;
    white-space: nowrap;
}
.tag-link:hover { background: var(--ink); color: var(--paper); }
.band-black .tag { background: var(--paper); color: var(--ink); }
.band-red .tag { background: var(--ink); color: var(--paper); }

.marker { font-family: var(--marker); }
.lede { font-size: 18px; font-weight: 500; max-width: 42ch; }

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

.hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 100vh;
    min-height: 100svh;
}

.hero-copy {
    background: var(--red);
    padding: clamp(28px, 3.5vw, 48px) var(--gutter);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.hero-logo { width: clamp(110px, 11vw, 150px); height: auto; }

.hero-title {
    display: flex;
    flex-direction: column;
    font-size: clamp(88px, 13.5vw, 196px);
    line-height: 0.86;
}
.hero-title .paper { color: var(--paper); }

.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}
.hero-tagline { max-width: 380px; font-size: 18px; font-weight: 500; line-height: 1.45; }
.hero-plate {
    font-family: var(--display);
    font-size: clamp(28px, 2.8vw, 40px);
    color: var(--paper);
    white-space: nowrap;
    line-height: 1;
}

.hero-photo { position: relative; overflow: hidden; background: var(--ink); }
.hero-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 42%;
}

.sticker {
    position: absolute;
    left: clamp(20px, 2.5vw, 36px);
    bottom: clamp(24px, 3vw, 44px);
    background: var(--paper);
    color: var(--ink);
    padding: 10px 18px;
    font-family: var(--marker);
    font-size: clamp(18px, 1.7vw, 24px);
    transform: rotate(-6deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------------------- Story */

.tally {
    display: flex;
    flex-direction: column;
    font-family: var(--display);
    font-size: clamp(64px, 8.3vw, 120px);
    line-height: 0.9;
    text-transform: uppercase;
}
.tally .red { color: var(--red); }
.tally .muted {
    margin-top: 20px;
    font-size: 20px;
    text-transform: none;
    color: var(--muted-dark);
    line-height: 1.3;
}
.story .prose { font-size: 19px; color: var(--paper-dim); }
.story .prose p + p { margin-top: 1.2em; }

/* ---------------------------------------------------------------- Film */

.video {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--ink);
    border: 6px solid var(--ink);
}
.video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.caption {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}

/* ------------------------------------------------------------ Odometer */

.odo {
    background: var(--paper);
    border-top: 6px solid var(--ink);
}

.odo-pin {
    height: 100vh;
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(8px, 2vh, 28px);
    overflow: hidden;
}

.odo-head {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
}
.odo-counter { display: flex; align-items: baseline; gap: 12px; }
.odo-km {
    font-family: var(--display);
    font-size: clamp(96px, 16vh, 240px);
    line-height: 0.85;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}
.odo-unit {
    font-family: var(--display);
    font-size: clamp(36px, 5vh, 72px);
    line-height: 1;
    color: var(--red);
}
.odo-where {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 6px;
}
.odo-rally {
    font-family: var(--marker);
    font-size: clamp(16px, 2vh, 20px);
    color: var(--red);
    margin-bottom: 4px;
}
.odo-place {
    font-family: var(--display);
    font-size: clamp(28px, 3.2vh, 40px);
    line-height: 1;
    text-transform: uppercase;
}
.odo-date {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
}

.odo-viewport { position: relative; width: 100%; }

.odo-track {
    --card-w: clamp(240px, 24vh, 340px);
    --card-h: calc(var(--card-w) * 1.28);
    --lane: 96px;
    position: relative;
    width: max-content;
    display: flex;
    align-items: flex-start;
    gap: clamp(48px, 6vw, 110px);
    /* the first and last cards land under the reading line (22vw from the left) */
    padding: 0 calc(78vw - var(--card-w) / 2) 0 calc(22vw - var(--card-w) / 2);
    height: calc(var(--card-h) + var(--lane) + 90px);
    will-change: transform;
}

.odo-route {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}
#odo-route-bg { stroke: var(--paper-dim); }
#odo-route-fg { stroke: var(--red); }
#odo-dots circle { fill: var(--ink); transition: r 0.25s ease, fill 0.25s ease; }
#odo-dots circle.on { fill: var(--red); stroke: var(--paper); stroke-width: 6; }

.card {
    position: relative;
    flex: none;
    width: var(--card-w);
    margin: 0;
    background: #ffffff;
    padding: 8px 8px 12px 8px;
    box-shadow: 0 16px 32px -14px rgba(17, 17, 17, 0.5);
    opacity: 0.55;
    transform: rotate(var(--tilt, 0deg)) translateY(var(--drop, 0px));
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.card:nth-child(even) { --tilt: -2.5deg; }
.card:nth-child(odd) { --tilt: 2deg; --drop: var(--lane); }
.card.on { opacity: 1; --tilt: 0deg; z-index: 2; }

.card img {
    width: 100%;
    height: var(--card-h);
    object-fit: cover;
}
.card figcaption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 4px 0 4px;
}
.card figcaption b {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.card.on figcaption b { color: var(--red); }
.card figcaption span { font-size: 14px; color: var(--muted); line-height: 1.4; }

.card-text {
    height: calc(var(--card-h) + 58px);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    background: var(--ink);
    color: var(--paper);
}
.card-end { background: var(--red); color: var(--ink); }
.card-rally { background: var(--ink); color: var(--paper); border-top: 10px solid var(--red); }
.card-label { font-family: var(--marker); font-size: 18px; color: var(--red); }
.card-big {
    font-family: var(--display);
    font-size: clamp(44px, 6vh, 72px);
    line-height: 0.9;
    text-transform: uppercase;
}
.card-big-sm { font-size: clamp(30px, 4vh, 44px); }
.card-small { font-size: 15px; font-weight: 500; line-height: 1.4; }
.card-start .card-small { color: var(--paper-dim); }

.odo-hint {
    width: 100%;
    font-family: var(--marker);
    font-size: 18px;
    color: var(--muted);
    text-align: right;
}

/* Stacked layout on small screens and for people who prefer less motion. */
@media (max-width: 899px), (prefers-reduced-motion: reduce) {
    .odo-pin { height: auto; padding-block: 0 48px; gap: 32px; overflow: visible; }
    .odo-head {
        position: sticky;
        top: 0;
        z-index: 5;
        flex-wrap: wrap;
        align-items: flex-end;
        padding-block: 18px 14px;
        background: var(--paper);
        border-bottom: 2px solid var(--ink);
    }
    .odo-km { font-size: clamp(56px, 16vw, 96px); }
    .odo-unit { font-size: clamp(24px, 6vw, 36px); }
    .odo-rally {
    font-family: var(--marker);
    font-size: clamp(16px, 2vh, 20px);
    color: var(--red);
    margin-bottom: 4px;
}
.odo-place { font-size: 22px; }
    .odo-viewport { overflow: visible; }
    .odo-track {
        --lane: 0px;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 40px;
        height: auto;
        padding: 0 var(--gutter);
        transform: none !important;
    }
    .odo-route { display: none; }
    .card { --drop: 0px; opacity: 1; width: min(100%, 420px); }
    .card:nth-child(even) { --tilt: -1.5deg; }
    .card:nth-child(odd) { --tilt: 1.5deg; }
    .card.on { --tilt: 0deg; }
    .card img { height: auto; aspect-ratio: 3 / 4; }
    .card-text { height: auto; padding: 28px 24px; }
    .odo-hint { display: none; }
}

/* ---------------------------------------------------------- What broke */

.broke-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 32px;
}
.broke-list li { display: flex; flex-direction: column; gap: 6px; }
.broke-list .what {
    font-family: var(--display);
    font-size: 40px;
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--paper);
}
.broke-list p { font-size: 16px; line-height: 1.45; }

/* ------------------------------------------------------------- Earlier */

.earlier-grid > :first-child,
.earlier-grid > :last-child { grid-column: span 6; }
.earlier p { color: var(--muted); font-size: 16px; margin-bottom: 18px; }

/* -------------------------------------------------------------- Raised */

.raised-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #333; }
.raised-list li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px 24px;
    align-items: baseline;
    padding: 22px 0;
    border-bottom: 1px solid #333;
}
.raised-list .amount {
    font-family: var(--display);
    font-size: 44px;
    line-height: 1;
    color: var(--red);
}
.raised-list .for { color: var(--paper-dim); font-size: 16px; }
.raised-list a { font-size: 14px; font-weight: 700; white-space: nowrap; }

/* ----------------------------------------------------------- Instagram */

.insta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-items: start;
}
.insta-grid .instagram-media {
    margin: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ------------------------------------------------------------ Sponsors */

.sponsor-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.sponsor-grid li { background: #ffffff; border: 2px solid var(--ink); }
.sponsor-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    padding: 28px;
    filter: grayscale(1);
    transition: filter 0.25s ease;
}
.sponsor-grid a:hover { filter: none; }
.sponsor-grid img { max-height: 100%; width: auto; object-fit: contain; }

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

.foot { padding-block: 48px; font-size: 14px; color: var(--muted-dark); }
.foot b { color: var(--paper); }

/* ----------------------------------------------------------- Responsive */

@media (max-width: 899px) {
    .hero { grid-template-columns: 1fr; min-height: 0; }
    .hero-copy { min-height: 64svh; }
    .hero-photo { height: 60vh; }
    .hero-title { font-size: clamp(72px, 22vw, 120px); }
    .grid-2 { gap: 28px; }
    .grid-2 > :first-child,
    .grid-2 > :last-child { grid-column: 1 / -1; }
    .broke-list { grid-template-columns: 1fr; gap: 20px; }
    .raised-list li { grid-template-columns: 1fr; gap: 4px; }
    .section-head { align-items: flex-start; flex-direction: column; }
}

/* ------------------------------------------------------------ Chapters */

.chapter { padding-block: clamp(72px, 9vw, 128px); background: var(--paper); }
.chapter-alt { background: #efece4; }

.chapter-head {
    display: flex;
    align-items: flex-end;
    gap: clamp(16px, 3vw, 40px);
    margin-bottom: clamp(32px, 4vw, 56px);
    border-bottom: 6px solid var(--ink);
    padding-bottom: 20px;
}
.chapter-year {
    font-family: var(--display);
    font-size: clamp(88px, 14vw, 200px);
    line-height: 0.8;
    color: var(--red);
    letter-spacing: 0.01em;
    flex: none;
}
.chapter-title { display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; min-width: 0; }
.chapter-title h2 { font-size: clamp(40px, 5.2vw, 76px); }
.chapter-meta {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.chapter-body {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 32px 32px;
    align-items: start;
}
.chapter-map { grid-column: span 7; border: 4px solid var(--ink); background: var(--paper); }
.chapter-map img { width: 100%; height: auto; display: block; }
.map-caption { padding: 10px 14px 12px 14px; margin: 0; border-top: 4px solid var(--ink); }
.chapter-map-tall { grid-column: span 3; }
.chapter-map-wide { grid-column: 1 / -1; }
.chapter-body .chapter-map-wide + .prose { grid-column: 1 / span 8; margin-top: 8px; }
.chapter-map-tall + .prose { grid-column: span 8; }
.chapter-body .prose { grid-column: span 5; font-size: 18px; line-height: 1.6; }
.chapter-body .prose p + p { margin-top: 1.1em; }
.chapter-body .prose-wide { grid-column: 1 / span 8; font-size: 20px; }
.chapter-body > .gallery,
.chapter-body > .gallery-title,
.chapter-body > .video,
.chapter-body > .caption { grid-column: 1 / -1; }
.chapter-body > .video { margin-top: 24px; }

.gallery-title {
    font-family: var(--marker);
    font-size: clamp(22px, 2.4vw, 30px);
    color: var(--red);
    margin: 24px 0 -8px 0;
    text-transform: none;
    line-height: 1.2;
}

.gallery {
    display: grid;
    gap: 20px;
    margin-top: 12px;
    grid-auto-flow: dense;
}
.gallery figure.wide { grid-column: span 2; }
.gallery figure.wide img { aspect-ratio: 16 / 10; }
.gallery-1 { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
.gallery-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery figure {
    margin: 0;
    background: #ffffff;
    padding: 8px 8px 12px 8px;
    box-shadow: 0 12px 24px -14px rgba(17, 17, 17, 0.45);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gallery figure:nth-child(3n+1) { transform: rotate(-0.8deg); }
.gallery figure:nth-child(3n+2) { transform: rotate(0.6deg); }
.gallery figure:nth-child(3n) { transform: rotate(-0.4deg); }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.gallery-4 img { aspect-ratio: 3 / 4; }
.gallery figcaption { font-size: 14px; line-height: 1.4; color: var(--muted); padding: 0 4px; }

@media (max-width: 1100px) {
    .gallery-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
    .chapter-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .chapter-map, .chapter-map-tall, .chapter-body .prose, .chapter-map-tall + .prose, .chapter-body .prose-wide, .chapter-body .chapter-map-wide + .prose { grid-column: 1 / -1; }
    .chapter-map-tall { max-width: 300px; }
    .gallery-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .gallery-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .gallery-1 { max-width: 100%; }
}
@media (max-width: 520px) {
    .gallery-3, .gallery-4 { grid-template-columns: minmax(0, 1fr); }
    .gallery figure.wide { grid-column: span 1; }
}


/* Feature photo: the one that matters */
.chapter-body > .feature { grid-column: 1 / -1; margin: 32px auto 0 auto; max-width: 720px; width: 100%; background: #ffffff; padding: 12px 12px 18px 12px; box-shadow: 0 24px 48px -20px rgba(17, 17, 17, 0.5); transform: rotate(-0.6deg); }
.feature img { width: 100%; height: auto; display: block; }
.feature figcaption { padding: 14px 6px 0 6px; font-size: 17px; line-height: 1.5; color: var(--ink); font-weight: 500; }
.chapter-body > .feature-pair { max-width: 1000px; }
.feature-pair .feature-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) {
    .feature-pair .feature-images { grid-template-columns: minmax(0, 1fr); }
}
