/* ===== Mythos Client – Download-Seite ===== */
/* Schriften liegen auf unserem Server (keine Google-Fonts, keine externen Anfragen, keine Cookies). */

@font-face { font-family: 'MinecraftFive'; src: url('fonts/minecraft-five-bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/InterVariable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b0708;
  --bg-2: #120a0c;
  --surface: #1a0f12;
  --surface-2: #241318;
  --line: #3a1a1e;
  --line-2: #5a2a2e;
  --ink: #f6ece9;
  --ink-2: #c9b0aa;
  --ink-3: #8f7570;
  --red: #e8230f;
  --red-2: #ff5a3c;
  --red-deep: #7a0f06;
  --glow: rgba(232, 35, 15, 0.38);
  --hard: 0 5px 0 rgba(0, 0, 0, 0.55);
  --font-heading: 'MinecraftFive', monospace;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
  color: var(--ink); background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(232, 35, 15, 0.20), transparent 70%),
    linear-gradient(rgba(255, 90, 60, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 90, 60, 0.045) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  background-attachment: fixed;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -120px; left: 8px; z-index: 300; padding: 10px 16px; white-space: nowrap; background: var(--red); color: #fff; font-family: var(--font-heading); }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--red-2); outline-offset: 3px; }

#embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
header, main, footer { position: relative; z-index: 1; }

/* ---- Navigation ---- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 7, 8, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 3px solid var(--line); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-m { display: block; width: 24px; height: auto; image-rendering: pixelated; }
.brand-text { position: relative; top: -5px; font-family: var(--font-heading); font-size: 1.15rem; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink); text-shadow: 2px 2px 0 #000; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { padding: 8px 14px; font-size: 0.95rem; font-weight: 600; color: var(--ink-2); text-decoration: none; border: 2px solid transparent; transition: color .15s, border-color .15s, background .15s; }
.nav-links a:hover { color: #fff; border-color: var(--line-2); background: var(--surface); }

/* ---- Knöpfe ---- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; font-family: var(--font-heading); font-size: 1.05rem; letter-spacing: 1px; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: #fff; border: 3px solid; border-radius: 0; cursor: pointer; overflow: hidden;
  transition: transform .12s var(--ease), filter .15s, box-shadow .15s;
}
.btn:active { transform: translateY(3px); }
.btn-label { position: relative; z-index: 1; }

.btn-lava {
  isolation: isolate; margin-top: 30px; padding: 17px 38px; font-size: 1.2rem;
  text-shadow: 2px 2px 0 #3a0600;
  background-color: #d02010; background-image: url(images/redstone-block.png); background-size: 64px 64px; image-rendering: pixelated;
  border-color: rgba(255, 190, 170, 0.5); border-top-color: rgba(255, 210, 190, 0.75); border-left-color: rgba(255, 200, 180, 0.65);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(255, 90, 30, 0.35), var(--hard), 0 0 38px -6px var(--glow);
  animation: lava-a 34s linear infinite;
}
.btn-lava::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url(images/redstone-block.png) 0 0 / 96px 96px; image-rendering: pixelated; mix-blend-mode: multiply; opacity: 0.55;
  animation: lava-b 44s linear infinite;
}
.btn-lava:hover { filter: brightness(1.14) saturate(1.1); transform: translateY(-2px); }
@keyframes lava-a { from { background-position: 0 0; } to { background-position: 128px 64px; } }
@keyframes lava-b { from { background-position: 0 0; } to { background-position: -192px 96px; } }

/* ---- Hero ---- */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(54px, 8vw, 96px); text-align: center; }
.logo-stage { width: min(660px, 92%); margin: 0 auto 8px; }
.hero-logo {
  display: block; width: 100%; image-rendering: pixelated;
  filter: drop-shadow(0 0 28px var(--glow)) drop-shadow(0 12px 0 rgba(0, 0, 0, 0.35));
  animation: float 6s ease-in-out infinite, pulse 4.2s ease-in-out infinite;
}
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes pulse { 0%, 100% { filter: drop-shadow(0 0 22px rgba(232,35,15,.30)) drop-shadow(0 12px 0 rgba(0,0,0,.35)); } 50% { filter: drop-shadow(0 0 46px rgba(255,70,30,.55)) drop-shadow(0 12px 0 rgba(0,0,0,.35)); } }

.hero-lead { margin-top: 18px; font-size: clamp(1.2rem, 2.6vw, 1.7rem); font-weight: 700; color: var(--ink); letter-spacing: -0.2px; }
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; margin: 14px 0 0; font-size: 1rem; font-weight: 500; color: var(--ink-3); }
.hero-tags span + span::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 14px 2px; background: var(--red-2); }

/* ---- Download ---- */
.dl { padding: clamp(40px, 6vw, 72px) 0 clamp(54px, 8vw, 96px); background: linear-gradient(var(--bg-2), transparent 70%); border-top: 3px solid var(--line); position: relative; }
.dl::before { content: ''; position: absolute; left: 0; right: 0; top: -3px; height: 3px; background: linear-gradient(90deg, transparent, var(--red), transparent); opacity: .8; }
.dl-head { text-align: center; margin-bottom: 34px; }
.dl-head h2 { font-family: var(--font-heading); font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: 1px; text-transform: uppercase; text-shadow: 3px 3px 0 #000; }
.dl-head p { margin-top: 8px; color: var(--ink-2); font-size: 1.1rem; }

.os-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.os-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 14px 22px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 3px solid var(--line-2); border-top-color: #7a3a3a; border-left-color: #6a3234; border-bottom-width: 6px;
  box-shadow: 0 18px 40px -24px #000;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.os-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(232,35,15,.18), transparent 70%); opacity: 0; transition: opacity .25s; }
.os-card:hover { transform: translateY(-6px); border-color: var(--red-2); box-shadow: 0 22px 44px -22px var(--glow); }
.os-card:hover::after { opacity: 1; }
.os-icon { width: 80px; height: 80px; margin-bottom: 18px; image-rendering: pixelated; filter: drop-shadow(0 6px 0 rgba(0,0,0,.45)); transition: transform .25s var(--ease); }
.os-card:hover .os-icon { animation: bob .7s steps(4) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.os-card h3 { font-family: var(--font-heading); font-size: 1.45rem; letter-spacing: .6px; text-transform: uppercase; text-shadow: 2px 2px 0 #000; }
.os-sub { margin: 4px 0 20px; min-height: 3em; font-size: .95rem; color: var(--ink-3); }

.os-ribbon { display: none; position: absolute; top: -3px; left: 50%; transform: translate(-50%, -100%); padding: 3px 12px; font-family: var(--font-heading); font-size: .72rem; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; color: #fff; background: var(--red); border: 2px solid var(--red-2); }
.os-card.is-yours { border-color: var(--red-2); box-shadow: 0 0 0 1px var(--red-deep), 0 18px 44px -20px var(--glow); margin-top: 0; }
.os-card.is-yours .os-ribbon { display: block; }

/* Download-Knopf (noch ohne Funktion) mit Tooltip */
.dl-wrap { position: relative; display: block; margin-top: auto; width: 100%; }
.btn-dl {
  width: 100%; padding: 13px 10px; font-size: 1rem; cursor: not-allowed;
  background: #3a1a1c; border-color: #5a2a2e; border-top-color: #7a3a3c; color: #d9bcb6; text-shadow: 2px 2px 0 #000;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.35), var(--hard);
}
.btn-dl:active { transform: none; }
.os-card.is-yours .btn-dl { border-color: #8a3a34; }
.dl-wrap::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translate(-50%, 6px); z-index: 20;
  width: max-content; max-width: 220px; padding: 9px 13px; font-size: .85rem; font-weight: 600; line-height: 1.35; text-align: center; white-space: normal;
  color: #fff; background: #000; border: 2px solid var(--red-2); box-shadow: 0 8px 22px -6px #000, 0 0 18px -4px var(--glow);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s, transform .15s var(--ease), visibility .15s;
}
.dl-wrap::before {
  content: ''; position: absolute; left: 50%; bottom: calc(100% + 5px); z-index: 21; width: 10px; height: 10px; background: #000;
  border-right: 2px solid var(--red-2); border-bottom: 2px solid var(--red-2); transform: translate(-50%, 6px) rotate(45deg);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s, transform .15s var(--ease), visibility .15s;
}
.dl-wrap:hover::after, .dl-wrap:focus-within::after, .dl-wrap.tip::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dl-wrap:hover::before, .dl-wrap:focus-within::before, .dl-wrap.tip::before { opacity: 1; visibility: visible; transform: translate(-50%, 0) rotate(45deg); }

/* ---- Fuß ---- */
.foot { border-top: 3px solid var(--line); background: var(--bg); }
.foot-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 30px; padding: 22px 0 26px; }
.brand-sm .brand-text { top: -4px; font-size: .95rem; color: var(--ink-2); }
.foot-note { flex: 1 1 340px; max-width: 560px; font-size: .8rem; line-height: 1.5; color: var(--ink-3); }
.foot-links { display: flex; gap: 18px; }
.foot-links a { font-size: .9rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: #fff; text-decoration: underline; }

/* ---- Einblenden beim Scrollen ---- */
html.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: var(--d, 0ms); }
html.js [data-reveal].in { opacity: 1; transform: none; }
html.js .os-card[data-reveal].in:hover { transform: translateY(-6px); }

/* ---- Responsiv ---- */
@media (max-width: 1100px) {
  .os-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .os-card { grid-column: span 2; }
  .os-card:nth-child(4) { grid-column: 2 / span 2; }
  .os-card:nth-child(5) { grid-column: 4 / span 2; }
}
@media (max-width: 720px) {
  .os-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .os-card, .os-card:nth-child(4), .os-card:nth-child(5) { grid-column: auto; }
  .os-card:nth-child(5) { grid-column: 1 / -1; width: calc(50% - 7px); margin-inline: auto; }
  .os-card { padding: 26px 10px 18px; }
  .os-icon { width: 64px; height: 64px; }
  .os-card h3 { font-size: 1.15rem; }
  .os-sub { font-size: .85rem; }
  .btn-dl { font-size: .9rem; }
  .nav-back { display: none; }
  .dl-wrap::after { max-width: 150px; }
}
@media (max-width: 420px) {
  .wrap { width: calc(100% - 32px); }
  .brand-text { font-size: 1rem; }
  .btn-lava { padding: 15px 26px; font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js [data-reveal] { opacity: 1; transform: none; }
  #embers { display: none; }
}
