/* totalkrass.de — Stil nach "General Intelligence Company" (Refero Styles):
   gemalte Szenen über volle Höhe, ruhige weiße Inhaltsflächen, Serifen-Überschriften,
   ein einziger blauer Akzent, Glas-Navigation. */

:root {
  --parchment: #fefffc;
  --paper: #ffffff;
  --linen: #f9faf7;
  --ink: #171717;
  --graphite: #2c2c2c;
  --charcoal: #444141;
  --ash: #646464;
  --fog: #b4b8b4;
  --mist: #dee2de;
  --twilight: #282834;
  --dusk: #1f1f29;
  --blue: #41a1cf;
  --blue-ink: #1f78a6;   /* Signal Blue, für Text auf Weiß lesbar abgedunkelt */
  --cerulean: #0081c0;
  --online: #3f9b5c;
  --offline: #c4553b;

  --serif: "PP Mondwest", "Fraunces", "Recoleta", Georgia, serif;
  --sans: "Inter", "Geist", system-ui, sans-serif;

  --shadow-sm: rgba(0, 0, 0, 0.15) 0 2px 6px 0;
  --shadow-card: rgba(0, 0, 0, 0.08) 0 1px 1px 0, rgba(0, 0, 0, 0.08) 0 4px 5px 0;
  --shadow-atmo: rgba(0, 0, 0, 0.06) 0 2px 2px 0, rgba(0, 0, 0, 0.04) 0 0 0 5px;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(80px, 10vw, 140px);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--parchment); color: var(--ink);
  font: 400 16px/1.5 var(--sans); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p, h1, h2, h3, figure, dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue); color: #fff; }
[hidden] { display: none !important; }

/* ---------- Typografie ---------- */
.display, .heading-lg, .heading, .heading-sm, .footer-statement {
  font-family: var(--serif); font-weight: 400; color: var(--graphite);
  font-feature-settings: "liga" 0; text-wrap: balance;
}
.display    { font-size: clamp(34px, 4vw, 54px); line-height: 1.1; letter-spacing: -0.02em; }
.heading-lg { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -0.02em; }
.heading    { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.02em; }
.heading-sm { font-size: 27px; line-height: 1.25; letter-spacing: -0.04em; }
.lead       { font-size: 18px; line-height: 1.5; color: var(--charcoal); letter-spacing: -0.01em; max-width: 60ch; }
.caption    { font-size: 13px; line-height: 1.3; color: var(--ash); letter-spacing: -0.01em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: calc(var(--max) + 80px); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section-linen { background: var(--linen); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent;
  font: 500 15px/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  background: transparent; color: var(--charcoal); white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 36px; padding: 5px 12px; }
.btn-outline { border-color: var(--blue); color: var(--blue-ink); }
.btn-outline-dark { border-color: var(--twilight); color: var(--twilight); }
.btn-dark { background: var(--dusk); border-color: var(--twilight); color: #fff; }
.btn-ghost { padding-inline: 4px; color: var(--twilight); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--fog); }
.arrow {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid currentColor; font-size: 12px; line-height: 1;
  transition: transform 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-outline:hover { background: rgba(65, 161, 207, 0.08); }
  .btn-outline-dark:hover { background: rgba(40, 40, 52, 0.06); }
  .btn-dark:hover { background: var(--twilight); }
  .btn-ghost:hover { text-decoration-color: var(--twilight); }
  .btn:hover .arrow { transform: translateX(2px); }
  a.btn[download]:hover .arrow { transform: translateY(2px); }
}
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--mist); background: var(--paper); color: var(--twilight);
  font: 500 16px/1 var(--sans); cursor: pointer; transition: background-color 160ms ease, transform 120ms var(--ease-out);
}
.icon-btn:active { transform: scale(0.94); }
@media (hover: hover) { .icon-btn:hover { background: var(--linen); } }

/* ---------- Glas ---------- */
.glass {
  background: rgba(254, 255, 252, 0.74);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

/* ---------- Navigation ---------- */
.nav-wrap { position: fixed; top: 16px; left: 0; right: 0; z-index: 30; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.nav {
  pointer-events: auto; display: flex; align-items: center; gap: 24px;
  padding: 6px 6px 6px 16px; border-radius: 50px;
  background: rgba(254, 255, 252, 0.72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8); box-shadow: var(--shadow-sm);
}
.nav-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font: 600 15px/1 var(--sans); color: var(--twilight); }
.block-icon { width: 18px; height: 18px; image-rendering: pixelated; border-radius: 3px; }
.nav-links { display: flex; gap: 20px; }
.nav-discord { display: grid; place-items: center; margin: 0 -12px 0 -8px; width: 36px; height: 36px; border-radius: 50%; color: var(--twilight); transition: background-color 160ms ease; }
.nav-discord svg { width: 20px; height: 20px; }
.nav-discord:active { transform: scale(0.94); }
.nav-links a { font: 500 15px/1 var(--sans); color: var(--charcoal); text-decoration: none; padding: 8px 0; transition: color 160ms ease; }
@media (hover: hover) { .nav-links a:hover { color: var(--ink); } }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; background: #c98f5f; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero-claim {
  position: absolute; z-index: 1; left: 54%; top: 17%; transform: translateX(-50%);
  font: italic 300 clamp(56px, 8.5vw, 140px)/1 var(--serif);
  font-variation-settings: "opsz" 144; letter-spacing: -0.03em; white-space: nowrap;
  color: #fffaf0; text-shadow: 0 2px 30px rgba(80, 30, 40, 0.35);
  pointer-events: none; user-select: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-claim { animation: claimIn 1600ms var(--ease-out) 500ms both; }
  @keyframes claimIn { from { opacity: 0; transform: translateX(-50%) translateY(16px); filter: blur(6px); } }
}
.hero-card {
  position: absolute; left: var(--gutter); bottom: var(--gutter);
  width: min(560px, calc(100% - 2 * var(--gutter)));
  padding: 32px; border-radius: 24px; box-shadow: var(--shadow-atmo);
  display: flex; flex-direction: column; gap: 20px;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--charcoal); }
.hero-sub { color: var(--charcoal); font-size: 16px; }
.hero-sub:empty { display: none; }
.state { display: flex; flex-direction: column; gap: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown > div { background: rgba(255, 255, 255, 0.7); border: 1px solid var(--mist); border-radius: 12px; padding: 12px 8px 10px; text-align: center; }
.cd-num { display: block; font: 400 clamp(30px, 3.2vw, 44px)/1 var(--serif); letter-spacing: -0.02em; color: var(--graphite); font-variant-numeric: tabular-nums; }
.cd-unit { display: block; margin-top: 6px; font-size: 13px; color: var(--ash); }

.status { display: grid; grid-template-columns: repeat(4, auto); gap: 8px 24px; justify-content: start; }
.status dt { font-size: 13px; color: var(--ash); }
.status dd { font: 500 18px/1.3 var(--sans); color: var(--graphite); display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--fog); flex: none; }
.dot.is-online { background: var(--online); box-shadow: 0 0 0 4px rgba(63, 155, 92, 0.18); }
.dot.is-offline { background: var(--offline); }
@media (prefers-reduced-motion: no-preference) {
  .dot.is-online { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(63, 155, 92, 0.06); } }
}

/* ---------- Split-Layout ---------- */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.split-text { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; position: sticky; top: 112px; }

/* ---------- Karten ---------- */
.card { background: var(--paper); border: 1px solid var(--mist); border-radius: 12px; box-shadow: var(--shadow-card); }

.steps { display: flex; flex-direction: column; gap: 16px; }
.step { padding: 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.step p { color: var(--charcoal); max-width: 56ch; }
.step .btn { margin-top: 8px; }
.step-head { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 32px; }
.step-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--mist); font: 500 15px/1 var(--sans); color: var(--charcoal); }
.modrinth-logo { display: inline-flex; align-items: center; gap: 8px; font: 600 18px/1 var(--sans); color: #1bd96a; letter-spacing: -0.02em; }
.modrinth-logo img { width: 28px; height: 28px; }
.modrinth-logo span { color: var(--graphite); }

/* ---------- Discord: die seltene Cerulean-Fläche ---------- */
.discord-wrap { padding-top: var(--section); }
.discord-wrap + .atmo { padding-top: 24px; }
.discord {
  position: relative; overflow: hidden; border-radius: 24px; background: var(--cerulean); color: #fff;
  padding: clamp(40px, 8vw, 112px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center;
  box-shadow: var(--shadow-atmo);
}
.discord .heading-lg { color: #fff; }
.discord-text { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; max-width: 560px; }
.discord-lead { font-size: 18px; line-height: 1.5; color: rgba(255, 255, 255, 0.92); }
.discord-mark { width: clamp(120px, 18vw, 240px); height: auto; color: rgba(255, 255, 255, 0.95); }
.btn-light { background: var(--paper); border-color: var(--paper); color: var(--twilight); }
@media (hover: hover) and (pointer: fine) { .btn-light:hover { background: var(--linen); } }
@media (prefers-reduced-motion: no-preference) {
  .discord.is-in .discord-mark { animation: float 6s ease-in-out 700ms infinite; }
  @keyframes float { 50% { transform: translateY(-8px) rotate(-3deg); } }
}

/* ---------- Atmosphäre ---------- */
.atmo { padding-bottom: 0; }
.atmo-panel { position: relative; border-radius: 24px; overflow: hidden; width: 100%; height: clamp(420px, 50vw, 640px); box-shadow: var(--shadow-atmo); background: #1d2a1c; }
.atmo-panel--tall { height: clamp(420px, 44vw, 560px); }
.atmo-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.atmo-card { position: absolute; left: 24px; bottom: 24px; max-width: 420px; padding: 24px; border-radius: 16px; display: flex; flex-direction: column; gap: 8px; }
.atmo-card .caption { color: var(--charcoal); }

.bleed { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: #1c2238; }
.bleed img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bleed-card { position: absolute; right: var(--gutter); bottom: var(--gutter); max-width: 460px; padding: 32px; border-radius: 24px; }

/* ---------- Mods ---------- */
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin-bottom: 56px; }
.mod-groups { display: flex; flex-direction: column; gap: 48px; }
.mod-group h3 { font: 500 18px/1.3 var(--sans); color: var(--graphite); letter-spacing: -0.01em; margin-bottom: 16px; display: flex; gap: 10px; align-items: baseline; }
.mod-group h3 span { color: var(--ash); font-weight: 400; font-size: 15px; }
.mod-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mod-grid li { min-width: 0; }
.mod > div { min-width: 0; hyphens: auto; overflow-wrap: break-word; }
.mod {
  display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; padding: 16px;
  text-decoration: none; transition: border-color 160ms ease, transform 200ms var(--ease-out);
}
.mod img { width: 48px; height: 48px; border-radius: 10px; background: var(--linen); object-fit: cover; }
.mod strong { display: block; font: 500 16px/1.3 var(--sans); color: var(--graphite); }
.mod span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.45; color: var(--charcoal); }
@media (hover: hover) and (pointer: fine) { .mod:hover { border-color: var(--blue); transform: translateY(-2px); } }

.libs { margin-top: 40px; border-top: 1px solid var(--mist); padding-top: 24px; }
.libs summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; font: 500 15px/1.3 var(--sans); color: var(--charcoal); }
.libs summary::-webkit-details-marker { display: none; }
.libs[open] summary .arrow { transform: rotate(180deg); }
.lib-list { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.lib-list a { display: inline-block; padding: 6px 12px; border: 1px solid var(--mist); border-radius: 8px; font-size: 15px; color: var(--charcoal); text-decoration: none; background: var(--paper); transition: border-color 160ms ease; }
@media (hover: hover) { .lib-list a:hover { border-color: var(--blue); } }

/* ---------- Galerie ---------- */
.gallery { columns: 3; column-gap: 12px; }
.gallery button { display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--linen); break-inside: avoid; }
.gallery img { width: 100%; height: auto; transition: transform 600ms var(--ease-out); }
@media (hover: hover) { .gallery button:hover img { transform: scale(1.03); } }
.empty { padding: 32px; display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.empty p:not(.heading-sm) { color: var(--charcoal); }
.empty a { color: var(--blue-ink); text-underline-offset: 3px; }

/* ---------- Farmen ---------- */
.farms { display: flex; flex-direction: column; gap: 12px; }
.farm { padding: 20px 24px; display: grid; gap: 6px; }
.farm-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.farm-top .heading-sm { font-size: 24px; }
.farm .coords { font-variant-numeric: tabular-nums; color: var(--charcoal); }
.farm p { color: var(--charcoal); }

/* ---------- Footer ---------- */
.footer { background: var(--paper); padding: var(--section) 0 40px; }
.footer-statement { font-size: clamp(44px, 7vw, 96px); line-height: 1.02; letter-spacing: -0.03em; max-width: 12ch; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--mist); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { font-size: 15px; color: var(--charcoal); text-decoration: none; }
@media (hover: hover) { .footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; } }
.footer-legal { margin-top: 32px; max-width: 80ch; }

/* ---------- Dialoge ---------- */
.dialog { border: 0; padding: 0; border-radius: 24px; background: var(--paper); color: var(--ink); width: min(560px, calc(100% - 32px)); box-shadow: rgba(0,0,0,.18) 0 24px 60px; }
.dialog::backdrop { background: rgba(31, 31, 41, 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog-inner { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.keys { display: flex; flex-direction: column; margin-top: 8px; }
.keys > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--mist); }
.keys dd { color: var(--graphite); }
kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--fog); border-bottom-width: 3px; border-radius: 8px; background: var(--linen);
  font: 500 15px/1 var(--sans); color: var(--twilight);
}
@media (prefers-reduced-motion: no-preference) {
  .dialog[open] { animation: dialogIn 260ms var(--ease-out); }
  @keyframes dialogIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
}

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(23, 23, 23, 0.92); }
.lightbox figure { position: absolute; inset: 64px 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.lightbox img { max-width: 100%; max-height: calc(100% - 32px); border-radius: 12px; object-fit: contain; }
.lightbox figcaption { color: var(--fog); }
.lightbox .icon-btn { position: absolute; z-index: 2; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; padding: 12px 18px; border-radius: 50px;
  background: var(--dusk); color: #fff; font: 500 15px/1 var(--sans);
  transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform 260ms var(--ease-out), visibility 0s 260ms;
}
.toast.on { transform: translate(-50%, 0); visibility: visible; transition: transform 260ms var(--ease-out); }

/* ---------- Bewegung ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .hero-img { animation: heroIn 1800ms var(--ease-out) both; }
  @keyframes heroIn { from { transform: scale(1.08); } }
  .hero-card { animation: rise 900ms var(--ease-out) 300ms both; }
  .nav { animation: drop 700ms var(--ease-out) 150ms both; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } }
  @keyframes drop { from { opacity: 0; transform: translateY(-12px); } }
  .cd-num.tick { animation: tick 400ms var(--ease-out); }
  @keyframes tick { from { opacity: .35; transform: translateY(-4px); } }
}

/* ---------- Tablet ---------- */
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-text { position: static; }
  .mod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { columns: 2; }
  .nav-links { gap: 16px; }
}

/* ---------- Telefon ---------- */
@media (max-width: 640px) {
  .nav { gap: 12px; }
  .nav-links { display: none; }
  .nav-discord { margin: 0 -4px; }
  .hero { height: auto; min-height: 100svh; display: flex; align-items: flex-end; padding: 96px 12px 12px; }
  .hero-img { object-position: 64% 50%; }
  .hero-claim { left: 54%; top: 16svh; font-size: 15vw; }
  .hero-card { position: relative; left: auto; bottom: auto; width: 100%; padding: 22px; border-radius: 20px; gap: 16px; }
  .state { gap: 16px; }
  .countdown { gap: 6px; }
  .countdown > div { padding: 10px 4px 8px; }
  .cd-unit { font-size: 12px; }
  .status { grid-template-columns: repeat(2, auto); gap: 12px 28px; }
  .hero-actions .btn-dark { width: 100%; }
  .heading-sm { font-size: 24px; }
  .mod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mod { grid-template-columns: 32px 1fr; gap: 8px; padding: 10px 8px; align-items: center; }
  .mod img { width: 32px; height: 32px; border-radius: 8px; }
  .mod strong { font-size: 13.5px; hyphens: manual; }
  .mod span { display: none; }
  .mod-groups { gap: 32px; }
  .hero .glass { background: rgba(254, 255, 252, 0.86); }
  .gallery { columns: 1; }
  .atmo-panel, .atmo-panel--tall { height: 520px; border-radius: 20px; }
  .atmo-card { left: 12px; right: 12px; bottom: 12px; }
  .bleed { height: 80svh; }
  .discord { grid-template-columns: 1fr; padding: 32px 24px; border-radius: 20px; gap: 28px; }
  .discord-mark { order: -1; width: 72px; }
  .bleed-card { left: 12px; right: 12px; bottom: 12px; padding: 24px; }
  .keys > div { grid-template-columns: 96px 1fr; }
  .lightbox figure { inset: 64px 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; translate: none; }
}
