/* ============================================================
   Spartaktik — Premium Design System
   Fonts: Bricolage Grotesque (Display) + Manrope (Body), self-hosted (DSGVO)
   ============================================================ */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/bricolage.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --pine: #0c1f1a;
  --pine-2: #123129;
  --paper: #faf8f3;
  --card: #ffffff;
  --emerald: #0e6b5c;
  --emerald-soft: #e7f1ee;
  --accent: #f07f23;
  --accent-deep: #d96a10;
  --line: #e4e7e1;
  --ink: #1c2b26;
  --muted: #63736d;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(12,31,26,.06), 0 2px 8px rgba(12,31,26,.05);
  --shadow-lg: 0 4px 12px rgba(12,31,26,.08), 0 16px 40px rgba(12,31,26,.12);
  --max: 1120px;
  --display: 'Bricolage Grotesque', 'Avenir Next', 'Helvetica Neue', sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: clamp(16px, 1.5vw, 17.5px);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: clamp(18px, 4vw, 32px); }

h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -.015em; color: var(--pine); text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); font-weight: 700; margin-top: 2.2em; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--emerald); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.muted { color: var(--muted); font-size: .9rem; }
.lead { font-size: 1.12rem; color: var(--ink); }
.euro { color: var(--accent-deep); font-weight: 800; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.narrow { max-width: 680px; }
.center-block { margin: 8vh auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 1rem; padding: 13px 26px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; transition: transform .25s cubic-bezier(.2,.8,.3,1.2), box-shadow .25s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--emerald); color: #fff; box-shadow: 0 6px 18px rgba(14,107,92,.32); }
.btn-primary:hover { background: #0c5f52; }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; box-shadow: 0 6px 18px rgba(240,127,35,.35); }
.btn-ghost { background: transparent; color: var(--pine); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--emerald); color: var(--emerald); }
.hero .btn-ghost { color: #e8efe9; border-color: rgba(255,255,255,.28); }
.hero .btn-ghost:hover { border-color: #fff; color: #fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; transition: box-shadow .3s ease; }
/* Blur on a pseudo-element: backdrop-filter on the header itself would make it the containing block
   for the fixed mobile nav, which then sits beside the header and widens the page. */
.site-header::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(12,31,26,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.25); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; gap: 16px; }
.logo { font-family: var(--display); color: #fff; text-decoration: none; font-weight: 800; font-size: 1.45rem; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: .5rem; }
.logo-mark { width: 34px; height: 34px; display: block; }
.logo span { color: var(--accent); }
.main-nav { display: flex; gap: clamp(12px, 2vw, 26px); align-items: center; }
.main-nav a { color: #cfdcd4; text-decoration: none; font-size: .95rem; font-weight: 600; position: relative; padding-block: 4px; }
.main-nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--accent); transition: right .28s cubic-bezier(.2,.8,.2,1); }
.main-nav a:hover { color: #fff; }
.main-nav a:hover::after { right: 0; }
.nav-toggle { display: none; }
.nav-toggle-btn { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle-btn span { display: block; width: 24px; height: 2.5px; background: #fff; border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }

@media (max-width: 820px) {
  .nav-toggle-btn { display: flex; }
  .main-nav { position: fixed; inset: 0; top: 58px; flex-direction: column; justify-content: flex-start; padding-top: 8vh; gap: 4px; background: rgba(12,31,26,.98); backdrop-filter: blur(20px); transform: translateX(100%); visibility: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility 0s linear .35s; }
  .nav-toggle:checked ~ .main-nav { transform: translateX(0); visibility: visible; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
  .main-nav a { font-size: 1.3rem; font-family: var(--display); padding: 12px 0; }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--pine) 0%, var(--pine-2) 55%, #0f3d31 100%); color: #e8efe9; padding: clamp(56px, 10vw, 110px) 0 clamp(44px, 7vw, 80px); }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; }
.hero::before { width: 480px; height: 480px; background: radial-gradient(circle, rgba(240,127,35,.55), transparent 65%); top: -160px; right: -120px; animation: drift 14s ease-in-out infinite alternate; }
.hero::after { width: 420px; height: 420px; background: radial-gradient(circle, rgba(24,140,120,.6), transparent 65%); bottom: -180px; left: -100px; animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(-40px, 30px) scale(1.12); } }
.hero .wrap { position: relative; z-index: 1; }
.hero .kicker { display: inline-block; font-family: var(--display); color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: .82rem; letter-spacing: .14em; border: 1px solid rgba(240,127,35,.4); border-radius: 999px; padding: 6px 16px; background: rgba(240,127,35,.08); }
.hero h1 { color: #fff; max-width: 780px; margin: .7em 0 .4em; }
.hero h1 .euro { color: var(--accent); }
.hero p.sub { max-width: 620px; font-size: clamp(1.02rem, 1.8vw, 1.18rem); color: #c3d4cb; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* Stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden; margin-top: clamp(32px, 5vw, 52px); }
.stat { background: rgba(255,255,255,.045); padding: 18px 20px; }
.stat b { display: block; font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat small { color: #a9bfb4; font-size: .82rem; line-height: 1.4; display: block; margin-top: 2px; }

/* ---------- Sections ---------- */
main.wrap { padding-block: clamp(36px, 6vw, 64px) clamp(40px, 6vw, 56px); }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head .overline { font-family: var(--display); color: var(--emerald); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; margin: 0; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: clamp(14px, 2vw, 22px); margin-block: 28px; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: transform .32s cubic-bezier(.2,.8,.2,1), box-shadow .32s ease, border-color .32s ease; }
a.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(14,107,92,.35); }
.card .icon { width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.35rem; border-radius: 12px; background: var(--emerald-soft); margin-bottom: 14px; }
.card h3 { margin: 0 0 8px; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 14px; }
.card .go { margin-top: auto; font-weight: 700; font-family: var(--display); color: var(--emerald); display: inline-flex; align-items: center; gap: 6px; }
.card .go::after { content: '→'; transition: transform .25s ease; }
a.card:hover .go::after { transform: translateX(5px); }
.card .badge { position: absolute; top: 16px; right: 16px; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); border-radius: 999px; padding: 4px 10px; box-shadow: 0 3px 10px rgba(240,127,35,.4); }

/* ---------- Article / Money pages ---------- */
/* Artikel: Lesespalte zentriert (720px), Widgets brechen breiter aus (CHECK24 empfiehlt ≥900px) */
article { max-width: none; }
article > * { max-width: 720px; margin-inline: auto; }
article > .widget-box, article > .cta-block { max-width: 1040px; }
article .stand { font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 14px; }
article ul li, article ol li { margin-bottom: .5em; }
article .box-tip { background: var(--emerald-soft); border-left: 4px solid var(--emerald); border-radius: 0 12px 12px 0; padding: 16px 20px; margin: 1.4em 0; }

/* FAQ accordion */
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-bottom: 10px; overflow: hidden; }
.faq summary { cursor: pointer; font-weight: 700; font-family: var(--display); padding: 15px 18px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--emerald); transition: transform .25s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 18px 15px; margin: 0; color: var(--muted); }

/* ---------- Widget box ---------- */
/* Farbliche Abgrenzung der Vergleichsrechner vom eigenen Content (Tarifcheck-Vorgabe) */
.widget-box { border: 1px solid #d5e3de; border-top: 4px solid var(--emerald); border-radius: var(--radius); background: #f1f7f4; padding: clamp(16px, 3vw, 24px); margin: 32px 0; box-shadow: var(--shadow-sm); }
.widget-box iframe, .widget-box > div { background: #fff; }
.cta-block { text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; margin: 32px 0; }
.ad-label { margin: 0 0 10px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.powered-by { margin: 10px 0 0; font-size: .8rem; color: var(--muted); }

/* ---------- Newsletter ---------- */
.newsletter-band { background: linear-gradient(140deg, var(--emerald) 0%, #0a5347 60%, #0c4a52 100%); color: #fff; margin-top: 56px; position: relative; overflow: hidden; }
.newsletter-band::before { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(240,127,35,.35), transparent 65%); top: -140px; right: -80px; filter: blur(70px); }
.newsletter-band .wrap { position: relative; padding-block: clamp(40px, 6vw, 64px); max-width: 760px; }
.newsletter-band h2 { color: #fff; margin-top: 0; }
.newsletter-band p { color: #d3e6df; }
.nl-form .hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.nl-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.nl-row input[type="email"] { flex: 1 1 260px; font-size: 1rem; font-family: var(--body); padding: 13px 18px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff; outline: none; transition: border-color .2s ease, background .2s ease; }
.nl-row input[type="email"]::placeholder { color: rgba(255,255,255,.55); }
.nl-row input[type="email"]:focus { border-color: var(--accent); background: rgba(255,255,255,.18); }
article .nl-row input[type="email"] { background: var(--card); color: var(--ink); border-color: var(--line); }
article .nl-row input[type="email"]:focus { border-color: var(--emerald); }
.nl-note { font-size: .82rem; color: #b7d2c9; margin-top: 12px; }
.nl-note a { color: #d3e6df; }
article .nl-note { color: var(--muted); }
article .nl-note a { color: var(--emerald); }

/* ---------- Footer ---------- */
.site-footer { background: var(--pine); color: #9db3a9; font-size: .88rem; }
.site-footer .wrap { padding-block: 36px; }
.site-footer a { color: #cfdcd4; }
.site-footer nav { margin: 10px 0; }
.disclosure { max-width: 820px; font-size: .8rem; color: #7e948a; }

/* ---------- Motion (scroll reveal) ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .sticky-cta { transform: none; }
}

/* Reisefenster-Tabelle auf den Ziel-Seiten (pin-factory/make-destination.mjs) */
/* Zielfoto (Reise-Seiten) — Bildquellen in pin-factory/photos/QUELLEN.md */
/* margin-inline MUSS auto bleiben — article > * zentriert die Kinder auf 720px,
   ein "0" hier zieht das Bild an den linken Rand des breiten article-Containers. */
.ziel-foto { margin: 1.6rem auto 2rem; }
.ziel-foto img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2;
  object-fit: cover; border-radius: 14px; background: var(--emerald-soft); }
.ziel-foto figcaption { margin-top: .5rem; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.ziel-foto figcaption a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.ziel-foto figcaption a:hover { color: var(--emerald); }
@media (max-width: 820px) { .ziel-foto img { aspect-ratio: 4 / 3; border-radius: 10px; } }

.reisefenster { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .98rem; }
.reisefenster th { text-align: left; padding: .55rem .8rem; background: var(--emerald-soft);
  color: var(--pine); font-weight: 800; letter-spacing: .02em; }
.reisefenster td { padding: .5rem .8rem; border-bottom: 1px solid var(--line); }
.reisefenster tr.gut td { background: #f3f9f0; font-weight: 700; }
.reisefenster tr.gut td:last-child { color: var(--emerald); }
.reisefenster tr.schlecht td { color: var(--muted); }
.reisefenster tr.schlecht td:last-child::before { content: "⚠ "; }

/* Zielliste auf /reisen/ */
.ziele-liste { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .55rem; }
.ziele-liste li { padding: .7rem .9rem; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; display: flex; flex-wrap: wrap; gap: .25rem .7rem; align-items: baseline; }
.ziele-liste a { text-decoration: none; }
.ziele-liste a:hover { text-decoration: underline; }
.ziele-liste .muted { font-size: .88rem; }

/* Direktlink-CTAs (inc/deeplinks.php) — nur der Direktlink setzt den 60-Tage-Cookie, deshalb
   bekommt jede Money-Page neben dem einen Widget mehrere Direktlink-Ausstiege. */
.cta-deep { border: 1px solid #f3d3b8; border-left: 5px solid var(--accent); border-radius: var(--radius);
  background: #fff7f0; padding: clamp(16px, 3vw, 24px); margin: 28px 0; }
.cta-deep .cta-title { margin: 0 0 6px; font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--pine); }
.cta-deep p { margin: 0 0 12px; }
.cta-deep .btn { margin: 4px 0 8px; }
.cta-deep .fine { margin: 0; font-size: .78rem; color: var(--muted); }
.cta-inline { margin: -18px 0 32px; font-size: .92rem; color: var(--muted); }
.cta-inline .ad-label { display: inline; margin: 0 6px 0 0; }
.cta-inline a { color: var(--accent-deep); font-weight: 700; text-decoration: none; }
.cta-inline a:hover { text-decoration: underline; }
.cta-end .btn { margin: 4px 6px 8px; }
.cta-end .powered-by { margin-top: 12px; }

/* Mobile Sticky-Leiste (Footer rendert sie, wenn $cta_product gesetzt ist; main.js zeigt sie nach Scrollen) */
.sticky-cta { display: none; }
@media (max-width: 820px) {
  .sticky-cta { display: flex; align-items: center; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(250,248,243,.96);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(12,31,26,.12); transform: translateY(110%); transition: transform .35s ease; }
  .sticky-cta.show { transform: translateY(0); }
  .sticky-cta.hide { display: none; }
  .sticky-cta .ad-label { margin: 0; flex: 0 0 auto; }
  .sticky-cta .btn { flex: 1 1 auto; text-align: center; padding: 11px 14px; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sticky-cta .close { flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; }
  body.has-sticky-cta { padding-bottom: 72px; }
}
