/* Marke: config/brand.json im Reels-Repo. Formregel: Karten und Panels 24px, Buttons Pille, Code 14px. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/BricolageGrotesque-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-latin.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #FFF4E6;
  --surface: #FFFFFF;
  --text: #231A15;
  --muted: #5E4A3F;
  --line: #231A15;
  --orange: #DA7756;
  --orange-deep: #B85A38;
  --sun: #FFD25E;
  --sky: #B9E1FF;
  --peach: #F8D3C0;
  --on-accent: #231A15;
  --shadow: 6px 6px 0 var(--line);
  --shadow-hover: 9px 9px 0 var(--line);
  --r-card: 24px;
  --r-code: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1D1511;
    --surface: #2B201A;
    --text: #FFF4E6;
    --muted: #D8C3B3;
    --line: #FFF4E6;
    --orange-deep: #F4A98A;
    --shadow: 6px 6px 0 rgba(0, 0, 0, 0.55);
    --shadow-hover: 9px 9px 0 rgba(0, 0, 0, 0.55);
  }
  .tone-sun, .tone-sky, .tone-peach, .hero-panel, .what, .banner { --text: #231A15; --muted: #4A382E; --orange-deep: #8E3F20; }
  .tone-white { background: var(--surface); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 500 18px/1.65 var(--display);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-deep); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--sun); color: #231A15; padding: 10px 16px; border-radius: 999px; font-weight: 700; z-index: 10; }
.skip:focus { top: 12px; }

main, .bar, .foot { width: min(100% - 32px, 1080px); margin-inline: auto; }

/* Kopfzeile */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding-top: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-block; white-space: nowrap; text-decoration: none; font-weight: 800; font-size: 17px; line-height: 1;
  padding: 16px 26px; border-radius: 999px; background: var(--orange); color: var(--on-accent);
  border: 3px solid #231A15; box-shadow: 4px 4px 0 #231A15;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #231A15; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #231A15; }
.btn-small { padding: 11px 18px; font-size: 15px; box-shadow: 3px 3px 0 #231A15; }
.btn-dark { background: #231A15; color: #FFF4E6; border-color: #231A15; box-shadow: 4px 4px 0 var(--orange); }
.btn-dark:hover { box-shadow: 6px 6px 0 var(--orange); }

/* Hero */
.hero {
  position: relative; display: grid; grid-template-columns: 1fr; gap: 8px; align-items: center;
  margin-top: 20px; padding: 36px 24px 0; overflow: clip;
  background: var(--sun); color: #231A15; border: 4px solid var(--line); border-radius: 32px; box-shadow: var(--shadow);
}
.hero-text { padding-bottom: 28px; }
h1 { font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; margin: 0; font-size: clamp(40px, 9vw, 76px); text-wrap: balance; }
.lead { font-size: clamp(18px, 2.4vw, 22px); line-height: 1.5; margin: 18px 0 26px; max-width: 34ch; font-weight: 600; }
.hero-toaster { width: min(78%, 340px); margin: 0 auto -6px; justify-self: center; animation: bob 4.5s ease-in-out infinite; transform-origin: 50% 100%; }
.hero-small { padding-bottom: 32px; }

/* Guide-Liste */
.guides { margin-top: 64px; }
h2 { font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; font-size: clamp(26px, 4vw, 36px); margin: 0 0 20px; }
.guide-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px;
  border: 4px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); color: #231A15;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover, .card:focus-within { transform: translate(-3px, -3px) rotate(-0.4deg); box-shadow: var(--shadow-hover); }
.card:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--line); }
.tone-sun { background: var(--sun); } .tone-sky { background: var(--sky); } .tone-peach { background: var(--peach); } .tone-white { background: #fff; }
.card h3 { margin: 0; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 800; text-wrap: balance; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* ganze Karte klickbar */
.card-sum { margin: 0; font-weight: 600; max-width: 56ch; }
.card-meta { margin: 0; font-size: 15px; color: var(--muted); font-weight: 600; }
.card-go { margin-top: 6px; align-self: flex-start; font-weight: 800; border-bottom: 3px solid #231A15; }
.card-go::after { content: " \2192"; }
.card-featured h3 { font-size: clamp(30px, 5vw, 48px); }
.empty { padding: 28px; border: 4px dashed var(--line); border-radius: var(--r-card); font-weight: 600; }

.chip {
  align-self: flex-start; margin: 0; padding: 5px 12px; font: 700 13px/1.2 var(--mono); letter-spacing: 0.02em;
  background: #fff; color: #231A15; border: 2px solid #231A15; border-radius: 999px;
}

/* Banner */
.banner {
  display: flex; align-items: center; gap: 20px; margin: 64px 0 0; padding: 24px;
  background: var(--sky); color: #231A15; border: 4px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
}
.banner img { flex: none; width: 96px; height: 96px; object-fit: contain; }
.banner > div { min-width: 0; }
.banner h2 { font-size: clamp(22px, 3.4vw, 30px); margin-bottom: 6px; }
.banner p { margin: 0 0 14px; font-weight: 600; max-width: 48ch; }
.banner p:last-child { margin-bottom: 0; }

/* Guide-Seite (Lesemodus) */
.guide { max-width: 720px; margin: 28px auto 0; }
.back { margin: 0 0 18px; font-weight: 700; font-size: 16px; }
.back a::before { content: "\2190 "; }
.guide-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.guide-head h1 {
  background: var(--sun); color: #231A15; border: 4px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 18px 22px; font-size: clamp(30px, 6.4vw, 52px); transform: rotate(-0.6deg);
}
.what { padding: 22px 24px; background: var(--sky); color: #231A15; border: 4px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.what h2 { font-size: 22px; margin-bottom: 8px; }
.what p { margin: 0 0 18px; font-weight: 600; }

.prose { margin-top: 36px; }
.prose h2 { margin: 44px 0 14px; padding-left: 14px; border-left: 8px solid var(--orange); font-size: clamp(24px, 3.6vw, 30px); }
.prose h3 { margin: 28px 0 8px; font-size: 21px; letter-spacing: -0.01em; }
.prose p, .prose li { max-width: 66ch; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--orange-deep); font-weight: 800; }
.prose code { font: 500 0.86em var(--mono); background: var(--surface); border: 2px solid var(--line); border-radius: 8px; padding: 1px 6px; overflow-wrap: anywhere; }
.prose pre { position: relative; margin: 18px 0; padding: 18px; padding-top: 52px; background: #231A15; color: #FFF4E6; border-radius: var(--r-code); overflow-x: auto; border: 3px solid #231A15; box-shadow: 4px 4px 0 var(--orange); }
.prose pre code { background: none; border: 0; padding: 0; font-size: 15px; color: inherit; overflow-wrap: normal; }
.prose blockquote { margin: 22px 0; padding: 12px 18px; background: var(--peach); color: #231A15; border: 3px solid var(--line); border-radius: var(--r-code); }
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 3px dashed var(--line); margin: 36px 0; opacity: .5; }
.copy {
  position: absolute; top: 10px; right: 10px; font: 700 13px/1 var(--display); padding: 8px 12px; border-radius: 999px; cursor: pointer;
  background: var(--sun); color: #231A15; border: 2px solid #231A15;
}
.copy:active { transform: scale(0.96); }
.banner-end { margin-top: 56px; }

.foot { padding: 56px 0 40px; color: var(--muted); font-size: 15px; font-weight: 600; }
.foot p { margin: 0 0 8px; max-width: 56ch; }
.foot a { color: inherit; }

/* Handy: Banner gestapelt, Kopfzeile ohne zweiten Button (der Folgen-Knopf steht im Banner) */
@media (max-width: 759px) {
  .banner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .banner img { width: 88px; height: 88px; }
  .bar .btn { display: none; }
  .btn { white-space: normal; text-align: center; }
}

/* Ab Tablet: Hero zweispaltig, Karten asymmetrisch */
@media (min-width: 760px) {
  main, .bar, .foot { width: min(100% - 64px, 1080px); }
  .hero { grid-template-columns: 1.35fr 1fr; padding: 56px 56px 0; gap: 24px; }
  .hero-text { padding-bottom: 56px; }
  .hero-toaster { width: 100%; max-width: 380px; margin: 0 0 -6px; justify-self: end; }
  .hero-small { grid-template-columns: 1fr; padding-bottom: 40px; }
  .guide-grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .card-featured { grid-column: 1 / -1; padding: 36px; }
  .banner { padding: 28px 36px; gap: 32px; }
  .banner img { width: 128px; height: 128px; }
}

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-8px) rotate(1.5deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-text > *, .card, .guide-head > *, .what { animation: rise .6s var(--ease) both; }
  .hero-text > :nth-child(2) { animation-delay: .08s; } .hero-text > :nth-child(3) { animation-delay: .16s; }
  .card { animation-delay: calc(var(--i, 0) * 80ms + 200ms); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-toaster { animation: none; }
  .btn, .card { transition: none; }
}
