/*
 * core-layout/style.css
 * ──────────────────────
 * CSS-Reset, Basis-Typografie, site-shell, Skip-Link,
 * Generic Card, Grid, Sections, Reveal-Animationen.
 * Erfordert: core-theme/style.css (CSS-Variablen).
 */

/* ── Self-hosted fonts (kein Google-CDN-Kontakt, DSGVO-konform) ── */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/playfair-700-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/playfair-700-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/playfair-700-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/playfair-700-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--forest);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -0.025em; }

/* ── Layout Shell ── */
.site-shell {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* ── Skip Link ── */
.skip-link {
  position: absolute; top: -80px; left: 20px; z-index: 9999;
  padding: 10px 20px; background: var(--verdant); color: #fff;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600; font-size: 0.875rem; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Sections ── */
.section { padding: 96px 0; }
.section--sm { padding: 64px 0; }
.section--fern { background: var(--fern); }
.section--sand { background: var(--sand); }
.section--forest { background: var(--verdant); color: white; }

/* ── Grid ── */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── Generic Card ── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-xs);
}
.card h3, .card h4 { font-size: 1.125rem; font-weight: 700; color: var(--forest); margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.9375rem; }

/* ── Content Panel ── */
.content-panel {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.85);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 48px;
}

/* ── Eyebrow ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px 6px 10px; border-radius: var(--radius-pill);
  background: rgba(46,125,72,0.1); color: var(--meadow);
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--sprout); flex-shrink: 0;
}

/* ── Buttons ── */
.button, .button-secondary, .btn-hero-primary, .btn-hero-secondary, .btn-amber {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 52px; padding: 0 28px; border-radius: var(--radius-pill);
  font-family: inherit; font-size: 0.9375rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s, background 0.2s, color 0.2s;
  text-decoration: none; white-space: nowrap;
}
.button { background: var(--verdant); color: #fff; box-shadow: 0 4px 18px rgba(26,66,40,0.28); }
.button:hover { background: var(--meadow); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(46,125,72,0.35); color: #fff; }
.button-secondary { background: var(--surface); color: var(--verdant); border: 1.5px solid var(--line-strong); box-shadow: var(--shadow-xs); }
.button-secondary:hover { border-color: var(--meadow); background: var(--fern); transform: translateY(-2px); color: var(--verdant); }

/* ── Focus ── */
a:focus-visible, button:focus-visible, .button:focus-visible {
  outline: 3px solid var(--meadow); outline-offset: 3px; border-radius: var(--radius-sm);
}

/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ── Section Heading (left-aligned) ── */
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section-heading h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; color: var(--forest); }
.section-heading p { margin: 0; max-width: 52ch; color: var(--muted); font-size: 1rem; flex-shrink: 0; }

/* ── Dark section overrides ── */
.section--forest .section-header h2 { color: #fff; }
.section--forest .section-header p { color: rgba(255,255,255,0.65); }
.section--forest .eyebrow { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.85); }
.section--forest .eyebrow::before { background: var(--sprout); }

/* ── Hero / CTA button variants ── */
.btn-hero-primary { background: #fff; color: var(--verdant); box-shadow: 0 4px 20px rgba(0,0,0,0.18); border: none; }
.btn-hero-primary:hover { background: var(--fern); transform: translateY(-2px); color: var(--verdant); }
.btn-hero-secondary { background: rgba(255,255,255,0.12); color: #fff; border: 1.5px solid rgba(255,255,255,0.35); backdrop-filter: blur(8px); }
.btn-hero-secondary:hover { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.65); color: #fff; }
.btn-amber { background: var(--amber); color: #fff; box-shadow: 0 4px 18px rgba(200,108,40,0.3); }
.btn-amber:hover { background: #b45e22; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,108,40,0.4); color: #fff; }
.admin-logout-link { min-height: 40px; padding: 0 16px; font-size: 0.875rem; }

/* ── Metrics ── */
.metrics-row { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.metric-cell { background: white; padding: 36px 28px; text-align: center; transition: background 0.2s; border-right: 1px solid var(--line); }
.metric-cell:last-child { border-right: none; }
.metric-cell:hover { background: var(--fern); }
.metric-cell strong { display: block; font-size: 2.8rem; font-weight: 800; line-height: 1; color: var(--verdant); letter-spacing: -0.04em; }
.metric-cell span { display: block; margin-top: 8px; font-size: 0.875rem; color: var(--muted); font-weight: 500; line-height: 1.4; }
.hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
/* backward compat */
.metric { background: white; padding: 18px; border-radius: var(--radius-md); }
.metric strong { display: block; font-size: 1.55rem; color: var(--verdant); }
.metric span { display: block; margin-top: 6px; font-size: 0.92rem; color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .content-panel { padding: 32px 24px; }
  .metrics-row { grid-template-columns: 1fr; }
  .metric-cell { border-right: none; border-bottom: 1px solid var(--line); }
  .metric-cell:last-child { border-bottom: none; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .hero-metrics { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-shell { width: min(100% - 24px, var(--container)); }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .section--sm { padding: 40px 0; }
  .content-panel { padding: 24px 16px; }
  :root { --header-h: 64px; }
}
