/* ============================================================
   CannaGuide — Stylesheet
   Design-Richtung: seriöser Länder-/Rechtsführer.
   Referenz ist ein Reisemedizin-Kompendium, nicht ein Growshop.
   Palette: tiefes Nachtgrün + warmes Papier + gedämpftes Messing.
   ============================================================ */

:root {
    /* Farben */
    --ink:        #16211c;   /* fast-schwarzes Grün, Haupttext */
    --paper:      #f6f4ec;   /* warmes Papier, Hintergrund */
    --paper-deep: #ece8db;   /* Kartenhintergrund */
    --forest:     #1f3a2e;   /* dunkles Nachtgrün, Header */
    --forest-2:   #2c5541;   /* mittleres Grün */
    --brass:      #a9822f;   /* Messing-Akzent, sparsam */
    --brass-soft: #c9a352;
    --line:       #d4cebc;   /* Trennlinien */
    --muted:      #6b7267;   /* Sekundärtext */

    /* Ampel */
    --ok:   #2f7d4f;
    --mid:  #b98a1e;
    --warn: #c47a1c;
    --bad:  #9e3b2e;

    /* Typo */
    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans:  'Inter', system-ui, -apple-system, sans-serif;

    --maxw: 1080px;
    --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--forest-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
    background: var(--forest);
    color: var(--paper);
    border-bottom: 3px solid var(--brass);
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 20px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.brand .logo {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -0.01em;
    color: var(--paper);
}
.brand .logo b { color: var(--brass-soft); font-weight: 600; }
.brand .tag {
    font-size: 13px;
    color: rgba(246,244,236,0.7);
    display: none;
}
@media (min-width: 720px) { .brand .tag { display: inline; } }

.site-nav { display: flex; gap: 22px; font-size: 14px; }
.site-nav a { color: rgba(246,244,236,0.85); }
.site-nav a:hover { color: var(--brass-soft); text-decoration: none; }

/* ---------- Suchleiste ---------- */
.searchbar {
    background: var(--forest-2);
    padding: 22px 0;
}
.searchform {
    display: flex;
    gap: 10px;
    max-width: 640px;
}
.searchform input[type="text"] {
    flex: 1;
    padding: 13px 16px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
}
.searchform input[type="text"]:focus {
    outline: 2px solid var(--brass-soft);
    outline-offset: 1px;
}
.btn {
    padding: 13px 22px;
    border: none;
    border-radius: var(--radius);
    background: var(--brass);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    font-family: var(--sans);
}
.btn:hover { background: var(--brass-soft); }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
}
.btn-ghost:hover { background: var(--paper-deep); }

/* ---------- Hero ---------- */
.hero {
    padding: 56px 0 40px;
}
.hero h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.1;
    margin: 0 0 14px;
    max-width: 16ch;
    letter-spacing: -0.02em;
}
.hero p.lede {
    font-size: 19px;
    color: var(--muted);
    max-width: 52ch;
    margin: 0;
}

/* ---------- Länder-Raster ---------- */
.section-title {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    margin: 48px 0 4px;
}
.section-sub { color: var(--muted); font-size: 15px; margin: 0 0 20px; }

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.country-card {
    background: var(--paper-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    display: block;
    color: var(--ink);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.country-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31,58,46,0.12);
}
.country-card .flag { font-size: 30px; line-height: 1; }
.country-card .cname {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 600;
    margin: 10px 0 8px;
}

/* Legal-Ampel */
.badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.01em;
}
.badge.ok   { background: rgba(47,125,79,0.14);  color: var(--ok); }
.badge.mid  { background: rgba(185,138,30,0.16); color: var(--mid); }
.badge.warn { background: rgba(196,122,28,0.16); color: var(--warn); }
.badge.bad  { background: rgba(158,59,46,0.14);  color: var(--bad); }

/* ---------- Kategorie-Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.chip {
    font-size: 14px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}
.chip:hover { border-color: var(--brass); color: var(--brass); text-decoration: none; }

/* ---------- Artikel / Topic ---------- */
.topic {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin: 32px 0 64px;
}
@media (min-width: 900px) {
    .topic { grid-template-columns: 1fr 300px; }
}

.topic-head { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 24px; }
.topic-head .crumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.topic-head h1 {
    font-family: var(--serif);
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 600;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.topic-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
}

.article h3 {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    margin: 32px 0 10px;
}
.article h4 { font-size: 17px; margin: 22px 0 8px; }
.article p { margin: 0 0 16px; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 22px; }
.article li { margin-bottom: 7px; }

/* Rechtshinweis-Box */
.notice {
    background: rgba(169,130,47,0.08);
    border-left: 3px solid var(--brass);
    padding: 14px 18px;
    font-size: 14px;
    color: #6a5a2f;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 24px 0;
}
.notice strong { color: #5a4a22; }

/* Quellen */
.sources { margin-top: 32px; font-size: 14px; }
.sources h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.sources ul { list-style: none; padding: 0; }
.sources li { margin-bottom: 6px; }

/* ---------- Sidebar / Produkte ---------- */
.sidebar { align-self: start; position: sticky; top: 20px; }
.product-block {
    background: var(--paper-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}
.product-block h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin: 0 0 14px;
}
.product {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.product:first-of-type { border-top: none; padding-top: 0; }
.product img {
    width: 56px; height: 56px;
    object-fit: cover;
    border-radius: var(--radius);
    background: #fff;
    flex-shrink: 0;
}
.product .pname { font-weight: 600; font-size: 14px; line-height: 1.3; }
.product .pprice { font-size: 14px; color: var(--forest-2); font-weight: 600; margin-top: 4px; }
.product .ptype { font-size: 11px; color: var(--muted); }
.aff-note { font-size: 11px; color: var(--muted); margin-top: 14px; line-height: 1.4; }

/* ---------- Suchergebnis-Liste ---------- */
.result-list { margin: 24px 0 48px; }
.result {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}
.result h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 6px; }
.result p { margin: 0; color: var(--muted); font-size: 15px; }
.result .inline-product {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 6px 12px;
    background: var(--paper-deep);
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 13px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 0;
    color: var(--muted);
}
.spinner {
    width: 34px; height: 34px;
    border: 3px solid var(--line);
    border-top-color: var(--brass);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .spinner { animation: none; }
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--forest);
    color: rgba(246,244,236,0.75);
    margin-top: 60px;
    padding: 40px 0;
    font-size: 14px;
}
.site-footer a { color: var(--brass-soft); }
.site-footer .cols { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-disclaimer {
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 28px;
    padding-top: 20px;
    font-size: 12px;
    color: rgba(246,244,236,0.55);
    line-height: 1.5;
}

/* Utility */
.hidden { display: none !important; }
