/* =========================================================
   Avents — Independent Game Studio
   Atmospheric worlds, iconic characters, editorial clarity.
   ========================================================= */

@font-face {
  font-family: 'Bebas Neue';
  src: url('assets/fonts/BebasNeue-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Oxanium';
  src: url('assets/fonts/Oxanium-Variable-Latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Pirata One';
  src: url('assets/fonts/PirataOne-Regular-Latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --night: #060b14;
  --night-2: #08142a;
  --ink: #eef2f8;
  --muted: #98a8c0;
  --line: rgba(238, 242, 248, 0.12);

  --soul: #67e8cf;
  --gold: #e9b24c;
  --ember: #ee6a3a;
  --sky: #5aa2ff;

  --accent: var(--soul);

  --display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --body: 'Oxanium', system-ui, -apple-system, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(88px, 12vw, 156px);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  position: relative;
}

main,
.hero,
.flagship,
.games,
.world,
.studio,
.contact,
.site-footer {
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.scene,
.scene img,
.character-triad,
.character-triad img,
.character-stage,
.character-stage img,
.lair-fighter,
.lair-fighter img,
.burst-block,
.world-logo,
.hero-logo img,
.age-gate-logo {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; padding: 0; }
em { font-style: normal; color: var(--ink); font-weight: 600; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

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

/* ---------- Typography ---------- */
h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4.35rem);
  line-height: 0.95;
  letter-spacing: 0.015em;
}
h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: 0.025em;
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 54ch;
  margin-top: 22px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 15px 28px;
  background: var(--soul);
  color: #04131a;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 30px -10px rgba(103, 232, 207, 0.6);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(103, 232, 207, 0.75); }

.btn-ghost {
  display: inline-block;
  padding: 14px 26px;
  background: transparent;
  color: var(--muted);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(238, 242, 248, 0.24);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-ghost:hover {
  border-color: rgba(238, 242, 248, 0.55);
  color: var(--ink);
}

.link-arrow {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.link-arrow::after {
  content: '→';
  display: inline-block;
  margin-left: 10px;
  transition: transform 0.2s ease;
}
.link-arrow:hover::after { transform: translateX(5px); }

/* =========================================================
   18+ AGE VERIFICATION GATE
   ========================================================= */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 8, 16, 0.84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
html.age-verified .age-gate {
  display: none;
}
html:not(.age-verified) body {
  overflow: hidden;
}
.age-gate-box {
  width: 100%;
  max-width: 352px;
  padding: 24px 24px 22px;
  background: #0a1322;
  border: 1px solid rgba(238, 242, 248, 0.14);
  border-radius: 6px;
  text-align: left;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
}
.age-gate-logo {
  height: 17px;
  width: auto;
  opacity: 0.92;
  margin-bottom: 18px;
}
.age-gate-title {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.12rem !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em;
  color: var(--ink) !important;
  margin-bottom: 6px;
}
.age-gate-box p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}
.age-gate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}
.age-btn {
  height: 38px;
  padding: 0 14px;
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.age-btn--primary {
  background: var(--ink);
  color: #060b14;
  border: 1px solid var(--ink);
}
.age-btn--primary:hover {
  background: #ffffff;
  border-color: #ffffff;
}
.age-btn--secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(238, 242, 248, 0.2);
}
.age-btn--secondary:hover {
  color: var(--ink);
  border-color: rgba(238, 242, 248, 0.42);
}
.age-gate-notice {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(238, 242, 248, 0.1);
  font-size: 0.78rem !important;
  color: #e5989b !important;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(6, 11, 20, 0.84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand img { height: 24px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}
.site-nav a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(238, 242, 248, 0.78);
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-contact {
  color: var(--ink);
  padding: 9px 18px;
  border: 1px solid rgba(238, 242, 248, 0.35);
  border-radius: 4px;
}
.site-nav .nav-contact:hover { border-color: var(--soul); color: var(--soul); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  background: none; border: 0; cursor: pointer;
  position: relative;
}
.nav-toggle span:not(.sr-only) {
  position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, top 0.25s ease;
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* =========================================================
   HERO — Necropolis layered environment
   ========================================================= */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  max-height: 1100px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  isolation: isolate;
}

.scene { position: absolute; inset: 0; z-index: -1; }
.scene::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 42% 38% at 50% 50%, rgba(5, 12, 26, 0.55), transparent 70%),
    linear-gradient(180deg, rgba(6, 11, 20, 0.55) 0%, transparent 18%, transparent 72%, var(--night-2) 100%);
  pointer-events: none;
}

.layer {
  position: absolute;
  will-change: transform;
  user-select: none;
  pointer-events: none;
}
.sky {
  inset: -6% 0 0 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center 30%;
}
.island-a { width: clamp(110px, 11vw, 200px); left: 24%; top: 13%; opacity: 0.45; filter: blur(0.6px); }
.island-b { width: clamp(90px, 9vw, 170px);  right: 25%; top: 9%;  opacity: 0.38; filter: blur(0.8px); }

.castle-left  { width: clamp(260px, 31vw, 580px); left: -3vw;  top: 30%; }
.castle-right { width: clamp(280px, 35vw, 640px); right: -4vw; top: 13%; }

.keeper {
  height: clamp(150px, 27vh, 300px);
  width: auto;
  right: 13vw;
  bottom: 15%;
  filter: drop-shadow(0 0 28px rgba(110, 160, 255, 0.35));
  animation: hover 5s ease-in-out infinite;
}
@keyframes hover {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

.mist {
  left: -5%; right: -5%; bottom: 4%;
  width: 110%;
  opacity: 0.55;
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  from { translate: -2% 0; }
  to   { translate: 2% 0; }
}
.rocks-left,
.rocks-right { width: clamp(200px, 27vw, 520px); bottom: -2%; }
.rocks-left  { left: -2%; }
.rocks-right { right: -2%; }

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--header-h);
}
.hero-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--soul);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.hero-logo { margin: 14px 0 6px; }
.hero-logo img {
  width: min(600px, 84vw);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.65));
}
.hero-line {
  font-family: 'Pirata One', Georgia, serif;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  color: #dfe8f5;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 32px;
  margin-top: 34px;
}

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 26px;
  width: 24px; height: 38px;
  margin-left: -12px;
  border: 1.5px solid rgba(238, 242, 248, 0.45);
  border-radius: 12px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px;
  width: 3px; height: 7px; margin-left: -1.5px;
  border-radius: 2px;
  background: var(--ink);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0%   { opacity: 0; transform: translateY(0); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* =========================================================
   NECROPOLIS FLAGSHIP — Character Triad Showcase
   ========================================================= */
.flagship {
  background:
    radial-gradient(ellipse 45% 50% at 28% 50%, rgba(76, 148, 255, 0.14), transparent 70%),
    linear-gradient(180deg, var(--night-2) 0%, var(--night) 100%);
  padding: clamp(64px, 9vw, 128px) 0 var(--section);
}
.flagship-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(44px, 6vw, 92px);
  align-items: center;
}

.character-triad {
  position: relative;
  min-height: clamp(380px, 46vw, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.character-triad::before {
  content: '';
  position: absolute;
  width: 78%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 232, 207, 0.18) 0%, rgba(62, 118, 235, 0.08) 45%, transparent 72%);
  filter: blur(24px);
  z-index: -1;
}
.triad-main {
  width: clamp(220px, 24vw, 330px);
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 32px rgba(103, 232, 207, 0.2));
}
.triad-side {
  position: absolute;
  width: clamp(150px, 16.5vw, 235px);
  z-index: 1;
  opacity: 0.92;
  filter: drop-shadow(0 22px 38px rgba(0, 0, 0, 0.8));
}
.triad-wizard {
  left: 2%;
  bottom: 6%;
  transform: rotate(-4deg);
}
.triad-collector {
  right: 2%;
  top: 8%;
  transform: rotate(4deg);
}

.story-points {
  margin-top: 38px;
  display: grid;
  gap: 26px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}
.story-points h3 {
  color: var(--soul);
  margin-bottom: 8px;
}
.story-points p {
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 50ch;
}

/* =========================================================
   OUR GAMES — Full-bleed worlds + Character Stages
   ========================================================= */
.games-intro {
  padding-bottom: clamp(28px, 4vw, 52px);
}

.world {
  position: relative;
  isolation: isolate;
  padding: clamp(88px, 11vw, 152px) 0;
  overflow: hidden;
}
.world::before,
.world::after {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
}
.world::before {
  background: var(--world-bg) center / cover no-repeat;
  transform: scale(1.04);
}
.world::after {
  background:
    linear-gradient(180deg, var(--night) 0%, transparent 20%, transparent 80%, var(--night) 100%),
    var(--world-tint);
}

.world-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.world-copy > p:not(.world-tag) {
  color: rgba(238, 242, 248, 0.88);
  font-size: 1.05rem;
  max-width: 48ch;
}
.world-logo {
  width: auto;
  max-width: min(360px, 100%);
  max-height: 145px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 24px;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.75));
}
.world-tag {
  font-family: var(--display);
  font-size: clamp(1.75rem, 2.7vw, 2.35rem);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 18px;
}

.world-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 12px 22px;
  background: rgba(6, 11, 20, 0.55);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border: 1px solid rgba(238, 242, 248, 0.24);
  border-radius: 4px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.world-cta svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.world-cta:hover {
  border-color: var(--accent);
  background: rgba(6, 11, 20, 0.82);
  color: #ffffff;
  transform: translateY(-1px);
}
.world-cta:hover svg {
  transform: translate(2px, -2px);
}

/* ---------- Character Stages ---------- */
.character-stage {
  position: relative;
  min-height: clamp(360px, 42vw, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.character-stage .char-primary {
  position: relative;
  z-index: 2;
  max-height: clamp(350px, 41vw, 510px);
  width: auto;
  filter: drop-shadow(0 28px 54px rgba(0, 0, 0, 0.9));
}

/* Tome of Greed Stage (Grounded Archivist, no Eye, no bobbing) */
.character-stage--tome::before {
  content: '';
  position: absolute;
  width: 66%;
  height: 66%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 178, 76, 0.22) 0%, rgba(190, 42, 58, 0.1) 48%, transparent 72%);
  filter: blur(22px);
  z-index: 0;
}

/* Lair of Riches — 3-Column Symmetric Showdown (Blue Wolf Left · Story Center · Red Wolf Right) */
.lair-duel-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: clamp(24px, 3.5vw, 48px);
  align-items: center;
}
.world-copy--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.world-logo--center {
  object-position: center;
  margin-left: auto;
  margin-right: auto;
}
.world-copy--center > p:not(.world-tag) {
  max-width: 46ch;
}
.lair-fighter {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  isolation: isolate;
}
.lair-fighter::before {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  filter: blur(26px);
  z-index: -1;
}
.lair-fighter--left::before {
  background: radial-gradient(circle, rgba(90, 162, 255, 0.22) 0%, transparent 70%);
}
.lair-fighter--right::before {
  background: radial-gradient(circle, rgba(238, 106, 58, 0.24) 0%, transparent 70%);
}
.lair-fighter img {
  max-height: clamp(320px, 38vw, 470px);
  width: auto;
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.9));
}

/* Block Burst Stage — Exact 1:1 In-Game Feature Blocks + Floating Chest */
.character-stage--burst::before {
  content: '';
  position: absolute;
  width: 74%;
  height: 74%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 64, 0.24) 0%, rgba(121, 167, 255, 0.16) 48%, transparent 72%);
  filter: blur(24px);
  z-index: 0;
}
.burst-chest {
  position: relative;
  z-index: 2;
  width: clamp(195px, 21vw, 290px);
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.78)) drop-shadow(0 0 28px rgba(255, 201, 64, 0.28));
  animation: hover 5.2s ease-in-out infinite;
}

/* 1:1 In-Game Block Tile from Block Burst source */
.block-tile {
  --bevel-size: 12%;
  position: relative;
  border: 0;
  border-radius: 0;
  background: conic-gradient(
    from -45deg at 50% 50%,
    var(--edge-top) 0deg 90deg,
    var(--edge-right) 90deg 180deg,
    var(--edge-bottom) 180deg 270deg,
    var(--edge-left) 270deg 360deg
  );
  background-repeat: no-repeat;
  box-shadow:
    0 0 0 1px rgb(14 20 51 / 65%),
    0 20px 36px rgb(4 9 28 / 75%);
}
.block-tile::before {
  position: absolute;
  z-index: 0;
  inset: var(--bevel-size);
  border-radius: 0;
  background: linear-gradient(180deg, var(--face-top) 0%, var(--face-bottom) 100%);
  background-repeat: no-repeat;
  box-shadow: inset 0 1px rgb(255 255 255 / 14%), inset 0 -1px rgb(18 14 53 / 18%);
  content: '';
  pointer-events: none;
}
.block-tile--feature {
  --face-top: #e9c787;
  --face-bottom: #b98649;
  --edge-top: #ffe4a9;
  --edge-right: #9d6737;
  --edge-bottom: #704220;
  --edge-left: #d8aa67;
}
.burst-block {
  position: absolute;
  z-index: 3;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.burst-block img {
  position: relative;
  z-index: 2;
  width: 78%;
  height: 78%;
  object-fit: contain;
}
.block-purple {
  width: clamp(86px, 9.5vw, 126px);
  top: 6%;
  left: 10%;
  transform: rotate(-10deg);
  animation: hover 4.8s ease-in-out -1s infinite;
}
.block-gold {
  width: clamp(92px, 10vw, 134px);
  top: 8%;
  right: 9%;
  transform: rotate(9deg);
  animation: hover 5.6s ease-in-out -2.4s infinite;
}
.block-emerald {
  width: clamp(84px, 9.2vw, 122px);
  bottom: 8%;
  left: 13%;
  transform: rotate(7deg);
  animation: hover 6.1s ease-in-out -3.2s infinite;
}
.block-red {
  width: clamp(86px, 9.5vw, 126px);
  bottom: 9%;
  right: 11%;
  transform: rotate(-8deg);
  animation: hover 5.1s ease-in-out -0.7s infinite;
}

/* Per-world color & atmospheric tint */
.world--tome {
  --accent: var(--gold);
  --world-tint: linear-gradient(90deg, rgba(14, 5, 10, 0.92) 0%, rgba(14, 5, 10, 0.68) 46%, rgba(14, 5, 10, 0.32) 100%);
}
.world--lair {
  --accent: var(--ember);
  --world-tint: radial-gradient(ellipse 55% 75% at 50% 50%, rgba(18, 8, 4, 0.86) 0%, rgba(18, 8, 4, 0.58) 65%, rgba(18, 8, 4, 0.78) 100%);
}
.world--burst {
  --accent: #ffc940;
  --world-bg:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560'%3E%3Cg fill-opacity='.16'%3E%3Cg fill='%2379a7ff'%3E%3Crect x='40' y='60' width='26' height='26' rx='3'/%3E%3Crect x='68' y='60' width='26' height='26' rx='3'/%3E%3Crect x='96' y='60' width='26' height='26' rx='3'/%3E%3C/g%3E%3Cg fill='%2338d6a6'%3E%3Crect x='400' y='120' width='26' height='26' rx='3'/%3E%3Crect x='428' y='120' width='26' height='26' rx='3'/%3E%3Crect x='428' y='148' width='26' height='26' rx='3'/%3E%3Crect x='456' y='148' width='26' height='26' rx='3'/%3E%3C/g%3E%3Cg fill='%23b28cff'%3E%3Crect x='250' y='330' width='26' height='26' rx='3'/%3E%3Crect x='250' y='358' width='26' height='26' rx='3'/%3E%3Crect x='278' y='358' width='26' height='26' rx='3'/%3E%3C/g%3E%3Cg fill='%23ffc940'%3E%3Crect x='90' y='440' width='26' height='26' rx='3'/%3E%3Crect x='90' y='468' width='26' height='26' rx='3'/%3E%3Crect x='90' y='496' width='26' height='26' rx='3'/%3E%3Crect x='118' y='496' width='26' height='26' rx='3'/%3E%3C/g%3E%3Cg fill='%23ff6b6b'%3E%3Crect x='470' y='420' width='26' height='26' rx='3'/%3E%3Crect x='498' y='420' width='26' height='26' rx='3'/%3E%3Crect x='470' y='448' width='26' height='26' rx='3'/%3E%3Crect x='498' y='448' width='26' height='26' rx='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") 0 0 / 560px repeat,
    radial-gradient(ellipse 70% 80% at 70% 50%, #2c5bc4 0%, #1b3a8a 45%, #0d1d4a 100%);
  --world-tint: linear-gradient(90deg, rgba(6, 12, 32, 0.65) 0%, rgba(6, 12, 32, 0.22) 50%, transparent 100%);
}
.world--burst::before { transform: none; }

/* =========================================================
   STUDIO
   ========================================================= */
.studio { padding: var(--section) 0; }
.studio-head { max-width: 780px; }
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(56px, 7vw, 88px);
}
.principles > div {
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.principles .num {
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--soul);
  margin-bottom: 14px;
}
.principles p { color: var(--muted); margin-top: 10px; font-size: 0.97rem; }

/* =========================================================
   CONTACT + FOOTER
   ========================================================= */
.contact {
  padding: var(--section) 0;
  text-align: center;
  background: radial-gradient(ellipse 60% 70% at 50% 100%, rgba(103, 232, 207, 0.1), transparent 70%);
  border-top: 1px solid var(--line);
}
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact h2 { font-size: clamp(2.6rem, 6.5vw, 5.25rem); max-width: 16ch; }
.contact-sub {
  color: var(--muted);
  margin-top: 18px;
  font-size: 1.02rem;
}
.contact-mail {
  margin-top: 28px;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 600;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--soul);
  transition: color 0.2s ease;
  word-break: break-all;
}
.contact-mail:hover { color: var(--soul); }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
}
.footer-inner a:hover { color: var(--ink); }
.age { color: #f2a3ae; }

/* =========================================================
   REVEAL (only when JS is running)
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .flagship-grid,
  .world-grid { grid-template-columns: 1fr; }

  .lair-duel-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lair-duel-grid .world-copy--center {
    grid-column: 1 / -1;
    order: -1;
  }

  .world--tome,
  .world--lair {
    --world-tint: linear-gradient(180deg, rgba(10, 5, 8, 0.84) 0%, rgba(10, 5, 8, 0.58) 100%);
  }

  .principles { grid-template-columns: 1fr; gap: 0; }
  .principles > div { padding-bottom: 26px; }

  .castle-left  { top: 18%; left: -8vw; width: 34vw; }
  .keeper { right: 6vw; bottom: 12%; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: block; z-index: 2; }
  .site-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    background: rgba(6, 11, 20, 0.97);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
  }
  .site-nav a { font-size: 1.05rem; }
  .nav-open .site-nav { opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }

  .hero { align-items: flex-end; padding-bottom: 96px; }
  .hero-content { padding-top: 0; }
  .castle-left  { width: 64vw; left: -18vw; top: 15%; }
  .castle-right { width: 70vw; right: -22vw; top: 6%; }
  .island-a { left: 8%; top: 40%; width: 90px; }
  .island-b { right: 6%; top: 34%; width: 80px; }
  .keeper { height: 120px; right: 4vw; bottom: auto; top: 30%; }
  .rocks-left, .rocks-right { width: 46vw; }
  .scene::after {
    background:
      radial-gradient(ellipse 80% 30% at 50% 68%, rgba(5, 12, 26, 0.6), transparent 70%),
      linear-gradient(180deg, rgba(6, 11, 20, 0.5) 0%, transparent 18%, transparent 70%, var(--night-2) 100%);
  }
  .hero-actions { flex-direction: column; gap: 20px; }

  .character-triad { min-height: 340px; }
  .triad-main { width: 195px; }
  .triad-side { width: 130px; }

  .character-stage { min-height: 340px; }
  .character-stage .char-primary { max-height: 320px; }
  .lair-fighter img { max-height: 250px; }
  .burst-chest { width: 175px; }
  .burst-block { width: 76px; }

  .world-logo { max-height: 110px; max-width: 260px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
