/* ==========================================================================
   marcokeller.de
   Designsystem — Premium Minimalism / Modern Tech
   Geist + Geist Mono · Grün #1C5745 als einzige Akzentfarbe · Hell und Dunkel
   ========================================================================== */

/* ----------------------------------------------------------- Schriften */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
}

/* ================================================================ Token */

:root {
  /* Flächen */
  --bg: #FBFBFC;
  --surface: #FFFFFF;
  --surface-2: #F4F5F7;
  --surface-sunk: #F1F2F4;

  /* Linien */
  --border: rgba(10, 11, 13, 0.09);
  --border-2: rgba(10, 11, 13, 0.16);

  /* Text — Kontrastwerte gegen --bg */
  --text: #0A0B0D;      /* 19.0:1 */
  --text-2: #42464F;    /*  9.1:1 */
  --text-3: #5C616B;    /*  6.0:1 */

  /* Akzent */
  --accent: #1C5745;    /*  8.1:1 */
  --accent-2: #14402F;
  --accent-soft: rgba(28, 87, 69, 0.09);
  --accent-line: rgba(28, 87, 69, 0.28);
  --glow: rgba(28, 87, 69, 0.13);
  --glow-2: rgba(28, 87, 69, 0.07);
  --on-accent: #FFFFFF;

  --spot: rgba(28, 87, 69, 0.07);
  --grid-line: rgba(10, 11, 13, 0.055);

  --shadow-1: 0 1px 2px rgba(10, 11, 13, 0.04), 0 10px 26px -14px rgba(10, 11, 13, 0.14);
  --shadow-2: 0 2px 4px rgba(10, 11, 13, 0.04), 0 28px 56px -24px rgba(10, 11, 13, 0.22);

  /* Radien */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Typografie */
  --sans: "Geist", ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --t-hero: clamp(42px, 6.6vw, 92px);
  --t-h1: clamp(36px, 4.8vw, 66px);
  --t-h2: clamp(27px, 3.3vw, 44px);
  --t-h3: clamp(20px, 1.9vw, 26px);
  --t-lede: clamp(18px, 1.45vw, 21px);
  --t-body: 17px;
  --t-sm: 15px;
  --t-label: 12px;

  /* Maße */
  --max: 1280px;
  --gutter: clamp(20px, 4.5vw, 72px);
  --measure: 690px;
  --step: clamp(80px, 9vw, 132px);

  /* Bewegung */
  --d-fast: 160ms;
  --d: 320ms;
  --d-slow: 620ms;
  --d-reveal: 900ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #08090B;
  --surface: #0E1013;
  --surface-2: #14171B;
  --surface-sunk: #0B0D10;

  --border: rgba(242, 243, 245, 0.10);
  --border-2: rgba(242, 243, 245, 0.20);

  --text: #F2F3F5;      /* 17.9:1 */
  --text-2: #A8AEB8;    /*  8.9:1 */
  --text-3: #9096A1;    /*  6.7:1 */

  --accent: #4ECB9C;    /*  9.8:1 */
  --accent-2: #7FE3BE;
  --accent-soft: rgba(78, 203, 156, 0.12);
  --accent-line: rgba(78, 203, 156, 0.30);
  --glow: rgba(78, 203, 156, 0.15);
  --glow-2: rgba(78, 203, 156, 0.08);
  --on-accent: #06231A;

  --spot: rgba(78, 203, 156, 0.09);
  --grid-line: rgba(242, 243, 245, 0.05);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 26px -14px rgba(0, 0, 0, 0.7);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.4), 0 28px 56px -24px rgba(0, 0, 0, 0.8);

  color-scheme: dark;
}

/* ============================================================== Basis */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.006em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background var(--d) var(--ease-soft), color var(--d) var(--ease-soft);
}

::selection { background: var(--accent); color: var(--on-accent); }

img, svg, video { max-width: 100%; display: block; }

p, li { text-wrap: pretty; hyphens: auto; -webkit-hyphens: auto; }

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.032em;
  line-height: 1.06;
  text-wrap: balance;
  hyphens: none;
  -webkit-hyphens: none;
}

a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.column {
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Mono-Auszeichnung — Rubriken, Nummern, Meta */
.label {
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.5;
}

.label--accent { color: var(--accent); }
.label--quiet { color: var(--text-3); font-weight: 400; }

/* ------------------------------------------------- Barrierefreiheit */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--accent);
  color: var(--on-accent);
  padding: 13px 22px;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
}

.skip:focus { left: 18px; top: 14px; }

main:focus { outline: none; }

/* ============================================================ Kopfzeile */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--d) var(--ease-soft),
              border-color var(--d) var(--ease-soft);
}

.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav.is-stuck { background: var(--bg); }
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 76px;
  transition: height var(--d) var(--ease);
}

.nav.is-stuck .nav__inner { height: 64px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand__mark {
  width: 27px;
  height: 24px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--d-slow) var(--ease);
}

.brand:hover .brand__mark { transform: translateY(-2px); }

.brand__name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}

.nav__right { display: flex; align-items: center; gap: 8px; }

.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; }

.nav__links a {
  display: block;
  position: relative;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 450;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--d-fast) var(--ease-soft), background var(--d-fast) var(--ease-soft);
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 4px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--d) var(--ease);
}

.nav__links a:hover { color: var(--text); background: var(--accent-soft); }
.nav__links a[aria-current="page"] { color: var(--accent); }
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

/* Umschalter Hell/Dunkel */
.theme {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color var(--d-fast) var(--ease-soft),
              color var(--d-fast) var(--ease-soft),
              background var(--d-fast) var(--ease-soft);
}

.theme:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.theme svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.theme__sun { display: none; }
:root[data-theme="dark"] .theme__sun { display: block; }
:root[data-theme="dark"] .theme__moon { display: none; }

.burger {
  display: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.burger span {
  display: block;
  width: 15px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--d) var(--ease), opacity var(--d-fast) var(--ease-soft);
}

.burger span + span { margin-top: 4px; }

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Lesefortschritt */
.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

/* ================================================================ Hero */

.hero {
  position: relative;
  min-height: min(880px, 100svh);
  display: flex;
  align-items: center;
  padding-block: clamp(130px, 17vh, 190px) clamp(72px, 10vw, 128px);
  overflow: hidden;
  isolation: isolate;
}

/* Ruhig animierter Hintergrund: Raster, zwei Lichtflächen, eine Kontur */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: -12%;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 76% 62% at 62% 40%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 76% 62% at 62% 40%, #000 0%, transparent 72%);
  will-change: transform;
}

.orb {
  position: absolute;
  border-radius: 50%;
}

.orb--1 {
  width: 44vw;
  height: 44vw;
  min-width: 420px;
  min-height: 420px;
  top: -14%;
  right: -6%;
  background: radial-gradient(circle at 42% 42%, var(--glow) 0%, var(--glow-2) 34%, transparent 70%);
  animation: drift-a 34s var(--ease-soft) infinite alternate;
}

.orb--2 {
  width: 36vw;
  height: 36vw;
  min-width: 340px;
  min-height: 340px;
  bottom: -20%;
  left: -8%;
  background: radial-gradient(circle at 58% 42%, var(--glow-2) 0%, transparent 68%);
  animation: drift-b 44s var(--ease-soft) infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-5%, 6%, 0) scale(1.1); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to   { transform: translate3d(7%, -5%, 0) scale(1); }
}

/* Feine Konturlinie als technischer Akzent */
.hero__line {
  position: absolute;
  right: 0;
  top: 0;
  width: 58%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to left, #000 0%, #000 42%, transparent 82%);
  mask-image: linear-gradient(to left, #000 0%, #000 42%, transparent 82%);
}

.hero__line path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.1;
  opacity: 0.5;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: trace 3.4s var(--ease) forwards;
}

.hero__line path:nth-of-type(2) { animation-delay: 0.35s; opacity: 0.3; }
.hero__line path:nth-of-type(3) { animation-delay: 0.7s; opacity: 0.19; }

.hero__line circle {
  fill: var(--accent);
  opacity: 0;
  animation: node-in 0.7s var(--ease) forwards;
}

.hero__line circle:nth-of-type(1) { animation-delay: 1.5s; }
.hero__line circle:nth-of-type(2) { animation-delay: 1.8s; }
.hero__line circle:nth-of-type(3) { animation-delay: 2.1s; }
.hero__line circle:nth-of-type(4) { animation-delay: 2.4s; }

/* Läuft nur, solange der Bereich im Bild ist */
.is-idle .orb,
.is-idle .footer__glow,
.is-idle .hero__eyebrow::before { animation-play-state: paused; }

@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes node-in { to { opacity: 0.65; } }

.hero__inner { position: relative; width: 100%; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: clamp(26px, 3.4vw, 40px);
}

.hero__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse 3.2s var(--ease-soft) infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.hero h1 {
  font-size: var(--t-hero);
  font-weight: 500;
  letter-spacing: -0.042em;
  line-height: 0.98;
  max-width: 18ch;
}

.hero h1 em { font-style: normal; color: var(--accent); }

/* Zeilenweiser Mask-Reveal */
.line { display: block; overflow: hidden; padding-bottom: 0.06em; }

.line > span {
  display: block;
  transform: translateY(105%);
  animation: line-up 1.05s var(--ease) forwards;
}

.line:nth-child(1) > span { animation-delay: 0.06s; }
.line:nth-child(2) > span { animation-delay: 0.17s; }
.line:nth-child(3) > span { animation-delay: 0.28s; }
.line:nth-child(4) > span { animation-delay: 0.39s; }

@keyframes line-up { to { transform: translateY(0); } }

.hero__lede {
  margin-top: clamp(24px, 3vw, 34px);
  max-width: 52ch;
  font-size: var(--t-lede);
  line-height: 1.58;
  color: var(--text-2);
  opacity: 0;
  animation: fade-up 1s var(--ease) 0.55s forwards;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: clamp(32px, 4vw, 46px);
  opacity: 0;
  animation: fade-up 1s var(--ease) 0.68s forwards;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  margin-top: clamp(52px, 7vw, 84px);
  padding-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--border);
  opacity: 0;
  animation: fade-up 1s var(--ease) 0.82s forwards;
}

.stat__value {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat__label { color: var(--text-3); margin-top: 6px; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.scrollcue {
  position: absolute;
  left: var(--gutter);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  opacity: 0;
  animation: fade-up 1s var(--ease) 1.1s forwards;
}

.scrollcue::after {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  animation: sweep 2.6s var(--ease) infinite;
}

@keyframes sweep {
  0% { transform: scaleX(0); transform-origin: left; }
  45% { transform: scaleX(1); transform-origin: left; }
  55% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ============================================================= Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--d) var(--ease), box-shadow var(--d) var(--ease),
              background var(--d-fast) var(--ease-soft), border-color var(--d-fast) var(--ease-soft),
              color var(--d-fast) var(--ease-soft);
}

.btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--d) var(--ease);
}

.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-1), 0 12px 28px -14px var(--accent);
}

.btn--primary:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2), 0 20px 40px -16px var(--accent);
}

.btn--ghost {
  border-color: var(--border-2);
  color: var(--text);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Textlink mit wachsender Unterlinie */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  position: relative;
}

.tlink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--d) var(--ease);
}

.tlink:hover::after { transform: scaleX(1); transform-origin: left; }

.tlink svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--d) var(--ease);
}

.tlink:hover svg { transform: translateX(3px); }

/* ========================================================== Sektionen */

.section { padding-block: var(--step); }
.section--tight { padding-block: clamp(56px, 6.5vw, 92px); }
.section--flush { padding-top: 0; }

.shead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.shead__text { max-width: 40ch; }

.shead h2 { font-size: var(--t-h2); margin-top: 14px; }

.shead p { margin-top: 14px; color: var(--text-2); font-size: var(--t-sm); max-width: 46ch; }

/* ========================================================= Bento-Grid */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 208px;
  padding: clamp(22px, 2.4vw, 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-1);
  transition: transform var(--d-slow) var(--ease),
              border-color var(--d) var(--ease-soft),
              box-shadow var(--d-slow) var(--ease);
}

/* Lichtschein folgt dem Zeiger */
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), var(--spot), transparent 68%);
  opacity: 0;
  transition: opacity var(--d) var(--ease-soft);
}

a.tile:hover {
  transform: translateY(-5px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-2);
}

a.tile:hover::before { opacity: 1; }

.tile__num {
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.tile__name {
  font-size: var(--t-h3);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.14;
}

.tile__desc {
  font-size: var(--t-sm);
  line-height: 1.6;
  color: var(--text-2);
  margin-top: auto;
  padding-top: 10px;
  max-width: 46ch;
}

.tile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.tile__tags .chip { font-size: 10px; padding: 4px 10px; }

.tile__go {
  position: absolute;
  right: clamp(20px, 2.2vw, 28px);
  top: clamp(20px, 2.2vw, 28px);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text-3);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity var(--d) var(--ease), transform var(--d) var(--ease),
              color var(--d-fast) var(--ease-soft), border-color var(--d-fast) var(--ease-soft);
}

.tile__go svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

a.tile:hover .tile__go { opacity: 1; transform: none; color: var(--accent); border-color: var(--accent-line); }

/* Feld-Anordnung: bewusst asymmetrisch. Die Spannweiten kommen als
   data-Attribut aus build.py, damit auch mehr oder weniger als fünf
   Themenfelder ein vollständiges Raster ergeben. */
.bento .tile[data-sp="2"] { grid-column: span 2; }
.bento .tile[data-sp="3"] { grid-column: span 3; }
.bento .tile[data-sp="4"] { grid-column: span 4; }
.bento .tile[data-sp="6"] { grid-column: span 6; }
.bento .tile[data-rw="2"] { grid-row: span 2; }

.tile--feature { background: linear-gradient(150deg, var(--surface), var(--surface-2)); }
.tile--feature .tile__name { font-size: clamp(26px, 2.7vw, 36px); }

/* Bento ohne Verlinkung (Haltung, Schwerpunkte) */
.bento--static { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento--static .tile { min-height: 0; box-shadow: none; background: var(--surface-2); }

/* ====================================================== Artikelkarten */

.posts { display: grid; gap: 14px; list-style: none; }

.post {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  gap: 12px 26px;
  align-items: start;
  padding: clamp(22px, 2.4vw, 30px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--d-slow) var(--ease),
              border-color var(--d) var(--ease-soft),
              box-shadow var(--d-slow) var(--ease);
}

.post::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--spot), transparent 66%);
  opacity: 0;
  transition: opacity var(--d) var(--ease-soft);
}

a.post:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-2);
}

a.post:hover::before { opacity: 1; }

.post__num {
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding-top: 6px;
}

.post__title {
  display: block;
  font-size: clamp(21px, 2.1vw, 29px);
  font-weight: 500;
  letter-spacing: -0.032em;
  line-height: 1.14;
  transition: color var(--d-fast) var(--ease-soft);
}

a.post:hover .post__title { color: var(--accent); }

.post__excerpt {
  display: block;
  margin-top: 10px;
  font-size: var(--t-sm);
  line-height: 1.62;
  color: var(--text-2);
  max-width: 62ch;
}

.post__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.chip {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

.chip--accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.post--draft { cursor: default; background: transparent; box-shadow: none; }
.post--draft .post__num { color: var(--text-3); }
.post--draft .post__title { color: var(--text-3); font-size: clamp(19px, 1.8vw, 23px); }

/* ============================================================= Filter */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(24px, 3vw, 36px); }

.filters button {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 450;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  cursor: pointer;
  transition: color var(--d-fast) var(--ease-soft), border-color var(--d-fast) var(--ease-soft),
              background var(--d-fast) var(--ease-soft), transform var(--d-fast) var(--ease);
}

.filters button:hover { color: var(--accent); border-color: var(--accent-line); transform: translateY(-1px); }

.filters button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.posts li[hidden] { display: none; }

.empty { padding: 40px 0; color: var(--text-3); }

/* ========================================================= Seitenkopf */

.phead { padding-block: clamp(112px, 15vh, 168px) clamp(28px, 3.4vw, 44px); }

.phead__eyebrow { color: var(--accent); margin-bottom: 18px; }

.phead h1 { font-size: var(--t-h1); max-width: 17ch; }

.phead__lede {
  margin-top: 22px;
  max-width: 54ch;
  font-size: var(--t-lede);
  line-height: 1.58;
  color: var(--text-2);
}

/* ============================================================ Artikel */

.ahead { padding-block: clamp(112px, 15vh, 168px) clamp(24px, 3vw, 36px); }

.ahead__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }

.ahead h1 { font-size: var(--t-h1); letter-spacing: -0.038em; }

.ahead__by { margin-top: 20px; color: var(--text-3); }

.key {
  padding: clamp(22px, 2.6vw, 30px);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  background: var(--accent-soft);
  margin-bottom: clamp(36px, 4.5vw, 54px);
}

.key__label { color: var(--accent); margin-bottom: 10px; }

.key p { font-size: 18.5px; line-height: 1.56; color: var(--text); }

.prose p {
  font-size: 18.5px;
  line-height: 1.72;
  color: var(--text-2);
  margin-bottom: 26px;
}

.prose h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  margin: clamp(44px, 5vw, 62px) 0 18px;
  letter-spacing: -0.034em;
}

.prose h3 { font-size: 21px; margin: 36px 0 12px; }

.prose ul, .prose ol { margin: 0 0 26px 20px; }

.prose li { font-size: 18.5px; line-height: 1.68; color: var(--text-2); margin-bottom: 9px; }

.prose li::marker { color: var(--accent); }

.prose blockquote {
  position: relative;
  margin: clamp(38px, 4.5vw, 54px) 0;
  padding: clamp(24px, 3vw, 32px) clamp(24px, 3vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 450;
  letter-spacing: -0.028em;
  line-height: 1.34;
  color: var(--text);
}

.prose blockquote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.prose strong { font-weight: 550; color: var(--text); }

.prose a { color: var(--accent); text-underline-offset: 3px; }

.prose .note,
.prose .prose__note {
  margin-top: clamp(38px, 4.5vw, 54px);
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--text-3);
}

.afoot {
  margin-top: clamp(44px, 5vw, 66px);
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 28px;
}

/* ========================================================= Themenseite */

.topic-intro { max-width: 60ch; font-size: var(--t-lede); line-height: 1.62; color: var(--text-2); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }

/* ============================================================= Profil */

.profile {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.profile__photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 50% 0%, var(--accent-soft), transparent 62%),
    var(--surface-2);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  color: var(--text-3);
  overflow: hidden;
}

.profile__body p {
  font-size: var(--t-lede);
  line-height: 1.66;
  color: var(--text-2);
  margin-bottom: 20px;
  max-width: 56ch;
}

.todo-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px dashed var(--accent-line);
  border-radius: var(--r-pill);
  padding: 5px 13px;
  margin-bottom: 22px;
}

/* ============================================================ Kontakt */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.crow {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--d-fast) var(--ease-soft), transform var(--d) var(--ease),
              background var(--d-fast) var(--ease-soft);
}

.crow + .crow { margin-top: 10px; }

a.crow:hover { border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-2px); }

.crow__label { color: var(--text-3); margin-bottom: 6px; }

.crow__value { font-size: clamp(19px, 1.9vw, 24px); font-weight: 500; letter-spacing: -0.03em; word-break: break-word; }

a.crow:hover .crow__value { color: var(--accent); }

.aside {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.aside h2 { font-size: 22px; margin-bottom: 12px; }

.aside p { font-size: var(--t-sm); line-height: 1.68; color: var(--text-2); }

.aside p + p { margin-top: 12px; }

/* ======================================================== Rechtliches */

.legal h2 { font-size: 23px; margin: clamp(36px, 4vw, 48px) 0 12px; }

.legal p { font-size: 17px; line-height: 1.68; color: var(--text-2); margin-bottom: 12px; }

.legal ul { margin: 0 0 16px 20px; }

.legal li { font-size: 17px; line-height: 1.68; color: var(--text-2); margin-bottom: 6px; }

.legal li::marker { color: var(--accent); }

.legal strong { font-weight: 550; color: var(--text); }

.todo { color: var(--accent); }

/* =========================================================== Fußzeile */

.footer {
  position: relative;
  padding-block: clamp(64px, 8vw, 104px) 32px;
  border-top: 1px solid var(--border);
  background: var(--surface-sunk);
  overflow: hidden;
  isolation: isolate;
}

.footer__glow {
  position: absolute;
  left: 50%;
  bottom: -60%;
  width: 90vw;
  height: 90vw;
  max-width: 1100px;
  max-height: 1100px;
  margin-left: -45vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-2) 0%, transparent 64%);
  z-index: -1;
  pointer-events: none;
  animation: drift-b 50s var(--ease-soft) infinite alternate;
}

.footer__cta h2 { font-size: var(--t-h2); max-width: 16ch; }

.footer__cta p { margin-top: 18px; color: var(--text-2); max-width: 44ch; font-size: var(--t-sm); }

.footer__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: clamp(32px, 5vw, 72px);
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: clamp(32px, 4vw, 44px);
  border-top: 1px solid var(--border);
}

.footer__brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 600; letter-spacing: -0.025em; }

.footer__brand .brand__mark { width: 25px; height: 22px; }

.footer__tag { margin-top: 14px; font-size: 14.5px; line-height: 1.62; color: var(--text-3); max-width: 32ch; }

.footer__col h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}

.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer__col a {
  font-size: 14.5px;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--d-fast) var(--ease-soft);
}

.footer__col a:hover { color: var(--accent); }

.footer__base {
  margin-top: clamp(40px, 5vw, 60px);
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--text-3);
}

/* ====================================================== Scroll-Reveal */

.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--d-reveal) var(--ease), transform var(--d-reveal) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.rv.is-in { opacity: 1; transform: none; }

/* ========================================================== Responsiv */

@media (max-width: 1080px) {
  .bento .tile[data-sp] { grid-column: span 3; }
  .bento .tile[data-rw] { grid-row: span 1; }
  .bento--static { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 22px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--d) var(--ease), transform var(--d) var(--ease),
                visibility 0s linear var(--d);
  }

  .nav__links.is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .nav__links a { padding: 14px 16px; font-size: 17px; border-radius: var(--r); }
  .nav__links a::after { display: none; }
  .nav__links a[aria-current="page"] { background: var(--accent-soft); }

  .burger { display: grid; }

  .hero { min-height: 0; padding-block: 124px 80px; }
  .hero h1 { max-width: 100%; }
  .scrollcue { display: none; }
  .hero__line { display: none; }

  .bento { gap: 10px; }
  .bento .tile[data-sp] { grid-column: span 6; }
  .bento--static { grid-template-columns: 1fr; }

  .post { grid-template-columns: 44px minmax(0, 1fr); }
  .post__meta { grid-column: 2; align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; }

  .profile { grid-template-columns: 1fr; }
  .profile__photo { max-width: 280px; }

  .contact { grid-template-columns: 1fr; }

  .footer__grid { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .prose p, .prose li { font-size: 17.5px; }
  .hero__stats { gap: 18px 30px; }
  .tile { min-height: 0; }
}

/* Sehr schmale Geräte: lange Rubriknamen dürfen umbrechen */
@media (max-width: 400px) {
  .chip {
    white-space: normal;
    letter-spacing: 0.06em;
    overflow-wrap: anywhere;
  }
}

/* Zeigergeräte ohne Hover: keine Lichtscheine */
@media (hover: none) {
  .tile::before, .post::before { display: none; }
}

/* =================================================== Reduzierte Bewegung */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .rv { opacity: 1; transform: none; transition: none; }
  .line > span { transform: none; animation: none; }
  .hero__lede, .hero__actions, .hero__stats, .scrollcue { opacity: 1; animation: none; }
  .orb, .footer__glow, .hero__eyebrow::before, .scrollcue::after { animation: none; }
  .hero__line path { stroke-dashoffset: 0; animation: none; }
  .hero__line circle { opacity: 0.65; animation: none; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================== Druck */

@media print {
  .nav, .footer, .skip, .afoot, .filters, .hero__bg, .scrollcue, .hero__actions { display: none !important; }
  body { background: #fff; color: #000; }
  .prose p, .prose li, .legal p, .legal li { color: #000; }
  .rv { opacity: 1; transform: none; }
  .tile, .post { break-inside: avoid; border-color: #ccc; box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
}
