:root {
  --bg: #fff6ea;
  --berry: #b31b3a;
  --forest: #1f3d2b;
  --cream: #fff6ea;
  --leaf: #e8c547;
  --ink: #1f3d2b;
  --berry-deep: #8a142c;
  --moss: #2a4a36;
  --linen: #f4e4cc;
  --stain: rgba(179, 27, 58, 0.16);
  --gold-soft: rgba(232, 197, 71, 0.35);
  --radius: 1.6rem;
  --shadow: 0 18px 40px rgba(31, 61, 43, 0.12);
  --header-h: 5.4rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

body.is-locked {
  overflow: hidden;
}

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

a {
  color: var(--berry);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--berry-deep);
}

h1,
h2,
h3,
h4 {
  font-family: "Young Serif", Georgia, serif;
  font-weight: 400;
  line-height: 1.18;
  color: var(--forest);
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

.skip:focus {
  top: 1rem;
}

.linen {
  background-color: var(--cream);
  background-image:
    repeating-linear-gradient(0deg, rgba(31, 61, 43, 0.035) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(179, 27, 58, 0.03) 0 1px, transparent 1px 6px),
    radial-gradient(ellipse at 20% 10%, rgba(232, 197, 71, 0.18), transparent 42%),
    radial-gradient(ellipse at 90% 80%, rgba(179, 27, 58, 0.08), transparent 38%);
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.blob,
.stain {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  filter: blur(2px);
}

.stain-a {
  width: 18rem;
  height: 14rem;
  background: radial-gradient(circle at 40% 40%, var(--stain), transparent 68%);
  border-radius: 62% 38% 55% 45% / 48% 58% 42% 52%;
  top: -4rem;
  left: -5rem;
}

.stain-b {
  width: 22rem;
  height: 16rem;
  background: radial-gradient(circle at 60% 50%, var(--gold-soft), transparent 70%);
  border-radius: 40% 60% 48% 52% / 55% 40% 60% 45%;
  right: -6rem;
  bottom: -5rem;
}

.stain-c {
  width: 12rem;
  height: 12rem;
  background: radial-gradient(circle, rgba(31, 61, 43, 0.1), transparent 70%);
  border-radius: 70% 30% 58% 42%;
  top: 30%;
  right: 8%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px dashed color-mix(in srgb, var(--forest) 22%, transparent);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--forest);
  text-decoration: none;
  font-family: "Young Serif", Georgia, serif;
  font-size: 1.35rem;
}

.brand img {
  width: 3.1rem;
  height: 3.1rem;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 1.35rem;
  margin-left: auto;
  margin-right: 0.4rem;
}

.site-nav a {
  color: var(--forest);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a.is-now {
  color: var(--berry);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

#guest-actions,
#player-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#guest-actions[hidden],
#player-actions[hidden] {
  display: none;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--berry);
  border-radius: 999px;
  background: var(--cream);
  font-weight: 800;
  color: var(--forest);
}

.player-chip::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--berry);
  box-shadow: 0 0 0 3px var(--leaf);
}

.nav-toggle {
  display: none;
  width: 2.7rem;
  height: 2.7rem;
  border: 1.5px solid var(--forest);
  background: var(--cream);
  border-radius: 0.8rem;
  padding: 0.55rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--forest);
  border-radius: 99px;
  transition: 0.2s;
}

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.7rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: rotate(-1.5deg) translateY(-1px);
}

.btn-berry {
  background: var(--berry);
  color: #fff8ef;
  box-shadow: 0 8px 0 var(--berry-deep);
}

.btn-berry:hover {
  color: #fff8ef;
  background: var(--berry-deep);
}

.btn-leaf {
  background: var(--leaf);
  color: var(--forest);
  box-shadow: 0 8px 0 #c9a52a;
}

.btn-ghost {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}

.btn-ghost:hover {
  color: var(--berry);
  border-color: var(--berry);
}

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.4rem;
  align-items: center;
  padding: 3.4rem 0 4.2rem;
  position: relative;
  z-index: 1;
}

.kicker {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--berry);
  margin-bottom: 0.8rem;
}

.lede {
  font-size: 1.12rem;
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.4rem 0 1.6rem;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.stat-row strong {
  display: block;
  font-family: "Young Serif", Georgia, serif;
  font-size: 1.45rem;
  color: var(--berry);
}

.stat-row span {
  font-size: 0.88rem;
}

.hero-art {
  position: relative;
}

.hero-frame {
  position: relative;
  border-radius: 42% 58% 48% 52% / 48% 42% 58% 52%;
  overflow: hidden;
  border: 3px solid var(--forest);
  box-shadow: var(--shadow);
  transform: rotate(-2.2deg);
}

.hero-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.linen-veil {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 246, 234, 0.18) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, rgba(255, 246, 234, 0.28), rgba(31, 61, 43, 0.12));
  pointer-events: none;
}

.section {
  position: relative;
  padding: 4.2rem 0;
  overflow: hidden;
}

.section-alt {
  background: color-mix(in srgb, var(--linen) 70%, var(--cream));
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.games {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  position: relative;
  z-index: 1;
}

.jam-card {
  background: var(--cream);
  background-image:
    repeating-linear-gradient(0deg, rgba(31, 61, 43, 0.03) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(90deg, rgba(179, 27, 58, 0.025) 0 1px, transparent 1px 7px);
  border: 2px solid var(--berry);
  border-radius: 1.4rem 1.8rem 1.2rem 1.7rem;
  padding: 1.15rem 1.15rem 1.3rem;
  box-shadow: 6px 10px 0 rgba(31, 61, 43, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.jam-card:nth-child(1) {
  transform: rotate(-2.1deg);
}

.jam-card:nth-child(2) {
  transform: rotate(1.6deg);
  margin-top: 0.8rem;
}

.jam-card:nth-child(3) {
  transform: rotate(-1.1deg);
}

.jam-card:hover {
  transform: rotate(0deg) translateY(-6px);
  border-color: var(--leaf);
  box-shadow: 0 16px 0 var(--leaf);
}

.jam-card img {
  width: 100%;
  height: 11.5rem;
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 40%, #fff, var(--linen));
  border-radius: 1rem;
  border: 1.5px dashed var(--forest);
  padding: 0.7rem;
}

.seal {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--forest);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.jam-card h3 {
  margin: 0;
  font-size: 1.45rem;
}

.jam-card p {
  margin: 0;
  flex: 1;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.feature-frame {
  border-radius: 58% 42% 62% 38% / 42% 58% 42% 58%;
  overflow: hidden;
  border: 3px solid var(--berry);
  transform: rotate(2deg);
  box-shadow: var(--shadow);
}

.feature-frame img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.4rem;
}

.checks li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.55rem;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--berry);
  box-shadow: 0 0 0 3px var(--leaf);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  position: relative;
  z-index: 1;
}

.step {
  text-align: center;
  padding: 1.4rem 1rem 1.6rem;
}

.stamp {
  width: 4.2rem;
  height: 4.2rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Young Serif", Georgia, serif;
  font-size: 1.7rem;
  color: var(--cream);
  background:
    radial-gradient(circle at 30% 30%, #d53a58, var(--berry) 55%, var(--berry-deep));
  border: 3px dashed var(--leaf);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.12), 0 8px 0 rgba(31, 61, 43, 0.12);
}

.patches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.patch {
  background: var(--cream);
  border: 2px dashed var(--forest);
  border-radius: 1.1rem;
  padding: 1.15rem 1rem 1.2rem;
  box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--linen) 80%, transparent);
  min-height: 11.5rem;
}

.patch:nth-child(odd) {
  transform: rotate(-1.4deg);
}

.patch:nth-child(even) {
  transform: rotate(1.2deg);
}

.patch h3 {
  font-size: 1.15rem;
}

.cta-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--forest);
  color: var(--cream);
  border-radius: 2.2rem;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.cta-band h2,
.cta-copy p {
  color: var(--cream);
}

.cta-copy {
  padding: 2.2rem 2rem;
}

.cta-band img {
  width: 100%;
  height: 100%;
  min-height: 16rem;
  object-fit: cover;
}

.safe-box {
  position: relative;
  z-index: 1;
  border: 2px solid var(--forest);
  border-radius: 1.8rem;
  padding: 1.8rem;
  background: color-mix(in srgb, var(--leaf) 18%, var(--cream));
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 3.2rem 0 2rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  max-width: 18ch;
}

.prose {
  position: relative;
  z-index: 1;
  background: var(--cream);
  border: 2px solid var(--berry);
  border-radius: 1.6rem;
  padding: 1.6rem 1.5rem 1.8rem;
  box-shadow: 8px 12px 0 rgba(31, 61, 43, 0.07);
  max-width: 46rem;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.6rem;
  position: relative;
  z-index: 1;
}

.form-card,
.info-card {
  background: var(--cream);
  border: 2px solid var(--berry);
  border-radius: 1.5rem;
  padding: 1.4rem;
  background-image:
    repeating-linear-gradient(0deg, rgba(31, 61, 43, 0.03) 0 1px, transparent 1px 6px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--forest);
  background: #fffdf8;
  border-radius: 0.85rem;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.form-ok {
  display: none;
}

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

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

.form-ok {
  padding: 1.4rem 0.4rem;
  text-align: center;
}

.form-ok h2 {
  color: var(--berry);
}

.site-footer {
  background: var(--forest);
  color: #f3ead8;
  padding: 3rem 0 1.4rem;
  margin-top: 2rem;
}

.site-footer a {
  color: var(--leaf);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 0.9fr;
  gap: 1.6rem;
}

.footer-grid h4 {
  color: var(--leaf);
  font-size: 1.05rem;
}

.footer-grid a,
.footer-grid p {
  display: block;
  margin-bottom: 0.4rem;
}

.brand-foot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--cream);
  text-decoration: none;
  font-family: "Young Serif", Georgia, serif;
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.brand-foot img {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--cream);
  border-radius: 50%;
}

.footer-bottom {
  border-top: 1px dashed rgba(232, 197, 71, 0.35);
  margin-top: 1.8rem;
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.88rem;
}

#age-overlay,
#auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(31, 61, 43, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.2s ease;
}

#age-overlay.is-open,
#auth-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.age-card,
.auth-card {
  width: min(28rem, 100%);
  background: var(--cream);
  background-image:
    repeating-linear-gradient(0deg, rgba(31, 61, 43, 0.035) 0 1px, transparent 1px 5px);
  border: 2.5px solid var(--berry);
  border-radius: 1.6rem;
  padding: 1.5rem 1.4rem 1.6rem;
  position: relative;
  box-shadow: 0 24px 50px rgba(31, 61, 43, 0.25);
}

.age-actions,
.auth-tabs {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

#age-denied {
  margin-top: 1rem;
  color: var(--berry);
  font-weight: 800;
}

#auth-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  background: var(--linen);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--forest);
}

.auth-tab {
  flex: 1;
  border: 1.5px solid var(--forest);
  background: transparent;
  border-radius: 999px;
  padding: 0.5rem;
  cursor: pointer;
  font-weight: 800;
}

.auth-tab.is-on {
  background: var(--berry);
  color: #fff8ef;
  border-color: var(--berry);
}

.auth-card form {
  margin-top: 1rem;
}

.auth-error {
  min-height: 1.2em;
  color: var(--berry);
  font-weight: 700;
  margin: 0.3rem 0 0.7rem;
}

#cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 150;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  max-width: 70rem;
  margin-inline: auto;
  background: var(--cream);
  border: 2px solid var(--forest);
  border-radius: 1.3rem;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(1rem);
}

#cookie-banner.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

#cookie-banner p {
  margin: 0;
  flex: 1 1 18rem;
}

@media (max-width: 980px) {
  .header-row {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: var(--cream);
    border-bottom: 1px dashed var(--forest);
    padding: 0.6rem 1rem 1rem;
  }

  .site-nav.is-open {
    display: flex;
    z-index: 90;
  }

  .site-nav a {
    padding: 0.55rem 0;
  }

  .hero-grid,
  .feature,
  .contact-grid,
  .cta-band,
  .games,
  .steps,
  .patches,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .jam-card,
  .jam-card:nth-child(2) {
    transform: none;
    margin-top: 0;
  }

  .cta-band img {
    min-height: 12rem;
  }
}

@media (max-width: 640px) {
  .header-actions .btn {
    min-height: 2.4rem;
    padding-inline: 0.75rem;
    font-size: 0.88rem;
  }

  .hero-grid,
  .section,
  .page-hero {
    padding-top: 2rem;
    padding-bottom: 2.2rem;
  }

  h1 {
    font-size: 2rem;
  }
}
