:root {
  --bg: #0f141a;
  --surface: #171b22;
  --card: #242b35;
  --line: rgba(255, 255, 255, 0.08);
  --primary: #66d4ff;
  --on-primary: #0d1b2a;
  --text: #f4f7fb;
  --muted: #b5bfcd;
  --warm: #f59e0b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1,
h2,
h3,
.brand {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 700;
  margin: 0;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0 72px;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02;
}

.hero h1 span {
  color: var(--primary);
}

.lead {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
  margin: 20px 0 30px;
  max-width: 460px;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stores img {
  height: 52px;
  display: block;
}

.stage {
  position: relative;
  height: 380px;
}

.polaroid {
  position: absolute;
  width: 240px;
  padding: 12px 12px 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color: #475569;
  font-weight: 800;
  text-align: center;
  font-size: 15px;
}

.polaroid .art {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.polaroid.ref {
  left: 4%;
  top: 30px;
  transform: rotate(-6deg);
  animation: float 6s ease-in-out infinite;
}

.polaroid.mine {
  right: 4%;
  top: 90px;
  transform: rotate(5deg);
  color: #0e7490;
  animation: float 6s ease-in-out -3s infinite;
}

@keyframes float {
  50% {
    translate: 0 -10px;
  }
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  padding: 8px 0 88px;
}

.step {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.step .num {
  display: block;
  font: 700 76px/0.9 "Fredoka", sans-serif;
  color: transparent;
  -webkit-text-stroke: 2px var(--tint);
  margin-bottom: 14px;
  transform: rotate(-4deg);
  transform-origin: left bottom;
}

.step:nth-child(2) .num {
  transform: rotate(3deg);
}

.step h3 {
  position: relative;
  display: inline-block;
  font-size: 30px;
  margin-bottom: 12px;
}

.step .scribble {
  position: absolute;
  left: -2px;
  right: -6px;
  bottom: -8px;
  width: calc(100% + 8px);
  height: 12px;
  fill: none;
  stroke: var(--tint);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  animation: scribble 900ms ease-out 300ms forwards;
}

.step:nth-child(2) .scribble {
  animation-delay: 500ms;
}

.step:nth-child(3) .scribble {
  animation-delay: 700ms;
}

@keyframes scribble {
  to {
    stroke-dashoffset: 0;
  }
}

.step p {
  color: var(--muted);
  font-size: 17px;
  margin: 0;
  line-height: 1.55;
  max-width: 300px;
}

.join {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #16202b, var(--surface));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  margin-bottom: 72px;
}

.join h2 {
  font-size: 28px;
}

.join p {
  color: var(--muted);
  margin: 6px 0 0;
}

.join form {
  display: flex;
  gap: 10px;
}

.join input {
  width: 170px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid var(--card);
  background: var(--bg);
  color: var(--text);
  font: 700 24px "Fredoka", sans-serif;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-align: center;
}

.join input:focus {
  outline: none;
  border-color: var(--primary);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 18px;
  padding: 15px 24px;
  background: var(--primary);
  color: var(--on-primary);
  font: 800 17px "Nunito", sans-serif;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 #2a9cc7;
}

.button:active {
  translate: 0 2px;
  box-shadow: 0 2px 0 #2a9cc7;
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

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

footer a {
  color: var(--muted);
  text-decoration: none;
}

.legal {
  max-width: 720px;
  padding-bottom: 72px;
}

.legal h1 {
  font-size: clamp(36px, 5vw, 52px);
  margin: 12px 0 8px;
}

.legal .updated {
  color: var(--muted);
  margin: 0 0 28px;
}

.legal h2 {
  font-size: 22px;
  margin: 32px 0 8px;
}

.legal p,
.legal li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.legal ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.legal a {
  color: var(--primary);
}

/* Join page */
.invite {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px 24px;
}

.invite .card {
  max-width: 420px;
  width: 100%;
}

.invite .logo {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  margin-bottom: 22px;
}

.invite h1 {
  font-size: 34px;
  line-height: 1.1;
}

.invite .hint {
  color: var(--muted);
  margin: 12px 0 24px;
  line-height: 1.5;
}

.code {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  font: 700 44px "Fredoka", sans-serif;
  letter-spacing: 0.3em;
  padding: 8px 10px 8px 26px;
  border-radius: 20px;
  margin-bottom: 26px;
}

.invite .button {
  width: 100%;
  margin-bottom: 26px;
}

.invite .stores {
  justify-content: center;
}

.invite .stores img {
  height: 46px;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 12px;
  }

  .stage {
    height: 320px;
  }

  .polaroid {
    width: 190px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .step .num {
    font-size: 60px;
  }

  .join form {
    width: 100%;
  }

  .join input {
    flex: 1;
  }
}
