:root {
  --bg: #f4f1de;
  --lake: #2b6cb0;
  --hay: #e9c46a;
  --flower: #e76f51;
  --sky: #f7f4e8;
  --ink: #1d3557;
  --dusk: #16324f;
  --foam: #fffdf6;
  --mist: #d7e4f2;
  --hay-line: rgba(233, 196, 106, 0.85);
  --font-head: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --bloom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cellipse cx='16' cy='7' rx='4.2' ry='7.2' fill='%23e76f51'/%3E%3Cellipse cx='16' cy='25' rx='4.2' ry='7.2' fill='%23e76f51'/%3E%3Cellipse cx='7' cy='16' rx='7.2' ry='4.2' fill='%232b6cb0'/%3E%3Cellipse cx='25' cy='16' rx='7.2' ry='4.2' fill='%232b6cb0'/%3E%3Ccircle cx='16' cy='16' r='3.6' fill='%23e9c46a'/%3E%3C/svg%3E");
  --radius: 26px;
  --shadow: 0 18px 48px rgba(29, 53, 87, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(233, 196, 106, 0.28), transparent 58%),
    radial-gradient(720px 380px at 96% 0%, rgba(43, 108, 176, 0.14), transparent 52%),
    radial-gradient(640px 280px at 70% 100%, rgba(231, 111, 81, 0.1), transparent 55%),
    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(--lake);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.55rem;
}

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;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 244, 232, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hay-line);
}

.site-header::after {
  content: "";
  display: block;
  height: 6px;
  background:
    radial-gradient(circle at 8px 3px, var(--flower) 2px, transparent 2.4px),
    radial-gradient(circle at 22px 3px, var(--hay) 2px, transparent 2.4px),
    radial-gradient(circle at 36px 3px, var(--lake) 2px, transparent 2.4px);
  background-size: 42px 6px;
  opacity: 0.7;
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

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

.brand img {
  width: 48px;
  height: 48px;
}

#nav-toggle {
  margin-left: auto;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--hay);
  border-radius: 14px;
  background: var(--sky);
  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(--ink);
  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: 2px;
  flex: 1;
  justify-content: center;
}

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

#site-nav a:hover,
#site-nav a[aria-current="page"] {
  background: var(--sky);
  box-shadow: inset 0 0 0 1.5px var(--hay);
}

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

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

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

#player-name {
  font-family: var(--font-head);
  font-weight: 600;
  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: 650;
  padding: 0.74rem 1.3rem;
  border-radius: 999px;
  transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease;
}

.btn-lake {
  background: var(--lake);
  color: var(--foam);
  box-shadow: 0 10px 22px rgba(43, 108, 176, 0.28);
}

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

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--hay);
}

.btn-ghost:hover {
  background: rgba(233, 196, 106, 0.22);
}

.btn-flower {
  background: var(--flower);
  color: var(--foam);
  box-shadow: 0 10px 22px rgba(231, 111, 81, 0.28);
}

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

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

.hero {
  position: relative;
  width: 100%;
  min-height: min(78vh, 720px);
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: min(78vh, 720px);
  object-fit: cover;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(244, 241, 222, 0.88) 0%, rgba(244, 241, 222, 0.55) 38%, rgba(29, 53, 87, 0.18) 100%),
    linear-gradient(180deg, transparent 42%, rgba(29, 53, 87, 0.28));
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  left: max(20px, calc(50% - 560px));
  right: 20px;
  bottom: 12%;
  max-width: 640px;
  color: var(--ink);
}

.kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  background: rgba(247, 244, 232, 0.78);
  border: 1px solid var(--hay);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lake);
  font-weight: 650;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.7rem);
  color: var(--ink);
}

.hero .lede {
  max-width: 48ch;
  color: var(--dusk);
}

.section {
  padding: 72px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

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

.muted {
  color: #3d5474;
}

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

.game-card {
  position: relative;
  background-color: var(--sky);
  background-image: var(--bloom), var(--bloom), var(--bloom), var(--bloom);
  background-repeat: no-repeat;
  background-size: 30px 30px;
  background-position: 8px 8px, calc(100% - 8px) 8px, 8px calc(100% - 8px), calc(100% - 8px) calc(100% - 8px);
  border: 2px solid var(--hay);
  border-radius: var(--radius);
  padding: 28px 22px 22px;
  box-shadow: var(--shadow);
  outline: 1px dashed rgba(43, 108, 176, 0.28);
  outline-offset: -12px;
  transition: transform 0.22s ease;
}

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

.game-card img {
  width: 100%;
  height: 198px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--hay-line);
}

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

.game-card p {
  margin: 0 6px 16px;
  color: #3d5474;
  font-size: 0.98rem;
}

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

.poles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: end;
}

.pole {
  text-align: center;
  padding: 8px 8px 0;
}

.pole-shaft {
  width: 16px;
  height: 168px;
  margin: 48px auto 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, #c9a44a, var(--hay) 40%, #f3d98a 55%, #c9a44a);
  position: relative;
  box-shadow: 4px 0 0 rgba(29, 53, 87, 0.06);
}

.pole-shaft::before {
  content: "";
  position: absolute;
  top: -46px;
  left: 50%;
  width: 72px;
  height: 72px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 7px solid var(--flower);
  box-shadow:
    0 0 0 5px var(--hay),
    inset 0 0 0 6px var(--lake),
    inset 0 0 0 14px var(--sky);
  background:
    radial-gradient(circle at 30% 30%, var(--hay) 3px, transparent 4px),
    radial-gradient(circle at 70% 28%, var(--flower) 3px, transparent 4px),
    radial-gradient(circle at 50% 72%, var(--lake) 3px, transparent 4px);
}

.pole-shaft::after {
  content: attr(data-num);
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  z-index: 1;
}

.pole h3 {
  font-size: 1.25rem;
}

.pole p {
  margin: 0;
  color: #3d5474;
  font-size: 0.96rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.feature-frame {
  position: relative;
  background-color: var(--sky);
  background-image: var(--bloom), var(--bloom), var(--bloom), var(--bloom);
  background-repeat: no-repeat;
  background-size: 32px 32px;
  background-position: 6px 6px, calc(100% - 6px) 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px);
  border: 2px solid var(--hay);
  border-radius: 32px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.feature-frame img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 20px;
}

.picnic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.picnic-tile {
  background-color: var(--sky);
  background-image:
    linear-gradient(45deg, rgba(233, 196, 106, 0.28) 25%, transparent 25%, transparent 75%, rgba(233, 196, 106, 0.28) 75%),
    linear-gradient(45deg, rgba(233, 196, 106, 0.28) 25%, transparent 25%, transparent 75%, rgba(233, 196, 106, 0.28) 75%);
  background-size: 26px 26px;
  background-position: 0 0, 13px 13px;
  border: 2px solid var(--hay);
  border-radius: 22px;
  padding: 24px 22px;
  box-shadow: var(--shadow);
}

.picnic-tile h3 {
  font-size: 1.22rem;
}

.picnic-tile p {
  margin: 0;
  color: #3d5474;
}

.cta-banner {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  min-height: 400px;
  box-shadow: var(--shadow);
}

.cta-banner img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.cta-dusk {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(22, 50, 79, 0.88) 0%, rgba(43, 108, 176, 0.42) 48%, rgba(231, 111, 81, 0.5) 100%);
}

.cta-copy {
  position: absolute;
  left: 40px;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 520px;
  color: var(--foam);
}

.cta-copy .kicker {
  background: rgba(247, 244, 232, 0.16);
  color: var(--hay);
  border-color: rgba(233, 196, 106, 0.55);
}

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

.cta-copy h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.page-hero {
  padding: 56px 0 12px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(43, 108, 176, 0.08), transparent 70%);
}

.prose-card,
.form-card {
  background-color: var(--sky);
  background-image: var(--bloom), var(--bloom), var(--bloom), var(--bloom);
  background-repeat: no-repeat;
  background-size: 28px 28px;
  background-position: 10px 10px, calc(100% - 10px) 10px, 10px calc(100% - 10px), calc(100% - 10px) calc(100% - 10px);
  border: 2px solid var(--hay);
  border-radius: 28px;
  padding: 36px 38px;
  box-shadow: var(--shadow);
}

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

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

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

input,
textarea {
  width: 100%;
  border: 1.5px solid var(--hay);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: var(--foam);
  color: var(--ink);
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--lake);
  outline-offset: 1px;
}

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

.form-success {
  display: none;
  padding: 1.2rem;
  border-radius: 16px;
  background: var(--mist);
  border: 1.5px solid var(--hay);
}

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

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

.site-footer {
  margin-top: 24px;
  padding: 40px 0 28px;
  background:
    linear-gradient(180deg, transparent, rgba(43, 108, 176, 0.1) 30%, rgba(22, 50, 79, 0.92));
  color: var(--foam);
}

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

.site-footer .brand {
  color: var(--foam);
}

.site-footer a {
  display: block;
  color: #d7e4f2;
  text-decoration: none;
  margin: 0.28rem 0;
}

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

.footer-note {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(233, 196, 106, 0.28);
  font-size: 0.88rem;
  color: #c5d4e6;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(22, 50, 79, 0.5);
  backdrop-filter: blur(7px);
}

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

.modal {
  width: min(430px, 100%);
  background-color: var(--sky);
  background-image: var(--bloom), var(--bloom);
  background-repeat: no-repeat;
  background-size: 26px 26px;
  background-position: 12px 12px, calc(100% - 12px) 12px;
  border: 2px solid var(--hay);
  border-radius: 28px;
  padding: 30px 26px 24px;
  box-shadow: var(--shadow);
  position: relative;
}

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

#auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--hay);
  border-radius: 50%;
  background: var(--foam);
  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: 1.5px solid var(--hay);
  border-radius: 999px;
  padding: 0.65rem;
  background: var(--foam);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  color: var(--ink);
}

.auth-tab.is-on {
  background: var(--lake);
  color: var(--foam);
  border-color: var(--lake);
}

.auth-error {
  min-height: 1.2em;
  color: var(--flower);
  font-size: 0.9rem;
}

#age-denied {
  margin-top: 12px;
  color: var(--flower);
}

#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(--sky);
  border: 2px solid var(--hay);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

@media (max-width: 980px) {
  .games,
  .poles,
  .feature-row,
  .picnic,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pole-shaft {
    height: 120px;
  }
}

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

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

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

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

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

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

  .cta-copy {
    left: 22px;
    right: 22px;
  }
}

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

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

  .cta-banner,
  .cta-banner img {
    min-height: 440px;
    height: 440px;
  }

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

  .prose-card,
  .form-card {
    padding: 28px 20px;
  }

  .feature-frame img {
    height: 260px;
  }
}

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