/* ==========================================================================
   cordyceps.at - Design System
   Editorial nature-science. Pergament, Bernstein, Moos. Fraunces + System-Sans.
   ========================================================================== */

@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/fraunces-400.woff2") format("woff2");
}
@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/assets/fonts/fraunces-600.woff2") format("woff2");
}

:root {
    --paper: #FAF6EE;
    --sand: #EFE7D6;
    --sand-deep: #E7DCC6;
    --line: #D8CDB8;
    --ink: #1F1A13;
    --muted: #6B6252;
    --amber: #A85F1B;
    --amber-strong: #8A4E14;
    --moss: #3B4A31;
    --moss-deep: #2C3826;
    --white: #FFFFFF;

    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --wrap: 1160px;
    --measure: 68ch;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 18px 40px -24px rgba(31, 26, 19, 0.45);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.125rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber-strong); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--ink); margin: 0 0 0.6em; letter-spacing: -0.01em; overflow-wrap: break-word; }
@media (max-width: 400px) { h2, h3, h4 { hyphens: auto; -webkit-hyphens: auto; } }
h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
p { margin: 0 0 1.1em; }
strong { font-weight: 600; }

.skip-link {
    position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
    padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section--sand { background: var(--sand); }
.prose { max-width: var(--measure); }
.prose p, .prose li { color: #322C22; }
.lead { font-size: 1.28rem; color: var(--muted); }

.eyebrow {
    display: inline-block; font-family: var(--sans); font-weight: 700;
    font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--amber); margin-bottom: 0.9rem;
}
.eyebrow span { color: var(--muted); font-weight: 600; }

.split {
    display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
}
.split--text-first .split__media { order: 2; }
/* Rasterspalten dürfen schmaler als ihr breitester Inhalt werden (sonst schiebt eine Tabelle
   oder ein langes Wort die ganze Spalte samt Bild über den Bildschirmrand). */
.split > *, .hero__grid > * { min-width: 0; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split--text-first .split__media { order: 0; } }

/* ---------- Media frames ---------- */
.media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--sand-deep); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--tall { aspect-ratio: 4 / 5; }
.media--wide { aspect-ratio: 16 / 10; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--sans); font-weight: 600; font-size: 1rem;
    padding: 0.85rem 1.6rem; border-radius: 999px; text-decoration: none;
    border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--white); }
.btn-primary:hover { background: var(--amber-strong); color: var(--white); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--sand); color: var(--ink); }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 246, 238, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo a { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo a span { color: var(--amber); }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 1.6rem; margin: 0; padding: 0; }
.main-nav a { font-family: var(--sans); font-weight: 600; font-size: 0.98rem; color: var(--ink); text-decoration: none; padding: 0.4rem 0; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--amber-strong); }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--amber); }

.has-dropdown { position: relative; }
.dropdown-arrow { font-size: 0.7rem; }
.main-nav .dropdown-menu {
    position: absolute; top: 100%; left: 0; min-width: 210px; background: var(--white);
    border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
    padding: 0.4rem; display: none; flex-direction: column; gap: 0.1rem;
}
.has-dropdown:hover .dropdown-menu { display: flex; }
.dropdown-menu li a { display: block; padding: 0.55rem 0.75rem; border-radius: 6px; }
.dropdown-menu li a:hover { background: var(--sand); }

.mobile-menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.mobile-menu-toggle span { width: 26px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.25s; }

@media (max-width: 900px) {
    .mobile-menu-toggle { display: flex; }
    /* Der Header hat backdrop-filter und ist damit Bezugsrahmen auch für position:fixed.
       Deshalb absolut direkt unter dem Header, und geschlossen wirklich unsichtbar
       (visibility), statt nur nach oben verschoben (dann lugte es über dem Seitenanfang hervor). */
    .main-nav { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - 72px); overflow-y: auto; background: var(--paper); border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s; }
    .main-nav.active { opacity: 1; visibility: visible; transform: translateY(0); box-shadow: var(--shadow); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1.5rem 1.5rem; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav > ul > li > a { display: block; padding: 0.9rem 0; }
    .dropdown-menu { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 0.5rem 1rem; }
    .dropdown-menu.active { display: flex; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--sand); border-bottom: 1px solid var(--line); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0.7rem 0; font-size: 0.85rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber-strong); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 0.5rem; }
.hero .lead { margin-bottom: 1.8rem; }
@media (max-width: 820px) { .hero__grid { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card__media { aspect-ratio: 16 / 10; background: var(--sand-deep); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card__body h3 { margin: 0; }
.card__meta { font-size: 0.85rem; color: var(--muted); }
.card__body .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Product CTA ---------- */
.product-cta { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: 0.8fr 1.2fr; }
.product-cta__media { background: var(--sand-deep); display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.product-cta__media img { max-height: 240px; width: auto; }
.product-cta__body { padding: 1.6rem 1.8rem; display: flex; flex-direction: column; gap: 0.6rem; }
.product-cta__price { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); }
.product-cta__note { font-size: 0.85rem; color: var(--muted); }
.product-cta .btn { align-self: flex-start; margin-top: 0.4rem; }
@media (max-width: 640px) { .product-cta { grid-template-columns: 1fr; } }

/* ---------- Spec table ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0; border-radius: var(--radius); }
.table-scroll > .spec-table { margin: 0; }
.spec-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 640px) {
    /* Steckbrief (2 Spalten): Bezeichnung über dem Wert, statt Silbentrennung in schmalen Spalten. */
    .spec-table:not(.spec-table--compare) th, .spec-table:not(.spec-table--compare) td { display: block; width: auto; padding: 0.7rem 0.9rem; }
    .spec-table:not(.spec-table--compare) th { border-bottom: 0; padding-bottom: 0.25rem; }
    .spec-table:not(.spec-table--compare) td { padding-top: 0.25rem; background: var(--white); }
    /* Vergleich (3 Spalten): feste Mindestbreite, horizontal wischen (.table-scroll). */
    .spec-table--compare { min-width: 560px; }
    .spec-table--compare th, .spec-table--compare td { padding: 0.7rem 0.8rem; }
}
.spec-table th { width: 38%; font-family: var(--sans); font-weight: 600; color: var(--moss); background: var(--sand); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); padding: 0.4rem 0; }
.faq summary { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; cursor: pointer; padding: 0.8rem 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--amber); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { color: var(--amber-strong); }
.faq details > div { padding: 0 0 1rem; color: #322C22; }

/* ---------- Disclaimer box ---------- */
.notice { background: var(--sand); border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; font-size: 0.92rem; color: var(--muted); }
.notice strong { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--moss-deep); color: #D9E0CF; margin-top: 2rem; }
.site-footer a { color: #E8ECE0; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.footer-grid h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 0.9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-brand { font-family: var(--serif); font-size: 1.3rem; color: var(--white); }
.footer-brand span { color: var(--amber); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 1.2rem 0; font-size: 0.85rem; color: #AEB7A2; }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,0.12); padding: 1.5rem 0 2.5rem; }
.footer-disclaimer p { font-size: 0.8rem; color: #AEB7A2; max-width: 900px; margin: 0; }
.footer-disclaimer strong { color: #D9E0CF; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---------- Forms ---------- */
form label { font-family: var(--sans); font-weight: 600; font-size: 0.95rem; color: var(--moss); }
form input[type="text"], form input[type="email"], form textarea {
    width: 100%; margin-top: 0.35rem; padding: 0.75rem 0.9rem; font: inherit; color: var(--ink);
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
form input:focus, form textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }
form textarea { resize: vertical; }
.form-error { display: block; margin-top: 0.3rem; color: #9A3412; font-size: 0.85rem; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.section-head { max-width: 760px; margin-bottom: 2.5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Rechtliche Hinweise (2026-10-14) ---------- */
.media, .card__media { position: relative; }
.footer-legal p + p { margin-top: 0.45rem; }
.spec-table caption { text-align: left; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; margin-bottom: 0.5rem; }
.prose .table-scroll { margin: 1.2rem 0; }
.sources { font-size: 0.88rem; color: var(--muted); }
.sources li { margin-bottom: 0.4rem; overflow-wrap: anywhere; }
