/*
  Azura Roleplay · gemeinsames Designsystem (alle Seiten)
  Stil: Loadingscreen- und Menü-Stil aus CLAUDE.md Abschnitt 3 (Mint, Teal, Tiefgrün, Jost,
  flache und spitze Hexagone, schräge Plaketten, Chevron-Banner, Segment-Balken, Teal-Glas).
  Formen: Original-SVGs aus [test]/loadingscreen/web/public/images/ in assets/img/shapes/.
  Regeln: kein backdrop-filter, kein filter: blur(), Animation nur über transform und opacity.
*/

@font-face {
  font-family: "Jost";
  src: url(../fonts/jost-latin-wght-normal.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  src: url(../fonts/jost-latin-ext-wght-normal.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Ersatzschrift mit angeglichenen Metriken gegen Layout-Sprünge beim Schriftwechsel */
@font-face {
  font-family: "Jost Fallback";
  src: local("Arial");
  size-adjust: 96%;
  ascent-override: 106%;
  descent-override: 37%;
  line-gap-override: 0%;
}

:root {
  --mint: #00f8b9;
  --teal: #02e1a9;
  --glow: #07bd8f;
  --deep: #003427;
  --deep-2: #00513d;
  --hover: #13ffc4;
  --text: rgb(220, 220, 220);
  --head: #fff;
  --ice: #c2f1ff;
  --body: #cbdeeb;
  --sec: #dbdbdb;
  --muted: rgba(203, 222, 235, 0.68);
  --bg: #0b0e12;
  --bg-2: #0e1015;
  --online: rgb(35, 165, 90);

  --font: "Jost", "Jost Fallback", system-ui, sans-serif;
  --skew: -29deg;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(20px, 4.2vw, 80px);
  --maxw: 1440px;
  --nav-h: 76px;

  --shape: url(../img/shapes/);
  --hex-flat: url(../img/shapes/logo-background.svg);
  --hex-pointy: url(../img/shapes/button-background.svg);
  --plaque-top: url(../img/shapes/button-top-background.svg);
  --plaque-bottom: url(../img/shapes/button-bottom-background.svg);
  --plaque-solid: url(../img/shapes/plaque-solid.svg);
  --chevron: url(../img/shapes/progress-background.svg);

  --seg-off: rgba(255, 255, 255, 0.17);
  --seg-on: radial-gradient(234.78% 142.5% at 50% -5%, #00f8b9 0%, rgba(0, 248, 185, 0) 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: clamp(16px, 0.95rem + 0.2vw, 18.5px);
  font-weight: 400;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--mint); color: #00241b; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--mint); color: #00241b; font-weight: 600; text-decoration: none; transition: transform .2s var(--ease); }
.skip:focus { transform: translateY(72px); }

/* ---------- Hintergrund: Vignette + Halbton-Punkte (statisch) ---------- */
.az-backdrop {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(158% 50% at 50% 50%, transparent 0%, rgba(14, 16, 21, 0.96) 100%),
    radial-gradient(circle at 50% 50%, rgba(0, 248, 185, 0.075) 0 1px, transparent 1.4px) 0 0 / 11px 11px,
    linear-gradient(180deg, #0b0f12 0%, #08110e 55%, #0b0e12 100%);
}
/* WebGL-Halbtonfeld (assets/js/az-field.js), liegt hinter allem Inhalt, nie über Text */
.az-field {
  position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%;
  pointer-events: none; opacity: 0; transition: opacity 0.9s ease;
}
.az-field.is-on { opacity: 1; }

/* ---------- Typografie ---------- */
.az-display {
  font-weight: 600; color: var(--head); line-height: 1.02; letter-spacing: -0.015em;
  font-size: clamp(2.5rem, 1.2rem + 5.2vw, 6.4rem);
  text-wrap: balance;
}
.az-h2 {
  font-weight: 600; color: var(--head); line-height: 1.06; letter-spacing: -0.01em;
  font-size: clamp(2rem, 1.1rem + 3.4vw, 4.4rem);
  text-wrap: balance;
}
.az-h3 { font-weight: 600; color: var(--head); line-height: 1.15; font-size: clamp(1.3rem, 1rem + 0.9vw, 1.85rem); }
.az-lead { font-size: clamp(1.06rem, 0.95rem + 0.45vw, 1.35rem); line-height: 1.55; color: var(--body); max-width: 40em; text-wrap: pretty; }
.az-text { color: var(--body); max-width: 38em; text-wrap: pretty; }
.az-text + .az-text { margin-top: 0.9em; }
.az-mint { color: var(--mint); }
.az-ice { color: var(--ice); }
.az-num { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Formen ---------- */
/* Flaches Hexagon: Identität, Logo, Kennzahlen (161:139) */
.az-hex {
  --s: 120px;
  position: relative; width: var(--s); aspect-ratio: 161 / 139; flex-shrink: 0;
  display: grid; place-items: center; text-align: center;
  background: var(--hex-flat) center / 100% 100% no-repeat;
}
.az-hex > img { width: 62%; height: auto; }
/* Spitzes Hexagon: alles Drückbare (66:73) */
.az-hexbtn {
  --s: 52px;
  position: relative; width: var(--s); aspect-ratio: 66 / 73; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  background: var(--hex-pointy) center / 100% 100% no-repeat;
  transition: filter 0.2s ease, transform 0.2s var(--ease);
}
.az-hexbtn svg { width: 38%; height: 38%; }
a.az-hexbtn:hover, button.az-hexbtn:hover, .az-cta:hover .az-hexbtn, .az-hexbtn.is-active {
  filter: brightness(125%) contrast(140%) drop-shadow(0 0 3vh #13ffc4cc);
}

/* Schräge Plaketten als 9-Slice (Schrägen fest, Mitte wächst mit), Schräge ≈ 61° */
.az-tag {
  --h: 2.25em;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  height: var(--h); padding: 0 calc(var(--h) * 0.72);
  font-size: 0.82rem; font-weight: 500; color: #fff; line-height: 1; white-space: nowrap;
  border-image: var(--plaque-top) 0 26 fill / 0 calc(var(--h) * 26 / 45) stretch;
}
.az-tag--b { border-image-source: var(--plaque-bottom); }
.az-tag--mint { color: var(--mint); }
.az-tag .az-dot { margin-right: 0.1em; }
.az-badge { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; }

/* Chevron-Banner: V-Kerbe links, Spitze rechts (Abschnittsköpfe) */
.az-chev {
  --h: 2.6em;
  display: inline-flex; align-items: center; gap: 0.6em;
  height: var(--h); padding: 0 calc(var(--h) * 0.75) 0 calc(var(--h) * 0.62);
  font-size: 0.86rem; font-weight: 500; color: #fff; line-height: 1; white-space: nowrap;
  border-image: var(--chevron) 0 15 0 13 fill / 0 calc(var(--h) * 15 / 41) 0 calc(var(--h) * 13 / 41) stretch;
}
.az-chev svg { width: 1.1em; height: 1.1em; color: var(--mint); }

/* Status-Punkt */
.az-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--online); box-shadow: 0 0 8px rgba(35, 165, 90, 0.9); flex-shrink: 0; }
.az-dot--mint { background: var(--mint); box-shadow: 0 0 8px rgba(0, 248, 185, 0.8); }

/* Segment-Balken: 13 Segmente */
.az-seg { display: flex; gap: 4px; align-items: center; }
.az-seg > i { position: relative; width: 11px; height: 18px; background: var(--seg-off); flex-shrink: 0; }
.az-seg > i > b { position: absolute; inset: 0; background: var(--seg-on); opacity: 0; transition: opacity 0.25s ease; }
.az-seg > i.on > b { opacity: 1; }
html:not(.js) .az-seg[data-static-fill] > i > b, html:not(.fx) .az-seg[data-static-fill] > i > b { opacity: 1; }

/* Teal-Glas: volles Glas + Glow nur für den Fokus-Inhalt */
.az-glass {
  position: relative; border-radius: 10px;
  background: radial-gradient(124.3% 11233.57% at 0.03% 50%, rgba(2, 225, 169, 0.35) 0%, rgba(0, 0, 0, 0.35) 100%);
  box-shadow: 0 0 3vh #07bd8f6e;
}
.az-glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border: 1px solid #00f8ba8e;
  -webkit-mask: radial-gradient(circle at 50% 0, transparent, #00f8ba86);
  mask: radial-gradient(circle at 50% 0, transparent, #00f8ba86);
}
.az-glass--quiet {
  background: radial-gradient(124.3% 11233.57% at 0.03% 50%, rgba(2, 225, 169, 0.13) 0%, rgba(0, 0, 0, 0.42) 100%);
  box-shadow: none;
}
.az-glass--quiet::after { border-color: rgba(0, 248, 186, 0.32); }

/* ---------- Aktionen: Hexagon + Plakette (wie die Navigation im Adminmenü) ----------
   Maße wie im Adminmenü (Hexagon 50 × 55, Plakette 40 hoch, 6 Abstand): Hexagon und Plakette liegen nebeneinander,
   die Plakette überlappt das Hexagon nicht. --h ist die Höhe der Plakette. */
.az-cta {
  --h: 46px;
  display: inline-flex; align-items: center; gap: calc(var(--h) * 0.15); text-decoration: none; color: #fff;
  font-weight: 500; font-size: 1.02rem; line-height: 1; white-space: nowrap;
}
.az-cta .az-hexbtn { --s: calc(var(--h) * 1.243); }
.az-cta__label {
  display: inline-flex; align-items: center; gap: 0.55em;
  height: var(--h);
  padding: 0 calc(var(--h) * 0.85) 0 calc(var(--h) * 0.7);
  border-image: var(--plaque-bottom) 0 26 fill / 0 calc(var(--h) * 26 / 45) stretch;
  transition: transform 0.25s var(--ease);
}
.az-cta__label svg { width: 1em; height: 1em; transition: transform 0.25s var(--ease); }
.az-cta:hover .az-cta__label svg { transform: translateX(4px); }
.az-cta--primary .az-cta__label { border-image-source: var(--plaque-solid); color: #00241b; font-weight: 600; }
.az-cta--primary .az-hexbtn { color: var(--mint); }
.az-cta:focus-visible { outline: none; }
.az-cta:focus-visible .az-cta__label { outline: 2px solid var(--mint); outline-offset: 4px; }
.az-ctas { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }

/* ---------- Navigation ---------- */
.az-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--pad);
}
/* Deckende Fläche hinter der Leiste, sobald gescrollt ist (Verlauf statt backdrop-filter) */
.az-nav::before {
  content: ""; position: absolute; inset: 0 0 -28px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(9, 12, 14, 0.97) 0%, rgba(9, 12, 14, 0.97) 72%, rgba(9, 12, 14, 0) 100%);
  opacity: 0; transition: opacity 0.35s ease;
}
html.is-scrolled .az-nav::before, html:not(.js) .az-nav::before, .az-nav.is-solid::before { opacity: 1; }
.az-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; }
.az-brand .az-hex { --s: 58px; }
.az-brand .az-hex > img { width: 70%; }
.az-brand__name { display: grid; gap: 1px; line-height: 1.1; }
.az-brand__name b { font-weight: 600; font-size: 1.2rem; color: #fff; }
.az-brand__name span { font-size: 0.86rem; color: var(--sec); opacity: 0.85; }
.az-menu { display: flex; align-items: center; gap: 6px; }
.az-menu a.az-tag { --h: 2.5em; font-size: 0.9rem; text-decoration: none; transition: filter 0.2s ease, color 0.2s ease; }
.az-menu a.az-tag:hover { filter: brightness(130%) contrast(130%); color: var(--mint); }
.az-menu a[aria-current="page"] { color: var(--mint); }
.az-menu .az-hexbtn { --s: 48px; margin-left: 10px; color: var(--mint); }
.az-burger { display: none; }
@media (max-width: 1080px) {
  .az-menu { display: none; }
  .az-burger { display: grid; --s: 50px; }
  .az-burger svg { width: 38%; height: 38%; }
  html.is-menu .az-menu {
    position: fixed; inset: 0; z-index: 39; display: flex; flex-direction: column; justify-content: center; align-items: stretch;
    gap: 12px; padding: calc(var(--nav-h) + 24px) var(--pad) 40px; background: rgba(8, 11, 13, 0.985);
  }
  html.is-menu .az-menu a.az-tag { --h: 3em; font-size: 1.15rem; justify-content: flex-start; padding-left: 2.2em; }
  html.is-menu .az-menu .az-hexbtn { margin: 12px auto 0; --s: 64px; }
  html.is-menu body { overflow: hidden; }
}
@media (max-width: 520px) {
  :root { --nav-h: 66px; }
  .az-brand .az-hex { --s: 48px; }
  .az-brand__name b { font-size: 1.05rem; }
  .az-brand__name span { display: none; }
}
/* Ohne JS: Menü als Liste unter der Leiste sichtbar */
html:not(.js) .az-burger { display: none; }
@media (max-width: 1080px) {
  html:not(.js) .az-nav { position: absolute; height: auto; min-height: var(--nav-h); flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  html:not(.js) .az-menu { display: flex; flex-wrap: wrap; width: 100%; }
}

/* ---------- Abschnitte ---------- */
.az-wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.az-section { position: relative; padding: clamp(80px, 12vh, 160px) 0; }
.az-head { display: grid; gap: 22px; margin-bottom: clamp(36px, 6vh, 72px); }
.az-head .az-chev { justify-self: start; }

/* Einblenden beim Scrollen (nur mit JS und Effekten; ohne bleibt alles sichtbar) */
html.fx [data-rv] { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
html.fx [data-rv].is-in { opacity: 1; transform: none; }

/* ---------- HUD-Cluster: Scroll-Fortschritt (Hexagon mit Zahl, Plaketten, Segment-Balken) ---------- */
.az-hud {
  position: fixed; left: clamp(14px, 2vw, 36px); bottom: clamp(14px, 2.4vh, 32px); z-index: 30;
  display: flex; align-items: center; pointer-events: none;
  opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s var(--ease);
}
html.fx .az-hud.is-on { opacity: 1; transform: none; }
.az-hud .az-hex { --s: 92px; }
.az-hud__pct { font-size: 1.55rem; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(0, 248, 185, 0.6); line-height: 1; min-width: 2.2ch; }
.az-hud__pct small { font-size: 0.55em; color: var(--mint); font-weight: 500; }
.az-hud__col { display: grid; gap: 4px; justify-items: start; margin-left: -34px; }
.az-hud__col .az-tag { --h: 26px; font-size: 0.72rem; min-width: 132px; }
.az-hud__bar { --h: 26px; height: var(--h); display: flex; align-items: center; padding: 0 14px 0 18px; margin-left: 14px;
  border-image: var(--chevron) 0 15 0 13 fill / 0 calc(var(--h) * 15 / 41) 0 calc(var(--h) * 13 / 41) stretch; }
.az-hud__bar .az-seg { gap: 3px; }
.az-hud__bar .az-seg > i { width: 7px; height: 12px; }
.az-hud__bottom { margin-left: -6px; }
/* Schmalere Desktops: nur der senkrechte Segment-Balken im linken Rand, damit nichts über Text liegt */
@media (max-width: 1639px) {
  .az-hud { left: 18px; top: 50%; bottom: auto; margin-top: -80px; }
  .az-hud .az-hex, .az-hud__col > .az-tag { display: none; }
  .az-hud__col { margin: 0; }
  .az-hud__bar { border-image: none; padding: 0; margin: 0; height: auto; }
  .az-hud__bar .az-seg { flex-direction: column; gap: 5px; }
  .az-hud__bar .az-seg > i { width: 5px; height: 7px; }
}
@media (max-width: 900px), (max-height: 560px) { .az-hud { display: none; } }

/* ---------- Hintergrund-Videos (Wege, Draußen, Einstieg): liegen über dem Standbild, blenden ein, sobald sie laufen.
   Laden erst in Bildnähe, laufen nur sichtbar (az-core.js), nur mit Effekten. ---------- */
.az-bgvideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.az-bgvideo.is-playing { opacity: 1; }

/* ---------- Seitenkopf der Unterseiten ---------- */
.az-pagehead { position: relative; min-height: min(78vh, 760px); display: flex; align-items: flex-end; padding: calc(var(--nav-h) + 60px) 0 clamp(50px, 8vh, 96px); overflow: hidden; isolation: isolate; }
.az-pagehead__img { position: absolute; inset: -8% 0 0 0; z-index: -2; }
.az-pagehead__img { opacity: 0.55; }
.az-pagehead__img picture, .az-pagehead__img img { width: 100%; height: 100%; }
.az-pagehead__img img { object-fit: cover; }
.az-pagehead::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(11, 14, 18, 0.95) 0%, rgba(11, 14, 18, 0.6) 55%, rgba(11, 14, 18, 0.35) 100%),
  linear-gradient(180deg, rgba(11, 14, 18, 0.2) 40%, var(--bg) 100%); }
.az-pagehead h1 { color: var(--ice); }
.az-pagehead .az-head { margin: 0; }
.az-pagehead--plain { min-height: 0; padding-bottom: 40px; }

/* ---------- Fließtext-Seiten (Recht) ---------- */
.az-prose { max-width: 820px; }
.az-prose h2 { font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.8rem); font-weight: 600; color: #fff; margin: 2.2em 0 0.6em; line-height: 1.2; }
.az-prose h3 { font-size: 1.12rem; font-weight: 600; color: #fff; margin: 1.6em 0 0.4em; }
.az-prose p, .az-prose li { color: var(--body); }
.az-prose p + p { margin-top: 0.8em; }
.az-prose ul { margin: 0.6em 0 0; display: grid; gap: 0.4em; }
.az-prose ul li { position: relative; padding-left: 1.4em; }
.az-prose ul li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; background: var(--mint); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.az-prose a { color: var(--mint); text-underline-offset: 3px; }
/* Platzhalter, die der Owner füllen muss: deutlich sichtbar */
.az-ph {
  display: inline-block; padding: 0.05em 0.5em; border: 1px dashed rgba(255, 196, 0, 0.75); color: #ffd36b;
  background: rgba(255, 196, 0, 0.08); border-radius: 3px; font-weight: 500;
}
.az-note { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px; margin: 0 0 32px; }
.az-note p { margin: 0; }
.az-note--warn { border: 1px dashed rgba(255, 196, 0, 0.6); background: rgba(255, 196, 0, 0.06); border-radius: 8px; color: #ffe2a0; }

/* ---------- Footer ---------- */
.az-footer { position: relative; padding: clamp(64px, 10vh, 120px) 0 40px; border-top: 1px solid rgba(0, 248, 185, 0.14); background: linear-gradient(180deg, rgba(0, 52, 39, 0.28), rgba(11, 14, 18, 0.98) 60%); }
.az-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.az-footer__logo { width: min(300px, 70vw); height: auto; }
.az-footer h2 { font-size: 0.82rem; font-weight: 500; color: var(--mint); margin-bottom: 14px; letter-spacing: 0.02em; }
.az-footer ul { display: grid; gap: 8px; }
.az-footer a { color: var(--body); text-decoration: none; }
.az-footer a:hover { color: var(--mint); }
.az-footer__small { margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; font-size: 0.84rem; color: var(--muted); }
@media (max-width: 900px) { .az-footer__grid { grid-template-columns: 1fr 1fr; } .az-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .az-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
