/* Palette and type mirror the app (src/styles): cream background, ink buttons, Skribble orange. */
:root {
  --bg: #f5f4ed;
  --paper: #faf8f2;
  --line: #e2dccd;
  --ink: #111108;
  --ink-soft: #55534a;
  --orange: #f0a747;
  --pink: #ff4d9a;
  --blue: #1ea7ff;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
  --max: 1180px;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ol {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 100px;
  z-index: 10;
}

.skip:focus {
  left: 8px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 100px;
  background: var(--ink);
  color: #fff;
  font: 500 16px/1 var(--body);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: transform 0.18s ease;
}

a.btn:hover,
.game-card:hover .btn {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(17, 17, 8, 0.18);
}

a.btn:hover svg,
.game-card:hover .btn svg {
  transform: translateX(3px);
}

.btn-small {
  padding: 12px 20px;
  font-size: 15px;
}

.btn-light {
  background: #fff;
  color: var(--ink);
}

.link-arrow {
  font-weight: 500;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--orange);
}

.link-arrow:hover {
  text-decoration-color: var(--ink);
}

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 20px/1 var(--display);
  letter-spacing: -0.03em;
  text-decoration: none;
  margin-right: auto;
}

.logo-mark {
  width: 26px;
  height: 26px;
  fill: var(--orange);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
}

.nav-links a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(56px, 8vw, 110px);
}

.orbits {
  position: absolute;
  inset: 0 -50vw;
  width: calc(100% + 100vw);
  height: 100%;
  z-index: -1;
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
  pointer-events: none;
}

.orbit-bold {
  stroke-width: 2.5;
  stroke: #e9e3d4;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 100px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 24px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 6px rgba(255, 77, 154, 0.2);
  }
}

h1 {
  font-size: clamp(40px, 7.2vw, 84px);
  font-weight: 800;
}

.hl {
  background: linear-gradient(transparent 62%, var(--orange) 62%, var(--orange) 92%, transparent 92%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.lede {
  max-width: 34em;
  margin-top: 24px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-top: 36px;
}

/* The same card the app shows on its home screen (src/components/home/game-card.tsx). */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  padding: 40px 30px;
  border-radius: 30px;
  background: var(--orange);
  color: var(--ink);
  text-decoration: none;
  transform: rotate(3deg);
  box-shadow: 0 24px 0 -8px rgba(17, 17, 8, 0.08);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.game-card:hover {
  transform: rotate(0deg) scale(1.02);
}

.game-title {
  position: relative;
  padding: 8px 20px;
  border-radius: 100px;
  background: #fff;
  font: 500 clamp(28px, 3.4vw, 38px) / 1.2 var(--display);
}

.game-sub {
  position: relative;
  margin-top: 8px;
}

.game-art {
  position: absolute;
  right: -10%;
  bottom: 15%;
  width: 94%;
  max-width: none;
  animation: bob 5s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-10px) rotate(-2deg);
  }
}

.btn-card {
  position: relative;
  margin-top: auto;
  width: min(250px, 100%);
}

/* ---------- Ticker ---------- */

.ticker {
  overflow: hidden;
  background: var(--ink);
  color: var(--bg);
  transform: rotate(-1.2deg) scale(1.02);
  padding: 18px 0;
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: slide 22s linear infinite;
}

.ticker span {
  font: 700 clamp(18px, 2.4vw, 28px) / 1 var(--display);
  text-transform: uppercase;
  padding: 0 28px;
}

.ticker i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--orange);
}

.ticker i:nth-of-type(3n + 2) {
  background: var(--pink);
}

.ticker i:nth-of-type(3n) {
  background: var(--blue);
}

@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Sections ---------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter) 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

h2 {
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 700;
}

.section-head p {
  color: var(--ink-soft);
}

.tag {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lineup {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 20px;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: clamp(28px, 4vw, 48px);
  min-height: 420px;
}

.tile h3 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  margin: 12px 0 16px;
}

.tile-skribble {
  background: var(--orange);
}

.tile-body {
  position: relative;
  z-index: 1;
  max-width: 18em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}

.tile-body .btn {
  margin-top: auto;
}

.tile-body p:not(.tag) {
  margin-bottom: 28px;
}

.tile-art {
  position: absolute;
  right: -6%;
  bottom: -6%;
  width: min(50%, 420px);
  max-width: none;
}

.tile-next {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--paper);
  border: 2px dashed var(--line);
  color: var(--ink-soft);
}

.tile-next h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--ink);
  line-height: 1.15;
}

.tile-moon {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 72px;
  height: 72px;
  fill: var(--line);
}

/* ---------- Steps ---------- */

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

.steps li {
  padding: 32px;
  border-radius: 30px;
  background: #fff;
}

.steps h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 24px 0 10px;
}

.steps p {
  color: var(--ink-soft);
}

.step-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font: 700 18px/1 var(--display);
}

.steps li:nth-child(2) .step-num {
  background: var(--pink);
}

.steps li:nth-child(3) .step-num {
  background: var(--blue);
}

.code {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}

.code span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: 700 17px/1 var(--display);
}

/* ---------- CTA + footer ---------- */

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: calc(var(--max) - 2 * var(--gutter));
  margin: clamp(64px, 9vw, 120px) auto 0;
  padding: clamp(36px, 6vw, 72px);
  border-radius: 30px;
  background: var(--ink);
  color: var(--bg);
}

.cta h2 {
  max-width: 14em;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px var(--gutter) 40px;
  color: var(--ink-soft);
  font-size: 15px;
}

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

/* ---------- Small screens ---------- */

@media (max-width: 1240px) {
  .cta {
    margin-left: var(--gutter);
    margin-right: var(--gutter);
  }
}

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

  .hero-card {
    width: min(100%, 380px);
    justify-self: center;
  }

  .lineup,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile {
    min-height: 0;
  }

  .tile-skribble {
    padding-bottom: 46%;
  }

  .tile-art {
    width: 62%;
  }

  .tile-next {
    padding-top: 120px;
  }
}

@media (max-width: 560px) {
  .nav-links {
    display: none;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
