/* =========================================================
   Baglyade World · Macito Design System (Pixel-Look)
   ========================================================= */

@font-face { font-family: "Pixelta"; src: url("../fonts/Pixelta.ttf") format("truetype"); font-weight: 400; font-display: block; }
@font-face { font-family: "Pixeloid Sans"; src: url("../fonts/PixeloidSans.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixeloid Sans"; src: url("../fonts/PixeloidSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --green: #00FF00;
  --green-hover: #00CC00;
  --green-dark: #006600;
  --paper: #F5F1E6;
  --white: #FFFFFF;
  --gray-050: #F0F0F0;
  --gray-200: #CCCCCC;
  --gray-400: #999999;
  --gray-600: #666666;
  --ink: #333333;
  --night: #1A1A1A;

  --font-display: "Pixelta", "Pixeloid Sans", monospace;
  --font: "Pixeloid Sans", ui-monospace, monospace;

  --elev-1: 2px 2px 0 0 var(--gray-200);
  --elev-2: 4px 4px 0 0 var(--gray-400);
  --elev-3: 6px 6px 0 0 var(--gray-600);
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--green);
  --snap: steps(2, end);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: none; font-smooth: never; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--font); letter-spacing: .04em; }
img { image-rendering: pixelated; max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
a { color: var(--green-dark); text-underline-offset: 3px; }
a:hover { color: var(--night); }
:focus-visible { outline: none; box-shadow: var(--focus); }
::selection { background: var(--green); color: var(--night); }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: min(100vh, 720px);
  min-height: 520px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  border-bottom: 2px solid var(--night);
  background: var(--night);
}
.hero__bg, .hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__bg img { object-fit: cover; transform-origin: 60% 40%; animation: bw-pan 32s ease-in-out infinite alternate; }

@keyframes bw-pan {
  from { transform: scale(1.04) translate(0, 0); }
  to   { transform: scale(1.16) translate(-2.5%, 1.5%); }
}

/* fallende Pixel-Blüten */
.hero__petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute; top: -24px; left: var(--x);
  animation: bw-fall var(--d) linear var(--delay) infinite;
}
.petal i {
  display: block; width: var(--s); height: var(--s);
  background: var(--c);
  box-shadow: calc(var(--s) / 2) calc(var(--s) / 2) 0 0 rgba(26, 26, 26, .25);
  animation: bw-sway var(--sway) steps(4, end) infinite alternate;
}
@keyframes bw-fall {
  from { transform: translateY(-5vh); }
  to   { transform: translateY(calc(min(100vh, 720px) + 40px)); }
}
@keyframes bw-sway {
  0%   { transform: translateX(-16px) rotate(0deg); }
  100% { transform: translateX(16px) rotate(90deg); }
}

.hero__content { position: relative; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }

.logo {
  display: flex; flex-direction: column;
  background: var(--night);
  border: 2px solid var(--night);
  box-shadow: 8px 8px 0 0 var(--green);
  animation: bw-drop 480ms steps(4, end) both, bw-glow 2.4s var(--snap) 1.2s infinite;
}
@keyframes bw-drop {
  0%   { transform: translateY(-48px); visibility: hidden; }
  1%   { visibility: visible; }
  100% { transform: translateY(0); }
}
@keyframes bw-glow {
  0%, 70%  { box-shadow: 8px 8px 0 0 var(--green); }
  85%      { box-shadow: 12px 12px 0 0 var(--green); }
  100%     { box-shadow: 8px 8px 0 0 var(--green); }
}
.logo__top { display: flex; align-items: center; gap: 24px; padding: 32px 40px 24px; }
.logo__block { flex: none; width: clamp(40px, 6vw, 64px); height: auto; animation: bw-hop 1.4s steps(2, end) infinite; }
@keyframes bw-hop {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.logo__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(40px, 8vw, 96px); line-height: 1;
  letter-spacing: .1em; text-transform: uppercase; color: var(--white);
}
.logo__world {
  display: flex; align-items: center; justify-content: center; gap: .6em;
  background: var(--green); color: var(--night);
  border-top: 2px solid var(--night);
  padding: 10px 16px;
  font-weight: 700; font-size: clamp(20px, 3vw, 32px); text-transform: uppercase;
}
.logo__world span:not(.logo__cursor) { animation: bw-type 1ms linear both; }
.logo__world span:nth-child(1) { animation-delay: .6s; }
.logo__world span:nth-child(2) { animation-delay: .75s; }
.logo__world span:nth-child(3) { animation-delay: .9s; }
.logo__world span:nth-child(4) { animation-delay: 1.05s; }
.logo__world span:nth-child(5) { animation-delay: 1.2s; }
@keyframes bw-type { from { visibility: hidden; } to { visibility: visible; } }
.logo__cursor { width: .55em; height: .9em; background: var(--night); margin-left: -.3em; animation: bw-blink 1s var(--snap) infinite; }
@keyframes bw-blink { 50% { visibility: hidden; } }

.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 0 var(--ink);
  padding: 8px 16px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  animation: bw-drop 480ms steps(4, end) .4s both;
}
.dot { width: 10px; height: 10px; background: var(--gray-400); border: 2px solid var(--ink); flex: none; }
.dot--on { background: var(--green); animation: bw-blink 1.2s var(--snap) infinite; }

.hero__scroll {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--night); color: var(--green);
  border: 2px solid var(--night); padding: 8px 12px; min-height: 44px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.hero__scroll:hover { color: var(--night); background: var(--green); }
.hero__scroll span { display: inline-block; animation: bw-hop 1s steps(2, end) infinite; }

/* ---------- NAV ---------- */
.topnav { position: sticky; top: 0; z-index: 20; background: var(--night); color: var(--white); border-bottom: 2px solid var(--night); }
.topnav__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.topnav__motd { font-size: 14px; letter-spacing: .06em; }
.topnav__motd .hl { color: var(--green); }
.topnav__links { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; font-weight: 700; }
.topnav__links a { color: var(--green); text-decoration: none; padding: 6px 8px; }
.topnav__links a:hover { background: var(--ink); color: var(--green); }

/* ---------- SECTIONS ---------- */
.main { padding-top: 64px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 96px; }
.section { display: flex; flex-direction: column; gap: 24px; scroll-margin-top: 72px; }
.section__head { display: flex; flex-direction: column; gap: 8px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; letter-spacing: .1em; }
.eyebrow__sq { width: 12px; height: 12px; background: var(--green); border: 2px solid var(--ink); }
h2 { font: 700 32px/1.1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
h3 { font: 700 20px/1.5 var(--font); letter-spacing: .03em; color: var(--night); }
.lede { font-size: 16px; color: var(--gray-600); max-width: 720px; }

/* ---------- CARD ---------- */
.card { background: var(--white); border: 2px solid var(--ink); box-shadow: var(--elev-3); }
.card__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink); color: var(--white);
  padding: 8px 16px; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.card__barlink { color: var(--green); text-decoration: none; font-size: 12px; }
.card__barlink:hover { color: var(--night); background: var(--green); }
.card__body { padding: 24px; }

.grid { display: grid; gap: 24px; }
.grid--ip { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- TILES ---------- */
.tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  width: 100%; padding: 24px; text-align: left;
  background: var(--white); color: var(--night);
  border: 2px solid var(--ink); box-shadow: var(--elev-2);
  font: inherit; letter-spacing: inherit; cursor: pointer;
}
.tile:hover, .tile:focus-visible { box-shadow: var(--focus); }
.tile:active { transform: translate(1px, 1px); box-shadow: inset 2px 2px 0 0 rgba(0,0,0,.12); }
.tile--ip { gap: 12px; padding-right: 76px; }
.tile--stat { min-height: 220px; }
.tile--hot { background: var(--green); }
.tile--stat .tile__label { padding-right: 44px; }
.tile__label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-600); }
.tile--hot .tile__label, .tile--hot .tile__note { color: var(--night); }
.tile__value { font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: .02em; }
.tile__value--ip { font-size: clamp(18px, 2.2vw, 26px); line-height: 1.3; overflow-wrap: anywhere; }
.tile__note { font-size: 14px; color: var(--gray-600); }
.tile__hint { font-size: 12px; color: var(--gray-600); }
.tile__done { display: none; font-size: 12px; font-weight: 700; background: var(--night); color: var(--green); padding: 2px 8px; }
.tile--stat .tile__done { margin-top: auto; }
.tile__icon {
  position: absolute; top: 20px; right: 20px;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--gray-050); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px;
}
.tile__icon--sm { top: 16px; right: 16px; width: 36px; height: 36px; background: var(--white); }
.tile__icon--sm svg { width: 20px; height: 20px; }
.i-check { display: none; }
.tile.is-copied .tile__hint, .tile.is-copied .i-copy { display: none; }
.tile.is-copied .tile__done, .tile.is-copied .i-check { display: inline-flex; }
.tile.is-copied .tile__icon { background: var(--green); }

/* ---------- MAP ---------- */
.map { position: relative; height: 520px; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--night); }
.map__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__bg, .map__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map__dither { position: absolute; inset: 0; background: repeating-conic-gradient(var(--night) 0% 25%, transparent 0% 50%) 50% / 4px 4px; }
.map__panel {
  position: relative; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center; background: var(--white); border: 2px solid var(--ink); box-shadow: 6px 6px 0 0 var(--green); padding: 32px 24px;
}
.map__panel p { font-size: 14px; color: var(--gray-600); }
.map__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-top: 2px solid var(--ink); background: var(--gray-050); font-size: 14px; color: var(--gray-600); }

/* ---------- BUTTON ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 24px;
  background: var(--green); color: var(--night);
  border: 2px solid var(--ink); border-radius: 4px; box-shadow: var(--elev-2);
  font: 700 16px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--green-hover); color: var(--night); box-shadow: var(--focus); }
.btn:active { transform: translate(1px, 1px); box-shadow: inset 2px 2px 0 0 rgba(0,0,0,.12); }
.btn--block { width: 100%; padding: 8px 12px; font-size: 14px; }

/* ---------- RULES TABLE ---------- */
.table-wrap { overflow-x: auto; }
.rules { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.rules th, .rules td { padding: 14px 16px; border-bottom: 1px solid var(--gray-200); text-align: left; vertical-align: top; }
.rules thead th { background: var(--gray-050); font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-600); }
.rules tbody th { font-weight: 700; width: 24%; }
.rules td:nth-child(2) { width: 18%; }
.rules tbody tr:last-child th, .rules tbody tr:last-child td { border-bottom: 0; }
.rules tbody tr:hover { background: #FAFFF5; }
.pill { display: inline-block; background: var(--night); color: var(--white); border-radius: 999px; padding: 2px 10px; font-size: 13px; white-space: nowrap; }

.rule-tip { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.tip { position: relative; flex: none; }
.tip__btn {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--green); color: var(--night); border: 2px solid var(--ink); border-radius: 4px;
  box-shadow: 2px 2px 0 0 var(--ink); font: 700 20px/1 var(--font); cursor: help;
}
.tip__btn:hover { background: var(--green-hover); }
.tip__box {
  position: absolute; right: 0; top: 52px; z-index: 5; width: 260px;
  background: var(--ink); color: var(--white); border: 2px solid var(--ink); box-shadow: 4px 4px 0 0 var(--green);
  padding: 12px 16px; font-size: 14px; line-height: 1.5;
  visibility: hidden;
}
.tip:hover .tip__box, .tip:focus-within .tip__box, .tip.is-open .tip__box { visibility: visible; }

/* ---------- DONATE ---------- */
.donate { display: flex; flex-wrap: wrap; gap: 32px; padding: 32px; }
.donate__text { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; line-height: 1.6; }
.donate__text mark { background: var(--green); color: var(--night); padding: 0 6px; font-weight: 700; }
.donate__box { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; background: var(--gray-050); border: 2px solid var(--ink); padding: 24px; }
.receipt { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.receipt li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--gray-200); padding-bottom: 8px; }
.receipt li:last-child { border-bottom: 0; padding-bottom: 0; }
.donate__url { font-size: 12px; color: var(--gray-600); text-align: center; }

/* ---------- FOOTER ---------- */
.footer { background: var(--night); color: var(--gray-200); border-top: 2px solid var(--night); font-size: 12px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 16px; }
.footer__by { display: flex; align-items: center; gap: 12px; }
.footer__by img { height: 28px; width: auto; }
.footer__legal { padding-bottom: 24px; color: var(--gray-400); }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translateX(-50%);
  background: var(--night); color: var(--green); border: 2px solid var(--green); box-shadow: 4px 4px 0 0 var(--green);
  padding: 10px 16px; font-size: 14px; font-weight: 700; letter-spacing: .06em;
  visibility: hidden;
}
.toast.is-visible { visibility: visible; animation: bw-drop 240ms steps(2, end); }

/* ---------- MOBIL ---------- */
@media (max-width: 640px) {
  .logo__top { padding: 20px 20px 16px; gap: 14px; }
  .main { gap: 72px; padding-top: 48px; }
  .donate { padding: 20px; }
  .map { height: 420px; }
  .topnav { position: static; }
}

/* Weniger Bewegung, wenn gewünscht */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .hero__petals { display: none; }
  html { scroll-behavior: auto; }
}
