/* Shared styles for Fjordsaga's standalone legal/info pages (AGB, Impressum,
   Spielregeln, Datenschutz, Widerrufsbelehrung, Presse, and their /en/
   counterparts). These pages sit outside the React app, so this file
   deliberately duplicates the relevant pieces of the app's own
   design language (web/src/styles.css) rather than importing it — same
   fonts, color tokens, header treatment and prose spacing as the in-game
   Hilfe page, kept in sync by hand. */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 300 640;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("/assets/fonts/alegreya-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("/assets/fonts/alegreya-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --water: #0c1920;
  --panel: #15242b;
  --panel2: #1c3039;
  --line: #2b444e;
  --ink: #d8e2e0;
  --dim: #8ca29f;
  --gold: #d9a441;
  --gold2: #f0c469;
  --rune: #e9dcb4;
  --radius: 3px;
}

* { box-sizing: border-box; }

/* Same background recipe as .frontpage (the landing/auth page) rather than
   the plain `body` rule used by the app's short dashboard screens — these
   legal pages are long, single scrolling documents like the landing page,
   not a fixed-viewport game shell. Only the image layer is attachment:
   fixed; the gradient on top of it is normal (scroll) attachment, so it's
   sized to the full PAGE height and actually fades to solid dark near the
   bottom of the document — that's what visually grounds the footer, a
   viewport-relative gradient wouldn't do that on a page taller than one
   screen (code review: the first version of this file used the viewport-
   relative version, which left the footer floating on bare map artwork
   with nothing anchoring it). */
body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(4, 12, 16, 0.12) 0%, rgba(4, 10, 13, 0.62) 74%, #081116 100%),
    url("/assets/backgrounds/fjord-map.webp") center 22% / cover fixed,
    #0a171d;
  color: var(--ink);
  font-family: "Alegreya Sans", system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* ---------- Header (matches .frontpage-header / HilfeStandaloneScreen) ---------- */
.legal-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
  padding: 0 max(20px, calc((100vw - 900px) / 2));
  background: linear-gradient(180deg, rgba(8, 18, 23, 0.96), rgba(8, 18, 23, 0.78));
  border-bottom: 1px solid rgba(217, 164, 65, 0.38);
  box-shadow: 0 7px 24px rgba(0, 0, 0, 0.34);
}
.legal-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 4px;
  background: linear-gradient(90deg, transparent, #7b5b26 15%, #d9a441 50%, #7b5b26 85%, transparent);
  opacity: 0.58;
}
.legal-header > a:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #eee3c6;
  text-decoration: none;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 24px;
  text-shadow: 0 2px 10px #000;
}
.legal-header .rune {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #96712f;
  transform: rotate(45deg);
  color: var(--gold2);
  background: rgba(41, 31, 19, 0.72);
  font-size: 18px;
  flex: none;
}
.legal-header .rune::first-letter {
  display: inline-block;
  transform: rotate(-45deg);
}
/* A chip, not a bare link — same visual weight as the in-game language
   <select> (.language-select select), even though this is a cross-link
   between two static pages rather than a live switcher. */
.language-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  text-decoration: none;
}
.language-link:hover { color: var(--gold2); border-color: var(--gold); }

/* ---------- Content window (matches .view-wrap's "framed parchment"
   look: dark gradient, faint vertical hatching, soft outer shadow) ---------- */
main {
  max-width: 900px;
  margin: 40px auto 80px;
  padding: 32px 36px 40px;
  background:
    linear-gradient(180deg, rgba(13, 32, 39, 0.91), rgba(8, 24, 30, 0.94)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px);
  border: 1px solid rgba(73, 105, 113, 0.48);
  border-radius: var(--radius);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    inset 0 0 60px rgba(0, 0, 0, 0.12);
}
@media (max-width: 640px) {
  main {
    margin: 20px 12px 60px;
    padding: 22px 18px 28px;
  }
  /* A fixed background can be janky/heavy on mobile browsers — drop it to
     normal scrolling there, same as the app's own body rule does. */
  body {
    background-attachment: scroll;
  }
}

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 460;
  font-optical-sizing: auto;
}
h1 {
  color: var(--gold2);
  font-size: 32px;
  font-weight: 540;
  margin-bottom: 4px;
}
.updated {
  color: var(--dim);
  font-size: 13px;
  margin-bottom: 32px;
}
h2 {
  color: var(--rune);
  font-size: 21px;
  margin-top: 34px;
  margin-bottom: 8px;
}
h3 {
  color: var(--ink);
  font-size: 16px;
  margin-top: 20px;
  margin-bottom: 8px;
}
p, li { color: var(--ink); }
p {
  margin: 10px 0;
  line-height: 1.55;
}
a { color: var(--gold); }
a:hover { color: var(--gold2); }
ul, ol {
  margin: 10px 0;
  padding-left: 22px;
}
li {
  margin-bottom: 6px;
  line-height: 1.55;
}
.placeholder {
  background: rgba(216, 84, 63, 0.14);
  border: 1px dashed #b8503f;
  color: #f0b3a6;
  padding: 2px 6px;
  border-radius: var(--radius);
  font-size: 0.95em;
}
.hint {
  margin-top: 44px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  color: var(--dim);
  font-size: 13px;
}
/* Same look as the in-game header's "Zurück zur Startseite" button
   (.frontpage-header-login) — a real button, not a bare text link. */
.back-link {
  display: inline-flex;
  align-items: center;
  margin-top: 36px;
  padding: 9px 18px;
  color: #ebd9aa;
  background: rgba(61, 44, 22, 0.7);
  border: 1px solid #7a5d2b;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 14px;
}
.back-link:hover { border-color: var(--gold); color: var(--gold2); }

/* ---------- Footer (matches .frontpage-footer, the same footer used on
   the landing/auth page) ---------- */
.frontpage-footer {
  min-height: 88px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  color: #6f8381;
  font-size: 13px;
}
.frontpage-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.frontpage-footer nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.frontpage-footer a {
  color: #c7d0cc;
  text-decoration: none;
  font-size: 14px;
}
.frontpage-footer a:hover { color: var(--gold2); }
.footer-discord {
  display: flex;
  color: #6f8381;
  transition: color 0.15s ease;
}
.footer-discord:hover { color: #5865f2; }
@media (max-width: 640px) {
  .frontpage-footer {
    padding: 22px 18px;
    flex-direction: column;
    min-height: 0;
  }
}
