/* ==========================================================================
   Shards of Lymia – main stylesheet
   1 Fonts · 2 Tokens · 3 Base · 4 Utilities · 5 Components · 6 Header
   7 Hero · 8 Sections · 9 Footer · 10 Pages · 11 Languages · 12 Motion
   ========================================================================== */

/* 1 Fonts (self-hosted, SIL Open Font License) --------------------------- */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  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: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2");
  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: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-wght-italic.woff2") format("woff2");
  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: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-cyrillic-wght-italic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* 2 Tokens ---------------------------------------------------------------- */

:root {
  --bg: #06051a;
  --bg-raised: #0c0a28;
  --bg-deep: #04030f;
  --panel: rgba(150, 160, 255, 0.055);
  --panel-strong: rgba(150, 160, 255, 0.1);
  --line: rgba(170, 180, 255, 0.16);
  --line-strong: rgba(170, 180, 255, 0.32);
  --text: #ecebff;
  --muted: #aeacd6;
  --dim: #7d7ba8;

  --cyan: #5ef0e0;
  --violet: #8f7bff;
  --magenta: #ff62c9;
  --amber: #ffcf7a;
  --grad: linear-gradient(100deg, var(--cyan) 0%, var(--violet) 52%, var(--magenta) 100%);
  --grad-soft: linear-gradient(100deg, rgba(94, 240, 224, 0.18), rgba(143, 123, 255, 0.18) 52%, rgba(255, 98, 201, 0.18));

  --role-tank: #6fb0ff;
  --role-healer: #6ff0b4;
  --role-support: #ffcf7a;
  --role-dd: #ff6f91;

  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-cjk-ko: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif;
  --font-cjk-tc: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", system-ui, sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 72px;
  --section-y: clamp(84px, 11vw, 152px);
  --cut: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display-weight: 600;
  --display-track: -0.01em;
  --caps-track: 0.18em;
}

/* 3 Base ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-style: normal; }

::selection { background: rgba(143, 123, 255, 0.45); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 4 Utilities ------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(760px + var(--gutter) * 2); }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.icon { width: 1.4em; height: 1.4em; flex: none; }

.h2, .h3, .h4, .hero__title, .hero__claim, .quote, .not-found__code, .entry__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-track);
  line-height: 1.06;
  text-wrap: balance;
}
.h2 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); }
.h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.12; }
.h4 { font-size: clamp(1.35rem, 2vw, 1.6rem); line-height: 1.18; }

.h2 em, .h3 em, .hero__claim em, .principle__title em {
  font-style: italic;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em;
}

.lead {
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 10px;
  height: 14px;
  background: var(--grad);
  clip-path: polygon(50% 0, 100% 35%, 50% 100%, 0 35%);
}

.footnote {
  margin-top: 20px;
  font-size: 0.86rem;
  color: var(--dim);
}
.footnote::before { content: "◆ "; color: var(--violet); }

/* 5 Components ------------------------------------------------------------ */

.btn {
  --btn-bg: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.25;
  color: var(--text);
  background: var(--btn-bg);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: transform 0.35s var(--ease), background 0.35s, color 0.35s, filter 0.35s;
}
.btn .icon { width: 1.25em; height: 1.25em; transition: transform 0.35s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .icon-arrow-right { transform: translateX(4px); }
.btn:hover .icon-arrow-up { transform: translateY(-3px); }

.btn--primary {
  background: var(--grad);
  color: #07051c;
}
.btn--primary:hover { filter: brightness(1.12) saturate(1.1); }

.btn--ghost {
  background: linear-gradient(var(--bg-raised), var(--bg-raised)) padding-box, var(--line-strong);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  background: rgba(150, 160, 255, 0.08);
}
.btn--ghost:hover { background: rgba(150, 160, 255, 0.18); }

.btn--small { min-height: 44px; padding: 8px 18px; font-size: 0.76rem; background: rgba(150, 160, 255, 0.1); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--small:hover { background: rgba(150, 160, 255, 0.2); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(150, 160, 255, 0.1);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  border-radius: 999px;
}
.chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(94, 240, 224, 0.7);
  animation: pulse 2.2s infinite;
}
.chip--outline {
  background: transparent;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 18px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, var(--cyan));
  background: color-mix(in srgb, var(--accent, var(--cyan)) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, var(--cyan)) 45%, transparent);
}

.grid { display: grid; gap: clamp(14px, 2vw, 22px); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

.card, .panel, .feature, .people, .demo, .measure__board, .status, .principle {
  position: relative;
  background: linear-gradient(160deg, rgba(150, 160, 255, 0.09), rgba(150, 160, 255, 0.025) 60%);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.6vw, 32px);
  transition: transform 0.5s var(--ease), background 0.4s;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.card p, .feature p, .panel p, .people p, .demo p, .callout p, .feeling p, .subhead p, .principle p, .measure__copy p, .editor__copy p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.card:hover::after, .card:focus-within::after { transform: scaleX(1); }
.card:hover { background: linear-gradient(160deg, rgba(150, 160, 255, 0.15), rgba(150, 160, 255, 0.04) 60%); }

.card__icon, .feature__icon, .feeling__icon, .callout__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: var(--cyan);
  background: rgba(94, 240, 224, 0.08);
  box-shadow: inset 0 0 0 1px rgba(94, 240, 224, 0.35);
  clip-path: polygon(50% 0, 100% 28%, 100% 72%, 50% 100%, 0 72%, 0 28%);
}
.card__icon, .feature__icon, .feeling__icon, .callout__icon { flex: none; }
.card__icon .icon, .feature__icon .icon, .feeling__icon .icon, .callout__icon .icon { width: 26px; height: 26px; }

.card__index {
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: "Manrope", sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: clamp(24px, 3vw, 36px);
  padding: 18px 22px;
  color: var(--muted);
  font-size: 0.98rem;
  border-left: 2px solid var(--violet);
  background: linear-gradient(90deg, rgba(143, 123, 255, 0.12), transparent 80%);
}
.notice .icon { color: var(--violet); margin-top: 2px; }

.callout {
  display: flex;
  gap: clamp(16px, 2.5vw, 28px);
  align-items: flex-start;
  margin-top: clamp(36px, 5vw, 64px);
  padding: clamp(22px, 3vw, 36px);
  background: linear-gradient(100deg, rgba(94, 240, 224, 0.09), rgba(143, 123, 255, 0.07) 55%, transparent);
  border-left: 2px solid var(--cyan);
}
.callout h3 { margin-bottom: 8px; }
.callout--warn { background: linear-gradient(100deg, rgba(255, 98, 201, 0.12), rgba(143, 123, 255, 0.06) 55%, transparent); border-left-color: var(--magenta); }
.callout--warn .callout__icon { color: var(--magenta); background: rgba(255, 98, 201, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 98, 201, 0.4); }

/* 6 Header ---------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.4s, box-shadow 0.4s;
}
.site-header.is-scrolled, .nav-open .site-header {
  background: rgba(6, 5, 26, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
  max-width: calc(1440px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand__mark { width: 20px; height: 27px; filter: drop-shadow(0 0 8px rgba(143, 123, 255, 0.7)); }
.brand__name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand__name i { font-size: 0.8em; font-weight: 500; text-transform: lowercase; letter-spacing: 0.04em; color: var(--muted); }

.site-nav { margin-left: auto; }
.site-nav__list { display: flex; gap: clamp(14px, 1.8vw, 30px); }
.site-nav a {
  position: relative;
  display: block;
  padding: 10px 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.3s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.site-nav a:hover, .site-nav a.is-active { color: var(--text); }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }

.site-header__tools { display: flex; align-items: center; gap: 10px; flex: none; }

.scroll-progress { position: absolute; inset: auto 0 0 0; height: 2px; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; }

/* Language menu */
.lang { position: relative; }
.lang__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(150, 160, 255, 0.09);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.3s;
}
.lang__button::-webkit-details-marker { display: none; }
.lang__button:hover, .lang[open] .lang__button { background: rgba(150, 160, 255, 0.2); }
.lang__button .icon-globe { width: 20px; height: 20px; color: var(--cyan); }
.lang__chevron { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.lang[open] .lang__chevron { transform: rotate(180deg); }
.lang__current--short { display: none; }

.lang__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  width: 280px;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
  background: #0d0b2b;
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 24px 60px rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  animation: pop 0.28s var(--ease);
}
.lang__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.lang__title .icon { width: 16px; height: 16px; }
.lang__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 12px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}
.lang__option:hover, .lang__option:focus-visible { background: rgba(150, 160, 255, 0.14); color: var(--text); }
.lang__option.is-active { color: var(--text); background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(143, 123, 255, 0.5); }
.lang__check { width: 18px; height: 18px; color: var(--cyan); opacity: 0; }
.lang__option.is-active .lang__check { opacity: 1; }

/* Mobile navigation */
.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  background: rgba(150, 160, 255, 0.09);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  border-radius: 50%;
}
.nav-toggle__bars { display: grid; gap: 5px; width: 18px; }
.nav-toggle__bars i { display: block; height: 2px; background: var(--text); transition: transform 0.35s var(--ease), opacity 0.2s; }
.nav-open .nav-toggle__bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle__bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1180px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    margin: 0;
    padding: 28px var(--gutter) 48px;
    background: var(--bg);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.3s, transform 0.4s var(--ease), visibility 0s 0.4s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav a {
    padding: 18px 0;
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .site-nav a::after { display: none; }
  .site-header__tools { margin-left: auto; }
  .nav-open body { overflow: hidden; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand__name { font-size: 1.05rem; letter-spacing: 0.1em; }
  .brand__mark { width: 16px; height: 22px; }
  .site-header__inner { gap: 10px; }
  .lang { position: static; }
  .lang__button { padding: 8px 12px; gap: 6px; }
  .lang__current--full { display: none; }
  .lang__current--short { display: inline; }
  .lang__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100dvh - var(--header-h) - 24px);
  }
  .lang__option { min-height: 50px; font-size: 1.05rem; }
}
@media (max-width: 380px) {
  .site-header__inner { gap: 8px; padding-inline: 14px; }
  .brand { gap: 8px; }
  .brand__name { font-size: 0.86rem; letter-spacing: 0.04em; }
  .lang__button { padding: 8px 10px; }
  .lang__chevron { display: none; }
}

/* 7 Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(24px, 6vh, 72px));
  padding-bottom: clamp(88px, 12vh, 128px);
  overflow: hidden;
  isolation: isolate;
}
.hero__backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; }

.hero__aurora { position: absolute; border-radius: 50%; will-change: transform; }
.hero__aurora--a {
  width: 110vmax;
  height: 110vmax;
  top: -62vmax;
  right: -38vmax;
  background: radial-gradient(closest-side, rgba(143, 123, 255, 0.5), rgba(94, 240, 224, 0.14) 55%, transparent 72%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.hero__aurora--b {
  width: 90vmax;
  height: 90vmax;
  bottom: -58vmax;
  left: -34vmax;
  background: radial-gradient(closest-side, rgba(255, 98, 201, 0.3), rgba(143, 123, 255, 0.12) 55%, transparent 72%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
.hero__stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 64%, rgba(255, 255, 255, 0.8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 12%, #c9fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 38%, rgba(255, 255, 255, 0.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 71% 8%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 30%, rgba(255, 255, 255, 0.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 58%, #ffd0f0 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 78%, rgba(255, 255, 255, 0.6) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 36% 86%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 74%, rgba(255, 255, 255, 0.7) 50%, transparent 51%);
  opacity: 0.7;
  animation: twinkle 6s ease-in-out infinite alternate;
}
.hero__particles { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero__scene {
  position: absolute;
  top: calc(var(--header-h) - 12px);
  bottom: 0;
  right: max(2vw, calc((100vw - 1440px) / 2));
  width: min(54vw, 760px);
  will-change: transform;
  transition: transform 0.6s var(--ease);
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
}
.shard-scene { width: 100%; height: 100%; overflow: visible; }
.shard-scene__core { filter: drop-shadow(0 0 28px rgba(143, 123, 255, 0.55)); animation: hover-core 9s ease-in-out infinite; transform-origin: 50% 100%; }
.shard-scene__side { animation: hover-core 11s ease-in-out infinite reverse; }
.shard-scene__glow { animation: breathe 7s ease-in-out infinite; transform-origin: 300px 430px; }
.shard-scene__beam { animation: breathe 5s ease-in-out infinite; transform-origin: 300px 420px; }
.shard-scene__ring { animation: ring 18s linear infinite; }
.shard-scene__float--slow { animation: float 10s ease-in-out infinite; }
.shard-scene__float--mid { animation: float 7.5s ease-in-out -2s infinite; }
.shard-scene__float--fast { animation: float 5.5s ease-in-out -1s infinite; }
.shard-scene__sheen { animation: sheen 6s ease-in-out infinite; }

.hero__fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: linear-gradient(to top, var(--bg) 8%, transparent);
}

.hero__content { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.hero__content > * { max-width: 660px; }

.hero__title {
  margin-top: 26px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3.4rem, 10.5vw, 9.2rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-wrap: balance;
  max-width: none;
  background: linear-gradient(180deg, #fff 30%, #b9b4ff 78%, #7f6dff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(110, 90, 255, 0.45));
}
.hero__title-line { display: block; }
.hero__title i {
  font-size: 0.46em;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  vertical-align: 0.42em;
  margin-right: 0.12em;
}
.hero__claim {
  margin-top: clamp(18px, 2.4vw, 30px);
  font-size: clamp(1.7rem, 3.4vw, 2.9rem);
  line-height: 1.1;
}
.hero__lead {
  margin-top: 18px;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: var(--muted);
  max-width: 560px;
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(26px, 3vw, 40px); }

.hero__stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 760px;
  margin-top: clamp(36px, 6vh, 72px);
  background: var(--line);
  box-shadow: 0 0 0 1px var(--line);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  padding: 16px 18px 18px;
  background: rgba(6, 5, 26, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.stat__value {
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: lining-nums;
}
.stat__label { font-size: 0.74rem; font-weight: 600; line-height: 1.35; letter-spacing: 0.04em; color: var(--muted); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  transform: translateX(-50%);
}
.hero__scroll .icon { width: 18px; height: 18px; color: var(--cyan); animation: nudge 1.8s ease-in-out infinite; }

@media (max-width: 900px) {
  .hero { justify-content: flex-end; padding-top: calc(var(--header-h) + 34vh); }
  .hero__scene {
    top: var(--header-h);
    bottom: auto;
    right: 50%;
    width: min(96vw, 520px);
    height: 62vh;
    margin-right: calc(min(96vw, 520px) / -2);
    opacity: 0.9;
  }
  .hero__fade { height: 62%; background: linear-gradient(to top, var(--bg) 42%, rgba(6, 5, 26, 0.72) 68%, transparent); }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__scroll { display: none; }
  .hero { padding-bottom: 56px; }
}
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: stretch; width: 100%; }
  .hero__actions .btn { width: 100%; }
}

/* 8 Sections -------------------------------------------------------------- */

.section { position: relative; padding-block: var(--section-y); }
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.section--vision::before { background: radial-gradient(60% 50% at 85% 10%, rgba(143, 123, 255, 0.12), transparent 70%); }
.section--world::before { background: radial-gradient(55% 45% at 10% 20%, rgba(94, 240, 224, 0.1), transparent 70%), linear-gradient(var(--bg), var(--bg-raised) 40%, var(--bg)); }
.section--combat::before { background: radial-gradient(50% 40% at 90% 30%, rgba(255, 98, 201, 0.1), transparent 70%); }
.section--classes::before { background: linear-gradient(var(--bg), var(--bg-raised) 30%, var(--bg-raised) 70%, var(--bg)); }
.section--peoples::before { background: radial-gradient(50% 40% at 15% 15%, rgba(255, 207, 122, 0.08), transparent 70%); }
.section--pve::before { background: radial-gradient(60% 50% at 50% 0%, rgba(143, 123, 255, 0.16), transparent 70%), linear-gradient(var(--bg), var(--bg-deep) 50%, var(--bg)); }
.section--systems::before { background: radial-gradient(50% 40% at 88% 12%, rgba(94, 240, 224, 0.09), transparent 70%); }
.section--principles::before { background: linear-gradient(var(--bg), var(--bg-raised) 50%, var(--bg)); }

.section-head { max-width: 820px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .h2 { margin-top: 18px; }
.section-head .lead { margin-top: 20px; max-width: 700px; }

.subhead { max-width: 760px; margin-top: clamp(56px, 7vw, 96px); margin-bottom: 28px; }
.subhead p { margin-top: 12px; }

/* Vision */
.card--pillar { padding-top: clamp(26px, 3vw, 36px); min-height: 100%; }

/* World */
.feelings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: clamp(22px, 3vw, 44px); }
.feeling { display: grid; gap: 10px; align-content: start; }
.feeling:nth-child(2) .feeling__icon { color: var(--violet); background: rgba(143, 123, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(143, 123, 255, 0.45); }
.feeling:nth-child(3) .feeling__icon { color: var(--magenta); background: rgba(255, 98, 201, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 98, 201, 0.4); }

.regions { display: flex; gap: 10px; height: clamp(380px, 46vw, 480px); }
.region {
  --rc: var(--cyan);
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  overflow: hidden;
  background: linear-gradient(to top, color-mix(in srgb, var(--rc) 22%, var(--bg-raised)), var(--bg-raised) 75%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 30%, transparent);
  transition: flex-grow 0.7s var(--ease), box-shadow 0.4s;
  isolation: isolate;
}
.region.is-active { flex-grow: 4.2; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 70%, transparent); }
.region--village { --rc: var(--amber); }
.region--forest { --rc: #6ff0b4; }
.region--ruins { --rc: var(--violet); }
.region--gorge { --rc: var(--cyan); }
.region--wilds { --rc: var(--magenta); }

.region__art {
  position: absolute;
  inset: auto 0 0 0;
  z-index: -1;
  width: 100%;
  height: 78%;
  fill: var(--rc);
  opacity: 0.45;
  transition: opacity 0.6s, transform 0.9s var(--ease);
  transform: scale(1.12);
  transform-origin: 50% 100%;
}
.region.is-active .region__art { opacity: 1; transform: none; }
.region::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(6, 5, 26, 0.94) 10%, rgba(6, 5, 26, 0.5) 42%, transparent 70%);
}
.region__toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 12px;
  text-align: left;
  color: var(--text);
}
.region__toggle::after { content: ""; position: absolute; inset: 0; }
.region__index {
  position: absolute;
  top: 18px;
  left: 22px;
  font-family: "Manrope", sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--rc) 80%, transparent);
}
.region__icon { color: var(--rc); }
.region__icon .icon { width: 28px; height: 28px; }
.region__name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: var(--display-weight);
  line-height: 1.1;
}
.region__body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.6s var(--ease), opacity 0.4s;
}
.region__body p { overflow: hidden; color: var(--text); font-size: 1rem; line-height: 1.55; min-width: min(46ch, 70vw); max-width: 46ch; }
.region.is-active .region__body { grid-template-rows: 1fr; opacity: 1; transition-delay: 0s, 0.2s; }
.region.is-active .region__body p { padding-top: 12px; }

@media (min-width: 861px) {
  .region:not(.is-active) .region__toggle { grid-template-columns: 1fr; justify-items: start; gap: 14px; }
  .region:not(.is-active) .region__name {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    max-height: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-self: start;
  }
  .region:not(.is-active) .region__icon { order: 2; }
}
@media (max-width: 860px) {
  .regions { flex-direction: column; height: auto; }
  .region { flex: none; padding: 18px 18px 18px 74px; min-height: 76px; justify-content: center; }
  .region.is-active { padding-bottom: 22px; }
  .region__index { top: 22px; left: 18px; font-size: 1.6rem; }
  .region__art { height: 100%; }
  .region__body p { min-width: 0; max-width: none; }
}

/* Combat */
.feature {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: clamp(22px, 2.6vw, 30px);
  transition: background 0.4s;
}
.feature:hover { background: linear-gradient(160deg, rgba(150, 160, 255, 0.15), rgba(150, 160, 255, 0.04) 60%); }
.feature:nth-child(3n + 2) .feature__icon { color: var(--violet); background: rgba(143, 123, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(143, 123, 255, 0.45); }
.feature:nth-child(3n) .feature__icon { color: var(--magenta); background: rgba(255, 98, 201, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 98, 201, 0.4); }

.demos {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(14px, 2vw, 22px);
  margin-top: clamp(40px, 5vw, 72px);
}
.demo {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: clamp(24px, 3.4vw, 44px);
  background: linear-gradient(160deg, rgba(143, 123, 255, 0.16), rgba(94, 240, 224, 0.04) 60%, rgba(6, 5, 26, 0.4));
}
.demo__copy p { margin-top: 12px; }
.demo .hud, .demo .charge { margin-top: auto; }

.hud__bars { display: grid; perspective: 800px; }
.hud__bar {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 12px);
  max-width: 520px;
  transition: transform 0.5s var(--ease), opacity 0.35s;
  transform-origin: 50% 50%;
}
.hud__bars[data-active="1"] .hud__bar--2,
.hud__bars[data-active="2"] .hud__bar--1 { opacity: 0; transform: rotateX(80deg) translateY(12px); pointer-events: none; }
.hud__slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  color: var(--cyan);
  background: rgba(6, 5, 26, 0.7);
  box-shadow: inset 0 0 0 1px rgba(94, 240, 224, 0.45), inset 0 0 18px rgba(94, 240, 224, 0.12);
  clip-path: polygon(22% 0, 100% 0, 100% 78%, 78% 100%, 0 100%, 0 22%);
  animation: slot-in 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 45ms);
}
.hud__bar--2 .hud__slot { color: var(--magenta); box-shadow: inset 0 0 0 1px rgba(255, 98, 201, 0.5), inset 0 0 18px rgba(255, 98, 201, 0.12); }
.hud__slot .icon { width: 46%; height: 46%; }
.hud__slot i {
  position: absolute;
  right: 12%;
  bottom: 8%;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 800;
  color: var(--muted);
}
.hud__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 20px; }
.hud__label { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text) !important; min-width: 5.5em; }

.charge { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.charge__button {
  --p: 0;
  position: relative;
  width: clamp(132px, 16vw, 168px);
  aspect-ratio: 1;
  border-radius: 50%;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.2s var(--ease);
}
.charge__button:active, .charge__button.is-charging { transform: scale(0.96); }
.charge__button > svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.charge__track { fill: none; stroke: var(--line-strong); stroke-width: 5; }
.charge__ring {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 6;
  stroke-linecap: butt;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p));
  filter: drop-shadow(0 0 6px var(--cyan));
}
.charge__core {
  position: absolute;
  inset: 16%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle, rgba(143, 123, 255, calc(0.25 + var(--p) / 140)), rgba(94, 240, 224, 0.06) 70%);
  box-shadow: 0 0 calc(var(--p) * 0.5px) rgba(143, 123, 255, 0.9), inset 0 0 0 1px var(--line-strong);
}
.charge__core .icon { width: 38%; height: 38%; transform: scale(calc(1 + var(--p) / 220)); }
.charge__button.is-max .charge__ring { stroke: var(--magenta); filter: drop-shadow(0 0 10px var(--magenta)); }
.charge__button.is-max .charge__core { animation: shake 0.3s linear infinite; }
.charge__status { min-height: 1.6em; font-size: 0.82rem !important; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text) !important; }

@media (max-width: 900px) { .demos { grid-template-columns: 1fr; } }

/* Classes */
.classes { display: grid; gap: 14px; }
.classes__tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.class-tab, .class-panel, .party__slot, .party-legend__item, .pill, .metrics { --accent: var(--role-dd); }
.class-tab--tank, .class-panel--tank, .party__slot--tank, .party-legend__item--tank, .pill--tank, .metrics--tank { --accent: var(--role-tank); }
.class-tab--healer, .class-panel--healer, .party__slot--healer, .party-legend__item--healer, .pill--healer, .metrics--healer { --accent: var(--role-healer); }
.class-tab--support, .class-panel--support, .party__slot--support, .party-legend__item--support, .pill--support, .metrics--support { --accent: var(--role-support); }

.class-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 6px 14px;
  min-width: 0;
  color: var(--muted);
  background: rgba(150, 160, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.4s var(--ease);
}
.class-tab:hover { color: var(--text); transform: translateY(-3px); }
.class-tab[aria-selected="true"] {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: inset 0 0 0 1px var(--accent), 0 10px 40px -12px var(--accent);
}
.class-tab__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.class-tab__icon .icon { width: 22px; height: 22px; }
.class-tab__name {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.js [data-inactive] { display: none; }

.class-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) 2fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 4vw, 52px);
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 16%, transparent), rgba(150, 160, 255, 0.04) 55%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  animation: panel-in 0.5s var(--ease);
}
.no-js .class-panel + .class-panel, html:not(.js) .class-panel + .class-panel { margin-top: 14px; }
.class-panel__emblem {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 260px;
  width: 100%;
  margin-inline: auto;
  color: var(--accent);
}
.class-panel__emblem::before, .class-panel__emblem::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.class-panel__emblem::before { background: color-mix(in srgb, var(--accent) 16%, transparent); animation: spin-slow 40s linear infinite; }
.class-panel__emblem::after { inset: 14%; background: rgba(6, 5, 26, 0.75); box-shadow: inset 0 0 40px color-mix(in srgb, var(--accent) 35%, transparent); }
.class-panel__emblem .icon { position: relative; z-index: 1; width: 34%; height: 34%; stroke-width: 1.1; filter: drop-shadow(0 0 12px var(--accent)); }
.class-panel__body .h3 { margin-top: 12px; font-size: clamp(2rem, 4vw, 3.2rem); }
.class-panel__desc { margin-top: 12px; color: var(--muted); max-width: 56ch; }

.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; margin-top: 26px; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.specs > div { padding: 14px 16px; background: rgba(6, 5, 26, 0.78); }
.specs dt { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.specs dd { margin-top: 4px; font-weight: 700; color: var(--text); }

@media (max-width: 860px) {
  .classes__tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .class-panel { grid-template-columns: 1fr; }
  .class-panel__emblem { max-width: 150px; margin-inline: 0; }
  .class-tab { padding: 12px 4px 10px; gap: 8px; }
  .class-tab__icon { width: 40px; height: 40px; }
  .class-tab__name { font-size: 0.68rem; }
}

.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(14px, 2vw, 22px); margin-top: clamp(40px, 5vw, 72px); }
.panel { display: flex; flex-direction: column; gap: 18px; padding: clamp(24px, 3.4vw, 40px); }
.panel--accent { background: linear-gradient(160deg, rgba(255, 111, 145, 0.14), rgba(143, 123, 255, 0.05) 60%); }

.party { display: grid; grid-template-columns: repeat(7, minmax(0, 52px)); gap: clamp(4px, 1.2vw, 10px); }
.party__slot {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  color: var(--bg);
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  font-weight: 800;
  font-size: 0.9rem;
  animation: bob 3s ease-in-out infinite;
}
.party__slot:nth-child(2n) { animation-delay: -1.5s; }
.party-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.86rem; font-weight: 700; }
.party-legend__item { display: inline-flex; align-items: center; gap: 8px; }
.party-legend__item::before { content: ""; width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); }

.equal { display: flex; align-items: flex-end; gap: 10px; height: 64px; }
.equal i { flex: 1; height: 100%; background: linear-gradient(to top, var(--role-dd), var(--magenta)); transform-origin: bottom; animation: equalize 4s var(--ease) infinite; clip-path: polygon(0 10px, 50% 0, 100% 10px, 100% 100%, 0 100%); }
.equal i:nth-child(2) { animation-delay: -0.4s; }
.equal i:nth-child(3) { animation-delay: -0.8s; }
.equal i:nth-child(4) { animation-delay: -1.2s; }

.measure {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  margin-top: clamp(56px, 8vw, 112px);
}
.measure__copy p { margin-top: 16px; }
.measure__board { padding: clamp(20px, 3vw, 34px); }
.measure__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.pill {
  min-height: 40px;
  padding: 6px 16px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  border-radius: 999px;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.pill:hover { color: var(--text); }
.pill[aria-selected="true"] { color: var(--bg); background: var(--accent); box-shadow: none; }
.metrics { display: grid; gap: 14px; }
.metric { display: grid; gap: 7px; }
.metric__label { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.metric__bar { display: block; height: 6px; background: rgba(150, 160, 255, 0.12); overflow: hidden; }
.metric__bar i {
  display: block;
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 40%, transparent), var(--accent));
  transform-origin: left;
  animation: grow 0.9s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms);
}
@media (max-width: 900px) { .measure { grid-template-columns: 1fr; } }

/* Peoples */
.people {
  --accent: var(--amber);
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: start;
  padding: clamp(26px, 3.2vw, 40px);
  background: linear-gradient(170deg, color-mix(in srgb, var(--accent) 14%, transparent), rgba(150, 160, 255, 0.03) 60%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 32%, transparent);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease);
}
.people--elves { --accent: #6ff0b4; }
.people--demons { --accent: var(--magenta); }
.people__sigil {
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
  fill: color-mix(in srgb, var(--accent) 10%, transparent);
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 60%, transparent));
  transition: transform 0.8s var(--ease);
}
.people:hover .people__sigil { transform: rotate(8deg) scale(1.06); }
.people .h3 { font-size: clamp(2rem, 3.4vw, 2.8rem); }

.quote {
  position: relative;
  max-width: 900px;
  margin: clamp(48px, 7vw, 96px) auto;
  padding-inline: clamp(8px, 4vw, 48px);
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  font-style: italic;
  line-height: 1.15;
  text-align: center;
}
.quote::before, .quote::after { content: ""; display: block; width: 120px; height: 1px; margin: 0 auto 28px; background: var(--grad); }
.quote::after { margin: 28px auto 0; }

.editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.editor__copy p { margin-top: 16px; }
.editor__copy .editor__goal { color: var(--text); padding-left: 18px; border-left: 2px solid var(--violet); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips .chip { animation: bob 5s ease-in-out infinite; animation-delay: calc(var(--i) * -0.7s); }
.chips .chip:nth-child(3n + 1) { box-shadow: inset 0 0 0 1px rgba(94, 240, 224, 0.5); }
.chips .chip:nth-child(3n + 2) { box-shadow: inset 0 0 0 1px rgba(143, 123, 255, 0.6); }
.chips .chip:nth-child(3n) { box-shadow: inset 0 0 0 1px rgba(255, 98, 201, 0.5); }
@media (max-width: 860px) { .editor { grid-template-columns: 1fr; } }

/* PvE */
.section--pve .section-head { max-width: 960px; }
.card--mode { --accent: var(--violet); }
.card--mode .tag { align-self: flex-start; }
.card--mode .card__icon { color: var(--violet); background: rgba(143, 123, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(143, 123, 255, 0.45); }
.callout--tiers { align-items: center; border-left-color: var(--violet); }
.tiers { display: flex; align-items: flex-end; gap: 6px; flex: none; height: 64px; }
.tiers i { width: 18px; background: var(--grad); clip-path: polygon(50% 0, 100% 22%, 100% 100%, 0 100%, 0 22%); animation: breathe 3s ease-in-out infinite; }
.tiers i:nth-child(1) { height: 45%; opacity: 0.55; }
.tiers i:nth-child(2) { height: 70%; opacity: 0.8; animation-delay: -1s; }
.tiers i:nth-child(3) { height: 100%; animation-delay: -2s; }

/* Systems */
.ticks { display: grid; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.94rem; line-height: 1.45; color: var(--text); }
.ticks .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--cyan); }
.card--system:nth-child(3n + 2) .card__icon { color: var(--violet); background: rgba(143, 123, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(143, 123, 255, 0.45); }
.card--system:nth-child(3n) .card__icon { color: var(--magenta); background: rgba(255, 98, 201, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 98, 201, 0.4); }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: clamp(12px, 1.6vw, 18px); }
.principle { display: grid; gap: 10px; align-content: start; padding: clamp(20px, 2.4vw, 30px); transition: background 0.4s; }
.principle:hover { background: linear-gradient(160deg, rgba(255, 98, 201, 0.13), rgba(150, 160, 255, 0.04) 60%); }
.principle__title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
  font-weight: var(--display-weight);
  line-height: 1.12;
  text-wrap: balance;
}
.principle__title em {
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.5em;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  vertical-align: 0.25em;
  padding: 4px 9px;
  margin-right: 0.2em;
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: linear-gradient(100deg, var(--magenta), var(--violet));
  white-space: nowrap;
}

/* Status */
.status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 920px;
  margin-inline: auto;
  padding: clamp(36px, 6vw, 80px) clamp(22px, 5vw, 72px);
  text-align: center;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(143, 123, 255, 0.3), transparent 62%),
    linear-gradient(160deg, rgba(150, 160, 255, 0.09), rgba(150, 160, 255, 0.025));
  --cut: 28px;
}
.social { display: grid; gap: 14px; justify-items: center; }
.social__title { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.social__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* 9 Footer ---------------------------------------------------------------- */

.site-footer { padding-top: clamp(48px, 6vw, 80px); background: var(--bg-deep); border-top: 1px solid var(--line); }
.site-footer__inner { display: grid; grid-template-columns: 1.2fr 1.6fr auto; gap: clamp(28px, 5vw, 72px); }
.site-footer__tagline { margin-top: 14px; max-width: 34ch; color: var(--muted); font-size: 0.96rem; }
.site-footer__social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.site-footer__social a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--text);
  background: rgba(150, 160, 255, 0.09);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  border-radius: 50%;
  transition: background 0.3s, color 0.3s, transform 0.35s var(--ease);
}
.site-footer__social a:hover { color: var(--bg); background: var(--cyan); transform: translateY(-3px); }
.site-footer__social .icon { width: 22px; height: 22px; }
.site-footer__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.site-footer__heading .icon { width: 16px; height: 16px; color: var(--cyan); }
.site-footer__langs ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 18px; }
.site-footer__langs a, .site-footer__legal a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s;
}
.site-footer__langs a:hover, .site-footer__legal a:hover { color: var(--text); }
.site-footer__langs a[aria-current="true"] { color: var(--cyan); font-weight: 700; }
.site-footer__langs a[aria-current="true"]::before { content: "◆"; margin-right: 8px; font-size: 0.6em; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: clamp(32px, 5vw, 56px);
  padding-block: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--dim);
}
@media (max-width: 860px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* 10 Pages ---------------------------------------------------------------- */

.content-page { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 96px)); padding-bottom: var(--section-y); min-height: 70vh; }
.content-page--center { display: grid; align-items: center; }
.entry__title { font-size: clamp(2.3rem, 5vw, 3.8rem); margin-bottom: 28px; }
.entry__content { color: var(--muted); }
.entry__content > * + * { margin-top: 1.1em; }
.entry__content h2, .entry__content h3, .entry__content h4 { margin-top: 1.8em; color: var(--text); font-family: var(--font-display); font-weight: var(--display-weight); line-height: 1.15; }
.entry__content h2 { font-size: 2rem; }
.entry__content h3 { font-size: 1.6rem; }
.entry__content a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.entry__content ul, .entry__content ol { padding-left: 1.3em; }
.entry__content ul { list-style: disc; }
.entry__content ol { list-style: decimal; }
.entry__content strong { color: var(--text); }
.not-found { display: grid; gap: 18px; justify-items: start; }
.not-found__code { font-size: clamp(5rem, 18vw, 11rem); line-height: 0.9; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 11 Languages ------------------------------------------------------------ */

:lang(ko) { --font-display: var(--font-cjk-ko); --display-weight: 800; --display-track: -0.02em; --caps-track: 0.06em; }
:lang(zh) { --font-display: var(--font-cjk-tc); --display-weight: 700; --display-track: 0.02em; --caps-track: 0.1em; }
:lang(ko) body, :lang(ko) { font-family: "Manrope", var(--font-cjk-ko); word-break: keep-all; }
:lang(zh) body, :lang(zh) { font-family: "Manrope", var(--font-cjk-tc); line-break: strict; }
:lang(ko) :is(.h2, .h3, .h4, .hero__claim, .quote, .region__name, .principle__title, .site-nav a),
:lang(zh) :is(.h2, .h3, .h4, .hero__claim, .quote, .region__name, .principle__title, .site-nav a) { line-height: 1.28; }
:lang(ko) :is(.h2, .hero__claim, .quote) em, :lang(zh) :is(.h2, .hero__claim, .quote) em,
:lang(ko) .h3 em, :lang(zh) .h3 em, :lang(ko) .quote, :lang(zh) .quote { font-style: normal; }
:lang(ko) .h2, :lang(zh) .h2 { font-size: clamp(2rem, 4.6vw, 3.5rem); }
:lang(ko) .hero__claim, :lang(zh) .hero__claim { font-size: clamp(1.5rem, 3vw, 2.4rem); }
:lang(ko) .quote, :lang(zh) .quote { font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.4; }
:lang(ko) :is(.btn, .chip, .tag, .pill, .site-nav a, .eyebrow), :lang(zh) :is(.btn, .chip, .tag, .pill, .site-nav a, .eyebrow) { letter-spacing: 0.06em; font-size: 0.86rem; }
:lang(ru) .h2 { font-size: clamp(2.1rem, 5vw, 4rem); }
:is(.h2, .h3, .h4, .principle__title, .region__name) { overflow-wrap: break-word; }
@media (max-width: 480px) {
  :lang(de) :is(.h2, .h3, .h4), :lang(ru) :is(.h2, .h3, .h4) { hyphens: auto; }
}
.hero__title, .brand__name { font-family: "Cormorant Garamond", Georgia, serif !important; }

/* 12 Motion --------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .card.reveal.is-visible, .js .people.reveal.is-visible { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(94, 240, 224, 0.7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(94, 240, 224, 0); } }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes drift-a { to { transform: translate3d(-8vmax, 6vmax, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(7vmax, -5vmax, 0) scale(1.12); } }
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.8; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes hover-core { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes breathe { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@keyframes ring { to { stroke-dashoffset: -400; } }
@keyframes sheen { 0%, 70%, 100% { opacity: 0; } 82% { opacity: 0.55; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes slot-in { from { opacity: 0; transform: translateY(10px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(1.5px, -1px); } 75% { transform: translate(-1.5px, 1px); } }
@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes equalize { 0%, 100% { transform: scaleY(0.82); } 50% { transform: scaleY(1); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.shard-scene__ring ellipse { animation: ring 18s linear infinite; }
.shard-scene__ring ellipse + ellipse { animation-duration: 26s; animation-direction: reverse; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .hero__particles { display: none; }
}

@media print {
  .site-header, .hero__backdrop, .hero__scroll { display: none; }
  body { background: #fff; color: #000; }
}

@media (max-width: 560px) {
  .callout { flex-direction: column; }
}

/* Logged-in editors: keep the header below the WordPress toolbar. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
