:root {
  --grape: #310076;
  --grape-deep: #200050;
  --grape-soft: #4a1a9e;
  --bamboo: #2fed8e;
  --bamboo-deep: #13b866;
  --cream: #fffaf1;
  --paper: #ffffff;
  --ink: #241640;
  --ink-soft: #5b4f73;
  --line: #ece4f7;
  --blush: #ff8fc2;
  --display: "Luckiest Guy", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--grape);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

/* ---------- Shared header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(32, 0, 80, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 0 0 3px var(--bamboo);
}

.brand b { color: var(--bamboo); font-weight: 400; }

.nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease;
}

.nav a:hover { background: rgba(255, 255, 255, 0.1); }

.nav a[aria-current="page"] {
  background: var(--bamboo);
  color: var(--grape-deep);
}

/* ---------- Home ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 48px 16px 72px;
  /* flat fill so the logo's own purple background blends in seamlessly */
  background: var(--grape);
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 360px;
  height: 360px;
  left: -140px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(47, 237, 142, 0.22), transparent 70%);
}

.hero::after {
  width: 300px;
  height: 300px;
  right: -110px;
  top: -90px;
  background: radial-gradient(circle, rgba(255, 143, 194, 0.18), transparent 70%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  width: min(620px, 100%);
  height: auto;
  animation: wobble 5s ease-in-out infinite;
  transform-origin: 50% 80%;
}

@keyframes wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-1.2deg); }
  75% { transform: rotate(1.2deg); }
}

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

.hero__tagline {
  margin: 8px 0 0;
  max-width: 560px;
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--bamboo);
  color: var(--grape-deep);
  text-decoration: none;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 6px 0 var(--bamboo-deep);
  transition: transform 140ms ease, box-shadow 140ms ease;
  max-width: 100%;
}

.hero__cta:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--bamboo-deep); }
.hero__cta:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--bamboo-deep); }

.cards {
  width: 100%;
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease;
}

.card:hover { transform: translateY(-4px) rotate(-0.6deg); }
.card:nth-child(2):hover { transform: translateY(-4px) rotate(0.6deg); }

.card__icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--grape);
  color: var(--bamboo);
}

.card__title {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0.5px;
  color: var(--grape);
}

.card__text {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.card__arrow { margin-left: auto; color: var(--grape-soft); flex: none; }

/* ---------- Legal pages ---------- */
.page-hero {
  position: relative;
  padding: 56px 16px 96px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(rgba(255, 255, 255, 0.07) 1.5px, transparent 1.5px) 0 0 / 26px 26px,
    var(--grape);
}

.page-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1;
  letter-spacing: 1px;
  text-shadow: 0 5px 0 var(--grape-deep);
}

.page-hero p {
  margin: 14px 0 0;
  font-weight: 800;
  color: var(--bamboo);
}

.page-hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 56px;
  color: var(--cream);
}

.legal {
  background: var(--cream);
  padding: 8px 16px 72px;
}

.legal__card {
  width: min(860px, 100%);
  margin: -64px auto 0;
  position: relative;
  padding: clamp(24px, 5vw, 56px);
  background: var(--paper);
  border-radius: 28px;
  border: 2px solid var(--line);
  box-shadow: 0 18px 40px rgba(49, 0, 118, 0.1);
  overflow-wrap: anywhere;
}

.legal h2 {
  margin: 40px 0 12px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.15;
  letter-spacing: 0.5px;
  color: var(--grape);
}

.legal h2:first-child { margin-top: 0; }

.legal h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 5px;
  margin-top: 8px;
  border-radius: 99px;
  background: var(--bamboo);
}

.legal h3 {
  margin: 26px 0 8px;
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
}

.legal p { margin: 0 0 14px; }

.legal .lead {
  font-weight: 900;
  color: var(--grape);
}

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

.legal li { margin: 6px 0; }

.legal li::marker { color: var(--bamboo-deep); }

.legal a {
  color: var(--grape-soft);
  font-weight: 800;
  text-decoration-color: rgba(74, 26, 158, 0.3);
  text-underline-offset: 3px;
}

.legal a:hover { color: var(--grape); text-decoration-color: currentColor; }

.legal .sdk-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 28px;
  font-size: 14px;
}

.legal .sdk-list li { margin: 3px 0; }

.legal .contact-box {
  margin-top: 8px;
  padding: 18px 22px;
  border-radius: 18px;
  background: #f3fdf8;
  border: 2px dashed var(--bamboo);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--grape-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 36px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: 12px;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.site-footer a:hover { color: var(--bamboo); }

.site-footer p { margin: 0; }

@media (max-width: 720px) {
  .site-header__inner {
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
    gap: 10px;
  }

  .nav { justify-content: center; }
  .nav a { padding: 6px 12px; font-size: 14px; }

  .hero { min-height: auto; padding-top: 32px; }
  /* keep glows away from the logo so its background stays invisible */
  .hero::after { display: none; }
  .hero__cta { padding: 13px 18px; font-size: 14px; gap: 8px; }
  .cards { grid-template-columns: 1fr; margin-top: 40px; }
  .card { padding: 18px; gap: 14px; }
  .card__title { font-size: 21px; }
  .card__arrow { display: none; }

  .legal .sdk-list { grid-template-columns: 1fr; }
}
