/* ── Landing page — Le Jeu de la Bête ────────────────────────── */

/* ── CSS Variables (inherited from the game's palette) ───────── */
:root {
  --bg-primary: #0e0a06;
  --bg-secondary: #181008;
  --color-primary: #c89040;
  --color-accent: #dfa030;
  --color-text: #ddd0b2;
  --color-text-dim: #8a7860;
  --color-border: rgba(200, 148, 60, 0.18);
  --font-title: 'Cardo', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --font-body: 'Cardo', Georgia, 'Times New Roman', serif;
  --radius-sm: 4px;
  --shadow-glow: 0 0 40px rgba(200, 160, 80, 0.12);
}

/* ── Reset ────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

::-moz-selection {
  background: var(--color-primary);
  color: var(--bg-primary);
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  /* Base layer: dark parchment texture with semi-transparent overlay */
  background:
    linear-gradient(rgba(14, 10, 6, 0.75), rgba(14, 10, 6, 0.75)),
    url('img/card_bg.jpg') center / cover no-repeat fixed;
  color: var(--color-text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Beast eyes — fades in from the right */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('img/bgbgws.jpg') center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 15%, black 60%);
  mask-image: linear-gradient(to left, transparent 30%, black 60%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle darkening vignette over everything */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, transparent 30%, rgba(0, 0, 0, 0.8) 100%),
    linear-gradient(to right, rgba(3, 2, 1, 0.6) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* ── Hide all scrollbars ──────────────────────────────────────── */
::-webkit-scrollbar {
  display: none;
}

* {
  scrollbar-width: none;
}

/* ── Main layout ──────────────────────────────────────────────── */
.landing {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── Left panel (scrollable content) ──────────────────────────── */
.panel-left {
  width: 50%;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  padding: 60px 56px 60px 72px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  background: linear-gradient(to right,
      rgba(10, 7, 4, 0.55) 0%,
      rgba(10, 7, 4, 0.45) 70%,
      rgba(10, 7, 4, 0.2) 95%,
      transparent 100%);
}

/* ── Language switcher ────────────────────────────────────────── */
.lang-switch {
  display: flex;
  gap: 6px;
  margin-bottom: 48px;
  align-self: flex-start;
}

.lang-btn {
  cursor: pointer;
  background: rgba(200, 148, 55, 0.05);
  color: var(--color-text-dim);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 16px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: rgba(200, 148, 55, 0.14);
  color: var(--color-text);
}

.lang-btn.active {
  background: rgba(200, 148, 55, 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ── Title ────────────────────────────────────────────────────── */
.menu-title {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  text-align: center;
}

.menu-title-sub {
  font-family: var(--font-title);
  font-size: 1.3rem;
  letter-spacing: 1em;
  color: var(--color-text-dim);
  text-transform: uppercase;
}

.menu-title-main {
  font-family: var(--font-title);
  font-size: 5rem;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.9),
    0 0 60px rgba(180, 130, 40, 0.2);
  line-height: 1;
}

.menu-subtitle {
  font-style: italic;
  color: var(--color-text-dim);
  font-size: 0.95rem;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

/* ── Divider ──────────────────────────────────────────────────── */
.menu-divider {
  width: 120px;
  height: 1px;
  opacity: 0.7;
  margin: 24px auto 36px auto;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}



/* ── Nav links (menu buttons) ─────────────────────────────────── */
.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  margin-bottom: 48px;
}

.menu-link {
  display: block;
  cursor: pointer;
  background: rgba(200, 148, 55, 0.06);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.menu-link:hover {
  background: rgba(200, 148, 55, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.menu-link--secondary {
  color: var(--color-text-dim);
  letter-spacing: 0.08em;
}

/* ── Content sections ─────────────────────────────────────────── */
.content-section {
  padding: 0 5em;
  margin: 2em auto;
  text-align: justify;
}

.content-section h2 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: var(--color-primary);
  letter-spacing: 0.08em;
  margin: 3em 0 1.5em 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 24px rgba(180, 130, 40, 0.18);
}

.content-section p {
  line-height: 1.75;
  color: var(--color-text);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.content-section ul {
  list-style: none;
  padding: 0;
}

.content-section li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  line-height: 1.65;
  font-size: 0.9rem;
  color: var(--color-text);
}

.content-section li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-size: 0.6rem;
  top: 5px;
  opacity: 0.6;
}

/* ── Footer ───────────────────────────────────────────────────── */
.landing-footer {
  margin-top: auto;
  padding-top: 40px;
  padding-bottom: 20px;
  font-size: 0.72rem;
  color: var(--color-text-dim);
  letter-spacing: 0.06em;
  opacity: 0.5;
}


/* ── Right panel (floating card) ──────────────────────────────── */
.panel-right {
  position: fixed;
  top: 0;
  right: 0;
  width: 50%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

/* Ambient glow behind the card */
.panel-right::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 148, 55, 0.08) 0%, transparent 70%);
  animation: ambientPulse 4s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
  from {
    transform: scale(0.9);
    opacity: 0.6;
  }

  to {
    transform: scale(1.15);
    opacity: 1;
  }
}

/* ── Floating card ────────────────────────────────────────────── */
.card-wrapper {
  animation: bounceCard 6s infinite ease;
  filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.7));
}

.card {
  width: 260px;
  height: 370px;
  perspective: 1000px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: center;
  animation: rotateCard 15s infinite linear;
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  /* Inner dark border for card feel */
  box-shadow:
    inset 0 0 0 1px rgba(180, 130, 48, 0.25),
    0 4px 18px rgba(0, 0, 0, 0.65);
}

.card-front img,
.card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-back {
  transform: rotateY(180deg);
}

/* Card front: parchment background with ornate frame overlay */
.card-front {
  background:
    url('img/card_front.png') center / contain no-repeat,
    url('img/card_bg.jpg') center / cover no-repeat;
}

/* Card back: dark beast eyes */
.card-back {
  background: url('img/bg.jpg') center / cover no-repeat;
}

/*suppression des bandes noires */
/* .card-front img {
  left: -3%;
  width: 107%;
  top: -3%;
  height: 107%;
} */

/* If images load, hide the background fallback */
.card-front img,
.card-back img {
  position: relative;
  z-index: 1;
}

@keyframes rotateCard {
  from {
    transform: rotateZ(8deg) rotateY(180deg);
  }

  to {
    transform: rotateZ(8deg) rotateY(540deg);
  }
}

@keyframes bounceCard {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(18px);
  }
}

/* ── Entrance animations ──────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out both;
}

.fade-in {
  animation: fadeIn 1s ease-out both;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.25s;
}

.delay-3 {
  animation-delay: 0.4s;
}

.delay-4 {
  animation-delay: 0.55s;
}

.delay-5 {
  animation-delay: 0.7s;
}

.delay-6 {
  animation-delay: 0.85s;
}

.delay-7 {
  animation-delay: 1.0s;
}

.delay-8 {
  animation-delay: 1.15s;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .panel-left {
    padding: 40px 36px 40px 40px;
  }

  .content-section {
    padding: 0 2.5em;
    margin: 3.5em auto;
  }

  .menu-title-main {
    font-size: 3.4rem;
  }

  .card {
    width: 220px;
    height: 310px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .landing {
    flex-direction: column;
    background:
      linear-gradient(to bottom, rgba(14, 10, 6, 0.98), rgba(18, 12, 8, 0.85)),
      url('img/card_bg.jpg') center / cover no-repeat;
  }

  body {
    overflow: auto;
  }

  .panel-left {
    width: 100%;
    max-height: none;
    padding: 40px 28px;
  }

  .content-section {
    padding: 0 1em;
    margin: 2.5em auto;
  }

  .panel-right {
    position: relative;
    width: 100%;
    height: 50vh;
    background: linear-gradient(to right,
        rgba(10, 7, 4, 0.55) 0%,
        rgba(10, 7, 4, 0.45) 70%,
        rgba(10, 7, 4, 0.2) 95%,
        transparent 100%);
  }

  .menu-title-main {
    font-size: 2.8rem;
  }

  .card {
    width: 180px;
    height: 255px;
  }
}

@media (max-width: 480px) {
  .menu-title-main {
    font-size: 2.2rem;
  }

  .content-section {
    padding: 0;
    margin: 1.5em auto;
  }

  .menu-title-sub {
    font-size: 1rem;
  }
}


/* ── 3D Dice Easter Egg ───────────────────────────────────────── */
.dice3d-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(5, 2, 1, 0.93);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: auto;
}

.dice3d-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Skip button — bottom-right corner, above the canvas */
.dice3d-skip {
  position: relative;
  z-index: 10;
  margin: 0 24px 24px 0;
  pointer-events: auto;
  font-size: 0.88rem;
  padding: 8px 20px;
  opacity: 0.7;
  background: rgba(200, 148, 55, 0.15);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dice3d-skip:hover {
  opacity: 1;
  background: rgba(200, 148, 55, 0.3);
}