/* Loresa — “night realm” landing: purpose-built for a small, magical 2D platformer */

:root {
  --void: #06040c;
  --night: #0f0818;
  --plum: #1a0a2c;
  --mauve: #2d1b4a;
  --mist: #c9bdd9;
  --text: #e9e2f2;
  --muted: #9a8fb0;
  --gold: #e8b84a;
  --gold-bright: #f5d47a;
  --rose: #ff6b8a;
  --rose-dim: rgba(255, 107, 138, 0.35);
  --glass: rgba(18, 10, 32, 0.72);
  --glass-bright: rgba(35, 22, 55, 0.55);
  --stroke: rgba(232, 184, 74, 0.22);
  --font-display: "Fraunces", "Georgia", serif;
  --font-sans: "Nunito", system-ui, sans-serif;
  --shadow-deep: 0 24px 80px rgba(0, 0, 0, 0.55);
  --radius: 20px;
  --radius-sm: 12px;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--void);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Depth: blurred in-game art + night wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background: url("../images/Photo1.jpg") center/cover no-repeat;
  filter: blur(20px) brightness(0.28) saturate(0.9);
  transform: scale(1.08);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 100% 80% at 15% 0%, rgba(88, 28, 135, 0.45) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 30%, rgba(180, 40, 90, 0.22) 0%, transparent 45%),
    linear-gradient(180deg, var(--plum) 0%, var(--void) 42%, #080510 100%);
  opacity: 0.97;
  pointer-events: none;
}

.sky-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 12%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 22% 45%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.2px 1.2px at 45% 8%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 88% 18%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.2px 1.2px at 92% 75%, rgba(255, 255, 255, 0.4), transparent);
  background-size: 100% 100%;
  pointer-events: none;
  opacity: 0.5;
  animation: twinkle 8s ease-in-out infinite;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(0, 0, 0, 0.55) 100%);
  mix-blend-mode: multiply;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.6; }
}

/* ——— Site header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__glow {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 20%, var(--rose) 50%, var(--gold) 80%, transparent 100%);
  opacity: 0.45;
  pointer-events: none;
}

.navbar {
  position: relative;
  padding: 0 clamp(16px, 3.5vw, 36px);
  background: linear-gradient(180deg, rgba(8, 5, 16, 0.97) 0%, rgba(12, 7, 22, 0.92) 50%, rgba(10, 6, 18, 0.88) 100%);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  border-bottom: 1px solid rgba(232, 184, 74, 0.15);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 40px rgba(0, 0, 0, 0.5);
}

.navbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(232, 184, 74, 0.35) 15%, rgba(255, 107, 138, 0.25) 50%, rgba(232, 184, 74, 0.35) 85%, transparent 100%);
  pointer-events: none;
  opacity: 0.6;
}

.navbar__shell {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2.5vw, 28px);
  padding: 10px 0;
}

.navbar__brand {
  display: flex;
  align-items: center;
  padding: 4px 4px;
  line-height: 0;
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.navbar__brand:hover,
.navbar__brand:focus-visible {
  background: rgba(232, 184, 74, 0.06);
  box-shadow: 0 0 0 1px rgba(232, 184, 74, 0.15);
  transform: translateY(-0.5px);
  outline: none;
}

.navbar__brand .logo-wide {
  display: block;
  width: min(200px, 40vw);
  max-height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 16px rgba(232, 184, 74, 0.2));
  transition: filter 0.2s, transform 0.2s;
}

.navbar__brand:hover .logo-wide,
.navbar__brand:focus-visible .logo-wide {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 20px rgba(232, 184, 74, 0.35));
}

.navbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 2vw, 16px);
  min-width: 0;
  flex: 1;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.nav-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 100px;
  background: linear-gradient(180deg, rgba(35, 20, 55, 0.85) 0%, rgba(20, 10, 35, 0.75) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.seg-btn {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  border-radius: 100px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.seg-btn::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
  opacity: 0.8;
  pointer-events: none;
}

.seg-btn:hover,
.seg-btn:focus-visible {
  color: var(--gold-bright);
  background: rgba(232, 184, 74, 0.12);
  box-shadow: 0 0 0 1px rgba(232, 184, 74, 0.2);
  outline: none;
}

.seg-btn:hover::after,
.seg-btn:focus-visible::after {
  transform: scaleX(0.6);
}

.navbar__sep {
  flex: 0 0 auto;
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.25) 30%, rgba(255, 255, 255, 0.12) 70%, transparent);
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.3);
  opacity: 0.7;
  align-self: center;
}

.download-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 44px;
  padding: 8px 18px 7px;
  text-align: center;
  text-decoration: none;
  color: #1a0a0e;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 12px;
  background: linear-gradient(165deg, #fff0c2 0%, var(--gold-bright) 20%, var(--gold) 75%, #c9952e 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 8px 28px rgba(232, 184, 74, 0.4);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  flex-shrink: 0;
}

.download-btn__text {
  display: block;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
}

.download-btn__hint {
  display: block;
  margin-top: 1px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  opacity: 0.5;
  text-transform: none;
}

.download-btn:hover,
.download-btn:focus-visible {
  filter: brightness(1.06) saturate(1.05);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 12px 36px rgba(232, 184, 74, 0.5);
  outline: none;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(40px, 6vw, 80px) clamp(18px, 4vw, 40px) clamp(48px, 7vw, 100px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 20%, rgba(255, 107, 138, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(88, 28, 135, 0.25) 0%, transparent 50%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.hero__copy {
  max-width: 38rem;
}

.hero__badge {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mauve);
  background: linear-gradient(90deg, rgba(232, 184, 74, 0.95) 0%, var(--gold-bright) 100%);
  border-radius: 9999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  font-weight: 700;
  font-optical-sizing: auto;
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--gold-bright) 40%, #ffb080 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.45));
}

.hero__tagline {
  margin: 1.1rem 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--mist);
  font-weight: 500;
  line-height: 1.6;
  max-width: 34em;
}

.hero__meta {
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.hero__dot {
  opacity: 0.5;
  user-select: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.75rem;
}

.btn-hero {
  display: inline-block;
  padding: 16px 28px;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 800;
  text-decoration: none;
  color: #120818;
  background: linear-gradient(180deg, #fff4d4 0%, var(--gold) 100%);
  border: none;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 10px 40px rgba(232, 184, 74, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn-hero:hover,
.btn-hero:focus-visible {
  filter: brightness(1.05);
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 16px 48px rgba(232, 184, 74, 0.45);
  outline: none;
}

.btn-hero-outline {
  display: inline-block;
  padding: 16px 28px;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  background: rgba(26, 10, 44, 0.6);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px var(--stroke);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-hero-outline:hover,
.btn-hero-outline:focus-visible {
  background: rgba(45, 27, 74, 0.75);
  color: var(--gold-bright);
  box-shadow: inset 0 0 0 1.5px var(--gold);
  transform: translateY(-2px);
  outline: none;
}

/* Hero “window” with real game art */
.hero__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero__portrait {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
  background: var(--night) url("../images/Photo1.jpg") center/cover no-repeat;
  box-shadow:
    var(--shadow-deep),
    0 0 0 1px var(--stroke),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero__portrait:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.01);
  box-shadow: var(--shadow-deep), 0 0 0 1px var(--gold), 0 0 60px var(--rose-dim);
}

.hero__portrait-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.2) 0%, transparent 42%, transparent 100%);
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.hero__portrait-label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 0.35rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(6, 4, 12, 0.7);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero__whisper {
  margin: 1.25rem 0 0;
  max-width: 20rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.4;
}

/* ——— Main ——— */
.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px) clamp(48px, 6vw, 80px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 3vw, 40px);
  align-items: flex-start;
}

.content {
  flex: 1.4;
  min-width: 280px;
}

/* Cards */
.card {
  position: relative;
  margin-bottom: 1.5rem;
  padding: 1.75rem 1.9rem 2rem;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25), 0 20px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 1px solid rgba(232, 184, 74, 0.18);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12) 50%, transparent);
  opacity: 0.5;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 184, 74, 0.28);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2), 0 28px 60px rgba(0, 0, 0, 0.45);
}

.card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  font-weight: 600;
  margin: 0.35rem 0 1rem;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.card h2 em {
  color: var(--gold-bright);
  font-style: italic;
  font-weight: 700;
}

.section-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose);
  opacity: 0.9;
}

.lede {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--mist);
  font-weight: 500;
  margin: 0 0 1rem;
}

.card p {
  margin: 0 0 0.9rem;
  color: var(--text);
  opacity: 0.95;
}

.card p:last-child {
  margin-bottom: 0;
}

#about h2 {
  text-align: left;
}

.card--accent {
  background: linear-gradient(165deg, rgba(50, 25, 80, 0.55) 0%, var(--glass) 100%);
  border-top-color: rgba(255, 107, 138, 0.35);
}

.card--download {
  text-align: center;
  padding-bottom: 2.25rem;
  border: 1px solid rgba(232, 184, 74, 0.35);
  background: linear-gradient(180deg, rgba(30, 15, 50, 0.85) 0%, rgba(15, 8, 24, 0.92) 100%);
  box-shadow: 0 0 0 1px rgba(232, 184, 74, 0.12), 0 24px 60px rgba(0, 0, 0, 0.5);
}

.card--download h2 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
}

.card--download .section-eyebrow {
  color: var(--gold);
}

.download-hero__note {
  max-width: 32rem;
  margin: 0 auto 1.5rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.feature-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.feature-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text);
  line-height: 1.55;
}

.feature-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.1rem;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 1px;
  transform: rotate(45deg);
  box-shadow: 0 0 8px var(--gold);
}

.feature-list strong {
  color: var(--gold-bright);
  font-weight: 700;
}

/* Section pieces: each block is its own “tome” */
#about.card,
#gameplay.card,
#features.card,
#whyplay.card {
  margin-bottom: 1.5rem;
}

/* Buttons in content */
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 16rem;
  padding: 1.1rem 1.5rem 1.15rem;
  text-decoration: none;
  color: #160810;
  font-family: var(--font-sans);
  font-weight: 800;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffe9a0 0%, var(--gold) 45%, #c9952e 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 10px 40px rgba(232, 184, 74, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn--xl {
  min-width: min(100%, 22rem);
  padding: 1.2rem 1.75rem 1.3rem;
}

.btn__label {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.btn__sub {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn:hover,
.btn:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 16px 48px rgba(232, 184, 74, 0.45);
  outline: none;
}

.center {
  text-align: center;
}

.note {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Sidebar & gallery */
.sidebar {
  flex: 0.9;
  min-width: 260px;
  position: sticky;
  top: 88px;
  padding: 1.5rem 1.35rem 1.6rem;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-deep);
  align-self: flex-start;
}

.sidebar-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose);
  opacity: 0.9;
}

.sidebar h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #fff;
}

.sidebar-lead {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gallery__item {
  position: relative;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.2s, box-shadow 0.2s, z-index 0.2s;
  font: inherit;
  color: inherit;
}

.gallery__item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  z-index: 2;
}

.gallery__item:hover,
.gallery__item:focus-visible {
  transform: scale(1.03);
  box-shadow: 0 0 0 1px var(--stroke), 0 12px 28px rgba(0, 0, 0, 0.5);
}

.gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Gallery lightbox */
body.modal-open {
  overflow: hidden;
  touch-action: none;
}

.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 24px);
  animation: modal-in 0.25s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal__scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 100% at 50% 40%, rgba(8, 4, 18, 0.65) 0%, rgba(4, 2, 10, 0.94) 100%);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: min(100%, 1000px);
  max-height: min(96vh, 900px);
  background: linear-gradient(165deg, rgba(20, 12, 38, 0.97) 0%, rgba(8, 4, 16, 0.98) 100%);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(232, 184, 74, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.5) inset,
    0 32px 80px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(88, 28, 135, 0.15);
  overflow: hidden;
}

.modal__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(30, 18, 50, 0.6) 0%, transparent 100%);
  flex-shrink: 0;
}

.modal__counter {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(232, 184, 74, 0.25);
}

.modal__close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.modal__close:hover,
.modal__close:focus-visible {
  color: var(--plum);
  background: var(--gold);
  border-color: var(--gold);
  outline: none;
  transform: scale(1.04);
}

.modal__stage {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 8px 8px 6px;
  min-height: 0;
  flex: 1 1 auto;
}

.modal__nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-height: 120px;
  margin: 0;
  padding: 0 4px;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.modal__nav:hover,
.modal__nav:focus-visible {
  color: var(--gold-bright);
  background: rgba(232, 184, 74, 0.12);
  box-shadow: 0 0 0 1px var(--stroke);
  outline: none;
}

.modal__frame {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 0 4px 8px;
  max-height: min(70vh, 640px);
}

.modal__img {
  display: block;
  max-width: 100%;
  max-height: min(70vh, 640px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.modal__hint {
  margin: 0;
  padding: 0 16px 14px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.8;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .modal__panel {
    max-height: 100%;
    border-radius: 16px;
  }

  .modal__stage {
    padding: 4px 4px 4px;
  }

  .modal__nav {
    width: 40px;
    min-height: 100px;
    font-size: 1.5rem;
    border-radius: 10px;
  }

  .modal__frame {
    max-height: 58vh;
    padding: 0 0 2px;
  }

  .modal__img {
    max-height: 52vh;
  }

  .modal__hint {
    font-size: 0.65rem;
    padding-bottom: 10px;
  }
}

/* Footer */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
  margin: 0;
}

.footer-brand {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__copy {
    max-width: none;
  }

  .hero__title {
    font-size: clamp(2.4rem, 10vw, 3.2rem);
  }

  .hero__meta {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero__portrait {
    max-width: 100%;
    margin: 0 auto;
    transform: none;
  }

  .hero__portrait:hover {
    transform: scale(1.01);
  }

  .hero__stage {
    order: -1;
  }

  .hero__whisper {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .navbar__shell {
    flex-direction: column;
    align-items: stretch;
    padding: 6px 0 10px;
    gap: 14px;
  }

  .navbar__brand {
    justify-content: center;
    width: 100%;
    padding: 6px 12px;
  }

  .navbar__actions {
    flex-direction: column;
    width: 100%;
    flex: none;
    gap: 12px;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
  }

  .nav-group {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    padding: 5px 5px 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    border-radius: 16px;
    scrollbar-width: thin;
  }

  .nav-group::-webkit-scrollbar {
    height: 3px;
  }
  .nav-group::-webkit-scrollbar-thumb {
    background: rgba(232, 184, 74, 0.35);
    border-radius: 2px;
  }

  .nav-group .seg-btn {
    scroll-snap-align: start;
  }

  .navbar__sep {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12) 20%, rgba(255, 255, 255, 0.12) 80%, transparent);
    box-shadow: none;
  }

  .download-btn {
    width: 100%;
    max-width: 22rem;
    margin: 0 auto;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 0.4rem;
    min-height: 48px;
    padding: 10px 20px 9px;
  }

  .download-btn__hint {
    display: none;
  }

  .container {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    order: -1;
    width: 100%;
  }

  .content,
  .sidebar {
    min-width: 0;
  }

  .card {
    padding: 1.35rem 1.25rem 1.5rem;
  }

  .modal__img {
    max-height: 68vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .sky-layer {
    animation: none;
  }
  .modal {
    animation: none;
  }
  .card,
  .btn,
  .btn-hero,
  .btn-hero-outline,
  .download-btn,
  .seg-btn,
  .navbar,
  .navbar__brand,
  .site-header,
  .hero__portrait,
  .gallery__item,
  .modal__close,
  .modal__nav {
    transition: none;
  }
  .seg-btn::after {
    transition: none;
  }
  .card:hover,
  .hero__portrait:hover,
  .gallery__item:hover,
  .download-btn:hover,
  .navbar__brand:hover {
    transform: none;
  }
}

img, video, canvas {
  max-width: 100%;
  height: auto;
}
