:root {
  --bg-void: #061024;
  --bg-deep: #08152e;
  --bg-card: #0d1f40;
  --bg-card-elevated: #122952;
  --border-subtle: rgba(125, 179, 255, 0.16);
  --border-bright: rgba(147, 197, 253, 0.34);

  --text-primary: #f2f6ff;
  --text-secondary: #a2badf;
  --text-muted: #6e8ab8;

  --cta-bg: #1e4ed8;
  --cta-hover: #2c62f5;
  --cta-shadow: rgba(30, 78, 216, 0.45);

  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-sign: 'Space Grotesk', system-ui, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-void);
  color: var(--text-primary);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background: radial-gradient(ellipse 120% 60% at 50% 0%, #0d224f 0%, var(--bg-void) 55%) no-repeat, var(--bg-void);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--cta-bg);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
}

/* ======================== HEADER ======================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  transition: background-color 220ms var(--ease-out), backdrop-filter 220ms var(--ease-out), border-color 220ms var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background-color: rgba(6, 16, 36, 0.78);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border-subtle);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  min-height: 44px;
  padding-right: 8px;
}

.brand-gem {
  display: inline-flex;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.55));
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(13, 31, 64, 0.76);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.lang-btn {
  min-width: 40px;
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sign);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: background-color 180ms ease, color 180ms ease;
}

.lang-btn.is-active {
  background: var(--cta-bg);
  color: #fff;
  box-shadow: 0 2px 10px rgba(30, 78, 216, 0.45);
}

.social-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: rgba(13, 31, 64, 0.78);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: transform 180ms var(--ease-out), background-color 180ms ease, border-color 180ms ease;
}

.icon-btn:hover {
  transform: translateY(-2px);
  background: rgba(30, 78, 216, 0.45);
  border-color: var(--border-bright);
}

/* ======================== HERO ======================== */
.hero {
  position: relative;
  min-height: min(100svh, 860px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 112px 24px 44px;
  overflow: hidden;
  isolation: isolate;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-scene-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.hero-sky-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 16, 36, 0.62) 0%,
    rgba(6, 16, 36, 0.34) 38%,
    rgba(6, 16, 36, 0.14) 68%,
    rgba(6, 16, 36, 0.6) 100%
  );
}

.hero-bottom-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  background: linear-gradient(to bottom, transparent 0%, var(--bg-void) 94%);
}

.ambient-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  animation: heroRise 700ms var(--ease-out) both;
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-greeting {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 600;
  color: #cfe2ff;
  text-shadow: 0 2px 12px rgba(6, 16, 36, 0.85);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.85rem, 6.4vw, 4.75rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-shadow: 0 6px 28px rgba(6, 16, 36, 0.82), 0 0 40px rgba(56, 189, 248, 0.2);
}

.hero-role {
  margin: 14px 0 12px;
  font-family: var(--font-sign);
  font-size: clamp(0.82rem, 1.4vw, 0.98rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #93c5fd;
  text-shadow: 0 2px 10px rgba(6, 16, 36, 0.9);
}

.hero-tagline {
  margin: 0 auto;
  max-width: 540px;
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  color: #e4eeff;
  text-shadow: 0 2px 14px rgba(6, 16, 36, 0.92);
}

.hero-meta-strip {
  margin-top: 18px;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.hero-fact {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: rgba(6, 16, 36, 0.65);
  border: 1px solid rgba(147, 197, 253, 0.28);
  backdrop-filter: blur(6px);
  font-family: var(--font-sign);
  font-size: 0.78rem;
  font-weight: 600;
  color: #dbeafe;
}

/* Scroll Signpost Button */
.scroll-sign {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  margin-top: 32px;
  transition: transform 200ms var(--ease-out);
}

.scroll-sign:hover {
  transform: translateY(3px);
}

.scroll-sign-board {
  padding: 10px 20px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(180deg, #b88c65 0%, #8b623f 100%);
  border: 2px solid #e7c8a2;
  box-shadow: 0 10px 24px rgba(6, 16, 36, 0.7), inset 0 1px 0 rgba(255, 244, 224, 0.45);
}

.scroll-sign-text {
  font-family: var(--font-sign);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #1f1207;
}

.scroll-sign-post {
  width: 10px;
  height: 16px;
  background: linear-gradient(90deg, #634227 0%, #865c38 60%, #4b311b 100%);
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}

/* ======================== JOURNEY & LEVELS ======================== */
.journey {
  position: relative;
  padding: 40px 24px 80px;
  background: var(--bg-void);
}

.trail-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.trail-stone {
  transition: fill 300ms ease, filter 300ms ease, opacity 300ms ease;
}

.trail-stone.is-lit {
  fill: #355890;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.55));
}

.journey-inner {
  position: relative;
  z-index: 1;
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 54px;
}

.level-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.level-row--right {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.level-prop {
  position: absolute;
  left: -36px;
  top: -68px;
  width: 132px;
  pointer-events: none;
  z-index: 0;
}

.prop-lantern-img {
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 68% 68% at 50% 50%, #000 45%, transparent 94%);
  mask-image: radial-gradient(ellipse 68% 68% at 50% 50%, #000 45%, transparent 94%);
  opacity: 0.92;
}

.level-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.portal-trigger {
  position: relative;
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  width: min(100%, 420px);
  transition: transform 280ms var(--ease-out);
}

.portal-trigger:hover {
  transform: translateY(-4px) scale(1.015);
}

.portal-aura {
  position: absolute;
  inset: 14% 16%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--level-glow, #38bdf8) 0%, transparent 72%);
  opacity: 0.24;
  filter: blur(26px);
  transition: opacity 280ms ease;
  pointer-events: none;
}

.portal-trigger:hover .portal-aura {
  opacity: 0.42;
}

.portal-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 68% 66% at 50% 50%, #000 50%, transparent 95%);
  mask-image: radial-gradient(ellipse 68% 66% at 50% 50%, #000 50%, transparent 95%);
}

.portal-trigger--lantern {
  width: min(100%, 220px);
}

.portal-img--lantern {
  aspect-ratio: 1 / 1;
}

/* Sculpted Wooden Level Signs */
.wood-sign {
  position: absolute;
  bottom: 12%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: linear-gradient(180deg, #3c6294 0%, #243f66 100%);
  border: 1.5px solid rgba(186, 230, 253, 0.5);
  box-shadow:
    0 10px 22px rgba(4, 10, 24, 0.75),
    0 0 18px rgba(56, 189, 248, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: rotate(-2deg);
}

.wood-sign::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: 10px;
  height: 15px;
  background: linear-gradient(180deg, #27446b 0%, #13233d 100%);
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}

.wood-sign--left {
  left: 4%;
}

.wood-sign--right {
  right: 4%;
  transform: rotate(2deg);
}

.wood-sign--final {
  position: relative;
  bottom: auto;
  transform: rotate(2deg);
}

.sign-label {
  font-family: var(--font-sign);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #f0f7ff;
  white-space: nowrap;
}

.sign-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  flex-shrink: 0;
}

/* Level Copy Column */
.level-copy {
  position: relative;
  z-index: 2;
  max-width: 400px;
}

.level-row--right .level-copy {
  justify-self: end;
}

.level-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.level-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.7vw, 2.05rem);
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
}

.level-badge {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.level-badge--purple { background: linear-gradient(135deg, #c084fc, #7e22ce); }
.level-badge--blue   { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.level-badge--amber  { background: linear-gradient(135deg, #fbbf24, #d97706); }
.level-badge--magenta{ background: linear-gradient(135deg, #f472b6, #a21caf); }
.level-badge--green  { background: linear-gradient(135deg, #4ade80, #15803d); }
.level-badge--sky    { background: linear-gradient(135deg, #38bdf8, #0284c7); }

.level-desc {
  margin: 0 0 20px;
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.level-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(147, 197, 253, 0.35);
  border-radius: var(--radius-pill);
  background: var(--cta-bg);
  color: #ffffff;
  font-family: var(--font-sign);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 6px 20px var(--cta-shadow);
  transition: transform 180ms var(--ease-out), background-color 180ms ease, box-shadow 180ms ease;
}

.level-cta:hover {
  transform: translateY(-2px);
  background: var(--cta-hover);
  box-shadow: 0 10px 26px rgba(44, 98, 245, 0.55);
}

.level-cta:active {
  transform: translateY(0);
}

/* Final Level Row */
.level-row--final {
  display: block;
  padding-top: 12px;
}

.final-stage {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  max-width: 820px;
  margin: 0 auto;
}

.level-copy--final {
  max-width: 390px;
}

.final-plaque-wrap {
  display: flex;
  justify-content: center;
}

.mobile-stones {
  display: none;
}

/* ======================== ADVENTURE MAP ======================== */
.adventure-map-section {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 84px auto 0;
}

.adventure-map-card {
  position: relative;
  padding: 42px 36px 34px;
  background: linear-gradient(165deg, #1b366a 0%, #122852 52%, #0e2044 100%);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 18px;
  box-shadow:
    0 28px 60px rgba(3, 8, 20, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.map-fold-crease {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(5, 12, 28, 0.34) 50%, rgba(255, 255, 255, 0.05) 55%, transparent);
}
.map-fold-crease--1 { left: 33.3%; }
.map-fold-crease--2 { left: 66.6%; }

.map-title {
  margin: 0 0 34px;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  font-weight: 700;
  color: #ffffff;
}

.map-nodes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.map-dotted-line {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 32px;
  height: 2px;
  border-top: 2px dashed rgba(162, 186, 223, 0.35);
  z-index: 0;
}

.map-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 6px 6px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text-primary);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms var(--ease-out);
}

.map-node:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.map-node.is-active {
  background: rgba(56, 189, 248, 0.11);
  border-color: rgba(125, 211, 252, 0.34);
}

.map-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 20px rgba(4, 10, 24, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.map-circle--purple { background: linear-gradient(135deg, #a855f7, #6b21a8); }
.map-circle--blue   { background: linear-gradient(135deg, #38bdf8, #1d4ed8); }
.map-circle--green  { background: linear-gradient(135deg, #4ade80, #15803d); }
.map-circle--magenta{ background: linear-gradient(135deg, #e879f9, #a21caf); }

.map-pin-wrap {
  margin-top: -6px;
  filter: drop-shadow(0 8px 18px rgba(245, 158, 11, 0.45));
}

.map-node-label {
  font-family: var(--font-sign);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #e2edff;
}

.map-node-label--here {
  color: #fde047;
}

.map-node-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.map-detail {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(6, 16, 36, 0.56);
  border: 1px solid rgba(147, 197, 253, 0.2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-detail-text {
  margin: 0;
  font-size: 0.92rem;
  color: #dbeafe;
  max-width: 68ch;
}

.map-detail-proof {
  font-family: var(--font-sign);
  font-size: 0.76rem;
  font-weight: 700;
  color: #7dd3fc;
  letter-spacing: 0.04em;
}

/* ======================== FOOTER ======================== */
.site-footer {
  background: linear-gradient(180deg, var(--bg-void) 0%, #040b1a 100%);
  padding: 64px 24px 36px;
  border-top: 1px solid rgba(125, 179, 255, 0.08);
}

.footer-inner {
  max-width: 1020px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) 230px;
  align-items: center;
  gap: 32px;
}

.footer-headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.7vw, 2.15rem);
  line-height: 1.18;
  font-weight: 700;
  color: #ffffff;
  max-width: 14ch;
}

.footer-contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-contacts li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-link,
.footer-location {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  min-height: 36px;
  transition: color 160ms ease;
}

.footer-link:hover {
  color: #ffffff;
}

.copy-chip {
  padding: 4px 11px;
  min-height: 30px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-bright);
  background: rgba(30, 78, 216, 0.25);
  color: #dbeafe;
  font-family: var(--font-sign);
  font-size: 0.72rem;
  font-weight: 700;
  transition: background-color 160ms ease;
}

.copy-chip:hover {
  background: var(--cta-bg);
}

.footer-art {
  display: flex;
  justify-content: flex-end;
}

.footer-pack-img {
  width: 220px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 68% 66% at 50% 50%, #000 50%, transparent 95%);
  mask-image: radial-gradient(ellipse 68% 66% at 50% 50%, #000 50%, transparent 95%);
}

.footer-bottom {
  max-width: 1020px;
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(125, 179, 255, 0.1);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-bottom p {
  margin: 0;
}

/* ======================== CODEX MODAL ======================== */
.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(4, 9, 22, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  position: relative;
  width: min(100%, 700px);
  max-height: min(88svh, 760px);
  overflow-y: auto;
  border-radius: 20px;
  background: linear-gradient(175deg, #102348 0%, #08152e 100%);
  border: 1px solid var(--border-bright);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  padding: 28px;
  color: var(--text-primary);
  animation: modalIn 220ms var(--ease-out) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--modal-accent, #38bdf8) 0%, transparent 72%);
  opacity: 0.25;
  filter: blur(28px);
  pointer-events: none;
}

.modal-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-level-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.35);
  color: #bae6fd;
  font-family: var(--font-sign);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
}

.modal-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(6, 16, 36, 0.65);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 160ms ease;
}

.modal-close:hover {
  background: rgba(30, 78, 216, 0.55);
}

.modal-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-lead {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.68;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.info-box {
  padding: 16px;
  border-radius: 14px;
  background: rgba(6, 16, 36, 0.56);
  border: 1px solid var(--border-subtle);
}

.info-box h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #ffffff;
}

.info-box p,
.info-box li {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.info-meta {
  font-family: var(--font-sign);
  font-size: 0.78rem;
  color: #93c5fd;
  margin-bottom: 8px;
  display: block;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tab {
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(6, 16, 36, 0.6);
  color: var(--text-secondary);
  font-family: var(--font-sign);
  font-size: 0.78rem;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.filter-tab.is-active {
  background: var(--cta-bg);
  border-color: rgba(147, 197, 253, 0.45);
  color: #ffffff;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  background: rgba(18, 41, 82, 0.85);
  border: 1px solid rgba(125, 179, 255, 0.22);
  font-size: 0.85rem;
  font-weight: 500;
  color: #e2edff;
}

.skill-tag[data-cat="tools"] { border-color: rgba(56, 189, 248, 0.42); }
.skill-tag[data-cat="hard"]  { border-color: rgba(168, 85, 247, 0.42); }
.skill-tag[data-cat="soft"]  { border-color: rgba(74, 222, 128, 0.42); }

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entry-card {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(6, 16, 36, 0.56);
  border: 1px solid var(--border-subtle);
}

.entry-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.entry-top h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.06rem;
  color: #ffffff;
}

.entry-period {
  font-family: var(--font-sign);
  font-size: 0.76rem;
  font-weight: 600;
  color: #7dd3fc;
}

.entry-org {
  margin: 0 0 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #cbd5e1;
}

.entry-bullets {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Contact Modal Form & Channels */
.contact-channels {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.channel-icon-btn {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 16, 36, 0.72);
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
  text-decoration: none;
  transition: transform 180ms var(--ease-out), background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.channel-icon-btn:hover {
  transform: translateY(-2px);
  background: rgba(30, 78, 216, 0.48);
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(30, 78, 216, 0.35);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(6, 16, 36, 0.45);
  border: 1px solid var(--border-subtle);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #dbeafe;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(13, 31, 64, 0.85);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
}

.form-field textarea {
  min-height: 88px;
  resize: vertical;
}

.form-error {
  margin: 0;
  font-size: 0.82rem;
  color: #fda4af;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn-secondary {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-bright);
  background: rgba(13, 31, 64, 0.85);
  color: #dbeafe;
  font-family: var(--font-sign);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 900px) {
  .level-prop {
    display: none;
  }

  .final-stage {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .final-plaque-wrap {
    grid-column: 1 / -1;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-headline {
    max-width: none;
  }

  .footer-contacts {
    align-items: center;
  }

  .footer-art {
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .site-header {
    padding: 10px 12px;
  }

  .header-inner {
    gap: 8px;
  }

  .brand {
    gap: 6px;
    padding-right: 2px;
  }

  .brand-gem svg {
    width: 22px;
    height: 22px;
  }

  .brand-text {
    font-size: 1.12rem;
  }

  .header-actions {
    gap: 6px;
  }

  .lang-switch {
    padding: 2px;
  }

  .lang-btn {
    min-width: 32px;
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .social-pills {
    gap: 5px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .icon-btn svg {
    width: 15px;
    height: 15px;
  }

  .trail-svg {
    display: none;
  }

  .journey-inner {
    gap: 24px;
  }

  .level-row,
  .level-row--right {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
  }

  .level-row--right .level-visual {
    order: -1;
  }

  .level-row--right .level-copy {
    justify-self: center;
  }

  .level-copy {
    margin: 0 auto;
  }

  .level-heading {
    justify-content: center;
  }

  .final-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .mobile-stones {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 2px 0;
  }

  .mobile-stones span {
    width: 16px;
    height: 10px;
    border-radius: 50%;
    background: #1b3158;
    border: 1px solid rgba(147, 197, 253, 0.2);
  }

  .adventure-map-card {
    padding: 28px 18px;
  }

  .map-fold-crease {
    display: none;
  }

  .map-nodes {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .map-dotted-line {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
