:root {
  --bg: #e8f4ff;
  --ice: #4aa3c7;
  --steel: #1a2a33;
  --frost: #f7fbff;
  --crack: #7fd3f0;
  --text: #1a2a33;
  --muted: #3d5563;
  --line: rgba(26, 42, 51, 0.22);
  --ice-shadow: 10px 14px 0 rgba(127, 211, 240, 0.28), 0 18px 36px rgba(26, 42, 51, 0.1);
  --header-h: 72px;
  --wrap: 1180px;
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(127, 211, 240, 0.18) 0 12px, transparent 12px) 0 0 / 48px 48px,
    linear-gradient(225deg, rgba(74, 163, 199, 0.08) 0 10px, transparent 10px) 24px 24px / 48px 48px,
    var(--bg);
  line-height: 1.55;
  min-height: 100%;
}

body.is-locked {
  overflow: hidden;
}

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

a {
  color: inherit;
}

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

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

p {
  margin: 0 0 1rem;
}

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
  border: 1px solid var(--steel);
  background: var(--frost);
  padding: 0.28rem 0.62rem;
  margin-bottom: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--steel);
  background: var(--steel);
  color: var(--frost);
  padding: 0.72rem 1.15rem;
  cursor: pointer;
  text-decoration: none;
  border-radius: 2px;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 4px 4px 0 var(--crack);
}

.btn:hover {
  background: var(--ice);
  color: var(--steel);
  transform: translate(-1px, -1px);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--crack);
}

.btn-ghost {
  background: var(--frost);
  color: var(--steel);
  box-shadow: 4px 4px 0 rgba(26, 42, 51, 0.12);
}

.btn-ghost:hover {
  background: var(--crack);
  color: var(--steel);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 251, 255, 0.92);
  border-bottom: 1px solid var(--steel);
  backdrop-filter: blur(10px);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.04em;
}

.logo img {
  width: 38px;
  height: 38px;
}

.brand-mark {
  width: 38px;
  height: 38px;
}

#site-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-left: auto;
}

#site-nav a {
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

#site-nav a:hover,
#site-nav a.is-current {
  color: var(--ice);
}

#site-nav a.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--steel);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.4rem;
}

#player-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--steel);
  background: var(--frost);
}

#nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--steel);
  background: var(--frost);
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}

#nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--steel);
  margin: 5px auto;
  transition: transform 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);
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--steel);
}

.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: calc(100vh - var(--header-h));
  min-height: max(560px, calc(100vh - var(--header-h)));
}

.hero-copy {
  padding: 4.2rem 0 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 4.1rem);
  max-width: 14ch;
}

.hero .lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.hero-visual {
  position: relative;
  min-height: 420px;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%, 0 16%);
  border-left: 1px solid var(--steel);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.hero-facet {
  position: absolute;
  inset: auto 8% 8% auto;
  width: min(46%, 220px);
  aspect-ratio: 1;
  background: linear-gradient(145deg, rgba(247, 251, 255, 0.55), rgba(127, 211, 240, 0.28));
  border: 1px solid var(--steel);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  pointer-events: none;
}

.notice-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  padding: 0.85rem 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--line);
}

.notice-strip strong {
  font-family: var(--font-head);
}

.section {
  padding: 4.4rem 0;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 46rem;
}

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

.shard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.game-card {
  background: var(--frost);
  border: 1px solid var(--steel);
  padding: 0.85rem 0.85rem 1.15rem;
  box-shadow: var(--ice-shadow);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-card:nth-child(1) {
  transform: skewY(-1.6deg);
  clip-path: polygon(0 0, 100% 0, 100% 92%, 88% 100%, 0 100%);
}

.game-card:nth-child(2) {
  transform: skewY(1.4deg) translateY(18px);
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%, 0 10%);
}

.game-card:nth-child(3) {
  transform: skewY(-0.8deg);
  clip-path: polygon(0 6%, 100% 0, 100% 100%, 6% 100%);
}

.game-card:hover {
  box-shadow: 12px 16px 0 rgba(127, 211, 240, 0.42), 0 20px 40px rgba(26, 42, 51, 0.12);
}

.game-card .thumb {
  overflow: hidden;
  border: 1px solid var(--steel);
  clip-path: polygon(0 0, 100% 8%, 94% 100%, 0 92%);
  aspect-ratio: 1;
  background: var(--bg);
}

.game-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}

.game-card p {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.game-card .kind {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-head);
  color: var(--ice);
}

.feature-split {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 0;
  border: 1px solid var(--steel);
  background: var(--frost);
  box-shadow: var(--ice-shadow);
}

.feature-visual {
  min-height: 360px;
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
  overflow: hidden;
  border-right: 1px solid var(--steel);
}

.feature-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-copy {
  padding: 2.4rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ice-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.6rem;
  border-left: 2px solid var(--steel);
  display: grid;
  gap: 1rem;
}

.ice-timeline li {
  position: relative;
  background: linear-gradient(180deg, #f7fbff 0%, #e4f3fc 100%);
  border: 1px solid var(--steel);
  padding: 1.15rem 1.2rem 1.05rem 1.4rem;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

.ice-timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.6rem - 6px);
  top: 1.25rem;
  width: 12px;
  height: 12px;
  background: var(--crack);
  border: 1px solid var(--steel);
  transform: rotate(45deg);
}

.layer-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--ice);
}

.frost-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.frost-cell {
  background: var(--frost);
  border: 1px solid var(--steel);
  padding: 1.2rem 1.1rem;
  border-radius: 2px;
  box-shadow: 6px 8px 0 rgba(127, 211, 240, 0.22);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.frost-cell h3 {
  font-size: 1.05rem;
}

.frost-cell p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.cta-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  border: 1px solid var(--steel);
  background: var(--steel);
  color: var(--frost);
  overflow: hidden;
}

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

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

.cta-copy p {
  color: #d7eaf4;
  max-width: 42ch;
}

.cta-visual {
  min-height: 260px;
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}

.cta-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-footer {
  background: var(--steel);
  color: var(--frost);
  margin-top: 3rem;
  border-top: 4px solid var(--crack);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.9fr 0.8fr;
  gap: 1.6rem;
  padding: 2.6rem 0 1.8rem;
}

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

.site-footer a:hover {
  color: var(--frost);
}

.site-footer .logo {
  color: var(--frost);
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.92rem;
}

.foot-col h4 {
  color: var(--frost);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.footer-bottom {
  border-top: 1px solid rgba(247, 251, 255, 0.14);
  padding: 1rem 0 1.4rem;
  font-size: 0.82rem;
  color: #b7cdd8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: space-between;
}

.page-hero {
  padding: 3.2rem 0 1.6rem;
  border-bottom: 1px solid var(--steel);
  clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%);
  background:
    linear-gradient(120deg, rgba(127, 211, 240, 0.25), transparent 42%),
    var(--frost);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.prose {
  max-width: 46rem;
}

.prose h2 {
  margin-top: 1.8rem;
  font-size: 1.35rem;
}

.prose ul {
  padding-left: 1.1rem;
}

.ice-panel {
  background: var(--frost);
  border: 1px solid var(--steel);
  box-shadow: var(--ice-shadow);
  padding: 1.6rem 1.5rem;
  border-radius: 2px;
}

.form-card {
  max-width: 36rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.32rem;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
}

input,
textarea {
  border: 1px solid var(--steel);
  background: #fff;
  padding: 0.7rem 0.75rem;
  border-radius: 2px;
  color: var(--text);
}

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

.form-success {
  display: none;
  padding: 1.1rem;
  border: 1px solid var(--steel);
  background: var(--bg);
}

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

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

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 42, 51, 0.62);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  z-index: 80;
}

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

.modal {
  width: min(100%, 420px);
  position: relative;
}

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

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0.8rem 0 1rem;
  border: 1px solid var(--steel);
}

.auth-tab {
  background: var(--bg);
  border: 0;
  border-right: 1px solid var(--steel);
  padding: 0.7rem;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
}

.auth-tab:last-child {
  border-right: 0;
}

.auth-tab.is-on {
  background: var(--steel);
  color: var(--frost);
}

.auth-error {
  color: #8a2432;
  min-height: 1.2em;
  font-size: 0.88rem;
  margin: 0.3rem 0 0;
}

#auth-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 34px;
  height: 34px;
  border: 1px solid var(--steel);
  background: var(--frost);
  cursor: pointer;
  font-size: 1.1rem;
}

#cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: none;
  background: var(--frost);
  border: 1px solid var(--steel);
  box-shadow: var(--ice-shadow);
  padding: 1rem 1.1rem;
  max-width: 640px;
  margin-inline: auto;
}

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

#age-denied {
  color: #8a2432;
  margin-top: 0.8rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.split-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.4rem;
}

@media (max-width: 980px) {
  .hero-split,
  .feature-split,
  .cta-band,
  .shard-grid,
  .frost-grid,
  .footer-grid,
  .split-facts {
    grid-template-columns: 1fr;
  }

  .game-card,
  .game-card:nth-child(1),
  .game-card:nth-child(2),
  .game-card:nth-child(3) {
    transform: none;
  }

  .hero-visual,
  .feature-visual,
  .cta-visual {
    clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
    min-height: 280px;
  }

  .hero-visual {
    border-left: 0;
    border-top: 1px solid var(--steel);
  }
}

@media (max-width: 860px) {
  .logo {
    order: 1;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  #nav-toggle {
    display: block;
    margin-left: 0;
    order: 3;
  }

  #site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--frost);
    border-bottom: 1px solid var(--steel);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.2rem 1.2rem;
    gap: 0.85rem;
  }

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

  #site-nav a.is-current::after {
    display: none;
  }
}

@media (max-width: 560px) {
  .header-actions .btn {
    padding: 0.55rem 0.7rem;
    font-size: 0.85rem;
  }

  .hero-copy {
    padding: 2.4rem 0 2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .cta-copy,
  .feature-copy {
    padding: 1.5rem 1.1rem;
  }
}
