/* ============================================================
   AmberSMP — style.css
   Struktur, Masse und Button-Mechanik 1:1 von townymc.de uebernommen
   (Werte per fetch() direkt aus deren echter style.css gelesen).
   Angepasst: Farben auf Schwarz+Amber, nur eine Shop-Sektion.

   Schrift-Hinweis: townymc.de nutzt drei selbst gehostete Custom-Fonts
   (MinecraftFive fuer Buttons, NotoSansCondBlack fuer Ueberschriften,
   Minecraft/Monocraft-Mono fuer das Server-Widget). Diese Font-Dateien
   liegen nur auf ihrem Server und duerfen nicht 1:1 kopiert werden.
   Ersetzt durch lizenzfreie, optisch sehr aehnliche Google-Fonts-
   Alternativen: Press Start 2P (Pixel-Look fuer Buttons), Anton
   (kondensiert/fett fuer Ueberschriften), JetBrains Mono (fuers
   Server-Widget). Poppins fuer den Footer-Markennamen ist exakt
   identisch uebernommen, die gibt's frei auf Google Fonts.
   ============================================================ */

:root {
  --bg: #000;
  --panel: #0d0d0d;
  --panel-deep: #080808;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.26);
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.62);
  --text-muted: rgba(255, 255, 255, 0.40);
  --discord: #5865F2;
  --online: #3BA55D;
  --amber: #e8a33d;
  --nav-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Noto Sans", var(--font);
  --font-display: "Anton", var(--font-body);
  --font-mc: "Press Start 2P", monospace;
  --font-mc-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ============================================================
   MC-Buttons — face+socket 3D-Druck-Mechanik, exakt uebernommen
   ============================================================ */

.mcbtn {
  --h: 44px;
  --px: 20px;
  --sink: 6px;
  --fs: 13px;
  display: inline-flex;
  padding: 0 0 var(--sink);
  border: 2px solid var(--socket-border, rgba(255, 255, 255, 0.26));
  border-radius: 0;
  background: var(--socket);
  font-family: var(--font-mc);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, padding-bottom 0.06s ease;
}

.mcbtn:hover { background: var(--socket-hover); border-color: var(--socket-border-hover, #fff); }
.mcbtn:active { padding-bottom: 0; }

.mcbtn-face {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding-left: var(--px);
  padding-right: var(--px);
  border: 2px solid var(--face-border, rgba(255, 255, 255, 0.4));
  background: var(--face);
  color: var(--face-text, #fff);
  font-size: var(--fs);
  letter-spacing: 0.5px;
  text-shadow: var(--face-shadow, 2px 2px 0 rgba(0, 0, 0, 0.5));
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.mcbtn:hover .mcbtn-face { background: var(--face-hover); border-color: var(--face-border-hover, rgba(255, 255, 255, 0.3)); }
.mcbtn:active .mcbtn-face { height: calc(var(--h) + var(--sink)); padding-top: var(--sink); }

.mcbtn-sm { --h: 36px; --px: 14px; --fs: 11px; }

.mcbtn-amber {
  --face: var(--amber);
  --face-hover: rgba(232, 163, 61, 0.8);
  --socket: rgba(232, 163, 61, 0.4);
  --socket-hover: rgba(232, 163, 61, 0.5);
}

.mcbtn-dark {
  --face: rgba(16, 16, 16, 0.78);
  --face-hover: rgba(16, 16, 16, 0.6);
  --socket: rgba(0, 0, 0, 0.5);
  --socket-hover: rgba(0, 0, 0, 0.6);
}

.mcbtn-light {
  --face: #ffffff;
  --face-hover: rgba(255, 255, 255, 0.85);
  --face-text: var(--discord);
  --face-border: rgba(0, 0, 0, 0.2);
  --face-border-hover: rgba(0, 0, 0, 0.3);
  --face-shadow: none;
  --socket: rgba(255, 255, 255, 0.45);
  --socket-hover: rgba(255, 255, 255, 0.55);
  --socket-border: rgba(0, 0, 0, 0.2);
  --socket-border-hover: rgba(0, 0, 0, 0.35);
}

/* ============================================================
   Nav
   ============================================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: #000;
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-brand { display: flex; align-items: center; flex-shrink: 0; }
.nav-brand img { height: 38px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-family: var(--font-body);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.66);
  transition: color 0.18s ease;
}
.nav-links a:hover { color: #fff; }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}
.nav-burger span { width: 22px; height: 2px; background: #fff; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 99;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 1rem 28px 1.5rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--line); color: #fff; }
.nav-mobile-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }

@media (max-width: 860px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: flex; }
}

/* ============================================================
   Toasts
   ============================================================ */

.toasts {
  position: fixed;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--amber);
  color: #fff;
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  animation: toast-in 0.2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   Maintenance banner
   ============================================================ */

.maintenance-banner {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 90;
  background: var(--amber);
  color: #17110a;
  text-align: center;
  padding: 0.6rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ============================================================
   Reveal-on-scroll — exakt uebernommen (Timing, Klassenname)
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}
.reveal.from-left { transform: translateX(-70px); }
.reveal.from-right { transform: translateX(70px); }
.reveal.is-visible { opacity: 1; transform: translate(0, 0); }

.section { padding: 120px 0; }

/* ============================================================
   Lead (Featured News)
   ============================================================ */

.lead { padding: calc(var(--nav-h) + 70px) 0 0; }

.lead-post {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.lead-media {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: var(--panel-deep);
}
.lead-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 16px; }

.lead-body { min-width: 0; }
.lead-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.2px;
  margin-bottom: 20px;
}
.lead-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text-muted); }
.post-tag { display: inline-block; background: rgba(232, 163, 61, 0.15); color: var(--amber); font-weight: 700; padding: 0.3rem 0.7rem; }
.lead-teaser { font-size: 16px; line-height: 1.7; color: var(--text-soft); max-width: 52ch; }

.lead-empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 5rem 2rem;
  text-align: center;
  background: var(--panel-deep);
}
.lead-empty h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 0.75rem; }
.lead-empty p { color: var(--text-soft); max-width: 46ch; margin: 0 auto 1.75rem; }

@media (max-width: 760px) {
  .lead-post { grid-template-columns: 1fr; }
}

/* ============================================================
   Archive
   ============================================================ */

.archive { padding: 40px 0 100px; }

.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-bottom: 40px; }

.archive-card { display: flex; flex-direction: column; text-align: left; min-width: 0; }

.archive-media {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--panel-deep);
}
.archive-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }

.archive-card h3 { font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: -0.5px; margin-bottom: 12px; }
.archive-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text-muted); }
.archive-card p { font-size: 14.5px; line-height: 1.65; color: var(--text-soft); }

.archive-actions { text-align: center; }

@media (max-width: 860px) { .archive-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Showcase (Support/Shop)
   ============================================================ */

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 60px;
  align-items: center;
}

.showcase-title { font-size: clamp(28px, 3.6vw, 38px); font-weight: 800; line-height: 1.12; letter-spacing: -1px; margin-bottom: 18px; }
.showcase-text { font-size: 16px; line-height: 1.7; color: var(--text-soft); }
.showcase-actions { margin-top: 32px; }

.showcase-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.showcase-media svg { width: 55%; height: auto; }

@media (max-width: 760px) { .showcase { grid-template-columns: 1fr; } }

/* ============================================================
   Discord section
   ============================================================ */

.discord-section { padding: 30px 0 120px; }

.discord-banner {
  max-width: 1040px;
  margin-inline: auto;
  padding: 44px 48px;
  border-radius: 18px;
  background: var(--discord);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: 32px;
}

.discord-copy { min-width: 0; }
.discord-head { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; margin-bottom: 16px; }
.discord-mark { display: block; height: 20px; width: auto; }

.discord-status {
  display: flex; align-items: center; gap: 0.55rem;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 13px; font-weight: 600; letter-spacing: 0.2px;
}

.ping { position: relative; width: 9px; height: 9px; flex-shrink: 0; }
.ping-core, .ping-wave { position: absolute; inset: 0; border-radius: 50%; background: var(--online); }
.ping-wave { animation: ping-anim 1.9s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes ping-anim { 0% { transform: scale(1); opacity: 0.75; } 80%, 100% { transform: scale(2.6); opacity: 0; } }

.discord-banner h2 { font-size: clamp(22px, 3vw, 27px); font-weight: 800; line-height: 1.2; letter-spacing: -0.7px; margin-bottom: 8px; color: #fff; }
.discord-banner p { font-size: 14.5px; line-height: 1.6; color: rgba(255, 255, 255, 0.85); margin-bottom: 24px; }

.discord-visual {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 14px;
}
.discord-visual svg { width: 65%; height: auto; }

@media (max-width: 760px) {
  .discord-banner { grid-template-columns: 1fr; padding: 32px; }
  .discord-visual { display: none; }
}

/* ============================================================
   Closing
   ============================================================ */

.closing-banner {
  position: relative;
  overflow: hidden;
  padding: 130px 24px 120px;
  background: var(--panel-deep);
  text-align: center;
}
.closing-banner svg.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0.5; }
.closing-banner::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.42) 32%, rgba(0,0,0,0.62) 70%, rgba(0,0,0,0.92) 90%, #000 100%);
}
.closing-inner { position: relative; z-index: 2; max-width: 520px; margin: 0 auto; }
.closing-inner h2 { font-size: clamp(34px, 6vw, 60px); font-weight: 800; line-height: 1.05; letter-spacing: -1.8px; margin-bottom: 18px; text-shadow: 0 4px 24px rgba(0,0,0,0.6); }
.closing-inner p { max-width: 460px; margin: 0 auto 38px; font-size: 16px; line-height: 1.65; color: rgba(255,255,255,0.85); }

/* mc-server — echtes MC-Multiplayer-Listen-Widget */

.mc-server {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 9px;
  background: rgba(0, 0, 0, 0.66);
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-radius: 0;
  font-family: var(--font-mc-mono);
  text-align: left;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.mc-server:hover { background: rgba(255, 255, 255, 0.16); border-color: #fff; }

.mc-server-icon { width: 58px; height: 58px; flex-shrink: 0; background: #000; border: 1px solid rgba(255, 255, 255, 0.16); display: flex; align-items: center; justify-content: center; }
.mc-server-icon img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }

.mc-server-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.mc-server-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mc-server-name { font-weight: 700; font-size: 14px; }
.mc-server-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mc-server-players { font-size: 12px; color: #a8a8a8; letter-spacing: 0.4px; }

.mc-signal { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.mc-signal i { display: block; width: 3px; background: rgba(255, 255, 255, 0.22); }
.mc-signal i:nth-child(1) { height: 3px; }
.mc-signal i:nth-child(2) { height: 5px; }
.mc-signal i:nth-child(3) { height: 7px; }
.mc-signal i:nth-child(4) { height: 9px; }
.mc-signal i:nth-child(5) { height: 12px; }
.mc-signal.online i { background: #ffffff; }

.mc-server-motd { font-size: 12.5px; letter-spacing: 0.3px; color: #a8a8a8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   Footer
   ============================================================ */

.footer { background: var(--bg); padding: 76px 0 30px; }

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.65fr);
  gap: 60px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; }
.footer-brand-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-icon { width: 44px; height: 44px; object-fit: contain; }
.footer-brand-name { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; font-family: 'Poppins', sans-serif; }
.footer-tagline { max-width: 340px; font-size: 14px; line-height: 1.7; color: var(--text-muted); }

.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.footer-col h4 { font-size: 11px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { font-size: 14.5px; color: rgba(255, 255, 255, 0.78); }
.footer-col a:hover { color: var(--amber); }

.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--text-muted); }

@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; }
}

/* ============================================================
   Reduced motion / focus
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

a:focus-visible, button:focus-visible, .mc-server:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
