@font-face {
  font-family: "Grenze Gotisch";
  src: url("/assets/fonts/grenze-gotisch.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("/assets/fonts/cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("/assets/fonts/alegreya-sans.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #0b090c;
  --bg-2: #141118;
  --well: #070609;
  --ink: #f0e8d9;
  --bone: #ded4bd;
  --muted: #a39d8c;
  --gold: #e8b85c;
  --heading: #e4c78e;
  --gold-dim: #a8864e;
  --line: rgba(201, 162, 90, 0.3);
  --blood: #c9503f;
  --ok: #6a9d7a;
  --display: "Grenze Gotisch", "Cinzel", Georgia, serif;
  --label: "Cinzel", Georgia, serif;
  --body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --gutter: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --nav-h: 64px;
  --nav-control: 36px;
  color-scheme: dark;
}
@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 100% 60% at 50% -20%, rgba(120, 72, 32, 0.42) 0%, transparent 58%),
    radial-gradient(ellipse 50% 45% at 95% 85%, rgba(90, 22, 20, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 5% 70%, rgba(40, 28, 60, 0.18) 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(11, 9, 12, 0.15) 40%, rgba(11, 9, 12, 0.55) 100%);
}

img { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffd98f; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
::selection { background: rgba(232, 184, 92, 0.35); color: #fff; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--gold);
  color: #111;
  font-family: var(--label);
  font-weight: 700;
  padding: 8px 14px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 32px + env(safe-area-inset-top, 0px)) var(--gutter) 2rem;
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.wrap--wide { max-width: 760px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, rgba(11, 9, 12, 0.94), rgba(11, 9, 12, 0.7) 70%, transparent);
  backdrop-filter: blur(10px);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
}
.nav__brand img { border-radius: 50%; width: 36px; height: 36px; box-shadow: 0 0 0 1px rgba(232, 184, 92, 0.25); }
.nav__brand:hover { color: var(--heading); }
.nav__brand span.tag {
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-left: 2px;
  font-weight: 700;
}
.nav__end {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.nav__end a.nav-link {
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 6px;
}
.nav__end a.nav-link:hover { color: var(--gold); }
.nav__end form { margin: 0; display: inline; }

/* ---------- Lang toggle (header) ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  height: var(--nav-control);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(10, 8, 11, 0.55);
  font-family: var(--label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  color: inherit;
  flex-shrink: 0;
}
.lang__opt { color: var(--muted); transition: color 0.2s; }
.lang__opt.is-on { color: var(--gold); }
.lang__sep { color: var(--line); }
.lang:hover { border-color: var(--gold-dim); background: rgba(30, 22, 16, 0.65); }

/* ---------- Typography ---------- */
.kicker {
  font-family: var(--label);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-dim);
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
}
.kicker::before,
.kicker::after {
  content: "";
  background: var(--gold-dim);
  opacity: 0.7;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
}

h1 {
  font-family: var(--display);
  color: var(--heading);
  text-shadow: 0 0 48px rgba(232, 150, 60, 0.22), 0 2px rgba(0, 0, 0, 0.55);
  text-wrap: balance;
  margin: 0 0 16px;
  font-size: clamp(38px, 8vw, 56px);
  font-weight: 400;
  line-height: 1.05;
}
h1 .accent { color: var(--gold); }

.lead {
  color: var(--bone);
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

/* ---------- Home hero ---------- */
.hero {
  text-align: center;
  padding: 0.5rem 0 1.75rem;
  position: relative;
}
.hero__crest {
  display: inline-flex;
  margin: 0 auto 1.1rem;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(232, 184, 92, 0.45), rgba(80, 50, 20, 0.2));
  box-shadow: 0 0 40px rgba(232, 184, 92, 0.2), 0 12px 28px rgba(0, 0, 0, 0.4);
}
.hero__crest img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(11, 9, 12, 0.85);
}
.hero .kicker { justify-content: center; }
.hero__lead {
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.02rem, 2.2vw, 1.12rem);
}
.hero__hint {
  margin: 1rem 0 0;
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 0.25rem;
}
.hero-links .btn { min-width: min(100%, 220px); }

/* Feature cards */
.feats {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .feats { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}
.feat {
  position: relative;
  background:
    linear-gradient(165deg, rgba(232, 184, 92, 0.07), transparent 45%),
    var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1.15rem 1.1rem 1.05rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(232, 184, 92, 0.06);
  text-align: left;
}
.feat__mark {
  display: block;
  width: 8px;
  height: 8px;
  margin-bottom: 0.75rem;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(232, 184, 92, 0.45);
}
.feat__title {
  font-family: var(--label);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--heading);
  margin: 0 0 0.4rem;
}
.feat__body {
  margin: 0;
  font-size: 0.95rem;
  color: var(--bone);
  line-height: 1.45;
}

/* ---------- Card / panel ---------- */
.card {
  position: relative;
  background:
    linear-gradient(160deg, rgba(232, 184, 92, 0.07), transparent 42%),
    var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1.85rem 1.5rem 1.6rem;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 28px 64px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(232, 184, 92, 0.09);
}
.card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(201, 162, 90, 0.14);
  pointer-events: none;
  border-radius: 1px;
}
.card--form { margin-top: 0.25rem; }

/* ---------- Form ---------- */
label {
  display: block;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-dim);
  margin: 1.1rem 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: var(--well);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder { color: rgba(163, 157, 140, 0.45); }
input:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 1px rgba(232, 184, 92, 0.28), 0 0 22px rgba(232, 184, 92, 0.14);
}

.actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}
.actions a:not(.btn) {
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 0.4rem 0.2rem;
}
.actions a:not(.btn):hover { color: var(--gold); }

/* ---------- Buttons ---------- */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  font-family: var(--label);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(232, 184, 92, 0.55);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(232, 184, 92, 0.14), rgba(232, 184, 92, 0.05)),
    rgba(12, 9, 10, 0.55);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, box-shadow 0.25s, transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
button:hover,
.btn:hover,
button:focus-visible,
.btn:focus-visible {
  color: #ffe0a0;
  border-color: var(--gold);
  background-color: rgba(40, 28, 14, 0.7);
  box-shadow: 0 0 0 1px rgba(232, 184, 92, 0.15), 0 0 22px rgba(232, 184, 92, 0.18);
  transform: translateY(-1px);
  text-decoration: none;
}
button:active,
.btn:active { transform: translateY(0); }

.btn--primary,
button.btn--primary {
  color: #1a1208;
  text-shadow: none;
  border-color: #e8b85c;
  background:
    linear-gradient(180deg, #f0c978 0%, #d4a04a 55%, #b8862e 100%);
  box-shadow: 0 4px 18px rgba(232, 184, 92, 0.28), inset 0 1px 0 rgba(255, 240, 200, 0.45);
}
.btn--primary:hover,
button.btn--primary:hover,
.btn--primary:focus-visible,
button.btn--primary:focus-visible {
  color: #120c05;
  border-color: #ffd98f;
  background:
    linear-gradient(180deg, #ffd98f 0%, #e8b85c 55%, #c9983a 100%);
  box-shadow: 0 6px 24px rgba(232, 184, 92, 0.4), inset 0 1px 0 rgba(255, 248, 220, 0.55);
}

.btn-ghost,
button.btn-ghost {
  color: var(--bone);
  border-color: var(--line);
  background: rgba(10, 8, 11, 0.55);
}
.btn-ghost:hover,
button.btn-ghost:hover,
.btn-ghost:focus-visible,
button.btn-ghost:focus-visible {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: rgba(30, 22, 16, 0.7);
}

.btn--wide { width: 100%; }
.btn--small,
button.btn--small {
  min-height: 40px;
  font-size: 12px;
  padding: 0 14px;
}

/* ---------- Flash ---------- */
.flash {
  border-radius: 2px;
  padding: 0.8rem 1rem;
  margin-bottom: 1.15rem;
  font-size: 0.95rem;
  border: 1px solid;
}
.flash-error {
  background: rgba(80, 24, 20, 0.55);
  border-color: rgba(201, 80, 63, 0.55);
  color: #f0c8c0;
}
.flash-ok {
  background: rgba(30, 50, 36, 0.55);
  border-color: rgba(106, 157, 122, 0.5);
  color: #c8e0d0;
}


.hint {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}

.dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 1.15rem;
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(201, 162, 90, 0.15);
  border-bottom: 1px solid rgba(201, 162, 90, 0.15);
}
.dl dt {
  font-family: var(--label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding-top: 0.25rem;
}
.dl dd { margin: 0; word-break: break-all; color: var(--bone); }
.dl code {
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--well);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  border: 1px solid rgba(201, 162, 90, 0.12);
}

.role-pill {
  display: inline-block;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(232, 184, 92, 0.12);
  border: 1px solid rgba(232, 184, 92, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
}

/* ---------- Footer ---------- */
footer.site {
  margin-top: auto;
  padding-top: 2.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.site__row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(201, 162, 90, 0.2);
}
.site__copy {
  margin: 0;
  text-align: center;
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.7;
}
footer.site a {
  color: var(--gold-dim);
  text-decoration: none;
}
footer.site a:hover { color: var(--gold); }

@media (min-width: 520px) {
  .hero-links .btn { width: auto; }
}

@media (max-width: 420px) {
  .card { padding: 1.45rem 1.15rem 1.3rem; }
  .nav__brand span.tag { display: none; }
  .hero-links { flex-direction: column; }
  .hero-links .btn { width: 100%; min-width: 0; }
}
