:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #637085;
  --paper: #fffaf2;
  --panel: #ffffff;
  --line: #dce3ee;
  --sun: #ffd166;
  --coral: #ef476f;
  --cyan: #118ab2;
  --green: #06d6a0;
  --violet: #6d5dfc;
  --shadow: 0 24px 80px rgba(20, 27, 40, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.34), transparent 34%),
    linear-gradient(225deg, rgba(17, 138, 178, 0.13), transparent 36%),
    var(--paper);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 64px);
  background: rgba(255, 250, 242, 0.86);
  border-bottom: 1px solid rgba(220, 227, 238, 0.72);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: conic-gradient(from 10deg, var(--coral), var(--sun), var(--green), var(--cyan), var(--violet), var(--coral));
  border: 3px solid var(--ink);
  border-radius: 8px;
  color: white;
  font-size: 15px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.22);
  transform: rotate(-3deg);
}

.brand-copy {
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: lowercase;
}

.nav-links,
.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-weight: 800;
}

.nav-links a,
.footer-links a {
  text-decoration: none;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--ink);
}

.header-action,
.game-actions button {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: 4px 4px 0 rgba(23, 32, 42, 0.18);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
}

.header-action {
  padding: 10px 16px;
}

.mobile-header-actions,
.menu-toggle,
.mobile-play {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.menu-toggle {
  width: 46px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: white;
  box-shadow: 4px 4px 0 rgba(23, 32, 42, 0.13);
  cursor: pointer;
}

.menu-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: clamp(28px, 5vw, 72px) clamp(18px, 4vw, 64px) 52px;
}

.hero > * {
  min-width: 0;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow,
.game-kicker {
  margin: 0 0 10px;
  color: var(--coral);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(4rem, 10vw, 9rem);
  max-width: 8ch;
  text-transform: lowercase;
}

.hero-lede {
  max-width: 620px;
  margin: 24px 0 0;
  color: #344154;
  font-size: 1.2rem;
  overflow-wrap: break-word;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-stats span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 5px 5px 0 rgba(23, 32, 42, 0.11);
  font-weight: 800;
}

.hero-stats strong {
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.game-shell {
  min-width: 0;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow), 9px 9px 0 rgba(23, 32, 42, 0.11);
}

.game-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 2px solid var(--ink);
  background: #fff5d8;
}

.game-topline > div:first-child {
  min-width: 0;
}

.game-topline h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.round-pill {
  min-width: 66px;
  padding: 9px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--green);
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  text-align: center;
}

.arena {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 18px;
  padding: 18px;
}

.canvas-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(23, 32, 42, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(23, 32, 42, 0.06) 1px, transparent 1px),
    #f3f8ff;
  background-size: 28px 28px;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.flash-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14px;
  background: transparent;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.flash-panel span {
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.92);
  box-shadow: 4px 4px 0 rgba(23, 32, 42, 0.12);
}

.flash-panel.active {
  opacity: 1;
}

.control-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tone-preview {
  min-height: 86px;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: white;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 900;
}

label span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--coral);
}

.game-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.game-actions button {
  min-height: 48px;
  padding: 10px;
}

#hint-btn {
  background: white;
  color: var(--ink);
}

.result-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--ink);
}

.result-strip div {
  padding: 14px;
  border-right: 2px solid var(--ink);
}

.result-strip div:last-child {
  border-right: 0;
}

.result-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-strip strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
}

.hidden {
  display: none !important;
}

.compare-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(230px, 1.1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-top: 2px solid var(--ink);
  background: #fffaf2;
  animation: reveal-pop 0.42s ease both;
}

.compare-copy span,
.swatch-pair span {
  display: block;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compare-copy strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  line-height: 1.15;
}

.compare-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 900;
  line-height: 1.35;
}

.swatch-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.swatch-pair div {
  padding: 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: white;
  box-shadow: 4px 4px 0 rgba(23, 32, 42, 0.09);
}

.swatch-pair i {
  display: block;
  height: 58px;
  margin-top: 7px;
  border: 2px solid var(--ink);
  border-radius: 8px;
}

@keyframes reveal-pop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.share-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-top: 2px solid var(--ink);
  background: #f2fffb;
}

.share-panel span {
  display: block;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.share-panel strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  line-height: 1.15;
}

.share-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.share-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.share-actions a,
.share-actions button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(23, 32, 42, 0.13);
  cursor: pointer;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.share-actions a:hover,
.share-actions button:hover {
  transform: translateY(-1px);
}

#native-share-btn {
  background: var(--green);
}

#twitter-share {
  background: #101820;
  color: white;
}

.section {
  padding: clamp(56px, 8vw, 100px) clamp(18px, 4vw, 64px);
}

.band {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid rgba(220, 227, 238, 0.7);
}

.section-heading {
  max-width: 900px;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  text-transform: lowercase;
}

.section-heading p,
.copy-stack p,
.feature-grid p,
.steps p,
.strategy p,
.faq-grid p,
.site-footer p {
  color: #39475a;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 32px;
}

.feature-grid article,
.steps article,
.strategy,
.faq-grid details {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 6px 6px 0 rgba(23, 32, 42, 0.08);
}

.feature-grid article {
  padding: 22px;
}

.feature-grid h3,
.copy-stack h3,
.steps h3,
.strategy h3,
.faq-grid summary {
  font-size: 1.35rem;
}

.copy-stack h4 {
  margin-top: 28px;
  font-size: 1.1rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.copy-stack {
  display: grid;
  gap: 4px;
}

.copy-stack h3 {
  margin-top: 14px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.steps article {
  padding: 18px;
}

.steps span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--sun);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
}

.strategy {
  margin-top: 18px;
  padding: 24px;
  background: #effbff;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.faq-grid details {
  padding: 18px 20px;
}

.faq-grid summary {
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 34px clamp(18px, 4vw, 64px);
  background: var(--ink);
  color: white;
}

.site-footer p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.74);
}

.footer-brand .brand-mark {
  border-color: white;
}

.footer-links {
  align-items: flex-start;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 1100px) {
  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100vw;
    max-width: 100vw;
    padding: 12px 18px;
  }

  .brand {
    min-width: 0;
  }

  .nav-links {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    font-size: 0.9rem;
  }

  .site-header.nav-open .nav-links {
    display: grid;
  }

  .nav-links a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 9px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: white;
    box-shadow: 3px 3px 0 rgba(23, 32, 42, 0.1);
  }

  .site-header > .header-action {
    display: none;
  }

  .mobile-header-actions {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 0;
  }

  .header-action {
    padding: 9px 15px;
  }

  .menu-toggle {
    display: inline-flex;
    position: fixed;
    top: 12px;
    right: 18px;
    z-index: 30;
  }

  h1 {
    max-width: 6ch;
    font-size: clamp(3.2rem, 16vw, 4rem);
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-stats span {
    justify-content: center;
    min-width: 0;
    text-align: center;
  }

  .game-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .round-pill {
    align-self: flex-start;
  }

  .hero {
    min-height: 0;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  .arena,
  .feature-grid,
  .steps,
  .faq-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .result-strip {
    grid-template-columns: 1fr;
  }

  .result-strip div {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }

  .result-strip div:last-child {
    border-bottom: 0;
  }

  .share-panel,
  .compare-panel,
  .swatch-pair,
  .share-actions {
    grid-template-columns: 1fr;
  }
}
