/* =============================================================
   Mullica Hill Historic Walking Tour
   Shared stylesheet
   Visual identity matches the printed signs:
   cream, deep navy, oxblood, EB Garamond serif throughout.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&display=swap');

:root {
    --cream:        #f3e9d2;
    --cream-light:  #fbf3df;
    --cream-deep:   #e7d8b0;
    --navy:         #131838;
    --navy-soft:    #232a4d;
    --navy-faint:   #5b6585;
    --oxblood:      #5c0d0d;
    --oxblood-soft: #761010;
    --rule:         #b8a98a;
    --rule-faint:   #d6c9aa;
    --ink:          #1a2342;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: 'EB Garamond', 'Adobe Caslon Pro', Georgia, serif;
    font-size: 19px;
    line-height: 1.72;
    font-feature-settings: "liga" 1, "kern" 1, "onum" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle paper-grain overlay so the cream is not flat */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.10  0 0 0 0 0.13  0 0 0 0 0.26  0 0 0 0.10 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
    mix-blend-mode: multiply;
    opacity: 0.7;
}

.page {
    max-width: 660px;
    margin: 0 auto;
    padding: 26px 28px 80px;
    position: relative;
    z-index: 1;
}

a { color: var(--oxblood); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover, a:focus { color: var(--oxblood-soft); }

/* ---------- Tour header (every page) ---------- */
.tour-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--cream);
    padding: 10px 0 12px;
    border-bottom: 2px solid var(--navy);
    margin-bottom: 8px;
    text-align: center;
    position: relative; /* fallback */
    position: sticky;
}
.tour-header::after {
    content: '';
    position: absolute;
    left: 6%; right: 6%;
    bottom: -6px;
    height: 1px;
    background: var(--navy);
}
.tour-header .kicker {
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
}
.tour-header .kicker a {
    color: var(--navy);
    text-decoration: none;
}

/* ---------- Stop chapter opener ---------- */
.stop-marker {
    text-align: center;
    margin: 44px 0 4px;
}
.stop-marker .stop-label {
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--oxblood);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}
.stop-marker .stop-number {
    display: block;
    font-size: 96px;
    font-weight: 700;
    line-height: 0.95;
    color: var(--navy);
    font-family: 'EB Garamond', Georgia, serif;
    font-feature-settings: "lnum" 1;
    margin: 0;
}

.building-name {
    text-align: center;
    font-size: 38px;
    line-height: 1.08;
    font-weight: 700;
    color: var(--navy);
    margin: 18px 12px 6px;
    letter-spacing: -0.005em;
}
.building-year {
    text-align: center;
    font-style: italic;
    font-size: 22px;
    color: var(--navy-soft);
    margin: 0 0 4px;
    font-feature-settings: "onum" 1;
}
.reading-time {
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--navy-soft);
    margin: 0 0 18px;
    font-weight: 600;
}

/* ornamental rule under year */
.rule-ornament {
    text-align: center;
    margin: 22px auto 36px;
    color: var(--navy);
    line-height: 1;
}
.rule-ornament svg { display: inline-block; vertical-align: middle; }

/* ---------- Hero image ---------- */
.hero-image {
    margin: 4px -28px 32px;
}
.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    border: 0;
}
.hero-image figcaption {
    font-style: italic;
    font-size: 14px;
    color: var(--navy-soft);
    padding: 10px 28px 0;
    text-align: center;
    line-height: 1.5;
}

/* ---------- Story body ---------- */
.story {
    font-size: 19.5px;
    line-height: 1.78;
    color: var(--ink);
    margin-top: 8px;
}
.story p { margin: 0 0 22px; }

/* drop cap on the lead paragraph */
.story p.lead::first-letter {
    float: left;
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 86px;
    line-height: 0.82;
    color: var(--navy);
    margin: 8px 10px 0 0;
    padding: 0 4px 0 0;
}

/* small-cap leading line after drop cap */
.story p.lead::first-line {
    font-variant: small-caps;
    letter-spacing: 0.02em;
    font-weight: 500;
}

/* Did-you-know epigraph */
.did-you-know {
    margin: 38px 0;
    padding: 22px 24px 22px 26px;
    background: var(--cream-light);
    border-left: 4px solid var(--oxblood);
    font-style: italic;
    font-size: 18px;
    line-height: 1.62;
    color: var(--navy);
    position: relative;
}
.did-you-know::before {
    content: '';
    position: absolute;
    left: -4px; top: 0; bottom: 0;
    width: 4px;
    background: var(--oxblood);
}
.did-you-know .label {
    display: block;
    font-style: normal;
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--oxblood);
    margin-bottom: 8px;
    font-weight: 700;
}

/* ---------- Section break ornament (asterism) ---------- */
.break {
    text-align: center;
    margin: 36px 0;
    color: var(--navy-soft);
    font-size: 22px;
    letter-spacing: 0.6em;
    line-height: 1;
    user-select: none;
}

/* ---------- Photo strip ---------- */
.photo-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 28px 0;
}
@media (min-width: 520px) {
    .photo-strip { grid-template-columns: 1fr 1fr; gap: 20px; }
}
.photo-strip figure { margin: 0; }
.photo-strip img {
    width: 100%;
    height: auto;
    display: block;
    border: 8px solid #fbf6e6;
    box-shadow: 0 0 0 1px var(--navy), 0 1px 8px rgba(26, 35, 66, 0.10);
}
.photo-strip figcaption {
    font-style: italic;
    font-size: 13px;
    color: var(--navy-soft);
    padding: 8px 4px 0;
    text-align: center;
    line-height: 1.5;
}

/* ---------- Next stop / scan-band button ---------- */
.next-stop {
    display: block;
    text-decoration: none;
    margin: 46px -4px 22px;
    padding: 22px 22px;
    background: var(--oxblood);
    color: var(--cream-light);
    text-align: center;
    border-radius: 0;
    box-shadow: 0 1px 0 var(--oxblood-soft);
    transition: background 0.15s ease;
}
.next-stop:hover, .next-stop:focus {
    background: var(--oxblood-soft);
    color: var(--cream-light);
}
.next-stop .label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
    color: rgba(251, 243, 223, 0.78);
}
.next-stop .destination {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
}
.next-stop .direction {
    display: block;
    font-style: italic;
    font-size: 14px;
    margin-top: 4px;
    color: rgba(251, 243, 223, 0.82);
    font-weight: 500;
}
.next-stop .walk-time {
    display: block;
    font-style: italic;
    font-size: 14px;
    color: rgba(251, 243, 223, 0.78);
    margin-top: 6px;
}

.prev-stop {
    display: block;
    text-align: center;
    margin: 14px 0 6px;
    color: var(--navy);
    font-style: italic;
    text-decoration: none;
    font-size: 15px;
}
.prev-stop:hover { text-decoration: underline; }
.prev-stop .arrow { margin-right: 4px; }

.back-to-index {
    display: block;
    text-align: center;
    color: var(--navy);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 600;
    margin: 26px 0 0;
}
.back-to-index:hover { color: var(--oxblood); }

/* ---------- All-stops navigation ---------- */
.all-stops {
    margin: 36px 0 12px;
    padding: 20px 0;
    border-top: 1px solid var(--navy);
    border-bottom: 1px solid var(--navy);
}
.all-stops .label {
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--oxblood);
    font-weight: 700;
    margin: 0 0 14px;
}
.all-stops ol {
    list-style: none;
    padding: 0;
    margin: 0;
}
.all-stops li a {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 14px;
    align-items: baseline;
    padding: 10px 4px;
    text-decoration: none;
    color: var(--navy);
    border-bottom: 1px solid var(--rule-faint);
}
.all-stops li:last-child a { border-bottom: 0; }
.all-stops li a:hover { background: var(--cream-light); }
.all-stops .num {
    font-weight: 700;
    font-size: 22px;
    text-align: right;
    color: var(--navy);
}
.all-stops .name {
    font-size: 17px;
    font-weight: 500;
}
.all-stops .here {
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--oxblood);
    font-weight: 700;
}
.all-stops li.current a { background: var(--cream-light); }
.all-stops li.current .name { font-weight: 700; }

/* ---------- Feedback form ---------- */
.feedback {
    margin: 56px -4px 32px;
    padding: 28px 14px 24px;
    background: var(--cream-light);
    border-top: 1px solid var(--navy);
    border-bottom: 1px solid var(--navy);
    text-align: center;
}
.feedback h3 {
    font-size: 22px;
    font-style: italic;
    font-weight: 500;
    margin: 0 0 4px;
    color: var(--navy);
}
.feedback .feedback-sub {
    font-size: 14px;
    color: var(--navy-soft);
    font-style: italic;
    margin: 0 0 18px;
}
.feedback iframe {
    width: 100%;
    height: 720px;
    border: 0;
    background: transparent;
}

/* ---------- Footer ---------- */
footer.hths-footer {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 2px solid var(--navy);
    text-align: center;
    font-size: 14px;
    color: var(--navy);
    line-height: 1.65;
    position: relative;
}
footer.hths-footer::before {
    content: '';
    position: absolute;
    left: 6%; right: 6%; top: -7px;
    height: 1px;
    background: var(--navy);
}
footer.hths-footer .preamble {
    font-style: italic;
    font-size: 13px;
    margin: 0 0 4px;
    color: var(--navy-soft);
}
footer.hths-footer .society {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 15px;
    margin: 0 0 10px;
}
footer.hths-footer .society a {
    color: var(--navy);
    text-decoration: none;
}
footer.hths-footer .society a:hover { color: var(--oxblood); }
footer.hths-footer .address {
    font-size: 13px;
    color: var(--navy-soft);
    margin: 0 0 8px;
}
footer.hths-footer .links {
    margin: 10px 0 8px;
    font-size: 13px;
}
footer.hths-footer .links a {
    color: var(--oxblood);
    text-decoration: none;
    margin: 0 8px;
}
footer.hths-footer .links a:hover { text-decoration: underline; }
footer.hths-footer .award {
    font-size: 12px;
    font-style: italic;
    color: var(--navy-soft);
    margin: 14px auto 0;
    max-width: 460px;
    line-height: 1.55;
    padding: 0 12px;
}

/* ============================================================
   Index page (the /tour landing)
   ============================================================ */

.tour-title {
    text-align: center;
    margin: 32px 0 8px;
}
.tour-title .pre {
    font-size: 11px;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: var(--oxblood);
    font-weight: 700;
    display: block;
    margin-bottom: 14px;
}
.tour-title h1 {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.05;
    color: var(--navy);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}
.tour-title .post {
    font-style: italic;
    font-size: 22px;
    color: var(--navy-soft);
    margin: 0;
}

.tour-intro {
    margin: 26px 0 30px;
    font-size: 19px;
    line-height: 1.7;
    color: var(--ink);
}
.tour-intro p { margin: 0 0 18px; }
.tour-intro p.lead::first-letter {
    float: left;
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 70px;
    line-height: 0.82;
    color: var(--navy);
    margin: 8px 8px 0 0;
}

.tour-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin: 26px 0 30px;
    padding: 20px 0;
    border-top: 1px solid var(--navy);
    border-bottom: 1px solid var(--navy);
    text-align: center;
}
.tour-meta .meta-item .label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--navy-soft);
    font-weight: 600;
    margin-bottom: 4px;
}
.tour-meta .meta-item .value {
    font-size: 17px;
    color: var(--navy);
    font-weight: 600;
    font-feature-settings: "onum" 1;
}

.section-label {
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--oxblood);
    font-weight: 700;
    margin: 30px 0 8px;
}

.stop-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 36px;
    counter-reset: stop;
}
.stop-list li {
    border-bottom: 1px solid var(--rule);
}
.stop-list li:first-child { border-top: 1px solid var(--rule); }
.stop-list a {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 20px;
    align-items: start;
    padding: 22px 4px;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s ease;
}
.stop-list a:hover { background: var(--cream-light); }
.stop-list .num {
    text-align: right;
    font-size: 48px;
    font-weight: 700;
    line-height: 0.9;
    color: var(--navy);
    font-feature-settings: "lnum" 1;
    padding-top: 2px;
}
.stop-list .name {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--navy);
    margin: 0 0 2px;
}
.stop-list .year {
    display: block;
    font-style: italic;
    color: var(--navy-soft);
    font-size: 15px;
    margin-bottom: 8px;
}
.stop-list .teaser {
    font-size: 16px;
    color: var(--ink);
    line-height: 1.5;
    font-style: italic;
}
.stop-list .address {
    display: block;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--navy-soft);
    font-weight: 600;
    margin-top: 6px;
}

.begin-cta {
    display: block;
    text-decoration: none;
    margin: 36px -4px 6px;
    padding: 24px 22px;
    background: var(--oxblood);
    color: var(--cream-light);
    text-align: center;
    transition: background 0.15s ease;
}
.begin-cta:hover, .begin-cta:focus { background: var(--oxblood-soft); color: var(--cream-light); }
.resume-cta {
    display: block;
    text-decoration: none;
    margin: 36px -4px 6px;
    padding: 24px 22px;
    background: var(--navy);
    color: var(--cream-light);
    text-align: center;
    transition: background 0.15s ease;
}
.resume-cta:hover, .resume-cta:focus { background: var(--navy-soft); color: var(--cream-light); }
.resume-cta .label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(251, 243, 223, 0.78);
    margin-bottom: 5px;
}
.resume-cta .destination {
    font-size: 26px;
    font-weight: 700;
}
.begin-cta .label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(251, 243, 223, 0.78);
    margin-bottom: 5px;
}
.begin-cta .destination {
    font-size: 26px;
    font-weight: 700;
}

/* ---------- Plan Your Visit ---------- */
.plan-visit {
    margin: 30px 0 36px;
    padding: 24px 0;
    border-top: 1px solid var(--navy);
    border-bottom: 1px solid var(--navy);
}
.plan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px 24px;
    margin: 0;
}
@media (min-width: 520px) {
    .plan-grid { grid-template-columns: 1fr 1fr; }
}
.plan-grid > div { margin: 0; }
.plan-grid dt {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--oxblood);
    font-weight: 700;
    margin: 0 0 4px;
}
.plan-grid dd {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
}
.plan-grid dd a {
    display: inline-block;
    margin-top: 4px;
    color: var(--oxblood);
    text-decoration: none;
    font-weight: 600;
}
.plan-grid dd a:hover { text-decoration: underline; }

/* ---------- End of Tour ---------- */
.end-of-tour {
    margin: 36px 0 16px;
}
.end-card {
    padding: 22px 22px;
    margin: 18px 0;
    background: var(--cream-light);
    border-left: 4px solid var(--navy);
}
.end-card.museum { border-left-color: var(--oxblood); }
.end-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    color: var(--navy);
    font-weight: 700;
}
.end-card p { margin: 0 0 10px; font-size: 16px; line-height: 1.6; }
.end-card .museum-hours { font-style: italic; color: var(--navy-soft); }
.end-card .eat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.end-card .eat-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--rule-faint);
    font-size: 15px;
    line-height: 1.5;
}
.end-card .eat-list li:last-child { border-bottom: 0; }
.end-card .eat-list strong { color: var(--navy); font-size: 16px; }
.end-card .eat-list em { color: var(--navy-soft); display: block; margin: 2px 0 4px; }
.end-card .eat-list a {
    color: var(--oxblood);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.end-card .eat-list a:hover { text-decoration: underline; }
.cta-inline {
    color: var(--oxblood);
    text-decoration: none;
    font-weight: 600;
}
.cta-inline:hover { text-decoration: underline; }
.cta-button {
    display: inline-block;
    padding: 10px 18px;
    margin: 4px 6px 4px 0;
    background: var(--oxblood);
    color: var(--cream-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.06em;
}
.cta-button.alt {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--navy);
}
.cta-button:hover { opacity: 0.9; }
.restart-link {
    display: block;
    text-align: center;
    margin: 24px 0 0;
    color: var(--navy);
    text-decoration: none;
    font-style: italic;
    font-size: 15px;
}

/* ---------- Page utilities ---------- */
.page-utilities {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--rule-faint);
}
.util-link {
    font-size: 14px;
    font-style: italic;
    color: var(--oxblood);
    text-decoration: none;
}
.util-link:hover { text-decoration: underline; }

/* ---------- Photo lightbox ---------- */
.lightbox-overlay {
    position: fixed; inset: 0;
    background: rgba(26, 35, 66, 0.94);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 32px;
    cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
    max-width: 100%; max-height: 90vh;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.lightbox-overlay .caption {
    position: absolute; bottom: 20px; left: 32px; right: 32px;
    color: var(--cream-light); font-style: italic; font-size: 14px;
    text-align: center;
}
.photo-strip img, .hero-image img { cursor: zoom-in; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 520px) {
    .page { padding: 22px 22px 70px; }
    .tour-title h1 { font-size: 40px; }
    .tour-title .post { font-size: 19px; }
    .stop-marker .stop-number { font-size: 80px; }
    .building-name { font-size: 32px; }
    .building-year { font-size: 20px; }
    .story { font-size: 18.5px; line-height: 1.74; }
    .story p.lead::first-letter { font-size: 76px; }
    .hero-image { margin-left: -22px; margin-right: -22px; }
    .next-stop { margin-left: -2px; margin-right: -2px; }
    .begin-cta { margin-left: -2px; margin-right: -2px; }
    .feedback { margin-left: -2px; margin-right: -2px; padding-left: 18px; padding-right: 18px; }
    .stop-list a { grid-template-columns: 52px 1fr; gap: 16px; }
    .stop-list .num { font-size: 40px; }
    .stop-list .name { font-size: 21px; }
    .tour-meta { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .tour-meta .meta-item .value { font-size: 15px; }
}

@media print {
    body::before { display: none; }
    .next-stop, .begin-cta, .feedback, .prev-stop, .back-to-index { display: none; }
    body { background: white; }
    .page { max-width: 100%; }
}
