:root {
  --bg: #0f0707;
  --bg-raised: #1a0d0c;
  --bg-card: #211110;
  --line: #3b1d1a;
  --ink: #f7efe7;
  --ink-soft: #cdbdb3;
  --ink-muted: #95817a;
  --red: #ff3030;
  --red-deep: #b4140f;
  --fire: #ff7a1a;
  --pink: #ff5d93;
  --gold: #ffd166;
  --font-display: "Press Start 2P", ui-monospace, monospace;
  --font-pixel: "Silkscreen", ui-monospace, monospace;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --radius: 14px;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

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

.nav-brand img,
.footer-brand img,
.wordmark img {
  image-rendering: pixelated;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.2vw, 32px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h3 {
  font-family: var(--font-pixel);
  font-size: 20px;
  line-height: 1.3;
  text-transform: uppercase;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--font-pixel);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fire);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 13px;
}

.nav-brand img {
  border-radius: 9px;
}

.nav-brand b,
.footer-brand b {
  color: var(--red);
  font-weight: 400;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-pixel);
  font-size: 16px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 22px;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}

.btn:active {
  transform: translateY(2px);
}

.btn-small {
  padding: 9px 14px;
  font-size: 14px;
  background: var(--red);
  color: #fff;
  box-shadow: 0 3px 0 var(--red-deep);
}

.btn-play {
  background: var(--red);
  color: #fff;
  box-shadow: 0 5px 0 var(--red-deep), 0 14px 40px -10px rgb(255 48 48 / 0.6);
  padding: 12px 26px 12px 20px;
  text-align: left;
}

.btn-play:hover {
  background: #ff4646;
}

.btn-play:active {
  box-shadow: 0 3px 0 var(--red-deep);
}

.btn-play span {
  display: flex;
  flex-direction: column;
  font-size: 19px;
  line-height: 1.15;
}

.btn-play small {
  font-size: 12px;
  opacity: 0.85;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink-soft);
}

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px var(--gutter) 88px;
}

.hero-glow {
  position: absolute;
  inset: -80px -40vw 0;
  z-index: -1;
  background:
    radial-gradient(circle at 70% 42%, rgb(255 90 20 / 0.42), transparent 36%),
    radial-gradient(circle at 70% 45%, rgb(200 20 15 / 0.5), transparent 60%);
  pointer-events: none;
}

.hero-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(0 0 0 / 0.55) 1.2px, transparent 1.3px);
  background-size: 6px 6px;
  mask-image: radial-gradient(circle at 70% 45%, #000 0, transparent 62%);
  -webkit-mask-image: radial-gradient(circle at 70% 45%, #000 0, transparent 62%);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.wordmark img {
  width: min(100%, 620px);
  filter: drop-shadow(0 4px 0 #000) drop-shadow(0 0 28px rgb(255 48 48 / 0.35));
}

.tagline {
  font-family: var(--font-display);
  font-size: clamp(14px, 2vw, 20px);
  color: var(--gold);
  text-transform: uppercase;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.hero-device {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 2;
  padding: 10px;
  border-radius: 38px;
  background: linear-gradient(160deg, #3a3434, #141010 55%);
  box-shadow:
    inset 0 0 0 2px #4d4545,
    0 30px 60px -20px rgb(0 0 0 / 0.8),
    0 0 0 1px #000;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 29px;
}

.phone-hero {
  max-width: 320px;
  transform: rotate(3deg);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.phone-hero.is-kicking {
  animation: kick 0.18s ease-out;
}

@keyframes kick {
  0% { transform: rotate(3deg) translateY(0); }
  40% { transform: rotate(2deg) translateY(6px) scale(0.99); }
  100% { transform: rotate(3deg) translateY(0); }
}

.phone-hearts {
  position: absolute;
  inset: 10px;
  overflow: hidden;
  border-radius: 29px;
  pointer-events: none;
}

.float-heart {
  position: absolute;
  width: 34px;
  height: auto;
  image-rendering: pixelated;
  animation: heart-rise 1.1s ease-out forwards;
}

@keyframes heart-rise {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--drift, 0px)), -260px) scale(1.15); }
}

.bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bubble {
  position: absolute;
  max-width: 230px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  color: #1a0d0c;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 10px 30px -8px rgb(0 0 0 / 0.6);
  transition: opacity 0.35s, transform 0.35s;
}

.bubble b {
  display: block;
  font-size: 12px;
  color: var(--red-deep);
}

.bubble[data-slot="0"] {
  top: 12%;
  left: -4%;
  border-bottom-left-radius: 4px;
}

.bubble[data-slot="1"] {
  top: 44%;
  right: -6%;
  border-bottom-right-radius: 4px;
}

.bubble[data-slot="2"] {
  bottom: 12%;
  left: 0;
  border-bottom-left-radius: 4px;
}

.bubble.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

.tap-hint {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--ink-muted);
  white-space: nowrap;
  animation: blink 1.6s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px var(--gutter) 40px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  margin-bottom: 48px;
}

.section-head > p:last-child {
  color: var(--ink-soft);
  font-size: 18px;
}

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

.gesture {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-raised);
  border: 1px solid var(--line);
}

.gesture p {
  color: var(--ink-soft);
  font-size: 16px;
}

.gesture-demo {
  position: relative;
  height: 150px;
  margin-bottom: 8px;
  border-radius: 10px;
  background:
    linear-gradient(transparent 49%, rgb(255 255 255 / 0.04) 50%, transparent 51%) 0 0 / 100% 22px,
    radial-gradient(circle at 50% 120%, rgb(255 60 30 / 0.28), transparent 70%),
    #120909;
  overflow: hidden;
}

.finger {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 0 0 8px rgb(255 255 255 / 0.15);
}

.finger-scroll {
  animation: scroll-up 1.8s ease-in-out infinite;
}

@keyframes scroll-up {
  0% { transform: translateY(46px); opacity: 0; }
  15% { opacity: 1; }
  70% { transform: translateY(-46px); opacity: 1; }
  100% { transform: translateY(-46px); opacity: 0; }
}

.finger-tap {
  animation: double-tap 1.6s ease-in-out infinite;
}

.finger-tap::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 3px solid var(--pink);
  opacity: 0;
  animation: ring 1.6s ease-out infinite;
}

@keyframes double-tap {
  0%, 100% { transform: scale(1); }
  10% { transform: scale(0.75); }
  20% { transform: scale(1); }
  30% { transform: scale(0.75); }
  40% { transform: scale(1); }
}

@keyframes ring {
  0%, 30% { opacity: 0; transform: scale(0.6); }
  35% { opacity: 1; }
  70%, 100% { opacity: 0; transform: scale(1.8); }
}

.finger-swipe {
  animation: swipe-side 1.6s ease-in-out infinite;
}

@keyframes swipe-side {
  0% { transform: translateX(-70px); opacity: 0; }
  15% { opacity: 1; }
  55% { transform: translateX(70px); opacity: 1; }
  70%, 100% { transform: translateX(70px); opacity: 0; }
}

.footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px 40px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px var(--gutter) 56px;
  font-size: 14px;
  color: var(--ink-muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--ink);
}

.footer-brand img {
  border-radius: 10px;
}

.footer-note {
  max-width: 46em;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--ink-soft);
}

.footer-copy {
  grid-column: 1 / -1;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
    gap: 64px;
  }

  .hero-glow {
    background:
      radial-gradient(circle at 50% 72%, rgb(255 90 20 / 0.4), transparent 40%),
      radial-gradient(circle at 50% 72%, rgb(200 20 15 / 0.45), transparent 70%);
  }

  .gestures {
    grid-template-columns: 1fr;
  }

  .footer {
    grid-template-columns: 1fr;
  }
}

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

  .nav-brand span {
    display: none;
  }

  .phone-hero {
    max-width: 250px;
  }

  .bubble {
    max-width: 180px;
    font-size: 13px;
    padding: 8px 11px;
  }

  .bubble[data-slot="0"] {
    left: 0;
  }

  .bubble[data-slot="1"] {
    right: 0;
  }

  .section {
    padding-top: 88px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px var(--gutter) 40px;
}

.doc h1 {
  margin: 14px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.4;
}

.doc h2 {
  margin: 48px 0 14px;
  font-size: clamp(16px, 2.4vw, 20px);
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 18px;
  color: var(--fire);
}

.doc p,
.doc li {
  color: var(--ink-soft);
}

.doc p + p {
  margin-top: 12px;
}

.doc ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.doc a {
  color: var(--pink);
  text-underline-offset: 3px;
}

.doc b {
  color: var(--ink);
}

.doc-meta {
  margin-bottom: 28px;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--ink-muted) !important;
}

.doc-placeholder {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--gold);
  color: #1a0d0c !important;
  font-weight: 700;
  text-decoration: none;
}

.nav-brand + .btn-small {
  margin-left: auto;
}
