@font-face {
  font-family: Fredoka;
  font-weight: 300 700;
  font-display: swap;
  src: url('fredoka-latin-wght-normal.woff2') format('woff2');
}

:root {
  --bg: #09080f;
  --panel: #13111f;
  --panel-2: #191631;
  --line: #2a2548;
  --text: #ece9fb;
  --muted: #a59fc4;
  --purple: #a78bfa;
  --violet: #7c5cf6;
  --cyan: #7dd3fc;
  --pink: #ff80bc;
  --gold: #ffe8a0;
  --brand: Fredoka, ui-rounded, 'Segoe UI', system-ui, sans-serif;
  --wrap: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--brand);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(30px, 4.4vw, 44px);
}

h3 {
  font-size: 19px;
}

p {
  margin: 0;
}

code {
  padding: 2px 7px;
  border-radius: 7px;
  background: #1d1a36;
  color: #d9d0ff;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.center {
  text-align: center;
}

main {
  overflow-x: hidden;
  overflow-x: clip;
}

.ff {
  letter-spacing: 0.06em;
}

.shine {
  background: linear-gradient(110deg, #d9ccff 0%, var(--purple) 30%, var(--cyan) 55%, #d9ccff 80%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 7s linear infinite;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(20px, calc((100vw - var(--wrap)) / 2));
  background: rgba(9, 8, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 8px rgba(150, 118, 255, 0.5));
}

.wordmark {
  font: 500 24px/1 var(--brand);
  color: #b9b3d6;
}

.wordmark b {
  font-weight: 600;
  background: linear-gradient(120deg, #d9ccff, var(--purple) 45%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.nav nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav nav a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

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

.btn.primary {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  box-shadow: 0 10px 34px -10px rgba(124, 92, 246, 0.9);
}

.btn.primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 14px 44px -10px rgba(124, 92, 246, 1);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: #ddd6fb;
}

.nav nav a.btn {
  padding: 9px 16px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
}

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

.muted {
  color: var(--muted);
  font-size: 14px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 72px 20px 88px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 68px);
}

.lead {
  max-width: 34em;
  color: #c9c3e6;
  font-size: 19px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #cfc9ea;
  font-size: 14px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 2.4s ease-out infinite;
}

.hint {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 232, 160, 0.07);
  border: 1px solid rgba(255, 232, 160, 0.2);
  color: #e9dfb8;
  font-size: 14px;
}

.aurora {
  position: absolute;
  inset: -80px -30vw 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora i {
  position: absolute;
  width: 46vw;
  max-width: 620px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: drift 16s ease-in-out infinite alternate;
}

.aurora i:nth-child(1) {
  top: -10%;
  left: 18%;
  background: #6d3df5;
}

.aurora i:nth-child(2) {
  top: 30%;
  right: 16%;
  background: #1f7fd1;
  opacity: 0.32;
  animation-duration: 21s;
  animation-delay: -6s;
}

.aurora i:nth-child(3) {
  bottom: -20%;
  left: 40%;
  background: #c0407f;
  opacity: 0.2;
  animation-duration: 26s;
  animation-delay: -11s;
}

.sparkles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.sparkles i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 3.2s ease-in-out infinite;
  animation-delay: var(--d);
}

.sparkles i:nth-child(3n) {
  background: var(--gold);
}

.sparkles i:nth-child(4n) {
  background: var(--cyan);
}

.hero-visual {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  perspective: 1400px;
}

.stage {
  position: relative;
  transform: rotateY(-9deg) rotateX(4deg) rotate(1.5deg);
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
  animation: hover 6s ease-in-out infinite;
}

.float {
  position: absolute;
  z-index: 3;
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.7);
}

.marquee {
  overflow: hidden;
  padding: 18px 0;
  border-block: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: slide 42s linear infinite;
}

.track span {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: #cbc5e8;
  font: 500 15px/1.2 var(--brand);
  white-space: nowrap;
}

.track span:nth-child(3n + 1) {
  border-color: rgba(167, 139, 250, 0.45);
  color: #d9ccff;
}

.track span:nth-child(3n + 2) {
  border-color: rgba(125, 211, 252, 0.35);
  color: #c4ebff;
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 110px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 110px 20px 40px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}

.row.flip .row-visual {
  order: 2;
}

.row-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.row-visual::before {
  content: '';
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 246, 0.34), transparent 65%);
  filter: blur(20px);
}

.row-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row-copy p {
  color: #c4bee0;
}

.eyebrow {
  width: max-content;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.14);
  color: #d0c2ff !important;
  font: 600 13px/1.6 var(--brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.row-copy ul {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: #d5cff0;
}

.row-copy li {
  position: relative;
  padding-left: 26px;
}

.row-copy li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 13px;
  height: 13px;
  background: var(--cyan);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.grid-wrap,
.how {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 90px 20px 30px;
}

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

.tile {
  padding: 22px 20px;
  border-radius: 22px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.7s ease;
}

.tile:hover {
  transform: translateY(-5px);
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 18px 44px -18px rgba(124, 92, 246, 0.8);
}

.tile > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: rgba(167, 139, 250, 0.14);
  font-size: 22px;
}

.tile p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

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

.steps li {
  position: relative;
  padding: 26px 22px 24px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.steps b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #38bdf8);
  color: #fff;
  font: 600 20px/1 var(--brand);
  box-shadow: 0 8px 24px -8px rgba(124, 92, 246, 0.9);
}

.steps p {
  margin-top: 8px;
  color: #c4bee0;
  font-size: 15.5px;
}

.copyline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.copyline code {
  flex: 1;
  padding: 6px 10px;
}

.copy {
  flex: none;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #d9d3f3;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.copy:hover {
  border-color: var(--purple);
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 760px;
  margin: 100px auto 0;
  padding: 44px 24px 52px;
  border-radius: 36px;
  background: radial-gradient(80% 120% at 50% 0%, rgba(124, 92, 246, 0.34), transparent 70%), var(--panel);
  border: 1px solid var(--line);
  text-align: center;
}

.cta .actions {
  justify-content: center;
}

.cta-mascot {
  width: 132px;
  height: 132px;
  filter: drop-shadow(0 0 18px rgba(150, 118, 255, 0.55));
  animation: bob 3.8s ease-in-out infinite;
}

footer {
  padding: 56px 20px 40px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.heart {
  color: var(--pink);
}

.legal {
  max-width: 620px;
  margin: 10px auto 0;
  font-size: 12px;
  opacity: 0.7;
}

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.grid .reveal:nth-child(2),
.steps .reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.grid .reveal:nth-child(3),
.steps .reveal:nth-child(3) {
  transition-delay: 0.16s;
}

.grid .reveal:nth-child(4) {
  transition-delay: 0.24s;
}

@keyframes shine {
  to {
    background-position: -220% 0;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
  }
  100% {
    box-shadow: 0 0 0 9px transparent;
  }
}

@keyframes drift {
  to {
    transform: translate(8%, 10%) scale(1.15);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.9;
    transform: scale(1) rotate(0);
  }
  50% {
    opacity: 0.15;
    transform: scale(0.5) rotate(40deg);
  }
}

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

@keyframes bob {
  50% {
    translate: 0 -8px;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    scale: 0.7;
  }
}

@keyframes ring {
  0%,
  60%,
  100% {
    rotate: 0deg;
  }
  10%,
  30% {
    rotate: -16deg;
  }
  20%,
  40% {
    rotate: 16deg;
  }
}

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

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
    padding-top: 44px;
    text-align: center;
  }

  .hero-copy {
    align-items: center;
  }

  .actions {
    justify-content: center;
  }

  .rows {
    gap: 80px;
    padding-top: 80px;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .row.flip .row-visual {
    order: 0;
  }

  .row-copy {
    align-items: center;
  }

  .row-copy ul {
    text-align: left;
  }

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

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

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

  .nav nav a:not(.btn) {
    display: none;
  }

  .stage {
    transform: none;
  }

  .hero {
    gap: 84px;
  }

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

  .btn {
    width: 100%;
  }

  .nav nav a.btn {
    width: auto;
  }

  .cta {
    margin-inline: 16px;
  }
}

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

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Entwine's own pieces ---------- */

.get {
  max-width: 33em;
}

.hint p + .copyline {
  margin-top: 8px;
}

.hint a,
.later a,
footer a {
  color: #d9ccff;
}

.poster {
  position: relative;
  width: min(340px, 78vw);
  padding: 10px;
  border-radius: 40px;
  background: linear-gradient(160deg, #36305c, #131023 60%);
  box-shadow: 0 0 0 1px #443d70, 0 40px 90px -24px rgba(124, 92, 246, 0.75), 0 0 120px -20px rgba(255, 128, 188, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.poster .scene {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 31px;
}

.poster .held {
  transform-box: fill-box;
  transform-origin: center;
  animation: beat 2.8s ease-in-out infinite;
}

.poster-cap {
  display: grid;
  gap: 6px;
  padding: 12px 12px 6px;
}

.poster-cap p {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 500 14.5px/1.3 var(--brand);
  color: #e8e2fb;
}

.poster-cap p::before {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7cd68a;
  box-shadow: 0 0 10px rgba(124, 214, 138, 0.8);
}

.poster-cap p.idle {
  color: #a59fc4;
}

.poster-cap p.idle::before {
  background: #6f6a8c;
  box-shadow: none;
}

.took {
  top: 1%;
  left: -31%;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 250px;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(38, 35, 60, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  font-size: 13.5px;
  line-height: 1.35;
  transform: translateZ(60px);
  animation: pop 0.7s 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both, bob 5s 1.2s ease-in-out infinite;
}

.took svg {
  flex: none;
  width: 38px;
  height: 38px;
  padding: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #4a3aa8, #1b1540);
}

.took,
.near {
  text-align: left;
}

.took strong,
.near strong {
  display: block;
  font-weight: 600;
}

.took small {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 400;
}

.took span {
  display: block;
  color: #cfc9ea;
}

.near {
  right: -20%;
  bottom: 20%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 16px;
  background: rgba(16, 38, 46, 0.94);
  border: 1px solid rgba(125, 211, 252, 0.45);
  font-size: 13.5px;
  line-height: 1.3;
  transform: translateZ(80px);
  animation: pop 0.7s 1.1s cubic-bezier(0.2, 1.4, 0.4, 1) both, bob 5.6s 1.8s ease-in-out infinite;
}

.near > span {
  font-size: 20px;
}

.near strong {
  color: #9be0ff;
}

.near div span {
  color: #cfe6ee;
}

.buddy {
  right: -13%;
  top: -8%;
  width: 96px;
  height: 96px;
  box-shadow: none;
  filter: drop-shadow(0 0 16px rgba(150, 118, 255, 0.6));
  transform: translateZ(100px) rotate(8deg);
  animation: bob 4.2s ease-in-out infinite;
}

.art {
  position: relative;
  width: min(440px, 88vw);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid #3b3660;
  background: radial-gradient(90% 80% at 50% 0%, rgba(124, 92, 246, 0.22), transparent 70%), linear-gradient(160deg, var(--panel-2), var(--panel));
  box-shadow: 0 30px 80px -24px rgba(124, 92, 246, 0.7);
  transform: rotate(-2deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.row.flip .art {
  transform: rotate(2deg);
}

.row:hover .art {
  transform: rotate(0) translateY(-6px);
}

.art svg {
  display: block;
  width: 100%;
  height: auto;
}

.art text {
  font: 600 14px/1 var(--brand);
  fill: #d9d3f3;
}

.art .reach {
  transform-box: fill-box;
  transform-origin: center;
  animation: reach 3.6s ease-in-out infinite;
}

.stack {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 30px 28px 28px;
  list-style: none;
  text-align: center;
}

.stack li {
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: #bdb6dc;
  font: 500 15.5px/1.3 var(--brand);
}

.stack li.top {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(124, 92, 246, 0.95);
}

.stack li.out {
  background: none;
  border-style: dashed;
  color: var(--muted);
}

.stack li.arrow {
  padding: 0;
  background: none;
  border: 0;
  color: #6f6a8c;
  font-size: 15px;
  line-height: 0.9;
}

.note-18 {
  max-width: 760px;
  margin: 26px auto 0;
  text-align: center;
}

.later {
  max-width: 760px;
  margin: 90px auto 0;
  padding: 34px 32px 36px;
  border-radius: 28px;
  background: var(--panel);
  border: 1px dashed #3b3660;
}

.later h2 {
  margin-top: 14px;
  font-size: clamp(26px, 3.6vw, 34px);
}

.later p {
  margin-top: 12px;
  color: #c4bee0;
}

.later ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: #d5cff0;
}

.later li {
  position: relative;
  padding-left: 26px;
}

.later li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 13px;
  height: 13px;
  background: var(--pink);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.cta-mascot {
  width: 210px;
  height: 143px;
}

@keyframes beat {
  0%,
  100% {
    scale: 1;
  }
  50% {
    scale: 1.18;
  }
}

@keyframes reach {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -5px;
  }
}

@media (max-width: 920px) {
  .took {
    left: -8%;
    top: 4%;
    width: 232px;
  }

  .near {
    right: -8%;
  }

  .buddy {
    right: -5%;
    width: 78px;
    height: 78px;
  }

  .get {
    margin-inline: auto;
    text-align: left;
  }

  .row .art,
  .row.flip .art {
    transform: none;
  }
}

@media (max-width: 560px) {
  .took {
    left: -3%;
    top: -7%;
    width: 216px;
    font-size: 12.5px;
  }

  .near {
    right: -3%;
    bottom: 21%;
  }

  .buddy {
    right: -1%;
    top: -6%;
  }

  .later {
    margin-inline: 16px;
    padding: 26px 20px 28px;
  }

  .cta-mascot {
    width: 180px;
    height: 123px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .poster .held,
  .art .reach {
    animation: none !important;
  }
}
