/* UCMS walking-tour page — "Main Street Wayfinding" direction.
   High-fidelity recreation of the 2026-07-29 design handoff
   (design_handoff_uphams_walking_tour). Tokens and measurements come from
   the handoff README; do not restyle ad hoc. The guide app (/guide/) keeps
   its own look by design. */

:root {
    --blue: #1B75BC;
    --blue-dark: #135685;
    --gold: #E0B93F;
    --gold-dark: #D4AC2F;
    --ink: #21303F;
    --body-c: #44515E;
    --muted: #5B6B7A;
    --paper: #F5F1E8;
    --card-border: #D8D2C4;
    --hairline: #E2DBCB;
    --hairline-soft: #EAE4D6;
    --pill: #EAF2F9;
    --font: 'Archivo', sans-serif;
    --wrap: 1080px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--body-c);
    background: var(--paper);
}

img { max-width: 100%; height: auto; }

/* Text links use the darker blue: brand #1B75BC is 4.31:1 on the paper
   background, just under WCAG AA's 4.5. Buttons keep brand blue (white
   text on it passes). */
a { color: var(--blue-dark); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: #0E436B; }

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--ink);
    color: #fff;
    padding: 10px 18px;
}
.skip:focus { left: 0; }

button { font-family: var(--font); }
button:focus-visible, a:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

/* ---------- utility bar ---------- */

.utility {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--blue);
    color: #fff;
    padding: 7px 40px;
    font: 600 11px/1 var(--font);
    letter-spacing: 0.06em;
}
.utility nav { display: flex; gap: 4px; }
/* Full-opacity white (70% failed contrast on the blue) and padded to a
   24px+ touch target; the underline alone marks the active language. */
.utility nav a {
    color: #fff;
    text-decoration: none;
    padding: 7px 8px;
    margin: -7px 0;
}
.utility nav a[aria-current] {
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

/* ---------- header + nav ---------- */

.site-head {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 40px;
    background: #fff;
    border-bottom: 3px solid var(--blue);
}

.brand img { display: block; height: 52px; width: auto; }

.site-nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    font: 600 14px/1 var(--font);
}

.nav-item { position: relative; }

.nav-item > button {
    appearance: none;
    background: none;
    border: none;
    font: 600 14px/1 var(--font);
    color: var(--ink);
    padding: 10px 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s ease;
}
.nav-item > button:hover { color: var(--blue); }

/* current section: pill + inset underline (per handoff; text darkened
   from brand blue, which is 4.3:1 on the pill background) */
.nav-item.is-current > button {
    background: var(--pill);
    color: var(--blue-dark);
    box-shadow: inset 0 -3px 0 var(--blue);
}

.nav-item > button[aria-expanded="true"] {
    background: var(--ink);
    color: #fff;
    box-shadow: none;
}

.panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--card-border);
    border-top: 3px solid var(--blue);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 10px rgba(33, 48, 63, 0.09), 0 18px 40px rgba(33, 48, 63, 0.14);
    padding: 10px;
}
.nav-item > button[aria-expanded="true"] + .panel { display: block; }

.panel ul { list-style: none; margin: 0; padding: 0; }
.panel li + li { margin-top: 2px; }
.panel a {
    display: block;
    padding: 9px 12px;
    border-radius: 4px;
    color: var(--ink);
    text-decoration: none;
    font: 600 14px/1.3 var(--font);
}
.panel a:hover { background: var(--pill); color: var(--blue-dark); }
.panel a[aria-current] {
    background: var(--pill);
    color: var(--blue-dark);
    box-shadow: inset 0 -3px 0 var(--blue);
    border-radius: 4px 4px 0 0;
}

.panel.mega {
    left: 50%;
    transform: translateX(-50%);
    width: min(660px, 92vw);
    padding: 18px;
    grid-template-columns: 1fr 1fr 200px;
    gap: 18px;
}
.nav-item > button[aria-expanded="true"] + .panel.mega { display: grid; }

.mega-head {
    margin: 4px 0 6px 12px;
    font: 700 11px/1 var(--font);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.mega-feature {
    display: block;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: var(--ink);
    text-decoration: none;
}
.mega-feature img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.mega-feature-label {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    color: #fff;
    font: 600 13.5px/1.35 var(--font);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.mega-feature:hover img { opacity: 0.7; }

.nav-cta { margin-left: 10px; }

.btn-gold {
    display: inline-block;
    background: var(--gold);
    color: var(--ink);
    font: 700 14px/1 var(--font);
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}
.btn-gold:hover { background: var(--gold-dark); color: var(--ink); }

/* burger (mobile) */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    cursor: pointer;
}
.burger span {
    display: block;
    height: 2.5px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- main ---------- */

main {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 36px 40px 64px;
}

.crumbs {
    font: 600 12px/1 var(--font);
    color: var(--muted);
}
/* Underlined: color alone can't distinguish links from the muted text. */
.crumbs a { text-decoration: underline; text-decoration-thickness: 1px; }
.crumbs span[aria-current] { color: var(--muted); }

/* ---------- hero ---------- */

.hero {
    display: flex;
    gap: 48px;
    margin: 22px 0 0;
    align-items: flex-start;
}
.hero-copy { flex: 1.25; min-width: 0; }
.hero-card-col { flex: 1; min-width: 0; }

h1 {
    font: 800 48px/1.05 var(--font);
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
h1 span { color: var(--blue); }

.lede {
    font: 400 16px/1.65 var(--font);
    color: var(--body-c);
    margin: 18px 0 0;
    max-width: 460px;
    text-wrap: pretty;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 0;
    font: 600 14px/1 var(--font);
    color: var(--ink);
}
.chips span {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 99px;
    padding: 10px 16px;
}
.chips .chip-gold { background: var(--gold); border-color: var(--gold); }

.hero-note {
    font: 400 15px/1.55 var(--font);
    color: var(--muted);
    margin: 20px 0 0;
}

.btn-hero {
    display: inline-block;
    margin: 26px 0 0;
    background: var(--blue);
    color: #fff;
    font: 700 15px/1 var(--font);
    text-decoration: none;
    padding: 15px 22px;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}
.btn-hero:hover { background: var(--blue-dark); color: #fff; }

/* hero photo card */
.photo-card {
    margin: 0;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(33, 48, 63, 0.09);
}
.photo-card img {
    display: block;
    width: 100%;
    height: 440px;
    object-fit: cover;
    object-position: 35% center;
}
.photo-card figcaption {
    padding: 12px 18px;
    border-top: 1px solid var(--hairline-soft);
    font: 400 13px/1.5 var(--font);
    color: var(--muted);
}

/* ---------- the guide, full width ---------- */

.guide-section { margin: 60px 0 0; scroll-margin-top: 100px; }

.guide-actions { display: flex; gap: 8px; flex: none; }

.btn-mini {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--blue);
    color: #fff;
    border: 2px solid var(--blue);
    font: 700 13px/1 var(--font);
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-mini:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-mini.outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-mini.outline:hover { background: var(--ink); color: #fff; }

.guide-wide { margin-top: 18px; }

.guide-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(33, 48, 63, 0.09);
}
/* The preview is a screenshot that reads like a live map; dim it and put
   the way in on top so nobody tries to pan the picture. */
.guide-preview { display: block; position: relative; }
.guide-preview img { display: block; width: 100%; }
.guide-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(33, 48, 63, 0.18), rgba(33, 48, 63, 0.42));
}
.preview-cta {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    background: var(--blue);
    color: #fff;
    font: 700 15px/1 var(--font);
    padding: 15px 22px;
    border-radius: 99px;
    box-shadow: 0 8px 24px rgba(33, 48, 63, 0.45);
    white-space: nowrap;
    transition: background-color 0.15s ease;
}
.guide-preview:hover .preview-cta { background: var(--blue-dark); }
.guide-card iframe { display: block; width: 100%; height: clamp(520px, 72vh, 800px); border: 0; }
.guide-card:fullscreen { border-radius: 0; border: none; }
.guide-card:fullscreen iframe { height: 100vh; }


/* ---------- stops ---------- */

.stops-section { margin: 60px 0 0; }

.h2-row { display: flex; align-items: center; gap: 14px; }
h2 { font: 800 28px/1.1 var(--font); color: var(--ink); margin: 0; }
.h2-rule { flex: 1; height: 3px; background: var(--blue); }

/* Column-wise fill (1-4 left, 5-7 right): reads like a numbered route. */
.stops {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    gap: 0 40px;
    margin: 24px 0 0;
    padding: 0;
}
.stops a {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 12px;
    border-bottom: 1px solid var(--hairline);
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.stops a:hover { background: #fff; }
.stops .num {
    flex: none;
    width: 30px;
    height: 30px;
    text-align: center;
    font: 700 14px/30px var(--font);
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
}
.stop-text { min-width: 0; }
.stop-name { display: block; font: 700 16px/1.3 var(--font); color: var(--ink); }
.stop-blurb { display: block; font: 400 13.5px/1.5 var(--font); color: var(--muted); margin-top: 3px; }

.paper-note { font: 400 13px/1.5 var(--font); color: var(--muted); margin: 18px 0 0; }

/* ---------- footer ---------- */

.site-foot { background: var(--ink); color: rgba(255, 255, 255, 0.75); }

.foot-grid {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 40px 40px 28px;
    display: flex;
    gap: 48px;
    align-items: flex-start;
}
.foot-brand { flex: 1.4; }
.foot-grid > div { flex: 1; }
.foot-grid > .foot-brand { flex: 1.4; }

.foot-logo {
    display: inline-block;
    background: #fff;
    border-radius: 6px;
    padding: 8px 12px;
}
.foot-logo img { display: block; height: 38px; width: auto; }
.foot-brand p { font: 400 13.5px/1.6 var(--font); margin: 14px 0 0; max-width: 320px; }

.foot-head {
    font: 700 12px/1 var(--font);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 12px;
}
.foot-body { font: 400 13.5px/1.7 var(--font); margin: 0; }
.foot-grid ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.foot-grid a { font: 400 13.5px var(--font); color: #fff; text-decoration: none; transition: color 0.15s ease; }
.foot-grid a:hover { color: var(--gold); }

.foot-fine-wrap { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.foot-fine {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 14px 40px;
    font: 400 12px/1.5 var(--font);
    color: rgba(255, 255, 255, 0.5);
}
.foot-fine strong { color: rgba(255, 255, 255, 0.75); }

/* ---------- responsive (handoff is desktop-only; same tokens below 960) ---------- */

@media (max-width: 959px) {
    .utility { padding: 7px 20px; }
    .utility-brand { display: none; }
    .utility { justify-content: flex-end; }

    .site-head { padding: 12px 20px; }
    .brand img { height: 40px; }
    .burger { display: flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 3px solid var(--blue);
        box-shadow: 0 24px 40px rgba(33, 48, 63, 0.18);
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    body.nav-open .site-nav { display: block; }

    .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 12px 16px; }
    .nav-item > button {
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 10px;
        border-bottom: 1px solid var(--hairline);
        border-radius: 0;
    }
    .nav-item.is-current > button { box-shadow: inset 3px 0 0 var(--blue); }
    .panel, .panel.mega {
        position: static;
        transform: none;
        width: auto;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--blue);
        border-radius: 0;
        margin: 4px 0 8px;
        grid-template-columns: 1fr;
    }
    /* The Explore feature card stays visible in the mobile accordion:
       it reads well there, and a display:none here behaved inconsistently
       across engines during QA (2026-07-29). If it must go, remove the
       element on mobile via JS instead. */
    .nav-cta { margin: 14px 10px 0; }
    .nav-cta .btn-gold { display: block; text-align: center; }

    .notice { padding: 9px 20px; }
    main { padding: 28px 20px 48px; }

    .hero { flex-direction: column; gap: 32px; }
    h1 { font-size: clamp(34px, 9vw, 44px); }
    .hero-card-col { width: 100%; }
    .photo-card img { height: 300px; }
    .guide-preview img { max-width: 340px; margin: 0 auto; }
    .guide-card { max-width: 420px; margin: 18px auto 0; }
    .h2-row { flex-wrap: wrap; }
    .guide-actions { display: none; }

    .stops { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }

    .foot-grid { flex-wrap: wrap; gap: 30px; padding: 32px 20px 24px; }
    .foot-brand { flex-basis: 100%; }
    .foot-grid > div { flex: 1 1 40%; }
    .foot-fine { padding: 14px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .burger span, .nav-item > button, .btn-blue, .btn-outline, .btn-gold, .stops a, .foot-grid a { transition: none; }
}
