/* ============================================================
   STÅLBÆKGÅRD — SHARED STYLESHEET
   One design system, every page: canopy/soil/carbon/growth/
   mineral tokens, Fraunces/IBM Plex Mono/Inter type, the
   tree-layer metaphor (Kronelag → Stammen → Rødderne → Jorden).
   ============================================================ */

:root {
    --canopy:  #223d2c;
    --canopy-dark: #1a3123;
    --carbon:  #17181a;
    --soil:    #3c2a1e;
    --growth:  #8ac755;
    --growth-ink: #3e6626;  /* readable dark-green for text on light backgrounds */
    --mineral: #d9a23f;
    --mineral-ink: #7a4d15; /* readable dark-amber for text on light backgrounds */
    --terracotta: #a8583d;
    --paper:   #f2f0e6;
    --white:   #ffffff;
    --ink:     #201f1a;
    --ink-soft:#5c584c;
    --line:    #ded9c8;
    --max: 1180px;
}

/* ------------------------------------------------------------
   GÅRDBUTIK THEME — the original palette from the Hindsholm
   Gårdbutik GitHub Pages site (field green + clay red), scoped
   to just that section so it reads as a distinct place in the
   site while still sharing every component/layout underneath.
   ------------------------------------------------------------ */
.page.theme-hindsholm {
    --canopy:  #2f3a26;   /* Hindsholm field green (was Stålbækgård canopy) */
    --canopy-dark: #171d13; /* matching dark shade for the gradient */
    --mineral-ink: #9c4530;   /* Hindsholm clay red — light-background text only */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; position: relative; }

h1, h2, h3 { font-family: "Fraunces", serif; font-weight: 600; margin: 0; color: var(--ink); }

.eyebrow {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mineral-ink);
    display: block;
    margin-bottom: 14px;
}
.eyebrow .layer-num { color: var(--growth-ink); }

:focus-visible { outline: 2px solid var(--growth); outline-offset: 3px; }

/* -------- Signature depth rule: canopy -> soil -> carbon -------- */
.page { position: relative; }
.depth-rule {
    position: absolute; top: 0; bottom: 0; left: 0; width: 5px;
    background: linear-gradient(to bottom, var(--growth) 0%, var(--canopy) 30%, var(--soil) 75%, var(--carbon) 100%);
    z-index: 5;
}
@media (max-width: 700px) { .depth-rule { display: none; } }

/* ------------------------------ Nav ------------------------------ */
header.site-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(242,240,230,0.94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 20px; }

.wordmark { text-decoration: none; display: flex; align-items: center; gap: 12px; }
.wordmark img { height: 40px; width: auto; }
.wordmark .name { font-family: "Fraunces", serif; font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.wordmark .sub { display: block; font-family: "IBM Plex Mono", monospace; font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-top: 2px; }

nav.primary-links { display: flex; align-items: center; gap: 4px; }
nav.primary-links a {
    font-size: 0.9rem; font-weight: 500; text-decoration: none;
    color: var(--ink); padding: 8px 14px; border-radius: 6px;
}
nav.primary-links a:hover { background: rgba(34,61,44,0.08); }
nav.primary-links a.current { color: var(--canopy); font-weight: 700; }
nav.primary-links a.nav-cta { background: var(--canopy); color: #fff; }
nav.primary-links a.nav-cta:hover { background: var(--canopy-dark); }

.menu-toggle { display: none; }
@media (max-width: 880px) {
    nav.primary-links { display: none; }
    .menu-toggle { display: inline-flex; background: none; border: 1px solid var(--line); padding: 8px 12px; font-size: 0.85rem; cursor: pointer; border-radius: 6px; }
}

/* language switch */
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-switch {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    font-weight: 600;
    flex-shrink: 0;
}
.lang-switch button { background: var(--white); border: none; padding: 7px 12px; cursor: pointer; color: var(--ink-soft); }
.lang-switch button + button { border-left: 1px solid var(--line); }
.lang-switch button.active { background: var(--canopy); color: #fff; }
.lang-switch button:hover:not(.active) { background: var(--paper); }

/* ============================================================
   Page header band (interior pages)
   ============================================================ */
.page-header {
    background: linear-gradient(160deg, var(--canopy) 0%, var(--canopy-dark) 100%);
    color: #f3f3ec;
    padding: 64px 0 56px;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 70% at 88% 10%, rgba(138,199,85,0.28), transparent 60%);
    pointer-events: none;
}
.page-header .wrap { position: relative; z-index: 1; max-width: 780px; }
.page-header .eyebrow { color: var(--mineral); }
.page-header .eyebrow .layer-num { color: var(--growth); }
.page-header h1 { font-size: clamp(2rem, 4.5vw, 3rem); color: #fff; margin-bottom: 12px; }
.page-header .lead { font-size: 1.08rem; color: rgba(243,243,236,0.85); max-width: 62ch; }
.crumb { font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; color: rgba(243,243,236,0.6); margin-bottom: 18px; }
.crumb a { color: var(--mineral); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* Era-band variants for Past/Future headers */
.page-header.era-past { background: linear-gradient(160deg, var(--soil) 0%, #241a12 100%); }
.page-header.era-past::before { background: radial-gradient(ellipse 60% 70% at 88% 10%, rgba(168,88,61,0.28), transparent 60%); }
.page-header.era-future { background: linear-gradient(160deg, var(--canopy-dark) 0%, var(--carbon) 100%); }
.era-tag {
    display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
    margin-bottom: 16px; border: 1px solid rgba(243,243,236,0.35);
}
.era-tag.present { color: var(--growth); }
.era-tag.past { color: #d69a80; }
.era-tag.future { color: var(--mineral); }

/* ============================================================
   Section shells
   ============================================================ */
section { padding: 72px 0; }
.section-head { max-width: 660px; margin-bottom: 42px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { color: var(--ink-soft); margin-top: 14px; font-size: 1.03rem; }
.on-white { background: var(--white); }
.on-canopy { background: var(--canopy); color: #f3f3ec; }
.on-canopy .eyebrow { color: var(--mineral); }
.on-canopy .eyebrow .layer-num { color: var(--growth); }
.on-canopy h2 { color: #fff; }
.on-canopy p { color: rgba(243,243,236,0.78); }
.on-soil { background: var(--soil); color: #f1e9df; }
.on-soil .eyebrow { color: var(--mineral); }
.on-soil .eyebrow .layer-num { color: var(--growth); }
.on-soil h2 { color: #fff; }
.on-soil p { color: rgba(241,233,223,0.75); }

/* ============================================================
   Content prose block (used on most interior pages)
   ============================================================ */
.prose { max-width: 760px; }
.prose p { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 18px; line-height: 1.75; }
.prose p:last-child { margin-bottom: 0; }
.on-soil .prose p { color: rgba(241,233,223,0.75); }
.on-canopy .prose p { color: rgba(243,243,236,0.78); }
.content-figure { border-radius: 14px; overflow: hidden; margin-bottom: 28px; }
.content-figure img { width: 100%; height: auto; display: block; }
.content-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 780px) { .content-two-col { grid-template-columns: 1fr; } }

/* ============================================================
   Cards: topic / era / link cards used across hub pages
   ============================================================ */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.topic-card {
    background: var(--white); border: 1px solid var(--line); border-radius: 14px;
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 10px 26px -20px rgba(20,20,15,0.35);
    text-decoration: none; color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -18px rgba(20,20,15,0.45); }
.topic-card .shot { aspect-ratio: 4/3; overflow: hidden; background: var(--paper); }
.topic-card .shot img { width: 100%; height: 100%; object-fit: cover; }
.topic-card .info { padding: 22px 22px 26px; flex-grow: 1; display: flex; flex-direction: column; }
.topic-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.topic-card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; flex-grow: 1; }
.topic-card .go { margin-top: 14px; font-family: "IBM Plex Mono", monospace; font-size: 0.76rem; font-weight: 600; color: var(--canopy); }
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .card-grid, .card-grid.cols-2 { grid-template-columns: 1fr; } }

/* Era hub band — used on the three time-period hub pages */
.era-hero { padding: 84px 0 64px; color: #f3f3ec; position: relative; overflow: hidden; }
.era-hero.present { background: linear-gradient(160deg, var(--canopy) 0%, var(--canopy-dark) 100%); }
.era-hero.past { background: linear-gradient(160deg, var(--soil) 0%, #241a12 100%); }
.era-hero.future { background: linear-gradient(160deg, var(--canopy-dark) 0%, var(--carbon) 100%); }
.era-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: #fff; margin-bottom: 14px; }
.era-hero .lead { font-size: 1.1rem; color: rgba(243,243,236,0.85); max-width: 66ch; }

/* ============================================================
   Timeline (reused from the landing page's Trunk section)
   ============================================================ */
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: grid; grid-template-columns: 120px 1fr; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: none; }
.timeline-item .when { font-family: "IBM Plex Mono", monospace; font-size: 0.85rem; font-weight: 600; color: var(--canopy); padding-top: 3px; }
.timeline-item h3 { font-size: 1.15rem; margin-bottom: 8px; }
.timeline-item p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }
.placeholder-note { display: inline-block; margin-top: 8px; font-size: 0.78rem; font-style: italic; color: #8a6512; background: #fdf3de; border: 1px dashed #e6c584; border-radius: 6px; padding: 4px 10px; }
@media (max-width: 620px) { .timeline-item { grid-template-columns: 1fr; gap: 6px; } }

/* ============================================================
   Buttons
   ============================================================ */
.btn { font-weight: 600; font-size: 0.92rem; text-decoration: none; padding: 13px 24px; border-radius: 8px; display: inline-block; }
.btn-gold { background: var(--mineral); color: #23180a; }
.btn-gold:hover { background: #c8933a; }
.btn-outline { border: 1px solid rgba(243,243,236,0.4); color: #fff; }
.btn-outline:hover { border-color: #fff; }
.btn-outline-dark { border: 1px solid var(--ink); color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ============================================================
   Carousel (hero image rotator)
   ============================================================ */
.hero-figure { position: relative; z-index: 1; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 44px -20px rgba(0,0,0,0.5); }
.carousel { position: relative; aspect-ratio: 4/3.1; }
.carousel-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.9s ease; }
.carousel-slide.active { opacity: 1; }
.carousel-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; gap: 8px; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,0.45); cursor: pointer; padding: 0; transition: background 0.2s ease, transform 0.2s ease; }
.carousel-dot.active { background: #fff; transform: scale(1.25); }

/* ============================================================
   Ledger stat strip
   ============================================================ */
.ledger { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(243,243,236,0.14); border: 1px solid rgba(243,243,236,0.14); border-radius: 10px; overflow: hidden; }
.ledger-item { background: rgba(255,255,255,0.03); padding: 18px 20px; }
.ledger-item .k { font-family: "IBM Plex Mono", monospace; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(243,243,236,0.6); display: block; margin-bottom: 6px; }
.ledger-item .v { font-family: "IBM Plex Mono", monospace; font-size: 1.02rem; font-weight: 600; color: #fff; display: block; }
@media (max-width: 780px) { .ledger { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   Footer
   ============================================================ */
footer.site-footer { background: var(--carbon); color: rgba(243,243,236,0.75); padding: 44px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 34px; margin-bottom: 28px; }
footer .eyebrow { color: var(--mineral); }
footer p, footer a { font-size: 0.92rem; }
footer a { text-decoration: none; color: rgba(243,243,236,0.75); }
footer a:hover { color: #fff; }
footer .entity { margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
footer .entity-mark { width: 30px; height: auto; flex-shrink: 0; background: #fff; border-radius: 6px; padding: 3px; }
footer .entity strong { display: block; color: #fff; font-size: 0.95rem; margin-bottom: 2px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(243,243,236,0.12); padding-top: 16px; font-size: 0.78rem; color: rgba(243,243,236,0.4); text-align: center; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
