/* =========================================================
   destinationlore.com / roadtripdenmark.com — main.css
   STAGE G — UI-SPEC implementation
   Based on .ui-spec/01-color.md, 02-typography.md, 03-spacing-and-layout.md
   ========================================================= */

/* =====================================================
   CUSTOM PROPERTIES — design tokens
   ===================================================== */

:root {
    /* Spacing scale (8px base, per 03-spacing) */
    --space-1: 0.25rem;  /*  4px */
    --space-2: 0.5rem;   /*  8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.25rem;  /* 20px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-10: 2.5rem;  /* 40px */
    --space-12: 3rem;    /* 48px */
    --space-16: 4rem;    /* 64px */
    --space-20: 5rem;    /* 80px */
    --space-24: 6rem;    /* 96px */

    /* Type scale (mobile-first; desktop overrides below) */
    --text-xs:   0.76rem;  /* 13px */
    --text-sm:   0.88rem;  /* 15px */
    --text-base: 1.00rem;  /* 17px */
    --text-lg:   1.13rem;  /* 19px */
    --text-xl:   1.31rem;  /* 22px */
    --text-2xl:  1.56rem;  /* 26px */
    --text-3xl:  1.88rem;  /* 32px */
    --text-4xl:  2.25rem;  /* 38px */
    --text-5xl:  2.63rem;  /* 44px */

    /* Line heights */
    --leading-tight:    1.15;
    --leading-snug:     1.35;
    --leading-normal:   1.55;
    --leading-relaxed:  1.65;
    --leading-loose:    1.85;

    /* Letter spacing */
    --tracking-tight:  -0.02em;
    --tracking-normal:  0;
    --tracking-wide:    0.04em;
    --tracking-wider:   0.08em;

    /* Font stacks (overridden per site below) */
    --font-headline: 'Fraunces', 'Georgia', 'Times New Roman', serif;
    --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-mono:     ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    /* Layout */
    --content-max:   65ch;       /* article body line-length */
    --container-max: 1200px;     /* site-wide container */
    --radius-sm: 4px;
    --radius:    6px;
    --radius-lg: 12px;
}

/* Desktop type scale */
@media (min-width: 768px) {
    :root {
        --text-base: 1.06rem;  /* 18px */
        --text-3xl:  2.25rem;  /* 38px */
        --text-4xl:  2.81rem;  /* 48px */
        --text-5xl:  3.50rem;  /* 60px */
    }
}

/* =====================================================
   SITE-SPECIFIC PALETTES (data-site attribute)
   ===================================================== */

/* destinationlore.com — Mediterranean Lore */
body[data-site="destinationlore"] {
    --color-base:         #FAF6EE;  /* cream */
    --color-surface:      #FFFCF7;
    --color-primary:      #1F4D55;  /* petroleum teal */
    --color-primary-dark: #143438;
    --color-accent:       #C24E2C;  /* burnt terracotta */
    --color-accent-soft:  #E89878;
    --color-secondary:    #7A8B6C;  /* olive sage */
    --color-text:         #2A2520;
    --color-text-muted:   #5C5654;
    --color-text-inverse: #FAF6EE;
    --color-border:       #E8DFCE;
    --color-focus-ring:   #1F4D55;
    --color-highlight-bg: #FFF5DC;
    --font-headline: 'Fraunces', 'Georgia', 'Times New Roman', serif;
    --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* roadtripdenmark.com — Northern Roads */
body[data-site="roadtripdenmark"] {
    --color-base:         #F8F8F6;  /* off-white */
    --color-surface:      #FFFFFF;
    --color-primary:      #0E1C2E;  /* midnight navy */
    --color-primary-soft: #1B2D4A;
    --color-accent:       #FF6B1A;  /* signal orange */
    --color-accent-soft:  #FF9159;
    --color-text:         #1F2937;
    --color-text-muted:   #475569;
    --color-text-inverse: #FFFFFF;
    --color-border:       #E5E7EB;
    --color-focus-ring:   #FF6B1A;
    --color-highlight-bg: #FEF3C7;  /* pale yellow callouts */
    --font-headline: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* =====================================================
   RESET + GLOBALS
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text);
    background: var(--color-base);
    font-feature-settings: "kern", "liga", "calt";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
    body { line-height: var(--leading-normal); }
}

/* =====================================================
   TYPOGRAPHY — headings + body text
   ===================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headline);
    color: var(--color-primary);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin: var(--space-8) 0 var(--space-4);
    font-weight: 700;
}

h1 { font-size: var(--text-4xl); margin-top: 0; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); font-weight: 600; }
h4 { font-size: var(--text-xl); font-weight: 600; }

p { margin: 0 0 1.25em; max-width: var(--content-max); }
.lead { font-size: var(--text-lg); line-height: var(--leading-snug); color: var(--color-text-muted); max-width: var(--content-max); }

a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
a:hover { color: var(--color-accent); }

body[data-site="roadtripdenmark"] a:hover { color: var(--color-accent); }

ul, ol { padding-left: var(--space-6); max-width: var(--content-max); }
li { margin-bottom: var(--space-2); }

strong, b { font-weight: 600; }
em, i { font-style: italic; }

blockquote {
    margin: var(--space-6) 0;
    padding: var(--space-4) var(--space-6);
    border-left: 3px solid var(--color-accent);
    background: var(--color-surface);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

blockquote p:last-child { margin-bottom: 0; }

code {
    background: var(--color-border);
    color: var(--color-primary);
    padding: 0.1em 0.4em;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9em;
}

pre code {
    display: block;
    padding: var(--space-4);
    overflow-x: auto;
}

hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-12) 0;
}

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

/* Focus ring (a11y) */
:focus-visible {
    outline: 2px solid var(--color-focus-ring);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* =====================================================
   HEADER + NAVIGATION
   ===================================================== */

.site-header {
    background: var(--color-base);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body[data-site="roadtripdenmark"] .site-header {
    background: var(--color-primary);
    border-bottom-color: var(--color-primary-soft);
}

body[data-site="roadtripdenmark"] .site-header,
body[data-site="roadtripdenmark"] .site-header a,
body[data-site="roadtripdenmark"] .site-header .nav-primary a {
    color: var(--color-text-inverse);
}

.site-nav {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    line-height: 1;
}

.site-logo img {
    display: block;
    height: 44px;
    width: 44px;
}

.nav-primary {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--space-6);
    flex: 1;
    flex-wrap: wrap;
}

.nav-primary a {
    color: inherit;
    text-decoration: none;
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: var(--text-base);
    padding: var(--space-2) 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s ease;
}

.nav-primary a:hover {
    border-bottom-color: var(--color-accent);
    color: inherit;
}

/* =====================================================
   LANGUAGE SWITCHER
   ===================================================== */

.lang-switcher {
    position: relative;
}

.lang-current {
    background: none;
    border: 1px solid currentColor;
    color: inherit;
    padding: var(--space-2) var(--space-4);
    cursor: pointer;
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    font-weight: 500;
}

.lang-current:hover {
    background: var(--color-surface);
    color: var(--color-primary);
}

.lang-dropdown {
    list-style: none;
    margin: var(--space-2) 0 0;
    padding: var(--space-2) 0;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    display: none;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher:focus-within .lang-dropdown {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: var(--space-2) var(--space-4);
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--text-sm);
}

.lang-dropdown a:hover {
    background: var(--color-base);
}

.lang-dropdown a[aria-current="page"] {
    font-weight: 600;
    color: var(--color-primary);
}

.cross-site-link {
    color: inherit;
    text-decoration: none;
    font-size: var(--text-sm);
    opacity: 0.85;
    font-family: var(--font-body);
}

.cross-site-link:hover { opacity: 1; text-decoration: underline; }

/* =====================================================
   BREADCRUMBS
   ===================================================== */

.breadcrumbs {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-4) var(--space-6) 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.breadcrumbs li { margin-bottom: 0; }

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin-left: var(--space-2);
    opacity: 0.5;
}

.breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.breadcrumbs a:hover { color: var(--color-primary); text-decoration: underline; }

.breadcrumbs li[aria-current="page"] span {
    font-weight: 600;
    color: var(--color-text);
}

/* =====================================================
   AFFILIATE DISCLOSURE (inline)
   ===================================================== */

.affiliate-disclosure {
    background: var(--color-highlight-bg);
    border-left: 3px solid var(--color-accent);
    padding: var(--space-3) var(--space-4);
    margin: var(--space-6) 0;
    font-size: var(--text-sm);
    border-radius: 0 var(--radius) var(--radius) 0;
    max-width: var(--content-max);
}

.affiliate-disclosure p {
    margin: 0;
    color: var(--color-text);
}

/* =====================================================
   ARTICLE / CONTENT LAYOUT
   ===================================================== */

main { min-height: 60vh; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

.article {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6) var(--space-16);
}

.article h1 {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-3);
}

.article > .meta {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-8);
    font-family: var(--font-body);
}

.article > .meta a {
    color: var(--color-text-muted);
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}

.article h2 {
    margin-top: var(--space-12);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-2);
}

.article h3 { margin-top: var(--space-10); }

/* Wrapped in :where() so component classes (.mantra-callout__text,
   .day-card__route, .pullquote etc) override without specificity wars. */
:where(.article p, .article ul, .article ol) {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
}

@media (min-width: 768px) {
    :where(.article p, .article ul, .article ol) {
        line-height: var(--leading-normal);
    }
}

/* =====================================================
   TABLES (used in test + comparison articles)
   ===================================================== */

table {
    border-collapse: collapse;
    margin: var(--space-6) 0;
    width: 100%;
    max-width: var(--content-max);
    font-size: var(--text-sm);
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
}

th, td {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

th {
    font-weight: 600;
    background: var(--color-base);
    color: var(--color-primary);
    font-family: var(--font-headline);
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

tbody tr:last-child td { border-bottom: none; }

/* =====================================================
   FOOTER
   ===================================================== */

.site-footer {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    margin-top: var(--space-20);
    padding: var(--space-12) 0 var(--space-6);
}

.site-footer a { color: var(--color-text-inverse); text-decoration: none; opacity: 0.85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; color: var(--color-text-inverse); }

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10);
}

.footer-col h3 {
    margin: 0 0 var(--space-4);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--color-text-inverse);
    opacity: 0.7;
    font-family: var(--font-body);
    font-weight: 600;
}

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

.footer-col li { margin-bottom: var(--space-2); }

.footer-strip {
    max-width: var(--container-max);
    margin: var(--space-10) auto 0;
    padding: var(--space-6) var(--space-6) 0;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: var(--text-sm);
    opacity: 0.7;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
    align-items: center;
}

.footer-strip .sep { opacity: 0.4; }

/* =====================================================
   ACCESSIBILITY
   ===================================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-2) var(--space-4);
    z-index: 1000;
    text-decoration: none;
}

.skip-link:focus { top: 0; }

/* =====================================================
   REDUCED MOTION
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =====================================================
   RESPONSIVE — mobile-first overrides
   ===================================================== */

@media (max-width: 720px) {
    .site-nav {
        flex-wrap: wrap;
        gap: var(--space-4);
        padding: 0 var(--space-4);
    }

    .nav-primary {
        gap: var(--space-4);
        font-size: var(--text-sm);
        order: 3;
        flex-basis: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .article { padding-left: var(--space-4); padding-right: var(--space-4); }
}

/* =========================================================
   STAGE H — Full component library
   Per .ui-spec/04-components.md
   Components: container variants, sections, hero, buttons,
   cards, grids, callouts, pullquotes, FAQ, mantra,
   author band, TOC, day-cards, photo-break, CTA, related
   ========================================================= */

/* =====================================================
   CONTAINER VARIANTS
   ===================================================== */
.container-narrow  { max-width: 760px;  margin-inline: auto; padding-inline: var(--space-6); }
.container-default { max-width: 1200px; margin-inline: auto; padding-inline: var(--space-6); }
.container-wide    { max-width: 1440px; margin-inline: auto; padding-inline: var(--space-6); }
.container-full    { max-width: 100%;   margin-inline: auto; padding-inline: 0; }

@media (max-width: 720px) {
    .container-narrow,
    .container-default,
    .container-wide { padding-inline: var(--space-4); }
}

/* =====================================================
   SECTION PATTERNS
   ===================================================== */
.section {
    padding-block: var(--space-12);  /* 48px mobile */
}
@media (min-width: 768px) { .section { padding-block: var(--space-16); } }  /* 64px tablet+ */
@media (min-width: 1024px) { .section { padding-block: var(--space-20); } } /* 80px desktop */

.section-tight { padding-block: var(--space-10); }
.section-loose { padding-block: var(--space-24); }

.section-divider {
    text-align: center;
    margin-block: var(--space-12) var(--space-8);
}
.section-divider::before {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: var(--color-accent);
    margin: 0 auto var(--space-3);
}
.section-divider h2 {
    font-style: italic;
    font-weight: 600;
    margin: 0;
}

/* Dark section (used for food / featured content / mantra) */
.section-dark {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 { color: var(--color-text-inverse); }
.section-dark a { color: var(--color-text-inverse); }
.section-dark a:hover { color: var(--color-accent-soft); }
.section-dark .lead { color: rgba(255, 252, 247, 0.85); }

/* =====================================================
   HERO — article hero with full-bleed image
   ===================================================== */
.hero-article {
    position: relative;
    min-height: 70vh;
    min-block-size: 600px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-bottom: var(--space-12);
}

.hero-article__image {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-article__image img,
.hero-article__image picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}

.hero-article__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(20, 52, 56, 0.15) 0%, rgba(20, 52, 56, 0.20) 40%, rgba(20, 52, 56, 0.78) 100%);
}

.hero-article__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-12) var(--space-6);
    color: var(--color-text-inverse);
}

.hero-tag {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: var(--color-accent);
    color: var(--color-surface);
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    margin-bottom: var(--space-4);
}

.hero-article h1 {
    font-size: clamp(2.25rem, 5vw, 4rem);
    line-height: 1.08;
    color: var(--color-text-inverse);
    margin: 0 0 var(--space-5);
    max-width: 900px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
    font-weight: 700;
}

.italic-headline {
    font-style: italic;
    color: #F4D38C;  /* warm gold — matches benchmark Playfair italic */
    font-weight: 600;
}

.hero-article__lead {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.55;
    max-width: 640px;
    color: rgba(255, 252, 247, 0.92);
    margin: 0 0 var(--space-5);
    font-weight: 400;
}

.hero-article__meta {
    font-size: var(--text-sm);
    color: rgba(255, 252, 247, 0.75);
    font-family: var(--font-body);
    margin: 0;
}
.hero-article__meta a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* roadtripdenmark hero — cool tint */
body[data-site="roadtripdenmark"] .hero-article__overlay {
    background: linear-gradient(180deg, rgba(14, 28, 46, 0.20) 0%, rgba(14, 28, 46, 0.30) 40%, rgba(14, 28, 46, 0.80) 100%);
}
body[data-site="roadtripdenmark"] .italic-headline { color: #FFB070; }

/* =====================================================
   AUTHOR BAND — credibility strip below hero
   ===================================================== */
.author-band {
    background: var(--color-surface);
    border-block: 1px solid var(--color-border);
    padding-block: var(--space-5);
    margin-block: var(--space-12);
}
.author-band__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: var(--space-6);
    display: flex;
    gap: var(--space-5);
    align-items: center;
    flex-wrap: wrap;
}
.author-band__photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--color-border);
}
.author-band__text { flex: 1; min-width: 260px; }
.author-band__name {
    font-family: var(--font-headline);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 var(--space-1);
}
.author-band__credential {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}
.author-band__quote {
    font-style: italic;
    color: var(--color-text);
    font-family: var(--font-headline);
    font-size: var(--text-base);
    margin: var(--space-2) 0 0;
    max-width: 520px;
}

/* =====================================================
   LAST-UPDATED STRIP — below hero
   ===================================================== */
.last-updated {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-8);
    opacity: 0.75;
    font-family: var(--font-body);
}
.last-updated .sep { opacity: 0.5; margin-inline: var(--space-2); }

/* =====================================================
   TABLE OF CONTENTS
   ===================================================== */
.toc {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    margin: var(--space-8) 0 var(--space-12);
    max-width: var(--content-max);
}
.toc__label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-3);
}
.toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: none;
    counter-reset: toc;
}
.toc li {
    counter-increment: toc;
    margin-bottom: var(--space-2);
    padding-left: 2rem;
    position: relative;
    font-size: var(--text-base);
}
.toc li::before {
    content: counter(toc, decimal-leading-zero);
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: var(--text-sm);
}
.toc a {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.toc a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-base);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-surface);
}
.btn-primary:hover {
    background: var(--color-accent-soft);
    color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}
.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-surface);
}

.btn-ghost {
    background: transparent;
    color: var(--color-primary);
    padding: var(--space-2) var(--space-4);
}
.btn-ghost:hover { background: var(--color-border); }

.btn-large { padding: var(--space-4) var(--space-8); font-size: var(--text-lg); }
.btn-small { padding: var(--space-2) var(--space-4); font-size: var(--text-sm); }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-block: var(--space-6);
}

/* =====================================================
   CARDS — article / destination
   ===================================================== */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(60, 30, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(60, 30, 0, 0.12);
}
.card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-border);
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.card:hover .card-image img { transform: scale(1.05); }

.card-body {
    padding: var(--space-5) var(--space-6) var(--space-6);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-3);
}

.card-title {
    font-family: var(--font-headline);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 var(--space-2);
    line-height: var(--leading-snug);
}

.card-excerpt {
    color: var(--color-text-muted);
    font-size: var(--text-base);
    margin: 0 0 var(--space-3);
    line-height: var(--leading-snug);
    flex: 1;
}

.card-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin: 0;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    opacity: 0.8;
}

/* Compact card variant — used in related-articles */
.card-compact .card-image { aspect-ratio: 4 / 3; }
.card-compact .card-body { padding: var(--space-4) var(--space-5) var(--space-5); }
.card-compact .card-title { font-size: var(--text-lg); }

/* =====================================================
   GRID SYSTEMS
   ===================================================== */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-block: var(--space-8);
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: var(--space-6);
    margin-block: var(--space-8);
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Featured grid — 1 large + 2 small */
.grid-featured {
    display: grid;
    gap: var(--space-5);
    grid-template-columns: 1fr;
    margin-block: var(--space-8);
}
@media (min-width: 900px) {
    .grid-featured {
        grid-template-columns: 2fr 1fr;
        grid-template-rows: 1fr 1fr;
    }
    .grid-featured > :first-child { grid-row: 1 / 3; }
}

/* =====================================================
   DAY CARDS — for itinerary / day-by-day route
   ===================================================== */
.day-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius);
    padding: var(--space-5) var(--space-6);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-5);
    align-items: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(60, 30, 0, 0.10);
}
/* When the card itself is a link */
a.day-card,
.day-card--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
a.day-card:hover { border-left-width: 6px; }
.day-card__number {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: var(--text-3xl);
    color: var(--color-accent);
    font-weight: 700;
    line-height: 1;
    min-width: 80px;
}
.day-card__number small {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-style: normal;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    margin-bottom: var(--space-1);
    font-family: var(--font-body);
    font-weight: 600;
}
.day-card__body { min-width: 0; }
.day-card__route {
    font-family: var(--font-headline);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 var(--space-1);
}
.day-card__highlight {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin: 0;
}
.day-card__distance {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-secondary);
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
}

@media (max-width: 600px) {
    .day-card {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }
    .day-card__distance {
        grid-column: 1 / -1;
        text-align: left;
        padding-top: var(--space-2);
        border-top: 1px solid var(--color-border);
        margin-top: var(--space-2);
    }
}

/* =====================================================
   CALLOUTS — info, tip, warning, mantra
   ===================================================== */
.callout {
    padding: var(--space-5) var(--space-6);
    border-radius: var(--radius);
    border-left: 4px solid;
    margin-block: var(--space-8);
    max-width: var(--content-max);
}
.callout__title {
    margin: 0 0 var(--space-2);
    font-family: var(--font-headline);
    font-size: var(--text-lg);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.callout__title .callout__icon {
    font-size: 1.25em;
    line-height: 1;
}
.callout p { margin: 0; max-width: none; }
.callout p + p { margin-top: var(--space-3); }

.callout-info    { background: #EAF3F5; border-left-color: var(--color-primary);  color: var(--color-text); }
.callout-info .callout__title { color: var(--color-primary); }

.callout-tip     { background: #FDF5E9; border-left-color: var(--color-accent);   color: var(--color-text); }
.callout-tip .callout__title { color: var(--color-accent); }

.callout-warning { background: #FEF3C7; border-left-color: #B8860B;               color: var(--color-text); }
.callout-warning .callout__title { color: #8B6914; }

.callout-skip    { background: #FCE7E1; border-left-color: #B91C1C;               color: var(--color-text); }
.callout-skip .callout__title { color: #991B1B; }

/* roadtripdenmark variants */
body[data-site="roadtripdenmark"] .callout-info { background: #E8F0F8; border-left-color: var(--color-primary); }
body[data-site="roadtripdenmark"] .callout-tip  { background: #FFF1E0; border-left-color: var(--color-accent); }

/* =====================================================
   MANTRA CALLOUT — the brand-tagline as a content block
   ===================================================== */
.mantra-callout {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-12) var(--space-8);
    border-radius: var(--radius-lg);
    text-align: center;
    margin-block: var(--space-16);
}
.mantra-callout__text {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: var(--text-3xl);
    line-height: 1.25;
    margin: 0;
    color: var(--color-text-inverse);
    max-width: 640px;
    margin-inline: auto;
}
.mantra-callout__follow {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: rgba(255, 252, 247, 0.85);
    margin: var(--space-5) auto 0;
    max-width: 520px;
    font-style: normal;
}

/* =====================================================
   PULL QUOTES
   ===================================================== */
.pullquote {
    margin: var(--space-12) 0;
    padding-left: var(--space-8);
    border-left: 4px solid var(--color-accent);
    font-family: var(--font-headline);
    font-style: italic;
    font-size: var(--text-2xl);
    line-height: 1.35;
    color: var(--color-primary);
    max-width: var(--content-max);
}
.pullquote p { margin: 0; max-width: none; font-size: inherit; line-height: inherit; }
.pullquote cite {
    display: block;
    margin-top: var(--space-4);
    font-style: normal;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

/* =====================================================
   FAQ ACCORDION
   ===================================================== */
.faq {
    max-width: var(--content-max);
    margin-block: var(--space-10);
}
.faq-item {
    border-bottom: 1px solid var(--color-border);
    padding-block: var(--space-4);
}
.faq-item:first-child { border-top: 1px solid var(--color-border); }
.faq-item summary {
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: var(--text-lg);
    color: var(--color-primary);
    cursor: pointer;
    list-style: none;
    padding-right: var(--space-8);
    position: relative;
    line-height: var(--leading-snug);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "＋";
    position: absolute;
    right: 0;
    top: 0;
    font-size: var(--text-2xl);
    color: var(--color-accent);
    transition: transform 0.2s ease;
    line-height: 1;
}
.faq-item[open] summary::after {
    content: "−";
    transform: rotate(0deg);
}
.faq-item summary:hover { color: var(--color-accent); }
.faq-item p {
    margin: var(--space-3) 0 0;
    color: var(--color-text);
    line-height: var(--leading-relaxed);
}

/* =====================================================
   PHOTO BREAK — full-bleed image with overlay caption
   ===================================================== */
.photo-break {
    position: relative;
    margin-block: var(--space-12);
    border-radius: var(--radius);  /* harmonised with .article figure */
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: flex-end;
}
.photo-break img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.photo-break__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Stronger gradient so light text always reads regardless of photo brightness */
    background: linear-gradient(180deg, rgba(20, 52, 56, 0.0) 35%, rgba(20, 52, 56, 0.55) 70%, rgba(20, 52, 56, 0.92) 100%);
}
.photo-break__caption {
    position: relative;
    z-index: 2;
    padding: var(--space-8) var(--space-8);
    color: #FFFCF7;  /* always cream, regardless of dark mode */
    font-family: var(--font-headline);
    font-style: italic;
    font-size: var(--text-2xl);
    line-height: 1.25;
    margin: 0;
    max-width: 720px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.6);
    font-weight: 600;
}

/* =====================================================
   PHOTO GALLERY (3-up grid)
   ===================================================== */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-3);
    margin-block: var(--space-8);
}
.photo-gallery figure { margin: 0; }
.photo-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    transition: transform 0.3s ease;
}
.photo-gallery a:hover img { transform: scale(1.03); }
.photo-gallery figcaption {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-2);
    line-height: var(--leading-snug);
}

/* =====================================================
   CTA BLOCK — image + text, dark or light
   ===================================================== */
.cta-block {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-block: var(--space-12);
    display: grid;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .cta-block { grid-template-columns: 1fr 1fr; }
}
.cta-block__image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.cta-block__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cta-block__body {
    padding: var(--space-8) var(--space-8);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cta-block h3 {
    color: var(--color-text-inverse);
    font-size: var(--text-2xl);
    margin: 0 0 var(--space-3);
}
.cta-block p {
    color: rgba(255, 252, 247, 0.88);
    margin: 0 0 var(--space-5);
    max-width: none;
}
.cta-block .btn-primary {
    background: var(--color-accent);
    color: var(--color-surface);
    align-self: flex-start;
}

/* =====================================================
   TABLE WRAPPER (responsive overflow)
   ===================================================== */
.table-wrapper {
    overflow-x: auto;
    margin-block: var(--space-8);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    -webkit-overflow-scrolling: touch;
}
.table-wrapper table {
    margin: 0;
    border-radius: 0;
    border: none;
    min-width: 600px;
}

/* =====================================================
   EXTERNAL LINK INDICATOR
   ===================================================== */
.link-external::after {
    content: " ↗";
    display: inline-block;
    font-size: 0.85em;
    margin-left: 0.15em;
    opacity: 0.7;
}

/* =====================================================
   TAG / CHIP
   ===================================================== */
.tag {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--color-border);
    color: var(--color-primary);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    border-radius: 999px;
    margin: 0 var(--space-1) var(--space-2) 0;
}

/* =====================================================
   RELATED ARTICLES SECTION
   ===================================================== */
.related-articles {
    margin-top: var(--space-16);
    padding-top: var(--space-10);
    border-top: 1px solid var(--color-border);
}
.related-articles__label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-3);
}
.related-articles h2 {
    margin: 0 0 var(--space-8);
    border-bottom: none;
    padding-bottom: 0;
}

/* =====================================================
   ARTICLE BODY OVERRIDES — when used WITH new components
   Tightens spacing around new blocks
   ===================================================== */
.article .toc + h2,
.article .hero-article + h2,
.article .author-band + h2 { margin-top: var(--space-12); }

.article figure {
    margin: var(--space-8) 0;
    max-width: var(--content-max);
}
.article figure img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    display: block;
}
:where(.article figcaption) {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-2);
    line-height: var(--leading-snug);
    font-style: italic;
}

/* H2 with section-anchor (for TOC jumping) */
.article h2[id] {
    scroll-margin-top: 80px;  /* offset sticky header */
}

/* =====================================================
   ANCHOR JUMP for TOC
   ===================================================== */
.article h2[id]::before {
    content: "";
    display: block;
    height: 0;
    margin-top: 0;
}

/* =====================================================
   RESPONSIVE — hero + components
   ===================================================== */
@media (max-width: 720px) {
    .hero-article { min-height: 60vh; min-block-size: 480px; }
    .hero-article__content { padding: var(--space-10) var(--space-4); }
    .mantra-callout { padding: var(--space-10) var(--space-5); }
    .mantra-callout__text { font-size: var(--text-2xl); }
    .cta-block__body { padding: var(--space-6); }
    .photo-break { min-height: 280px; }
    .photo-break__caption { padding: var(--space-5); font-size: var(--text-lg); }
    .toc { padding: var(--space-4); }
}
