@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  background: #00290e;
}

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

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: #00290e;
}

.home-scene {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #00290e;
}

.home-scene::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(to right, rgba(0, 16, 5, 0.62), rgba(0, 16, 5, 0) 24%),
    linear-gradient(to left, rgba(0, 16, 5, 0.62), rgba(0, 16, 5, 0) 24%);
  content: "";
  pointer-events: none;
}

.home-scene::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 16, 5, 0) 42%,
    rgba(0, 16, 5, 0.18) 62%,
    rgba(0, 16, 5, 1) 86%
  );
  content: "";
  pointer-events: none;
}

.site-header {
  position: absolute;
  top: 0.75rem;
  right: clamp(1rem, 4vw, 3.5rem);
  left: clamp(1rem, 4vw, 3.5rem);
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.site-header__brand {
  display: block;
  width: min(17vw, 160px);
}

.site-header__brand img {
  display: block;
  width: 100%;
  height: auto;
}

.site-header__nav {
  display: flex;
  gap: clamp(0.75rem, 1.8vw, 1.75rem);
  align-items: center;
  transform: translateX(clamp(0.5rem, 1.5vw, 1rem));
}

.site-header__nav a {
  color: #f2eedf;
  font: 400 0.92rem / 1.2 "Montserrat", Arial, Helvetica, sans-serif;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.site-header__nav a:hover,
.site-header__nav a:focus-visible {
  color: #f5b82e;
}

.site-header__nav a:focus-visible {
  outline: 2px solid #f5b82e;
  outline-offset: 0.35rem;
}

.page-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background: #00290e;
  color: #f2eedf;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

.page-shell::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0) 24%),
    linear-gradient(to left, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0) 24%);
  content: "";
  pointer-events: none;
}

.page-shell::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 42%,
    rgba(0, 0, 0, 0.18) 62%,
    rgba(0, 0, 0, 0.72) 100%
  );
  content: "";
  pointer-events: none;
}

.page-shell .site-header {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  width: auto;
  margin: 0 clamp(1rem, 4vw, 3.5rem);
  padding-top: 0.75rem;
}

.page-shell__content {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 6rem);
}

.solver-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem clamp(0.75rem, 3vw, 2rem) 1rem;
}

.solver-content__frame {
  display: block;
  flex: none;
  width: min(100%, 900px);
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(245, 184, 46, 0.35);
  background: #000;
}

.solver-content__frame:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border: 0;
}

.solver-content__controls {
  display: flex;
  justify-content: flex-end;
  width: min(100%, 900px);
  margin-top: 0.6rem;
}

.solver-content__fullscreen {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(245, 184, 46, 0.65);
  border-radius: 6px;
  background: rgba(0, 16, 5, 0.82);
  color: #f2eedf;
  font: 700 0.78rem / 1 "Montserrat", Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
}

.solver-content__fullscreen:hover,
.solver-content__fullscreen:focus-visible {
  border-color: #f5b82e;
  background: rgba(6, 41, 18, 0.94);
  color: #f5b82e;
}

.solver-content__fullscreen:focus-visible {
  outline: 2px solid #f5b82e;
  outline-offset: 3px;
}

.solver-content__copy {
  width: min(100%, 900px);
  margin: 2rem auto 0;
  padding-bottom: 3rem;
}

.solver-content__copy h1,
.solver-content__copy h2 {
  color: #f5b82e;
  line-height: 1.2;
}

.solver-content__copy h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.solver-content__copy h2 {
  margin: 2.5rem 0 0.8rem;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

.solver-content__copy p,
.solver-content__copy li {
  color: #f2eedf;
  font-size: 1rem;
  line-height: 1.7;
}

.solver-content__copy p {
  margin: 0 0 1rem;
}

.solver-content__copy ul {
  margin: 0;
  padding-left: 1.4rem;
}

.solver-content__copy strong {
  color: #f5b82e;
  font-weight: 700;
}

.games-content {
  padding: clamp(0.5rem, 2vh, 1.5rem) 1.5rem 4rem;
  text-align: center;
  transform: translateY(-2rem);
}

.games-content__title {
  display: block;
  width: min(72vw, 420px);
  height: auto;
  margin: 0 auto;
}

.games-content__intro {
  margin: 1rem auto 0;
  color: #f2eedf;
  font: 400 clamp(1.25rem, 2vw, 1.55rem) / 1.4 "Montserrat", Arial, Helvetica, sans-serif;
}

.games-list {
  display: grid;
  gap: 0.75rem;
  width: min(100%, 52rem);
  margin: clamp(2rem, 5vh, 3.5rem) auto 0;
  text-align: left;
}

.games-list__link {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) 1.25rem;
  gap: 1.25rem;
  align-items: center;
  min-height: 6rem;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(214, 162, 14, 0.62);
  border-radius: 8px;
  background: rgba(0, 16, 5, 0.72);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  color: #f8f4e9;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.games-list__link:hover,
.games-list__link:focus-visible {
  border-color: #f5b82e;
  background: rgba(6, 41, 18, 0.94);
  transform: translateY(-3px);
}

.games-list__link:focus-visible {
  outline: 2px solid #f5b82e;
  outline-offset: 3px;
}

.games-list__suit {
  color: #f5b82e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.75rem;
  line-height: 1;
  text-align: center;
}

.games-list__suit--red {
  color: #dc5d52;
}

.games-list__copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.games-list__copy strong {
  color: #fffaf0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.25;
}

.games-list__copy span {
  color: #c9d4ca;
  font-size: clamp(0.78rem, 1.3vw, 0.95rem);
  line-height: 1.35;
}

.games-list__arrow {
  width: 0.8rem;
  height: 0.8rem;
  border-top: 2px solid #f5b82e;
  border-right: 2px solid #f5b82e;
  transform: rotate(45deg);
}

.about-content {
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(0rem, 0.5vh, 0.4rem) 1.5rem 4rem;
  transform: translateY(-1rem);
}

.about-content__intro {
  padding-bottom: 1.75rem;
  text-align: center;
}

.about-content__motif {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 0.8rem;
  color: #f5b82e;
  font-family: Georgia, serif;
  font-size: 1.75rem;
}

.about-content h1 {
  margin: 0;
  color: #f5b82e;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
}

.about-section {
  position: relative;
  padding: 2rem 0 1.5rem;
  border-top: 1px solid rgba(245, 184, 46, 0.24);
}

.about-section h2 {
  margin: 0 0 0.8rem;
  color: #f2eedf;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.2;
}

.about-content p {
  max-width: 44rem;
  margin: 0 0 1rem;
  color: #f2eedf;
  font-size: 1rem;
  line-height: 1.7;
}

.about-content p.about-content__motif {
  margin-bottom: 0.8rem;
  font-size: 1.75rem;
  line-height: 1;
}

.about-content strong {
  color: #f5b82e;
  font-weight: 400;
}

.about-content a {
  color: #f5b82e;
  text-underline-offset: 0.2em;
}

.about-content a:hover,
.about-content a:focus-visible {
  color: #ffcf5c;
}

.about-section--last {
  padding-bottom: 0;
}

.about-content__cta {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 184, 46, 0.24);
  text-align: center;
}

.about-content__ready {
  margin-bottom: 0.25rem !important;
  color: #f5b82e !important;
  font-size: 1.15rem !important;
}

.about-content__cta > p:not(.about-content__ready) {
  margin-bottom: 1.25rem;
}

.about-content__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.about-content__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12rem;
  padding: 0.75rem 1rem;
  border: 1px solid #b88622;
  border-radius: 2rem;
  color: #f2eedf;
  font-size: 0.82rem;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.about-content__actions a span {
  margin-left: 0.55rem;
  color: #f5b82e;
  font-size: 1.1rem;
}

.about-content__actions a:hover,
.about-content__actions a:focus-visible {
  background: rgba(245, 184, 46, 0.14);
  color: #fffaf0;
}

.site-intro {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin-top: clamp(7.5rem, 15vh, 9rem);
  width: min(90vw, 560px);
  color: #f2eedf;
  text-align: center;
  transform: translateY(-7rem);
}

.site-logo {
  display: block;
  width: min(62vw, 440px);
  height: auto;
  margin: 0 auto;
  user-select: none;
}

.site-tagline,
.site-description {
  margin: 0;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

.site-tagline {
  margin-top: 1.5rem;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.25;
}

.site-description {
  max-width: 32rem;
  margin: 0.35rem auto 0;
  font-size: clamp(0.9rem, calc(1vw + 4px), 1.05rem);
  line-height: 1.4;
}

.game-prompt {
  position: relative;
  z-index: 2;
  margin: clamp(1rem, 3vh, 2rem) 1rem 0;
  color: #f2eedf;
  font: 700 clamp(1rem, 1.5vw, 1.2rem) / 1.3 "Montserrat", Arial, Helvetica, sans-serif;
  text-align: center;
  transform: translateY(-2rem);
}

.game-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  align-items: center;
  justify-content: center;
  margin-top: 0.6rem;
  width: min(92vw, 680px);
  transform: translateY(-5rem);
}

.game-link {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 0 1 300px;
  flex-direction: column;
  align-items: center;
  width: min(40vw, 300px);
  min-width: 0;
  aspect-ratio: 1 / 1.05;
  padding: 0.85rem clamp(0.65rem, 1.8vw, 1rem) 0.7rem;
  overflow: hidden;
  border: 2px solid #d6a20e;
  border-radius: 24px;
  background: #010805;
  color: #f8f4e9;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  text-align: center;
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease;
}

.game-link::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
}

.game-link--klondike::before {
  background: radial-gradient(circle at 50% 8%, rgba(0, 67, 28, 0.82), transparent 68%);
}

.game-link--spider::before {
  background: radial-gradient(circle at 50% 8%, rgba(66, 14, 77, 0.72), transparent 68%);
}

.game-link__art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: clamp(7rem, 16vw, 10.25rem);
}

.game-link__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-link__description {
  display: block;
  min-height: 2.7em;
  margin-top: 0.8rem;
  font-size: clamp(0.68rem, 1.45vw, 0.9rem);
  line-height: 1.4;
}

.game-link__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 13.5rem);
  margin-top: auto;
  padding: clamp(0.45rem, 0.9vw, 0.6rem) 0.85rem;
  border: 1px solid #e7ad16;
  border-radius: 999px;
  background: linear-gradient(#ffc74d, #e69a00);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.65);
  color: #080a06;
  font-size: clamp(0.86rem, 1.7vw, 1.12rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.game-link__arrow {
  width: 0.7rem;
  height: 0.7rem;
  margin-left: 0.8rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.game-link:hover,
.game-link:focus-visible {
  filter: brightness(1.12);
  transform: translateY(-5px) scale(1.02);
}

.game-link:focus-visible {
  outline: 3px solid #f5b82e;
  outline-offset: -3px;
}

.court-figure {
  position: absolute;
  bottom: clamp(3rem, 8svh, 6rem);
  z-index: -1;
  display: block;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom;
  user-select: none;
  pointer-events: none;
}

.court-figure--queen {
  left: 0;
  height: min(88svh, 760px);
}

.court-figure--king {
  right: 0;
  height: min(92svh, 790px);
}

.site-footer {
  position: fixed;
  right: 0;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 0;
  z-index: 3;
  color: #f2eedf;
  font: 400 1rem / 1.2 "Montserrat", Arial, Helvetica, sans-serif;
  text-align: center;
}

.site-footer strong {
  color: #f5b82e;
  font-weight: 400;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .court-figure--queen {
    left: -12svh;
    height: min(68svh, 640px);
  }

  .court-figure--king {
    right: -14svh;
    height: min(70svh, 660px);
  }
}

@media (max-width: 560px) {
  .site-header {
    top: 0.5rem;
    right: 1rem;
    left: 1rem;
  }

  .site-header__brand {
    width: 120px;
  }

  .site-header__nav {
    gap: 0.6rem;
    transform: translateX(0.4rem);
  }

  .site-header__nav a {
    font-size: 0.8rem;
  }

  .page-shell .site-header {
    margin: 0 1rem;
  }

  .about-content {
    padding-top: 0.4rem;
  }

  .about-content__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .about-content__actions a {
    min-width: 0;
  }

  .game-links {
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    width: min(82vw, 320px);
  }

  .games-list__link {
    grid-template-columns: 2.25rem minmax(0, 1fr) 0.9rem;
    gap: 0.8rem;
    min-height: 5.25rem;
    padding: 0.85rem 1rem;
  }

  .games-list__suit {
    font-size: 2rem;
  }

  .game-link {
    width: 100%;
  }

  .court-figure--queen {
    left: -14svh;
    height: 52svh;
  }

  .court-figure--king {
    right: -15svh;
    height: 54svh;
  }
}