:root {
  --page-deep: #d67732;
  --page-dark: #8f3f25;
  --card: #fdfbf8;
  --card-soft: #dc8b450f;
  --ink: #15383b;
  --muted: #587174;
  --line: rgba(21, 56, 59, 0.17);
  --line-orange: rgba(214, 130, 58, 0.31);
  --copper: #dc8b45;
  --copper-dark: #cd7e39;
  --copper-icons: #d27e37;
  --electric: #58d2c3;
  --electric-dark: #238f86;
  --lamp: #ffd76a;
  --frame: #123e43;
  --white: #fff;
  --logo-size: 125px;
  --shadow: 0 28px 70px rgba(0, 21, 24, 0.34);
  --radius-large: 20px;
  --radius-medium: 20px;
  --radius-small: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: light;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background-color: var(--ink);
  background-image:
    url("../assets/interface/motif-electricite.svg"),
    linear-gradient(135deg, #187a70 0%, #145a55 50%, #062f35 100%);
  background-size:
    520px 520px,
    100% 100%;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 243, 213, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

body::before {
  top: -190px;
  left: -130px;
  box-shadow:
    0 0 0 40px rgba(255, 243, 213, 0.035),
    0 0 0 88px rgba(255, 243, 213, 0.022);
}

body::after {
  right: -200px;
  bottom: -160px;
  box-shadow:
    0 0 0 54px rgba(220, 139, 69, 0.035),
    0 0 0 110px rgba(220, 139, 69, 0.022);
}

.page-shell {
  width: min(1500px, calc(100% - 48px));
  margin-inline: auto;
  padding: 50px 0 18px;
}

.experience-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-large);
  background:
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08)),
    var(--card);
  box-shadow: var(--shadow);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 34px;
  align-items: start;
  padding: 32px 34px;
  /* background:
    radial-gradient(
      circle at 12% 20%,
      rgba(88, 210, 195, 0.13),
      transparent 32%
    ),
    linear-gradient(120deg, rgba(255, 255, 255, 0.54), transparent 62%); */
}

.brand {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.game-logo {
  display: block;
  flex: 0 0 var(--logo-size);
  width: var(--logo-size);
  height: var(--logo-size);
  aspect-ratio: 1;
  /* filter: drop-shadow(0 16px 16px rgba(21, 56, 59, 0.12)); */
}

.brand-label,
.game-heading-label {
  color: var(--electric-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-label {
  margin: 12px 0 0;
}

.game-heading-label {
  margin-bottom: 4px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 0px;
  font-size: 2.7rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.title-accent {
  color: var(--copper-dark);
}

.title-line {
  display: block;
}

.intro-copy {
  padding-left: 34px;
  border-left: 1px solid var(--line);
}

.intro-lead {
  margin-bottom: 10px;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.38;
}

.intro-subtitle {
  max-width: 610px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.game-tags span {
  padding: 8px 12px;
  border: 1px solid rgba(35, 143, 134, 0.25);
  border-radius: 999px;
  color: var(--electric-dark);
  background: rgba(88, 210, 195, 0.1);
  font-size: 0.78rem;
  font-weight: 750;
}

.instructions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-orange);
  border-bottom: 1px solid var(--line-orange);
  background: var(--card-soft);
}

.instruction {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: start;
  min-height: 96px;
  padding: 15px 28px;
}

.instruction + .instruction {
  border-left: 1px solid var(--line-orange);
}

.instruction-number {
  position: absolute;
  top: 13px;
  right: 16px;
  color: rgba(205, 126, 57, 0.36);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.instruction-icon {
  display: grid;
  width: 52px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(21, 56, 59, 0.15);
  border-radius: 14px;
  color: var(--copper-icons);
  background: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.instruction-icon svg,
.safety-icon svg {
  width: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.instruction p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.instruction strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 1rem;
}

.game-shell {
  padding: 32px 34px 38px;
}

.game-heading {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.game-heading h2 {
  margin-bottom: 0;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.game-safety {
  display: flex;
  gap: 6px;
  max-width: 570px;
  align-items: start;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: right;
}

.game-safety svg {
  flex: 0 0 20px;
  width: 20px;
  fill: none;
  color: var(--copper-dark);
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.game-frame {
  position: relative;
  overflow: hidden;
  border: 6px solid var(--frame);
  border-radius: 16px;
  background: var(--frame);
  box-shadow: 0 20px 34px rgba(9, 43, 47, 0.18);
}

.game-canvas-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  background: #051b1e;
}

.sound-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(246, 241, 231, 0.38);
  border-radius: 50%;
  color: #f6f1e7;
  background: rgba(5, 27, 30, 0.72);
  cursor: pointer;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  background: rgba(170, 91, 46, 0.92);
}

.sound-toggle svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sound-toggle .sound-off {
  display: none;
}

.sound-toggle[aria-pressed="true"] .sound-on {
  display: none;
}

.sound-toggle[aria-pressed="true"] .sound-off {
  display: block;
}

.game-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.game-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  margin: 0;
  color: rgba(255, 255, 255, 0.63);
  background:
    linear-gradient(rgba(88, 210, 195, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 210, 195, 0.055) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(88, 210, 195, 0.11), transparent 44%);
  background-size:
    42px 42px,
    42px 42px,
    100% 100%;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: center;
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 8px 0 16px;
}

.footer {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 160ms ease;
}

.footer:hover,
.footer:focus-visible {
  color: var(--white);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 980px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .intro-copy {
    padding-top: 22px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .instructions {
    grid-template-columns: 1fr;
  }

  .instruction {
    min-height: 96px;
  }

  .instruction + .instruction {
    border-top: 1px solid var(--line-orange);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .page-shell,
  .footer-links {
    width: min(100% - 24px, 1500px);
  }

  .page-shell {
    padding: 18px 0 12px;
  }

  .experience-card {
    border-radius: 20px;
  }

  .intro,
  .game-shell {
    padding: 26px 20px;
  }

  .brand {
    align-items: flex-start;
  }

  .game-logo {
    flex-basis: 92px;
    width: 92px;
    height: 92px;
  }

  .brand-label {
    margin-top: 9px;
    font-size: 0.64rem;
  }

  h1 {
    font-size: 2rem;
  }

  .instruction {
    grid-template-columns: 46px 1fr;
    min-height: 104px;
    padding: 22px 20px;
  }

  .instruction-icon {
    width: 46px;
  }

  .game-heading {
    display: block;
  }

  .game-safety {
    margin-top: 14px;
    text-align: left;
  }
}

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