:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #fff7eb;
  background: #151722;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid #ffe1a7; outline-offset: 5px; }

.shore {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1.25rem, 4vw, 3.5rem);
}

body {
  margin: 0;
  isolation: isolate;
}

#shore-loading {
  border: 0;
  padding: 1.5rem;
  text-align: center;
  background: transparent;
  color: #ffe8c8;
}
#shore-loading::backdrop { background: #241e30; }
#loading-label { margin: .9rem 0 0; font: 650 .95rem ui-monospace, monospace; }
.loading-horizon {
  width: 4rem;
  height: 2rem;
  margin: auto;
  overflow: hidden;
  border-bottom: 2px solid #d89991;
}
.loading-horizon::before {
  content: "";
  display: block;
  width: 1.65rem;
  height: 1.65rem;
  margin: .3rem auto 0;
  border-radius: 50%;
  background: #ffd5a6;
  animation: shore-sun 1.6s ease-in-out infinite alternate;
}
@keyframes shore-sun { from { transform: translateY(55%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .loading-horizon::before { animation: none; } }
#shore-loading button {
  border: 1px solid #997e94; border-radius: .35rem; margin-top: 1rem;
  padding: .6rem 1rem; color: inherit; background: #322839; font: inherit; cursor: pointer;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, #1813218c, #18132119 28%, #18132154 58%, #151722b8),
    radial-gradient(ellipse at center, #21172366, transparent 70%),
    var(--shore-backdrop, #574356 url("assets/beach.png") center / cover no-repeat);
}

#water-scene {
  position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none; visibility: hidden;
}
.shore-menu.water-ready { --shore-backdrop: transparent; }
.water-ready #water-scene { visibility: visible; }
.shore-menu #sound, .shore-menu #sound-status:not(:empty) {
  position: fixed; z-index: 1; right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom)); padding: .65rem .9rem;
  border: 1px solid #997e94; border-radius: 2rem; background: #251e30ed;
  color: #fff0d7; font: 650 .85rem/1.4 system-ui, sans-serif;
}
.shore-menu #sound { cursor: pointer; min-height: 44px; }
.shore-menu #sound-status:not(:empty) { bottom: 4.2rem; }
.shore-menu .games { padding-bottom: max(5.5rem, 9vw); }

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font: 700 1rem ui-monospace, monospace;
  letter-spacing: .08em;
}

.wordmark span, h1 span { color: #ffd5a6; }
.nav-link { font-weight: 650; padding: .6rem .15rem; }
.nav-link:hover { text-decoration: underline; text-underline-offset: .3em; }

.intro {
  align-self: center;
  padding-block: 3rem;
  text-align: center;
  text-shadow: 0 3px 20px #231422bd;
}

h1 {
  margin: 0;
  font: 900 clamp(3.55rem, 12vw, 10rem)/.95 ui-monospace, monospace;
  letter-spacing: -.095em;
  padding-inline-end: .095em;
}

.intro p { margin: 1.4rem 0 1.9rem; font-size: clamp(1rem, 2.5vw, 1.25rem); }

.primary {
  display: inline-block;
  padding: .85rem 1.35rem;
  border-radius: .35rem;
  background: #ffe0b3;
  color: #231c2b;
  box-shadow: 0 4px 0 #8e5f64;
  font-weight: 750;
  text-shadow: none;
}

.primary:hover { background: #fff1d6; }

.games {
  text-shadow: 0 2px 8px #151722, 0 1px 3px #151722;
  max-width: 75rem;
  margin: auto;
  padding: clamp(3rem, 9vw, 8rem) clamp(1.25rem, 4vw, 3.5rem);
}

.games h2 { margin: 0; font: 800 clamp(2rem, 5vw, 4rem)/1 ui-monospace, monospace; }
.games p { margin: 1rem 0 0; color: #d1c7cf; }

.game-library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 22rem));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.game-card {
  display: block;
  overflow: hidden;
  border: 1px solid #a3869b;
  border-radius: .65rem;
  background: #211b2b;
  box-shadow: 0 .75rem 2rem #15172266;
  text-shadow: none;
}

.game-card-poster {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-bottom: 1px solid #a3869b;
}

.game-card-info { padding: 1rem 1.25rem 1.25rem; }
.game-card-art-circle {
  background: radial-gradient(ellipse at center, #283e36, #12191b 72%);
}
.game-card-art-range {
  background: #67806a url("games/archery-nine/art/pasture.jpg") center / cover no-repeat;
}
.game-card-art-pour { background: radial-gradient(ellipse at center, #c79b68, #704d37 75%); }
.game-card-art-shell { background: #e4c58e url("games/you-are-not-a-robot/shell-game/art/cove.webp") center 60% / cover; }
.game-card-art-shell img { width: 7rem; margin-top: 1.5rem; }
.game-card-art-balance {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  background: radial-gradient(ellipse at center, #f8e5ba, #c0966e);
}
.game-card-art-balance img { width: clamp(3.5rem, 16vw, 5rem); height: 5rem; object-fit: contain; }
.game-card-art-pour span {
  width: 4.2rem;
  height: 5.35rem;
  border: 2px solid #ffebc7ba;
  border-radius: .45rem .45rem 1rem 1rem;
  background: linear-gradient(0deg, #aa743e 0%, #efbf7c 49%, #fff0d133 50%);
  box-shadow: inset .3rem 0 #ffffff30, .28rem .4rem .55rem #1d374388;
  transform: perspective(14rem) rotateX(-14deg);
}
.game-card-art-range span {
  width: 3.7rem;
  height: 5rem;
  border: .32rem solid #f9d47e;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #513b28, inset 0 0 0 1px #513b28;
}
.game-card-art-beat { background: radial-gradient(ellipse at center, #ecd6b5, #c79b73); }
.game-card-art-beat span { display: flex; align-items: center; }
.game-card-art-beat img {
  width: clamp(2.9rem, 15vw, 4.5rem);
  border-radius: .28rem;
  box-shadow: 0 .25rem .6rem #59392d6b;
}
.game-card-art-beat img:first-child { transform: rotate(-12deg) translateX(.3rem); }
.game-card-art-beat img:nth-child(2) { position: relative; z-index: 1; transform: translateY(-.4rem); }
.game-card-art-beat img:last-child { transform: rotate(12deg) translateX(-.3rem); }
.game-card-art-word {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .3rem;
  background: radial-gradient(ellipse at center, #594763, #272138 75%);
}
.game-card-art-word span {
  display: grid;
  place-items: center;
  width: clamp(1.5rem, 7vw, 2rem);
  aspect-ratio: 1;
  border-radius: .25rem;
  background: #edc9b7;
  color: #2c2038;
  font: 800 1rem ui-monospace, monospace;
}
.game-card-art-word span:nth-child(even) { background: #c9b4e2; }
.game-card-circle {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.75rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#6bdbbb, #efd58a 55%, #ee916f 84%, #6bdbbb);
  box-shadow: 0 0 1.1rem #6bdbbb38;
}
.game-card-circle::before {
  content: "";
  position: absolute;
  inset: .2rem;
  border-radius: inherit;
  background: #21312d;
}
.game-card-circle::after {
  content: "";
  z-index: 1;
  width: .38rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff7eb;
}
.game-card-info h3 { margin: 0; font-size: 1.2rem; }
.game-card-info p { margin: .35rem 0 1rem; }
.game-card-info .primary { padding: .55rem 1rem; }
.game-card:hover { border-color: #ffe0b3; }
.game-card:hover .primary { background: #fff1d6; }

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}

.primary[hidden] { display: none; }
.game-card-art-jigsaw { background: repeating-linear-gradient(36deg, #ffffff09 0 1px, transparent 1px 4px), #58604b; }
.game-card-art-jigsaw img { width: 5.5rem; transform: rotate(-12deg); filter: drop-shadow(.16rem .22rem .1rem #30291b88); }
