:root {
  --bg: #f6efe4;
  --wood: #8b5a2b;
  --steam: #c9c4bb;
  --ember: #e85d04;
  --ink: #2b2118;
  --foam: #fffaf3;
  --wool: #e8dccb;
  --bench: #efe6d6;
  --copper: #c45c26;
  --shadow: #d8ccba;
  --lift: 18px 18px 36px var(--shadow), -14px -14px 30px #fffdf8;
  --press: inset 10px 10px 20px var(--shadow), inset -8px -8px 18px #fffdf8;
  --radius: 28px;
  --font-head: "Fraunces", "Times New Roman", serif;
  --font-body: "Karla", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(232, 93, 4, 0.08), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(201, 196, 187, 0.45), transparent 50%),
    var(--bg);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
}

body.is-locked {
  overflow: hidden;
}

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

a {
  color: var(--copper);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--foam);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: 999px;
}

.skip:focus {
  top: 1rem;
}

.shell {
  width: min(1120px, calc(100% - 28px));
  margin: 18px auto 40px;
  background:
    linear-gradient(180deg, rgba(255, 250, 243, 0.55), transparent 28%),
    repeating-linear-gradient(90deg, rgba(139, 90, 43, 0.045) 0 1px, transparent 1px 11px),
    #f3eadc;
  border-radius: 36px;
  box-shadow: var(--lift);
  overflow: hidden;
}

.wrap {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(180deg, #fffaf3, #f4eadc);
  border-bottom: 1px solid rgba(139, 90, 43, 0.12);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.35rem;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  box-shadow: 6px 6px 12px var(--shadow), -5px -5px 12px #fff;
  background: var(--bg);
}

#nav-toggle {
  margin-left: auto;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 16px;
  background: var(--bg);
  box-shadow: 6px 6px 12px var(--shadow), -5px -5px 12px #fff;
  cursor: pointer;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

#nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--wood);
  border-radius: 2px;
  transition: 0.2s ease;
}

#nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

#nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#site-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

#site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 500;
}

#site-nav a:hover,
#site-nav a[aria-current="page"] {
  background: var(--bg);
  box-shadow: var(--press);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#player-name {
  font-family: var(--font-head);
  font-style: italic;
  padding: 0 6px;
}

.btn,
button.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0.72rem 1.25rem;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-copper {
  background: linear-gradient(180deg, #ff7a2e, var(--ember) 55%, var(--copper));
  color: var(--foam);
  box-shadow: 0 8px 18px rgba(232, 93, 4, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-copper:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 6px 6px 14px var(--shadow), -5px -5px 12px #fff;
}

.btn-ghost:hover {
  box-shadow: var(--press);
}

.btn-tiny {
  padding: 0.52rem 0.95rem;
  font-size: 0.92rem;
}

.hero {
  position: relative;
  margin: 18px;
  border-radius: 32px;
  overflow: hidden;
  min-height: 520px;
  box-shadow: var(--lift);
}

.hero img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.steam-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(246, 239, 228, 0.12), rgba(43, 33, 24, 0.42) 72%),
    radial-gradient(ellipse at 70% 20%, rgba(255, 250, 243, 0.45), transparent 50%);
  pointer-events: none;
}

.steam-veil::after {
  content: "";
  position: absolute;
  inset: -20% 8% auto;
  height: 55%;
  background:
    radial-gradient(closest-side, rgba(255, 250, 243, 0.35), transparent 70%),
    radial-gradient(closest-side, rgba(201, 196, 187, 0.28), transparent 72%);
  background-size: 42% 90%, 55% 100%;
  background-position: 20% 40%, 70% 10%;
  background-repeat: no-repeat;
  animation: steam 9s ease-in-out infinite;
  filter: blur(8px);
}

@keyframes steam {
  0%,
  100% { transform: translateY(8px) scale(1); opacity: 0.7; }
  50% { transform: translateY(-14px) scale(1.06); opacity: 1; }
}

.hero-copy {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 36px;
  max-width: 620px;
  color: var(--foam);
}

.kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.18);
  backdrop-filter: blur(8px);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--foam);
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  color: var(--foam);
  text-shadow: 0 8px 24px rgba(43, 33, 24, 0.45);
}

.hero .lede {
  color: #fff6ea;
  max-width: 48ch;
}

.section {
  padding: 56px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.muted {
  color: #5c4c3d;
}

.games {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.game-card {
  position: relative;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px 14px 20px;
  box-shadow: var(--lift);
  overflow: hidden;
  transition: transform 0.22s ease;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 250, 243, 0.55), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-4px);
}

.game-card:hover::after {
  opacity: 1;
}

.game-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--press);
}

.game-card h3 {
  margin: 14px 8px 6px;
  font-size: 1.35rem;
}

.game-card p {
  margin: 0 8px 14px;
  color: #5c4c3d;
  font-size: 0.98rem;
}

.game-card .btn {
  margin: 0 8px;
}

.stones {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stone-circle {
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fffaf3, var(--bench) 42%, #e2d4c0);
  box-shadow: 14px 16px 28px var(--shadow), -10px -10px 22px #fff, inset 0 -18px 24px rgba(139, 90, 43, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
}

.stone-circle .num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ff7a2e, var(--ember));
  color: var(--foam);
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.4rem;
  margin-bottom: 10px;
  box-shadow: 0 8px 16px rgba(232, 93, 4, 0.28);
}

.stone-circle p {
  margin: 0;
  font-size: 0.95rem;
  color: #5c4c3d;
}

.feature-split,
.cta-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  background: var(--bg);
  border-radius: 32px;
  padding: 18px;
  box-shadow: var(--lift);
}

.feature-split img,
.cta-split img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 24px;
}

.benches {
  display: grid;
  gap: 16px;
}

.bench {
  background: var(--bench);
  border-radius: 22px;
  padding: 18px 22px;
  box-shadow: var(--press);
}

.bench h3 {
  font-size: 1.2rem;
}

.page-hero {
  padding: 48px 0 8px;
  text-align: center;
}

.prose-card {
  background: var(--bg);
  border-radius: 32px;
  padding: 32px 36px;
  box-shadow: var(--lift);
}

.prose-card h2 {
  margin-top: 1.6rem;
  font-size: 1.45rem;
}

.form-card {
  background: var(--bg);
  border-radius: 32px;
  padding: 28px;
  box-shadow: var(--lift);
}

.form-grid {
  display: grid;
  gap: 14px;
}

label span {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

input,
textarea {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 0.85rem 1rem;
  background: var(--bench);
  color: var(--ink);
  font: inherit;
  box-shadow: var(--press);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-success {
  display: none;
  padding: 1.2rem;
  border-radius: 18px;
  background: var(--bench);
  box-shadow: var(--press);
}

.form-card.is-sent form {
  display: none;
}

.form-card.is-sent .form-success {
  display: block;
}

.site-footer {
  margin-top: 12px;
  padding: 36px 0 28px;
  background: linear-gradient(180deg, transparent, rgba(139, 90, 43, 0.08));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
}

.site-footer a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  margin: 0.25rem 0;
}

.site-footer h4 {
  font-size: 1.05rem;
}

.footer-note {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 90, 43, 0.15);
  font-size: 0.88rem;
  color: #5c4c3d;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(43, 33, 24, 0.45);
  backdrop-filter: blur(6px);
}

.overlay.is-open {
  display: grid;
}

.modal {
  width: min(420px, 100%);
  background: var(--bg);
  border-radius: 28px;
  padding: 28px 26px 24px;
  box-shadow: var(--lift);
  position: relative;
}

.modal h2 {
  font-size: 1.7rem;
}

#auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--bench);
  box-shadow: var(--press);
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--ink);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 18px;
}

.auth-tab {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem;
  background: var(--bench);
  box-shadow: var(--press);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.auth-tab.is-on {
  background: linear-gradient(180deg, #ff7a2e, var(--ember));
  color: var(--foam);
  box-shadow: 0 6px 14px rgba(232, 93, 4, 0.25);
}

.auth-error {
  min-height: 1.2em;
  color: #9b2c00;
  font-size: 0.9rem;
}

#age-denied {
  margin-top: 12px;
  color: #9b2c00;
}

#cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 20px;
  background: var(--foam);
  border-radius: 22px;
  box-shadow: var(--lift);
}

#cookie-banner.is-open {
  display: flex;
}

@media (max-width: 980px) {
  .games,
  .stones,
  .feature-split,
  .cta-split,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stone-circle {
    aspect-ratio: auto;
    min-height: 240px;
  }
}

@media (max-width: 820px) {
  #nav-toggle {
    display: flex;
  }

  #site-nav {
    position: absolute;
    top: 78px;
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    background: var(--foam);
    border-radius: 22px;
    padding: 12px;
    box-shadow: var(--lift);
    z-index: 20;
  }

  #site-nav.is-open {
    display: flex;
  }

  .header-bar {
    position: relative;
    flex-wrap: wrap;
  }

  .hero,
  .hero img {
    min-height: 460px;
    height: 460px;
  }

  .hero-copy {
    left: 20px;
    right: 20px;
    bottom: 22px;
  }
}

@media (max-width: 640px) {
  .games,
  .stones,
  .feature-split,
  .cta-split,
  .footer-grid,
  #cookie-banner {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .shell {
    width: min(100% - 16px, 1120px);
    border-radius: 24px;
  }

  .hero,
  .hero img {
    min-height: 420px;
    height: 420px;
    margin: 10px;
    border-radius: 22px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .steam-veil::after,
  .game-card,
  .btn {
    animation: none;
    transition: none;
  }
}
