:root {
  --field: #0b1e4a;
  --ink: #071433;
  --edge: #e6b342;
  --gold: #fad661;
  --cream: #f6e7c4;
  --quiet: #e4d3a4;
  --muted: #cbb98a;
  --cyan: #3ad7ff;
  --fire: #ff8a3d;
  --earth: #c4a15a;
  --air: #d7ecff;
  --tech: #7dffe0;
  --shadow: #b9a0ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(250, 214, 97, 0.16), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(58, 215, 255, 0.12), transparent 55%),
    var(--field);
  color: var(--cream);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 10px;
  border: 2px solid rgba(230, 179, 66, 0.45);
  border-radius: 22px;
  pointer-events: none;
  z-index: 4;
}

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: white; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(960px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 48px;
  height: 48px;
  display: block;
}

.nav { display: flex; align-items: center; gap: 8px; }

.nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
}

.langs a {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(230, 179, 66, 0.45);
  border-radius: 999px;
  color: var(--muted);
}

.page-link { margin-left: 8px; }

#fr, #en { display: none; }
body:not(:has(#en:target)) #fr { display: block; }
body:has(#en:target) #en { display: block; }
body:not(:has(#en:target)) a[href="#fr"],
body:has(#en:target) a[href="#en"] {
  background: var(--gold);
  color: #1a1204;
  border-color: var(--gold);
}
body:has(#en:target) .only-fr { display: none; }
.only-en { display: none; }
body:has(#en:target) .only-en { display: inline; }

.wrap {
  width: min(960px, calc(100% - 48px));
  margin: 0 auto;
  padding: 12px 0 64px;
}

.hero { text-align: center; padding: 12px 0 8px; }

.hero img.crest {
  width: min(280px, 70vw);
  height: auto;
  margin: 0 auto 4px;
  display: block;
}

.kicker {
  margin: 0;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 0;
  color: var(--gold);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lead {
  margin: 16px auto 0;
  max-width: 36rem;
  font-size: 1.25rem;
  color: var(--cream);
}

.elements {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 8px;
  padding: 0;
  list-style: none;
}

.elements li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(230, 179, 66, 0.4);
  border-radius: 999px;
  background: rgba(7, 20, 51, 0.72);
  color: var(--quiet);
  font-size: 0.85rem;
  font-weight: 700;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
}
.dot.water { background: var(--cyan); }
.dot.earth { background: var(--earth); }
.dot.air { background: var(--air); }
.dot.tech { background: var(--tech); }
.dot.shadow { background: var(--shadow); }

.steps, .modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.plate {
  margin: 0;
  padding: 18px 16px 16px;
  background: var(--ink);
  border: 2px solid var(--edge);
  border-radius: 22px;
}

.plate .n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1204;
  font-weight: 800;
}

h2 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.plate p, .legal p, .legal li { margin: 0; color: var(--quiet); }
.plate p + p { margin-top: 8px; }

.note {
  margin: 0;
  text-align: center;
  color: var(--muted);
}

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

a.store {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border: 2px solid var(--edge);
  border-radius: 999px;
  background: var(--gold);
  color: #1a1204;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

a.store:hover { background: white; color: #1a1204; }

.legal { max-width: 42rem; margin: 12px auto 0; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); text-align: left; }
.legal .updated { margin-top: 12px; color: var(--muted); }
.legal h2 { margin-top: 28px; font-size: 1rem; }
.legal p { margin-top: 10px; }
.legal ul { margin: 10px 0 0; padding-left: 1.1rem; }
.legal li { margin-top: 8px; }
.legal strong { color: var(--cream); }
.legal code { color: var(--gold); font-size: 0.92em; }

@media (max-width: 800px) {
  body::before { inset: 6px; border-radius: 16px; }
  .top, .wrap { width: min(960px, calc(100% - 28px)); }
  .steps, .modes { grid-template-columns: 1fr; }
  .top { align-items: flex-start; }
  .nav { flex-wrap: wrap; justify-content: flex-end; }
}
