

:root {
  --bg: #0b0b12;
  --bg-soft: #14141f;
  --ink: #f2efe8;
  --ink-soft: #a9a6b8;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #7c6cff;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --portal-size: min(320px, 72vw);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(124, 108, 255, 0.18), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
}

a { color: inherit; }


.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.brand-icon { display: block; border-radius: 8px; }
.brand-name { color: var(--ink-soft); }

.site-nav { display: flex; gap: clamp(0.75rem, 3vw, 2rem); margin-left: auto; }

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s;
}

.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); }


.lang { position: relative; display: none; }
.js .lang { display: block; }

.lang-button {
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: none;
  cursor: pointer;
  line-height: 0;
}

.lang-button img, .lang-list img { display: block; border-radius: 4px; }

.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 20;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.lang-list button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--ink);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.lang-list button:hover, .lang-list button:focus-visible { background: rgba(255, 255, 255, 0.08); }
.lang-list button[aria-current='true'] { color: var(--accent); }
.lang-button:focus-visible, .lang-list button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


.hero {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 7rem) 1rem 2rem;
  text-align: center;
}

.hero-kicker {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.1;
  text-wrap: balance;
}

.hero-text { margin: 0; color: var(--ink-soft); text-wrap: pretty; }


.portals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: 3rem 1rem 5rem;
}

.portal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: var(--portal-size);
  text-decoration: none;
  outline: none;
}


.portal--kalice { --portal-color: #a8165b; --portal-glow: #e8d44d; --portal-land: #3a3a3a; }
.portal--mga { --portal-color: #8a5a12; --portal-glow: #d9ab4a; --portal-land: #0d0705; }


.portal-window {
  display: block;
  width: var(--portal-size);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle, var(--portal-color), var(--portal-land) 75%);
}

.portal-window img { width: 100%; height: 100%; object-fit: cover; }


.portal-art {
  display: block;
  width: var(--portal-size);
  aspect-ratio: 1;
  overflow: visible;
}

.portal-shade {
  fill: none;
  stroke: rgba(0, 0, 0, 0.55);
  stroke-width: 10;
  filter: blur(4px);
}

.portal-thread {
  opacity: 0.85;
  transition: opacity 0.3s;
}

.portal-thread--glow { fill: var(--portal-glow); }
.portal-thread--accent { fill: var(--portal-accent, #f4a6a0); }

.portal-threads { filter: drop-shadow(0 0 3px var(--portal-glow)); }

.portal:hover .portal-thread,
.portal:focus-visible .portal-thread { opacity: 1; }

.portal:focus-visible .portal-label { outline: 2px solid var(--portal-glow); outline-offset: 6px; border-radius: 4px; }

.portal-label { display: flex; flex-direction: column; align-items: center; text-align: center; }
.portal-name { font-size: 1.35rem; font-weight: 700; }
.portal-desc { color: var(--ink-soft); font-size: 0.95rem; }


.portal--soon { cursor: default; }
.portal--soon .portal-art,
.portal--soon .portal-window { filter: saturate(0.55) brightness(0.8); }

.portal-soon {
  position: absolute;
  top: calc(var(--portal-size) / 2);
  left: 50%;
  z-index: 1;
  width: calc(var(--portal-size) * 1.05);
  padding: 0.45rem 0;
  background: #c8102e;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%) rotate(-12deg);
  pointer-events: none;
}


.portal-veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at var(--x) var(--y), var(--portal-glow), var(--portal-color) 18%, var(--portal-land) 45%);
  clip-path: circle(var(--r0) at var(--x) var(--y));
  pointer-events: none;
}


.panel {
  width: min(46rem, 100% - 2rem);
  margin: 0 auto 2rem;
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.panel h2 { margin: 0 0 0.5rem; font-size: 1.25rem; }


.panel--contact {
  --tgdc-accent: var(--accent);
  --tgdc-field-bg: rgba(0, 0, 0, 0.35);
  --tgdc-border: var(--line);
}

.panel.panel--contact > p { margin-bottom: 1.25rem; }
.noscript { color: var(--ink); }
.panel p { margin: 0; color: var(--ink-soft); }


.button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.15s;
}
.button:hover, .button:focus-visible { filter: brightness(1.15); }
.button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.site-footer {
  padding: 2rem 1rem 3rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--ink); }


.legal {
  width: min(46rem, 100% - 2rem);
  margin: 0 auto;
  padding: 1rem 0 2rem;
}
html[lang='en'] .legal-fr,
html:not([lang='en']) .legal-en { display: none; }
.legal h1 { margin: 1rem 0 0.25rem; text-align: center; }
.legal h2 { margin: 2rem 0 0.5rem; padding-bottom: 0.25rem; border-bottom: 1px solid var(--line); font-size: 1.3rem; }
.legal h3 { margin: 1.25rem 0 0.35rem; font-size: 1.05rem; }
.legal p { color: var(--ink-soft); }
.legal strong { color: var(--ink); }
.legal a { color: var(--accent); }
.legal section { scroll-margin-top: 1rem; }
.legal-updated { text-align: center; font-size: 0.85rem; }
.legal-toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.2rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}
.legal-mail { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.debug { font-family: ui-monospace, Consolas, monospace; }

@media (max-width: 480px) {
  .site-header { gap: 0.75rem; padding-inline: 1rem; }
  .site-nav { gap: 0.75rem; font-size: 0.9rem; }
}

@media (max-width: 380px) {
  .brand-name { display: none; }
  .site-nav { gap: 0.6rem; font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
