/* Duskra Games : une scène de cabaret à l'heure bleue.
   Nuit violacée, filets champagne, soleil couchant (braise → rose), Bodoni Moda pour la voix, Jost pour le texte. */

@font-face {
  font-family: 'Bodoni Moda';
  src: url('../fonts/bodoni-moda-latin-opsz-normal.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('../fonts/jost-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #0b0a12;
  --night-2: #13101d;
  --dusk: #231a33;
  --champagne: #e8d5a9;
  --champagne-soft: #d6c294; /* libellés : 9:1 sur fond nuit */
  --starlight: #f4e9cf;
  --mist: #d3ccdb; /* texte courant : 12:1 */
  --mist-dim: #aaa2b8; /* petits textes secondaires : 7.5:1 */
  --ember: #f4ae68;
  --rose: #c8475f;
  --line: rgba(232, 213, 169, 0.18);
  --line-strong: rgba(232, 213, 169, 0.4);

  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --max: 1160px;
  --section-y: clamp(52px, 7vw, 84px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  background-image:
    radial-gradient(90% 50% at 78% 0%, rgba(58, 41, 84, 0.6), transparent 62%),
    radial-gradient(60% 34% at 70% 30%, rgba(244, 174, 104, 0.07), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, #0e0c17 55%, var(--night) 100%);
  background-repeat: no-repeat;
  color: var(--mist);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grain de pellicule, très léger */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(244, 174, 104, 0.35);
  color: var(--starlight);
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 1px solid var(--champagne);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 8px 14px;
  background: var(--champagne);
  color: var(--night);
  font-size: 0.85rem;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- en-tête */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) var(--gutter) 16px;
}

.brand img {
  height: 32px;
  width: auto;
}

.nav {
  display: flex;
  gap: clamp(16px, 3vw, 34px);
}

.nav a {
  position: relative;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--champagne-soft);
  padding-block: 8px;
  transition: color 0.3s var(--ease);
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0.2em;
  bottom: 2px;
  height: 1px;
  background: linear-gradient(90deg, var(--ember), var(--rose));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.nav a:hover {
  color: var(--starlight);
}
.nav a:hover::after {
  transform: scaleX(1);
}

/* ---------------------------------------------------------------- titres communs */

.eyebrow {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--champagne-soft);
}

.eyebrow::before {
  content: '';
  flex: none;
  width: 24px;
  height: 1px;
  margin-top: 0.62em;
  background: linear-gradient(90deg, var(--ember), var(--champagne-soft));
}

h1,
h2,
h3 {
  font-family: var(--display);
  /* Taille optique fixée : en affiche (auto), les déliés du Bodoni disparaissent à l'écran. */
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 26;
  font-weight: 500;
  color: var(--starlight);
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.85rem, 4.4vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: -0.005em;
}

section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}

.section-head {
  margin-bottom: clamp(24px, 4vw, 40px);
  max-width: 42rem;
}

/* Séparateur : l'étoile du soir entre deux filets, avec une lueur chaude */
.games,
.studio,
.contact {
  position: relative;
}

.games::before,
.studio::before,
.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 9px;
  background:
    linear-gradient(90deg, transparent, var(--line) 30%, var(--line) 70%, transparent) center / 100% 1px no-repeat;
  -webkit-mask: linear-gradient(90deg, #000 calc(50% - 14px), transparent calc(50% - 14px), transparent calc(50% + 14px), #000 calc(50% + 14px));
  mask: linear-gradient(90deg, #000 calc(50% - 14px), transparent calc(50% - 14px), transparent calc(50% + 14px), #000 calc(50% + 14px));
}

.games::after,
.studio::after,
.contact::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  background: var(--ember);
  filter: drop-shadow(0 0 6px rgba(244, 174, 104, 0.7));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M4 0Q4 4 8 4Q4 4 4 8Q4 4 0 4Q4 4 4 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M4 0Q4 4 8 4Q4 4 4 8Q4 4 0 4Q4 4 4 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------------------------------------------------------------- boutons et liens */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), filter 0.4s var(--ease);
}

/* Bouton principal : champagne plein, lueur de rampe */
.btn-primary {
  color: #1a1424;
  background: linear-gradient(180deg, #f6e6c2 0%, #e8d5a9 48%, #ddc08a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 12px 32px -14px rgba(244, 174, 104, 0.75),
    0 0 0 1px rgba(244, 174, 104, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 16px 40px -12px rgba(244, 174, 104, 0.9),
    0 0 0 1px rgba(244, 174, 104, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--champagne);
  transition: color 0.3s var(--ease);
}

.link span {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.35s var(--ease);
}

.link:hover {
  color: var(--starlight);
}
.link:hover span {
  transform: translateX(4px);
}

/* ---------------------------------------------------------------- héros */

.hero {
  display: grid;
  gap: 8px;
  align-content: center;
  padding-top: calc(88px + env(safe-area-inset-top, 0px));
  padding-bottom: clamp(44px, 6vw, 72px);
}

.hero-visual {
  position: relative;
  width: min(66vw, 290px);
  margin: 0 auto;
}

/* Lueur chaude sous le portail */
.hero-visual::before {
  content: '';
  position: absolute;
  inset: 30% 0 -6%;
  z-index: -1;
  background: radial-gradient(50% 40% at 50% 88%, rgba(244, 174, 104, 0.22), transparent 72%);
  filter: blur(6px);
  animation: breathe 11s ease-in-out infinite alternate;
  pointer-events: none;
}

.portal {
  width: 100%;
  height: auto;
  overflow: visible;
}

.portal .arch {
  fill: var(--champagne);
}

.portal .star {
  fill: var(--starlight);
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle 7s ease-in-out infinite;
}

.portal .sun {
  animation: settle 11s ease-in-out infinite alternate;
}

.portal .glow {
  animation: breathe 11s ease-in-out infinite alternate;
}

.portal .ring {
  fill: none;
  stroke: var(--champagne);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.portal .ring-1 {
  opacity: 0.26;
}
.portal .ring-2 {
  opacity: 0.12;
}

.portal .horizon,
.portal .horizon-long {
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.portal .shimmer {
  fill: var(--starlight);
  opacity: 0;
  animation: shimmer 14s var(--ease) infinite 3s;
}

.portal .pool {
  animation: breathe 11s ease-in-out infinite alternate;
}

.hero-text {
  max-width: 36rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin-bottom: 20px;
  /* Coupure naturelle : « Built to be / remembered. » plutôt qu'un équilibrage */
  text-wrap: wrap;
}

.hero h1 span {
  display: block;
  color: var(--champagne);
}

.lede {
  margin: 0 0 28px;
  font-size: clamp(1rem, 2.3vw, 1.1rem);
  line-height: 1.7;
  max-width: 33rem;
}

/* Pastille « Coming soon » */
.status {
  position: relative;
  display: inline-block;
  padding: 4px 10px 4px 22px;
  border: 1px solid rgba(244, 174, 104, 0.5);
  color: var(--ember);
}

.status::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px rgba(244, 174, 104, 0.8);
  animation: pulse 3.2s ease-in-out infinite;
}

/* Entrée en scène : discrète et rapide */
.hero-visual,
.hero-text > * {
  animation: rise 1s var(--ease) both;
}
.hero-visual {
  animation-name: fade;
  animation-duration: 1.5s;
}
.hero-text > :nth-child(2) {
  animation-delay: 0.1s;
}
.hero-text > :nth-child(3) {
  animation-delay: 0.2s;
}
.hero-text > :nth-child(4) {
  animation-delay: 0.3s;
}

/* ---------------------------------------------------------------- jeux */

.game {
  display: grid;
  gap: clamp(26px, 4vw, 56px);
  align-items: center;
}

.game-art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 70px -36px rgba(0, 0, 0, 0.9), 0 26px 64px -30px rgba(244, 174, 104, 0.4);
}

/* Filet lumineux au bas de l'affiche, comme une rampe */
.game-art::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248, 196, 131, 0.9), transparent);
}

.game-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 1.4s var(--ease);
}

.game:hover .game-art img {
  transform: scale(1.03);
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 16px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.game-meta .index {
  color: var(--champagne-soft);
}

.game h3 {
  font-size: clamp(2rem, 5.4vw, 2.9rem);
  line-height: 1.05;
  margin-bottom: 8px;
}

.game-kind {
  margin: 0 0 18px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--champagne-soft);
}

.game-info > p:not(.game-meta):not(.game-kind) {
  margin: 0 0 24px;
  max-width: 34rem;
}

.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--mist);
}

/* ---------------------------------------------------------------- le studio */

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
}

.principles li {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.principles h3 {
  font-size: 1.3rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.principles p {
  margin: 0;
  max-width: 30rem;
}

/* ---------------------------------------------------------------- contact */

.contact-text {
  margin: 0 0 14px;
  max-width: 32rem;
}

.mail {
  display: inline-block;
  font-family: var(--display);
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 22;
  font-weight: 500;
  font-size: clamp(1.55rem, 6.4vw, 3rem);
  line-height: 1.2;
  color: var(--champagne);
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(90deg, var(--ember), var(--rose)) left bottom / 32px 1px no-repeat;
  padding-bottom: 8px;
  transition: background-size 0.6s var(--ease), color 0.3s var(--ease);
}

.mail:hover {
  background-size: 100% 1px;
  color: var(--starlight);
}

/* ---------------------------------------------------------------- pied de page */

.foot {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--mist-dim);
}

.foot img {
  height: 22px;
  width: auto;
}

.foot p {
  margin: 0;
}

.foot .rg {
  margin-left: auto;
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------- écrans moyens et grands */

@media (min-width: 720px) {
  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
  }
}

@media (min-width: 960px) {
  .brand img {
    height: 36px;
  }

  .hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    padding-top: calc(112px + env(safe-area-inset-top, 0px));
    padding-bottom: clamp(56px, 6vw, 80px);
  }

  .hero-visual {
    order: 2;
    width: 100%;
    max-width: 380px;
    margin: 0 0 0 auto;
  }

  .hero-text {
    order: 1;
  }

  .hero h1 {
    font-size: clamp(3rem, 4.8vw, 3.9rem);
  }

  .portal .horizon-long {
    display: none;
  }

  .game {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .studio {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(40px, 6vw, 88px);
    align-items: start;
  }

  .studio .section-head {
    margin-bottom: 0;
  }

  .principles {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .principles li {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 24px;
  }

  .principles h3 {
    margin: 0;
  }

  .contact {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(40px, 6vw, 88px);
    align-items: end;
  }

  .contact .section-head {
    margin-bottom: 0;
    grid-row: span 2;
  }

  .contact-text,
  .mail {
    grid-column: 2;
  }
}

/* ---------------------------------------------------------------- mouvements */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.95;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.82);
  }
}

@keyframes settle {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(6px);
  }
}

@keyframes shimmer {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  8% {
    opacity: 0.55;
  }
  32% {
    opacity: 0;
    transform: translateX(460px);
  }
  100% {
    opacity: 0;
    transform: translateX(460px);
  }
}

@keyframes breathe {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.68;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

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

/* ---------------------------------------------------------------- page 404 */

.lost {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  padding: 40px var(--gutter);
  text-align: center;
}

.lost img {
  height: 64px;
  width: auto;
}

.lost h1 {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
}
