/* Infinimon – Webseite
   Farben 1:1 aus dem Spiel (scripts/ui_style.gd, scripts/monster_role.gd),
   damit Seite und App wie aus einem Guss wirken. */

:root {
  --bg: #0b1220;
  --surface: #131d2e;
  --surface-hi: #1a2740;
  --raised: #243552;
  --border: #26354f;
  --text: #eef2f8;
  --text-muted: #8d9ab0;
  --text-dim: #5c687d;
  --accent: #3be39b;
  --on-accent: #05241a;
  --mp: #2fa8ff;
  --gold: #f5b94a;
  --gold-hi: #ffe08a;
  --gold-lo: #d9771a;
  --danger: #f26d6d;

  --role-tank: #5b8dd9;
  --role-support: #9ede4a;
  --role-phys: #ffb373;
  --role-mag: #b07cff;

  --radius-card: 16px;
  --radius-button: 12px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-title: "Cinzel Decorative", "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7ff0bf; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Kopfzeile ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(38, 53, 79, 0.6);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px var(--border); }
.brand span {
  font-family: var(--font-title); font-weight: 900; font-size: 19px; letter-spacing: 0.06em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 600;
  padding: 8px 12px; border-radius: 10px;
}
.nav a:hover { color: var(--text); background: var(--surface-hi); }
.nav .btn { margin-left: 8px; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); color: var(--text);
  width: 42px; height: 42px; border-radius: 10px; cursor: pointer; font-size: 20px; line-height: 1;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px var(--gutter) 16px;
    background: rgba(11, 18, 32, 0.97);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; font-size: 16px; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Knöpfe ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-button);
  font-weight: 700; font-size: 16px; text-decoration: none; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 24px rgba(59, 227, 155, 0.28); }
.btn-primary:hover { color: var(--on-accent); background: #5cf0b0; box-shadow: 0 8px 30px rgba(59, 227, 155, 0.4); }
.btn-secondary { background: var(--surface-hi); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { color: var(--text); background: var(--raised); }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(238, 242, 248, 0.25); }
.btn-ghost:hover { color: var(--text); border-color: rgba(238, 242, 248, 0.5); }
.nav .btn-primary { padding: 9px 16px; font-size: 15px; color: var(--on-accent); }
.nav .btn-primary:hover { background: #5cf0b0; }

.btn small { font-weight: 600; opacity: 0.7; font-size: 12px; }

/* ---------- Hero ---------- */

.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40px; z-index: -2;
  background: url("../img/hero-bg.webp") center 30% / cover no-repeat;
  filter: blur(6px) saturate(1.15);
  opacity: 0.55;
  /* weich ins Seiten-Blau auslaufen lassen, sonst bleibt unten eine Kante */
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent calc(100% - 40px));
  mask-image: linear-gradient(180deg, #000 55%, transparent calc(100% - 40px));
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 70% 35%, rgba(47, 168, 255, 0.18), transparent 70%),
    radial-gradient(40% 40% at 20% 70%, rgba(176, 124, 255, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(11, 18, 32, 0.55) 0%, rgba(11, 18, 32, 0.7) 55%, var(--bg) 96%);
}

.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center;
  padding-top: clamp(48px, 9vh, 110px); padding-bottom: clamp(56px, 10vh, 120px);
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(59, 227, 155, 0.12); border: 1px solid rgba(59, 227, 155, 0.4);
  color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.pill::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent); animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .pill::before { animation: none; } }

.title {
  margin: 18px 0 6px;
  font-family: var(--font-title); font-weight: 900;
  /* max. 76px: breiter passt „INFINIMON" nicht mehr in die linke Hero-Spalte */
  font-size: clamp(40px, 6.4vw, 76px); line-height: 0.95; white-space: nowrap; letter-spacing: 0.03em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 42%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1.5px rgba(40, 14, 40, 0.55);
  filter: drop-shadow(0 4px 0 #1b0f22) drop-shadow(0 0 28px rgba(245, 185, 74, 0.35));
}

.tagline {
  margin: 0 0 22px; color: var(--text); font-size: clamp(15px, 2vw, 19px);
  letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600;
}
.tagline span { color: var(--gold); padding: 0 0.3em; }

.lead { margin: 0 0 30px; max-width: 34em; color: #c9d2e0; font-size: clamp(17px, 1.6vw, 19px); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.phone {
  justify-self: center; position: relative;
  width: min(100%, 320px); aspect-ratio: 9 / 16;
  border-radius: 34px; padding: 10px;
  background: linear-gradient(160deg, #2a3a57, #111a2a);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 120px rgba(47, 168, 255, 0.22);
  transform: rotate(3deg);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 40px; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  /* Schmal: Querformat-Ausschnitt ohne den (schon als Titel sichtbaren) Schriftzug */
  .phone { width: min(100%, 440px); aspect-ratio: 4 / 3; border-radius: 26px; padding: 8px; transform: none; }
  .phone img { border-radius: 20px; object-position: center 68%; }
}

/* ---------- Abschnitte ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, rgba(19, 29, 46, 0), rgba(19, 29, 46, 0.75) 12%, rgba(19, 29, 46, 0.75) 88%, rgba(19, 29, 46, 0)); }

.section-head { max-width: 680px; margin: 0 0 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 10px; }
.section h2 {
  margin: 0 0 14px; font-size: clamp(30px, 4.2vw, 44px); line-height: 1.12; letter-spacing: -0.01em;
}
.section-head p { margin: 0; color: var(--text-muted); font-size: 18px; }

/* Feature-Karten */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 24px;
}
.feature { position: relative; overflow: hidden; }
.feature-icon {
  width: 64px; height: 64px; border-radius: 14px; margin-bottom: 16px;
  box-shadow: 0 0 0 1px var(--border), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.feature h3 { margin: 0 0 8px; font-size: 20px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 16px; }

/* Monster-Galerie */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 28px; }
.filter button {
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  padding: 8px 14px; border-radius: 999px;
  color: var(--text-muted); background: var(--surface); border: 1px solid var(--border);
}
.filter button:hover { color: var(--text); }
.filter button[aria-pressed="true"] { color: var(--text); background: var(--raised); border-color: var(--c, var(--text-muted)); box-shadow: inset 0 0 0 1px var(--c, transparent); }
.filter .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; }

.monsters { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 12px; }
.monster {
  --c: var(--text-dim);
  margin: 0; background: var(--surface); border-radius: 14px; overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--c) 70%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 18%, transparent);
  transition: transform 0.15s ease;
}
.monster:hover { transform: translateY(-3px); }
.monster img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.monster figcaption { padding: 8px 10px 10px; font-size: 14px; font-weight: 700; line-height: 1.25; hyphens: auto; overflow-wrap: break-word; }
.monster .roles { display: flex; gap: 4px; margin-top: 5px; }
.monster .roles i { width: 22px; height: 4px; border-radius: 2px; background: var(--r); }
.monster[hidden] { display: none; }

.r-tank { --r: var(--role-tank); }
.r-support { --r: var(--role-support); }
.r-phys { --r: var(--role-phys); }
.r-mag { --r: var(--role-mag); }

.gallery-note { margin: 20px 0 0; color: var(--text-dim); font-size: 14px; }

/* Zonen */
.zones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .zones { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .zones { grid-template-columns: 1fr; } }

.zone { position: relative; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.zone img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.4s ease; }
.zone:hover img { transform: scale(1.05); }
.zone-body {
  position: absolute; inset: auto 0 0 0; padding: 48px 16px 16px;
  background: linear-gradient(180deg, transparent, rgba(8, 12, 22, 0.94) 55%);
}
.zone-level { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.zone h3 { margin: 2px 0 2px; font-size: 20px; }
.zone p { margin: 0; color: var(--text-muted); font-size: 14px; }

.more-strip {
  margin-top: 16px; display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: var(--radius-card);
  background: linear-gradient(90deg, rgba(245, 185, 74, 0.12), rgba(176, 124, 255, 0.1));
  border: 1px solid rgba(245, 185, 74, 0.3);
}
.more-strip img { width: 56px; height: 56px; border-radius: 12px; flex: none; }
.more-strip p { margin: 0; color: #d5dcea; font-size: 16px; }
.more-strip strong { color: var(--text); }

/* Dorf */
.village { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
@media (max-width: 900px) { .village { grid-template-columns: minmax(0, 1fr); } }
.buildings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.building { margin: 0; text-align: center; }
.building img { width: 100%; aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.building figcaption { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); line-height: 1.25; hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 520px) { .buildings { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.checklist { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; color: #d5dcea; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 6px;
  background: rgba(59, 227, 155, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%233be39b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  border: 1px solid rgba(59, 227, 155, 0.45);
}

/* Spielen / Plattformen */
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .platforms { grid-template-columns: 1fr; } }
.platform { display: flex; flex-direction: column; gap: 10px; }
.platform-icon { font-size: 30px; line-height: 1; }
.platform h3 { margin: 0; font-size: 21px; }
.platform p { margin: 0 0 8px; color: var(--text-muted); font-size: 16px; flex: 1; }
.platform .btn { align-self: flex-start; }
.status { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.platform-discord { border-color: rgba(88, 101, 242, 0.55); background: linear-gradient(160deg, rgba(88, 101, 242, 0.16), var(--surface) 60%); }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #6d78f5; color: #fff; }

/* ---------- Fußzeile ---------- */

.site-footer { border-top: 1px solid var(--border); padding: 36px 0 44px; color: var(--text-dim); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Textseiten (Impressum, Datenschutz, 404) ---------- */

.page { padding: clamp(48px, 8vw, 88px) 0; }
.page .wrap { max-width: 780px; }
.page h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.1; margin: 0 0 24px; }
.page h2 { font-size: 22px; margin: 36px 0 10px; }
.page h3 { font-size: 18px; margin: 26px 0 8px; color: var(--text); }
.page p, .page li { color: #d0d8e5; }
.page ul { padding-left: 1.2em; }
.page li { margin: 6px 0; }
.page li::marker { color: var(--accent); }
.page .summary { margin: 28px 0 8px; }
.page .summary h2 { margin-top: 0; font-size: 19px; }
.page .summary ul { margin-bottom: 0; }
.page .stand { color: var(--text-dim); margin-top: 40px; font-size: 15px; }
.todo {
  border: 1px dashed var(--gold); background: rgba(245, 185, 74, 0.08); color: var(--gold);
  border-radius: 12px; padding: 12px 16px; font-size: 15px;
}
.center-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }
