/* ==========================================================================
   Aidenn Games — feuille de style
   Le cadre du studio reprend la sobriété d'Aidenn Arts (papier clair, encre)
   autour du logo « Pixel » : un A tracé en pixels, dont un pixel corail, et
   AIDENN GAMES_ en Space Mono. Chaque jeu garde sa propre identité : émeraude et or
   pour Banking Empire, bleu nuit et « chunky sticker » pour Puzzle Sprint.
   ========================================================================== */

/* ===== Polices (SIL Open Font License, hébergées sur le site) ===== */
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/playfair-display-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Display";
  src: url("../fonts/red-hat-display-latin.woff2") format("woff2");
  font-weight: 500 900;
  font-display: swap;
}
@font-face {
  font-family: "Anton";
  src: url("../fonts/anton-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Bungee";
  src: url("../fonts/bungee-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("../fonts/space-mono-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ===== Variables ===== */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #15131a;
  --muted: #5f5b67;
  --line: #e2ded5;
  --pixel: #e8553d;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Space Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1160px;
  --gutter: 16px;
  --header-h: 64px;

  /* Banking Empire — « Émeraude privée » */
  --be-bg: #06261d;
  --be-panel: #0d3b2e;
  --be-gold: #d9b35b;
  --be-gold-light: #fff0c2;
  --be-gold-mid: #e9c776;
  --be-gold-deep: #c89d45;
  --be-text: #f2f5fb;
  --be-muted: #a9c2b6;

  /* Puzzle Sprint — « chunky sticker » */
  --ps-bg: #1b2b57;
  --ps-deep: #142041;
  --ps-panel: #2f4d8f;
  --ps-panel-hi: #3d63b5;
  --ps-ink: #12102a;
  --ps-text: #ffffff;
  --ps-dim: #b9cbf0;
  --ps-yellow: #ffd23f;
  --ps-green: #3ddc84;
  --ps-red: #ff4d5a;
  --ps-blue: #4d9dff;
  --ps-purple: #b56cff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121117;
    --surface: #1a1920;
    --ink: #f2f0ea;
    --muted: #a6a2ae;
    --line: #2c2a33;
  }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 34em;
}

/* ===== En-tête ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/* Le A fait 69 unités : 34,5 px tombe sur un demi-pixel par unité */
.brand-mark {
  flex: none;
  width: 34.5px;
  height: 34.5px;
}

.brand-name {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.brand-name span {
  color: var(--pixel);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.92rem;
}

.nav > a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.nav > a:hover {
  color: var(--ink);
}

.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
}

.lang button {
  border: 0;
  background: none;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.lang button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

@media (max-width: 560px) {
  .nav > a { display: none; }
  .brand { gap: 8px; }
  .brand-name { font-size: 1rem; }
}

/* ===== Accroche ===== */
.hero {
  padding: 56px 0 72px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 14px 0 20px;
  text-wrap: balance;
}

.hero-games {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
  max-width: 30rem;
}

.hero-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.2s;
}

.hero-link:hover {
  transform: translateY(-2px);
}

.hero-link-name {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
}

.hero-link-genre {
  font-size: 0.8rem;
  opacity: 0.8;
}

.hero-link-be {
  background: linear-gradient(160deg, #14573f, var(--be-bg));
  color: var(--be-gold-light);
  box-shadow: inset 0 0 0 1px rgba(217, 179, 91, 0.35);
}

.hero-link-ps {
  background: var(--ps-bg);
  color: var(--ps-yellow);
  border: 2px solid var(--ps-ink);
  box-shadow: 4px 4px 0 var(--ps-ink);
}

.hero-phones {
  position: relative;
  height: 400px;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.hero-phones .phone {
  position: absolute;
  width: min(200px, 46vw);
}

.phone-left {
  left: 0;
  top: 36px;
  transform: rotate(-6deg);
}

.phone-left img {
  object-position: center 70%;
}

.phone-right {
  right: 0;
  top: 0;
  z-index: 1;
  transform: rotate(5deg);
}

@media (min-width: 900px) {
  .hero {
    padding: 80px 0 96px;
  }
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
  }
  .hero-phones {
    height: 480px;
  }
  .hero-phones .phone {
    width: 228px;
  }
}

/* ===== Téléphones ===== */
.phone {
  aspect-ratio: 9 / 16;
  border-radius: 30px;
  border: 7px solid #0d0c11;
  background: #0d0c11;
  overflow: hidden;
  box-shadow:
    0 1px 0 1px rgba(255, 255, 255, 0.06) inset,
    0 30px 60px -20px rgba(10, 8, 20, 0.45),
    0 12px 24px -12px rgba(10, 8, 20, 0.35);
}

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

.phone-be img {
  object-position: center bottom;
}

@media (prefers-color-scheme: dark) {
  .hero-phones .phone {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.14),
      0 30px 60px -20px rgba(0, 0, 0, 0.7);
  }
  .hero-link-ps {
    border-color: transparent;
    box-shadow: 0 0 0 1px rgba(255, 210, 63, 0.3);
  }
}

/* ===== Sections de jeu (communes) ===== */
.anchor {
  position: relative;
  top: calc(-1 * var(--header-h));
}

.game {
  position: relative;
  padding: 72px 0 80px;
  overflow: hidden;
}

.game-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.game h2 {
  margin: 18px 0 14px;
}

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

.chip {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 11px;
  border-radius: 999px;
}

.game-pitch {
  font-size: 1.05rem;
  max-width: 36em;
  margin-top: 16px;
}

.game-note {
  font-size: 0.85rem;
  margin-top: 28px;
}

.game-visual {
  display: flex;
  justify-content: center;
}

@media (min-width: 900px) {
  .game {
    padding: 104px 0 112px;
  }
  .game-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
  }
}

/* ===== Banking Empire ===== */
.game-be {
  color: var(--be-text);
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, rgba(217, 179, 91, 0.14), transparent 60%),
    linear-gradient(180deg, #14573f 0%, var(--be-bg) 45%, #021510 100%);
}

.game-be .chip {
  color: var(--be-gold-light);
  border: 1px solid rgba(217, 179, 91, 0.4);
}

.game-be .chip-status {
  background: var(--be-gold);
  border-color: var(--be-gold);
  color: #0b0d14;
}

.be-title {
  font-family: "Red Hat Display", var(--sans);
  line-height: 0.9;
  display: flex;
  flex-direction: column;
}

.be-title-small {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--be-gold-mid);
  margin-left: 0.2em;
}

.be-title-big {
  font-size: clamp(3.6rem, 13vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--be-gold-light) 0%, var(--be-gold-mid) 42%, var(--be-gold-deep) 58%, var(--be-gold-mid) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(2, 21, 16, 0.6));
}

.be-tagline {
  font-family: "Red Hat Display", var(--sans);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--be-gold-mid);
}

.game-be .game-pitch {
  color: var(--be-muted);
}

.be-features {
  display: grid;
  gap: 22px;
  margin-top: 32px;
}

.be-features li {
  padding-left: 16px;
  border-left: 2px solid var(--be-gold);
}

.be-features h3 {
  font-family: "Red Hat Display", var(--sans);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--be-text);
}

.be-features p {
  font-size: 0.95rem;
  color: var(--be-muted);
  margin-top: 2px;
}

.game-be .game-note {
  color: var(--be-gold-mid);
}

.phone-be {
  width: min(300px, 78vw);
  border-color: #021510;
  box-shadow:
    0 0 0 1px rgba(217, 179, 91, 0.45),
    0 40px 80px -30px rgba(0, 0, 0, 0.8);
}

@media (min-width: 640px) {
  .be-features {
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
  }
}

/* Galerie des intérieurs */
.be-gallery {
  margin-top: 72px;
}

.be-gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.be-gallery-head h3 {
  font-family: "Red Hat Display", var(--sans);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--be-gold-mid);
}

.segmented {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(2, 21, 16, 0.6);
  box-shadow: inset 0 0 0 1px rgba(217, 179, 91, 0.35);
}

.segmented button {
  border: 0;
  background: none;
  padding: 6px 16px;
  border-radius: 999px;
  font-family: "Red Hat Display", var(--sans);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--be-gold-mid);
  transition: background 0.2s, color 0.2s;
}

.segmented button[aria-pressed="true"] {
  background: var(--be-gold);
  color: #0b0d14;
}

.interiors {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-bottom: 12px;
  margin: 0 calc(-1 * var(--gutter));
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 179, 91, 0.4) transparent;
}

.interiors li {
  scroll-snap-align: start;
}

.interiors img {
  width: 100%;
  aspect-ratio: 3 / 5;
  object-fit: cover;
  object-position: center 70%;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(217, 179, 91, 0.3);
  background: var(--be-panel);
  transition: opacity 0.25s;
}

.interiors img.is-loading {
  opacity: 0.4;
}

.interiors span {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--be-muted);
}

@media (min-width: 1100px) {
  .interiors {
    overflow: visible;
    margin: 0;
    padding: 0;
  }
}

/* ===== Puzzle Sprint ===== */
.game-ps {
  color: var(--ps-text);
  background-color: var(--ps-bg);
  background-image:
    radial-gradient(ellipse 90% 70% at 15% 0%, rgba(77, 157, 255, 0.18), transparent 60%),
    linear-gradient(180deg, transparent 60%, rgba(20, 16, 38, 0.6) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' fill='none' stroke='%23b9cbf0' stroke-width='1.6' stroke-linecap='round' opacity='0.09'%3E%3Cpath d='M10 14h8M14 10v8'/%3E%3Ccircle cx='58' cy='16' r='4'/%3E%3Cpath d='M30 50l6 6M36 50l-6 6'/%3E%3Cpath d='M76 56l5 8h-10z'/%3E%3Crect x='12' y='76' width='8' height='8' rx='1'/%3E%3Cpath d='M52 82q4-6 8 0t8 0'/%3E%3C/svg%3E");
}

.game-ps .chip {
  font-family: "Bungee", var(--sans);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--ps-text);
  background: var(--ps-panel);
  border: 2px solid var(--ps-ink);
  box-shadow: 3px 3px 0 var(--ps-ink);
  border-radius: 8px;
}

.game-ps .chip-status {
  background: var(--ps-yellow);
  color: var(--ps-ink);
}

.ps-title {
  font-family: "Anton", Impact, "Arial Black", sans-serif;
  font-weight: 400;
  line-height: 0.88;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
}

.ps-title-top {
  font-size: clamp(3.6rem, 13vw, 6.2rem);
  color: var(--ps-text);
  text-shadow: 4px 4px 0 var(--ps-ink);
}

.ps-title-bottom {
  font-size: clamp(3.2rem, 11.5vw, 5.4rem);
  color: var(--ps-yellow);
  letter-spacing: 0.14em;
  transform: skewX(-12deg);
  transform-origin: left bottom;
  margin-left: 0.3em;
  text-shadow:
    3px 3px 0 var(--ps-panel-hi),
    6px 6px 0 var(--ps-ink);
}

.ps-tagline {
  font-family: "Bungee", var(--sans);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ps-yellow);
  margin-top: 18px;
}

.game-ps .game-pitch {
  color: var(--ps-dim);
}

.ps-steps {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

.ps-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--ps-panel);
  border: 3px solid var(--ps-ink);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ps-ink);
}

.ps-num {
  font-family: "Bungee", var(--sans);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ps-yellow);
  text-shadow: 2px 2px 0 var(--ps-ink);
  padding-top: 2px;
}

.ps-steps h3 {
  font-family: "Anton", Impact, sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
}

.ps-steps p {
  font-size: 0.93rem;
  color: var(--ps-dim);
  margin-top: 4px;
}

.ps-visual {
  position: relative;
  min-height: 440px;
}

.phone-ps {
  position: absolute;
  width: min(205px, 46vw);
  border: 4px solid var(--ps-ink);
  border-radius: 26px;
  box-shadow: 8px 8px 0 var(--ps-ink);
}

.phone-ps-a {
  left: 0;
  top: 0;
  transform: rotate(-4deg);
  z-index: 1;
}

.phone-ps-b {
  right: 0;
  top: 60px;
  transform: rotate(5deg);
}

@media (max-width: 899px) {
  .ps-visual { max-width: 440px; min-height: 400px; width: 100%; margin: 0 auto; }
}

/* Les douze épreuves */
.ps-trials {
  margin-top: 72px;
}

.ps-trials > h3 {
  font-family: "Anton", Impact, sans-serif;
  font-weight: 400;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 3px 3px 0 var(--ps-ink);
  margin-bottom: 24px;
}

.stickers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.stickers li {
  --c: var(--ps-panel);
  --t: var(--ps-text);
  --d: var(--ps-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 16px;
  background: var(--c);
  color: var(--t);
  border: 3px solid var(--ps-ink);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ps-ink);
  transform: rotate(var(--r, 0deg));
  transition: transform 0.15s;
}

.stickers li:hover {
  transform: rotate(0deg) translate(-2px, -2px);
}

.stickers b {
  font-family: "Bungee", var(--sans);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.stickers span {
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--d);
}

.stickers li:nth-child(6n + 1) { --c: var(--ps-yellow); --t: var(--ps-ink); --d: #3b3417; --r: -1.5deg; }
.stickers li:nth-child(6n + 2) { --c: var(--ps-panel-hi); --r: 1deg; }
.stickers li:nth-child(6n + 3) { --c: var(--ps-red); --t: var(--ps-ink); --d: #4a1219; --r: -0.5deg; }
.stickers li:nth-child(6n + 4) { --c: var(--ps-green); --t: var(--ps-ink); --d: #103d25; --r: 1.5deg; }
.stickers li:nth-child(6n + 5) { --c: var(--ps-panel); --r: -1deg; }
.stickers li:nth-child(6n + 6) { --c: var(--ps-purple); --t: var(--ps-ink); --d: #2c1450; --r: 0.5deg; }

.game-ps .game-note {
  color: var(--ps-dim);
  margin-top: 32px;
}

/* ===== Studio ===== */
.studio {
  padding: 80px 0 88px;
}

.studio-inner {
  display: grid;
  gap: 48px;
}

.studio h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 12px 0 16px;
  text-wrap: balance;
}

.principles {
  display: grid;
  gap: 28px;
}

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

.principles h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.principles p {
  color: var(--muted);
  font-size: 0.97rem;
}

@media (min-width: 640px) {
  .principles {
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
  }
}

@media (min-width: 1000px) {
  .studio {
    padding: 112px 0 120px;
  }
  .studio-inner {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 72px;
  }
}

/* ===== Pied de page ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand .brand-mark {
  width: 27.6px;
  height: 27.6px;
  color: var(--ink);
}

.footer-link {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}

.footer-link:hover {
  border-color: var(--ink);
}

/* ===== Mouvement réduit ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
