/* ============================================
   HENRIKO-STYLE TEXTURE PACK SITE
   Thème: Sombre, cinématique, inspiré de
   Fragile Dreams: Farewell Ruins of the Moon
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --bg-void: #0a0d12;
  --bg-deep: #11151c;
  --bg-panel: #161b24;
  --fog: #3d4a5c;
  --fog-light: #5a6b80;
  --ember: #c9a876;
  --ember-bright: #e0c294;
  --text-main: #e8e6e1;
  --text-dim: #9aa3ad;
  --line: rgba(201, 168, 118, 0.18);

  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Jost', sans-serif;

  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --particle-center: #e0c294;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--ember); color: var(--bg-void); }

:focus-visible {
  outline: 1px solid var(--ember-bright);
  outline-offset: 3px;
}

/* ---------- Ambient particles (signature element) ---------- */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  contain: strict;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--particle-center, #F49CCB);
  box-shadow:
    0 0 6px 3px var(--particle-glow, rgba(224, 194, 148, 0.5)),
    0 0 18px 8px var(--particle-glow, rgba(224, 194, 148, 0.25));
  opacity: 0;
  animation: drift var(--drift-dur, 8s) linear infinite, flicker var(--flicker-dur, 12s) ease-in-out infinite;
  transition: background 1.2s ease, box-shadow 1.2s ease;
  will-change: transform, opacity, filter;
}

@keyframes drift {
  0%   { opacity: 0; transform: translateY(0) translateX(0); }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-110vh) translateX(20px); }
}

@keyframes flicker {
  0%   { filter: brightness(1); }
  15%  { filter: brightness(0.3); }
  30%  { filter: brightness(1); }
  50%  { filter: brightness(0.5); }
  70%  { filter: brightness(1); }
  85%  { filter: brightness(0.4); }
  100% { filter: brightness(1); }
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px 72px;
  background: linear-gradient(to bottom,
    rgba(10,13,18,0.92) 0%,
    rgba(10,13,18,0.6) 35%,
    rgba(10,13,18,0) 100%);
  transform: translateZ(0);
}

.lining { font-variant-numeric: lining-nums; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--ember-bright);
  font-variant-numeric: lining-nums;
}

.nav-by {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-left: 6px;
  align-self: flex-end;
  margin-bottom: 2px;
}

.nav-brand .mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 12px 3px rgba(201,168,118,0.6);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.fx-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 12px;
  color: var(--ember);
  opacity: 0.8;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.fx-toggle:hover { opacity: 1; border-color: var(--ember); }
.fx-toggle.off {
  color: var(--text-dim);
  opacity: 0.4;
  border-color: var(--line);
}

/* ---------- Language picker ---------- */
.lang-picker {
  position: relative;
  flex-shrink: 0;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 10px;
  color: var(--text-dim);
  opacity: 0.8;
  transition: opacity 0.2s, border-color 0.2s;
}
.lang-btn:hover { opacity: 1; border-color: var(--ember); color: var(--ember); }

#lang-flag { font-size: 1rem; line-height: 1; }
#lang-code { font-size: 0.7rem; font-weight: 500; }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0e1420;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-width: 150px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.lang-dropdown.open { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.lang-option:hover { background: rgba(255,255,255,0.06); color: var(--ember); }
.lang-option.active { color: var(--ember-bright); }

body.fx-off .particles,
body.fx-off #water-canvas { display: none; }

.nav-links {
  display: flex;
  gap: 38px;
  list-style: none;
}

.nav-links button {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s var(--ease);
}

.nav-links button::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0%;
  height: 1px;
  background: var(--ember-bright);
  transition: width 0.35s var(--ease);
}

.nav-links button:hover,
.nav-links button.active {
  color: var(--text-main);
}

.nav-links button.active::after,
.nav-links button:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  z-index: 110;
}
.nav-toggle span {
  width: 24px; height: 1px;
  background: var(--text-main);
}

/* ---------- View / transition system ---------- */
.view-stage {
  position: relative;
  min-height: 100vh;
}

.view {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.view.active, .view.leaving {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

.view.active {
  position: relative;
  z-index: 4;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.view.leaving {
  position: absolute;
  z-index: 3;
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-layer {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  will-change: transform;
}

.hero-layer.sky {
  background: radial-gradient(ellipse at 50% 30%, #1a2230 0%, #0a0d12 70%);
}

.hero-layer.stars {
  background-image:
    radial-gradient(1px 1px at 10% 20%, white, transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(1.5px 1.5px at 60% 40%, white, transparent),
    radial-gradient(1px 1px at 30% 70%, white, transparent),
    radial-gradient(1px 1px at 90% 60%, white, transparent),
    radial-gradient(1.5px 1.5px at 45% 85%, white, transparent),
    radial-gradient(1px 1px at 15% 50%, white, transparent),
    radial-gradient(1px 1px at 70% 75%, white, transparent);
  opacity: 0.5;
}

.hero-layer.ruins {
  background: linear-gradient(to top, #11151c 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 0 24px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 18px;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: var(--text-main);
  opacity: 0;
  animation: fadeUp 1.1s var(--ease) 0.4s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--ember-bright);
  font-variant-numeric: lining-nums;
}

.hero-sub {
  margin-top: 22px;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-dim);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  opacity: 0;
  animation: fadeUp 1.1s var(--ease) 0.6s forwards;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1.1s var(--ease) 0.8s forwards;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: all 0.35s var(--ease);
}

.btn-primary {
  background: var(--ember);
  color: var(--bg-void);
  border-color: var(--ember);
}
.btn-primary:hover {
  background: var(--ember-bright);
  border-color: var(--ember-bright);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text-main);
}
.btn-ghost:hover {
  border-color: var(--ember);
  color: var(--ember-bright);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.btn-discord {
  background: #5865F2;
  color: #fff;
  border-color: #5865F2;
}
.btn-discord:hover {
  background: #4752c4;
  border-color: #4752c4;
  transform: translateY(-2px);
}

.btn-soon {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
}
.btn-soon-tag {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 4px;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  animation: fadeUp 1s var(--ease) 1.1s forwards;
}

.scroll-cue .line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--ember), transparent);
  animation: pulseLine 2s ease-in-out infinite;
}

@keyframes pulseLine {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ---------- Section shared ---------- */
.section {
  position: relative;
  padding: 140px 48px;
  max-width: 1240px;
  margin: 0 auto;
}

#view-home .section {
  padding-top: 72px;
}

.section-head {
  margin-bottom: 64px;
  text-align: center;
}

.section-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 500;
}

.section-desc {
  margin-top: 18px;
  color: var(--text-dim);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  font-weight: 300;
}

.project-layout {
  display: flex;
  gap: 48px;
  max-width: 860px;
  margin: 0 auto;
  align-items: stretch;
}

.project-desc {
  flex: 1 1 0;
  color: var(--text-dim);
  line-height: 1.8;
  font-weight: 300;
  font-size: 1rem;
  text-align: left;
}

.project-layout .fd-feature-list {
  flex: 1 1 0;
  border-left: 1px solid var(--line);
  padding-left: 48px;
}

/* ---------- Game grid (Texture Packs page) ---------- */
.game-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
}

.game-card {
  position: relative;
  width: 256px;
  height: 360px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--bg-panel);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.game-card.reveal-hidden {
  opacity: 0;
  transform: translateY(24px);
}

.game-card.reveal-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.game-card.reveal-visible:hover {
  transform: scale(1.07) !important;
}

.game-card.available:hover {
  transform: scale(1.07);
  border-color: var(--ember);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

.game-card-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 20%, #232b38 0%, #11151c 75%);
  background-size: cover;
  background-position: center bottom;
  transition: transform 0.6s var(--ease);
}

.game-card[data-view-link="starfox-adventure"] .game-card-bg {
  background-position: center 100% !important;
}

.game-card.available:hover .game-card-bg {
  transform: none;
}

#water-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}

.ambient-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 38%, #203048 0%, #0b1119 68%);
  z-index: 1;
  pointer-events: none;
  transform: translateZ(0);
}

.vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 75%, rgba(6, 9, 20, 0.12) 100%);
  z-index: 1;
  pointer-events: none;
  transform: translateZ(0);
}

.site-bg-reveal {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  filter: brightness(0.28);
  opacity: 0;
  transition: opacity 0.7s ease;
  z-index: 1;
  pointer-events: none;
  transform: translateZ(0);
}

.site-bg-reveal.active {
  opacity: 1;
}

.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,13,18,0.92) 0%, rgba(10,13,18,0.5) 28%, rgba(10,13,18,0) 45%);
}

.game-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 10px 18px 14px;
}

.game-card-tag {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  text-shadow: 1px 1px 0 rgba(0,0,0,1), -1px -1px 0 rgba(0,0,0,1), 0 1px 3px rgba(0,0,0,0.9);
  margin-bottom: 8px;
  display: block;
}

.game-card-name {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0,0,0,1), 0 2px 4px rgba(0,0,0,0.9);
}

.game-card-meta {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-shadow: 0 1px 3px rgba(0,0,0,0.95);
}

.game-card.locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.game-card.locked .game-card-tag { color: var(--fog-light); }

/* ---------- Fragile Dreams page ---------- */
#view-fragile-dreams {
  --ember: #FBAAFF;
  --ember-bright: #fcc0ff;
  --particle-center: #F49CCB;
}

#view-starfox-adventure {
  --ember: #FFD166;
  --ember-bright: #FFE7AD;
  --particle-center: #FFE39B;
}

.fd-hero {
  position: relative;
  padding: 72px 48px 28px;
  text-align: center;
  overflow: hidden;
}


.fd-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.fd-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('Cover_Fragile_Dreams.webp');
  background-size: cover;
  background-position: center 28%;
  filter: blur(8px);
  transform: scale(1.08);
  opacity: 0.7;
}
.fd-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10,13,18,0.55) 0%, rgba(10,13,18,0.85) 60%, #0a0d12 100%),
    linear-gradient(to right, #0a0d12 0%, transparent 20%, transparent 80%, #0a0d12 100%);
}

#view-starfox-adventure .fd-hero-bg::before {
  background-image: url('Cover_Starfox_Adventures.webp');
  background-size: cover;
  background-position: center 40%;
  filter: blur(8px);
  transform: scale(1.08);
  opacity: 0.78;
}

#view-starfox-adventure .fd-hero-bg::after {
  background:
    linear-gradient(to bottom, rgba(10,13,18,0.35) 0%, rgba(10,13,18,0.78) 60%, #0a0d12 100%),
    linear-gradient(to right, #0a0d12 0%, transparent 20%, transparent 80%, #0a0d12 100%);
}

.fd-crumb {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.fd-crumb button { color: var(--ember); }

.fd-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 500;
}

.fd-title-logo {
  max-width: 420px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.fd-title em { color: var(--ember-bright); font-style: italic; }

.fd-tagline {
  margin-top: 16px;
  color: var(--text-dim);
  font-weight: 300;
  max-width: 520px;
  margin-inline: auto;
}

.fd-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.fd-stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--ember-bright);
  line-height: 0.85;
}
.fd-stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--text-dim);
  margin-top: 0;
}

.fd-stat-date {
  font-size: 0.72rem;
  color: var(--fog-light);
  margin-top: 0;
  opacity: 0.85;
}

.fd-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 0;
}

/* ---------- Before/After compare sliders ---------- */
.fd-compare-eyebrow {
  margin-top: 28px;
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ember);
  opacity: 0.8;
}

.compare-section {
  width: 100%;
}

.compare-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: calc(100% - 500px);
  margin: 0 auto;
}

.compare-slider-wrap {
  display: flex;
  align-items: center;
}

.compare-arrow-ext {
  flex-shrink: 0;
  width: 100px;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.compare-arrow-ext img {
  width: 80px;
  height: auto;
  display: block;
}

.compare-arrow-ext .arrow-hover { display: none; }
.compare-arrow-ext:hover .arrow-normal { display: none; }
.compare-arrow-ext:hover .arrow-hover { display: block; }

.compare-arrow-ext.compare-prev img { transform: scaleX(-1); }

.compare-thumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  margin: 0 100px;
  position: relative;
}
.compare-thumbs::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, #0a0d12, transparent);
  z-index: 0;
  pointer-events: none;
}
.compare-thumb {
  position: relative;
  z-index: 1;
}

.compare-thumb {
  flex: 1;
  min-width: 0;
  aspect-ratio: 16/10;
  overflow: hidden;
  border: 3px solid transparent;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
  margin: 0 6px;
}

.compare-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compare-thumb { opacity: 0.7; }
.compare-thumb:hover { opacity: 1; }
.compare-thumb.active {
  border-color: #000;
  opacity: 1;
}

.compare-slider {
  position: relative;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
  aspect-ratio: 16/9;
  flex: 1;
  min-width: 0;
  cursor: default;
  user-select: none;
  touch-action: none;
}

.compare-before,
.compare-after {
  position: absolute;
  inset: 0;
}

.compare-before img,
.compare-after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.compare-inner {
  position: absolute;
  inset: 0;
  transform-origin: center;
  transition: transform 0.25s ease;
}

.compare-before { background: #0e1218; }

.compare-after {
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.compare-label {
  position: absolute;
  bottom: 10px;
  z-index: 4;
  pointer-events: none;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.45);
  padding: 3px 8px;
  border-radius: 3px;
  pointer-events: none;
}

.compare-label-left  { left: 12px; transition: opacity 0.2s; }
.compare-label-right { right: 12px; transition: opacity 0.2s; }

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 3;
}

.compare-line {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.75);
}

.compare-drag {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  color: #0a0d12;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  pointer-events: auto;
  cursor: col-resize;
}


.compare-zoom-hint {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.65);
  pointer-events: none;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.8));
}

.compare-fs-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.8));
  transition: color 0.2s, transform 0.15s;
}
.compare-fs-btn svg { width: 28px; height: 28px; }
.compare-fs-btn:hover { color: var(--ember-bright); transform: scale(1.15); }

.compare-slider:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: unset;
  border-radius: 0;
  cursor: col-resize;
}
.compare-slider:fullscreen .compare-before img,
.compare-slider:fullscreen .compare-after img {
  object-fit: contain;
}
.compare-slider:fullscreen .compare-fs-btn { opacity: 1; }

.fd-gallery-item {
  aspect-ratio: 16/10;
  border-radius: 4px;
  background: linear-gradient(135deg, #1c2330, #0e1218);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fog-light);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
}

.fd-detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}

.fd-feature-list {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fd-feature-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.6;
}

.fd-feature-list .dot {
  flex-shrink: 0;
  margin-top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px 2px rgba(201,168,118,0.5);
}

.fd-compact-info {
  list-style: none;
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

.fd-compact-info li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255,255,255,0.02);
  color: var(--text-dim);
  font-size: 0.94rem;
}

.fd-compact-info span {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fog-light);
  font-size: 0.72rem;
}

.fd-compact-info strong {
  color: var(--text-main);
  font-weight: 500;
  text-align: right;
}

.fd-timeline {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 0;
}
.fd-timeline::before {
  content: '';
  position: absolute;
  left: 68px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--line);
}
.fd-tl-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
  position: relative;
  opacity: 0.65;
}
.fd-tl-item::before {
  content: '';
  position: absolute;
  left: 62px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-dark);
  z-index: 1;
}
.fd-tl-done {
  opacity: 1;
}
.fd-tl-done::before {
  background: var(--ember);
  border-color: var(--ember);
  box-shadow: 0 0 8px rgba(224, 130, 80, 0.6);
}
.fd-tl-extra {
  margin-top: 6px;
}
.fd-tl-extra::before {
  border-style: dashed;
}
.fd-tl-ver {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--ember);
  width: 58px;
  flex-shrink: 0;
  text-align: right;
}
.fd-tl-done .fd-tl-ver {
  color: var(--ember-bright);
}
.fd-tl-extra .fd-tl-ver {
  color: var(--fog-light);
  opacity: 0.6;
}
.fd-tl-label {
  font-size: 1.15rem;
  color: var(--text-dim);
  padding-left: 18px;
}
.fd-tl-done .fd-tl-label {
  color: var(--text);
}

.fd-tl-has-video {
  flex-direction: column;
  align-items: stretch;
  cursor: pointer;
}
.fd-tl-has-video:hover .fd-tl-video-badge {
  background: rgba(224,130,80,0.25);
  border-color: var(--ember-bright);
  color: var(--ember-bright);
}
.fd-tl-row {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
}
.fd-tl-video-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  color: var(--ember);
  border: 1px solid var(--ember);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.fd-tl-item.fd-tl-open .fd-tl-video-badge {
  background: rgba(224,130,80,0.15);
}
.fd-tl-video-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
  padding-left: 76px;
}
.fd-tl-item.fd-tl-open .fd-tl-video-wrap {
  max-height: 520px;
}
.fd-tl-video-wrap iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 8px;
  margin-top: 10px;
  margin-bottom: 8px;
  display: block;
}

.fd-download-card {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 36px 0 36px 36px;
  position: sticky;
  top: 120px;
  margin-left: auto;
  width: 100%;
}

.fd-download-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.fd-download-card p {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 26px;
}

.fd-download-card .btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 14px;
}

.fd-version {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 48px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.8;
}

.site-footer .ember { color: var(--ember); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .fd-detail-grid { grid-template-columns: 1fr; }
  .fd-download-card { position: static; padding: 24px 0; }
  .fd-gallery { grid-template-columns: 1fr 1fr; }
  .compare-arrow-ext { width: 56px; }
  .compare-arrow-ext img { width: 44px; }
  .compare-thumbs { margin: 0 56px; }
  .compare-main { max-width: 100%; }
  .project-layout { flex-direction: column; gap: 32px; }
  .project-layout .fd-feature-list { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 32px; }
}

@media (max-width: 640px) {
  /* Nav */
  .site-nav { padding: 13px 18px 10px; }
  .nav-right { gap: 8px; }
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    background: linear-gradient(to bottom, #0a0d12 70%, transparent);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    z-index: 999;
    margin: 0;
    padding: 52px 28px 36px;
    list-style: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links button { font-size: 1rem; padding: 12px 0; width: 100%; text-align: left; }
  .nav-toggle { display: flex; z-index: 1000; }
  .fx-toggle span { display: none; }
  .fx-toggle { padding: 5px 9px; }
  .nav-brand { flex-direction: row; align-items: flex-start; gap: 8px; }
  .nav-brand .mark { margin-top: 13px; }
  .nav-title { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
  .nav-by { display: block; margin-bottom: 0; margin-left: 0; align-self: flex-start; margin-top: -3px; }

  /* Sections */
  .section { padding: 72px 18px 48px; }
  #view-home .section { padding-top: 48px; }

  /* Hero home */
  .hero-title { font-size: clamp(2.4rem, 10vw, 3.8rem); }
  .hero-sub { font-size: 0.9rem; padding: 0 8px; }

  /* FD hero */
  .fd-hero { padding: 90px 18px 12px; }
  .fd-title { font-size: clamp(2rem, 9vw, 3rem); }
  .fd-crumb { margin-bottom: 10px; }
  .fd-stat-num { font-size: 1.6rem; }
  .fd-stats { gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
  .fd-compare-eyebrow { margin-top: 14px; font-size: 0.7rem; }

  /* Compare slider */
  .compare-main { max-width: 100%; width: 100%; }
  .compare-slider-wrap { flex-direction: column; }
  .compare-arrow-ext { display: none; }
  .compare-slider { width: 100%; }
  .compare-thumbs {
    margin: 0;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .compare-thumbs::-webkit-scrollbar { display: none; }
  .compare-thumbs::before { display: none; }
  .compare-thumb {
    flex: 0 0 100px;
    min-width: 100px;
    aspect-ratio: 16/10;
    margin: 0;
    border-radius: 4px;
  }

  /* Timeline */
  .fd-timeline::before { left: 56px; }
  .fd-tl-item::before { left: 50px; }
  .fd-tl-ver { width: 46px; font-size: 0.85rem; }
  .fd-tl-label { font-size: 0.95rem; }

  /* Game cards */
  .game-grid { grid-template-columns: 1fr; }

  /* Gallery */
  .fd-gallery { grid-template-columns: 1fr; }
  .fd-stats { gap: 20px; }

  /* Lang picker dropdown */
  .lang-dropdown { position: fixed; right: 12px; left: auto; top: auto; }

  /* Footer */
  .site-footer { padding: 28px 18px; font-size: 0.72rem; }
}

@media (max-width: 400px) {
  .fd-stat-num { font-size: 1.3rem; }
  .hero-title { font-size: 2.2rem; }
  .compare-arrow-ext img { width: 28px; }
}

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