/* Site colours (--primary, --primary-dark, --accent, --accent-text) are appended by build.py */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: #1f2933;
    background: #fafaf7;
}

a {
    color: var(--primary-dark);
}

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

.wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 8px 14px;
    background: var(--primary-dark);
    color: #fff;
    z-index: 2000;
}

.skip-link:focus {
    left: 10px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: #fff;
    border-bottom: 1px solid #e6e6e0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-dark);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.logo span {
    color: var(--accent-text);
}

#site-nav ul {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#site-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: #1f2933;
    text-decoration: none;
    font-weight: 500;
}

#site-nav a:hover,
#site-nav a[aria-current="page"] {
    background: #f1efe8;
    color: var(--primary-dark);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #1f2933;
}

@media (max-width: 800px) {
    .nav-toggle {
        display: block;
    }

    #site-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e6e6e0;
    }

    #site-nav.open {
        display: block;
    }

    #site-nav ul {
        flex-direction: column;
        padding: 8px 20px 16px;
    }

    #site-nav a {
        padding: 12px;
    }
}

/* Breadcrumb */
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 14px 0 0;
    font-size: 0.9rem;
}

.breadcrumb li + li::before {
    content: "›";
    margin-right: 6px;
    color: #5f6b76;
}

.breadcrumb a {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Hero */
.hero {
    padding: 28px 0 8px;
}

.hero-home {
    padding: 44px 0 16px;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    line-height: 1.15;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

.lead {
    max-width: 760px;
    margin: 0;
    font-size: 1.15rem;
    color: #3e4a55;
}

/* Content */
.content {
    padding-bottom: 48px;
}

.prose {
    max-width: 780px;
}

.prose h2 {
    margin: 36px 0 10px;
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.prose h3 {
    margin: 26px 0 8px;
    font-size: 1.2rem;
}

.prose p a,
.prose li a,
.faq p a,
.footer-bottom a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Map */
.map-wrap {
    margin: 22px 0 6px;
}

.map {
    height: 460px;
    border-radius: 14px;
    border: 1px solid #e0ddd3;
    background: #e8e6df;
    z-index: 1;
}

.map-caption {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: #5f6b76;
}

@media (max-width: 600px) {
    .map {
        height: 360px;
    }
}

.pin {
    background: none;
    border: 0;
}

.pin-body {
    position: absolute;
    left: 1px;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: 2px solid #fff;
    box-shadow: -2px 3px 6px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease;
}

.pin::after {
    content: "";
    position: absolute;
    left: 11px;
    bottom: 0;
    width: 12px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
}

.pin:hover .pin-body,
.pin:focus-visible .pin-body {
    transform: rotate(-45deg) scale(1.12);
}

.pin:focus-visible {
    outline: none;
}

.pin:focus-visible .pin-body {
    box-shadow: 0 0 0 3px var(--accent), -2px 3px 6px rgba(0, 0, 0, 0.35);
}

.pin-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
}

.pin-linked .pin-dot {
    width: 12px;
    height: 12px;
    background: var(--accent);
    border: 2px solid #fff;
}

.pin-icon {
    transform: rotate(45deg);
    font-size: 16px;
    line-height: 1;
}

.pin-emoji .pin-body {
    background: #fff;
    border: 3px solid var(--primary);
}

.route-line {
    stroke: var(--accent);
}

.leaflet-popup-content .popup-title {
    display: block;
    font-size: 1.05em;
    margin-bottom: 4px;
}

.leaflet-popup-content p {
    margin: 4px 0 8px;
}

.leaflet-control-attribution a {
    text-decoration: underline;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 3px var(--accent);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    border: 2px solid #fff;
}

/* Facts */
.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin: 22px 0 10px;
}

.fact {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e6e6e0;
    border-radius: 12px;
}

.fact-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5f6b76;
}

.fact-value {
    display: block;
    font-weight: 700;
    color: #1f2933;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.card {
    display: block;
    padding: 18px;
    background: #fff;
    border: 1px solid #e6e6e0;
    border-radius: 14px;
    color: #1f2933;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.card-icon {
    font-size: 1.6rem;
}

.card h2,
.card h3 {
    margin: 6px 0 4px;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.card p {
    margin: 0;
    font-size: 0.95rem;
    color: #3e4a55;
}

.home-section {
    margin-top: 34px;
}

.home-section > h2 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--primary-dark);
}

.more {
    margin: 0;
}

/* Plan your trip */
.plan {
    margin: 36px 0;
    padding: 24px;
    border-radius: 16px;
    background: var(--primary-dark);
    color: #fff;
}

.plan h2 {
    margin: 0 0 14px;
}

.plan-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.plan-link {
    display: block;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
}

.plan-link:hover {
    background: rgba(255, 255, 255, 0.22);
}

.plan-link strong,
.plan-link span {
    display: block;
}

.plan-link span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.plan .aff-note {
    margin: 12px 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* FAQ */
.faq {
    margin: 36px 0;
    max-width: 780px;
}

.faq h2 {
    color: var(--primary-dark);
}

.faq details {
    margin-bottom: 10px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e6e6e0;
    border-radius: 12px;
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
}

.faq p {
    margin: 10px 0 0;
}

/* Related */
.related h2 {
    color: var(--primary-dark);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.related-card {
    display: block;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e6e6e0;
    border-radius: 12px;
    color: #1f2933;
    text-decoration: none;
}

.related-card strong {
    display: block;
    color: var(--primary-dark);
}

.related-card span {
    font-size: 0.9rem;
    color: #3e4a55;
}

/* Footer */
.site-footer {
    margin-top: 40px;
    padding: 36px 0 20px;
    background: #1d232a;
    color: #d5dbe1;
}

.site-footer a {
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.footer-brand {
    margin: 0 0 6px;
    font-size: 1.2rem;
    font-weight: 800;
}

.footer-brand span {
    color: var(--accent);
}

.footer-title {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #fff;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col li {
    margin: 4px 0;
}

.footer-col a {
    text-decoration: none;
}

.footer-col a:hover {
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.85rem;
}

.footer-bottom p {
    margin: 4px 0;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    body {
        background: #14181c;
        color: #e4e8ec;
    }

    a,
    .breadcrumb a {
        color: var(--accent);
    }

    .site-header,
    #site-nav {
        background: #1b2026;
        border-color: #2b323a;
    }

    #site-nav a,
    .nav-toggle span {
        color: #e4e8ec;
        background-color: transparent;
    }

    .nav-toggle span {
        background: #e4e8ec;
    }

    #site-nav a:hover,
    #site-nav a[aria-current="page"] {
        background: #262d35;
        color: #fff;
    }

    .logo,
    .hero h1,
    .prose h2,
    .home-section > h2,
    .card h2,
    .card h3,
    .faq h2,
    .related h2,
    .related-card strong {
        color: #fff;
    }

    .lead,
    .card p,
    .related-card span {
        color: #c3cad1;
    }

    .fact,
    .card,
    .faq details,
    .related-card {
        background: #1b2026;
        border-color: #2b323a;
        color: #e4e8ec;
    }

    .fact-label,
    .map-caption,
    .breadcrumb li + li::before {
        color: #aab3bc;
    }

    .fact-value {
        color: #fff;
    }
}
:root { --primary: #b3262d; --primary-dark: #7e1b20; --accent: #f2b56b; --accent-text: #006233; }
