:root {
  --bg: #f4f1ec;
  --bg-deep: #ebe6de;
  --ink: #12141a;
  --ink-soft: #5c6170;
  --line: rgba(18, 20, 26, 0.1);
  --mint: #00c2a0;
  --mint-deep: #00a888;
  --coral: #ff5a4f;
  --sky: #6eb6ff;
  --phone: #17191f;
  --font: "Instrument Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --space: clamp(1.25rem, 4vw, 3rem);
  --radius: 1.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.blob-a {
  width: 42vw;
  height: 42vw;
  top: -12%;
  right: -8%;
  background: rgba(0, 194, 160, 0.28);
  animation: drift-a 18s ease-in-out infinite;
}

.blob-b {
  width: 36vw;
  height: 36vw;
  bottom: 5%;
  left: -10%;
  background: rgba(110, 182, 255, 0.22);
  animation: drift-b 22s ease-in-out infinite;
}

.blob-c {
  width: 28vw;
  height: 28vw;
  top: 40%;
  left: 40%;
  background: rgba(255, 90, 79, 0.12);
  animation: drift-c 16s ease-in-out infinite;
}

.nav,
.hero,
.band,
.footer {
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--space);
}

.nav-mark {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--mint-deep);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  min-height: calc(100dvh - 4.5rem);
  padding: 1rem var(--space) 3.5rem;
}

.hero-copy {
  max-width: 36rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mint-deep);
  animation: enter 0.7s ease both;
}

.eyebrow::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(0, 194, 160, 0.5);
  animation: ping 2s ease infinite;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.brand-line {
  display: block;
  animation: enter 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-line:nth-child(2) {
  animation-delay: 0.08s;
}

.brand-line.accent {
  font-style: italic;
  color: var(--ink);
  background: linear-gradient(120deg, var(--ink) 40%, var(--mint-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 28rem;
  margin-bottom: 2rem;
  animation: enter 0.8s ease 0.14s both;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: enter 0.8s ease 0.22s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.1rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-fill {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 30px rgba(18, 20, 26, 0.18);
}

.btn-fill:hover {
  transform: translateY(-2px);
  background: #000;
  box-shadow: 0 16px 36px rgba(18, 20, 26, 0.22);
}

.btn-line {
  background: rgba(255, 255, 255, 0.45);
  border-color: var(--line);
  backdrop-filter: blur(8px);
}

.btn-line:hover {
  border-color: rgba(18, 20, 26, 0.28);
  transform: translateY(-2px);
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  perspective: 1000px;
}

.phone {
  position: relative;
  z-index: 2;
  width: min(100%, 290px);
  aspect-ratio: 9 / 17.5;
  padding: 0.7rem;
  border-radius: 2rem;
  background: linear-gradient(160deg, #2a2e38, #12141a 45%, #0b0c10);
  box-shadow:
    0 40px 80px rgba(18, 20, 26, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.08) inset;
  transform: rotateY(-12deg) rotateX(6deg) translateZ(0);
  transition: transform 0.35s ease;
  animation: float-phone 6s ease-in-out infinite;
}

.phone-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.16), transparent 35%, transparent 65%, rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

.phone-screen {
  height: 100%;
  border-radius: 1.45rem;
  background:
    radial-gradient(circle at 80% 0%, rgba(0, 194, 160, 0.18), transparent 40%),
    linear-gradient(180deg, #1c1f28, #14161c);
  padding: 1.1rem 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: #f5f6f8;
  overflow: hidden;
}

.match-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(245, 246, 248, 0.7);
}

.timer {
  color: var(--mint);
  font-variant-numeric: tabular-nums;
  animation: tick-glow 1.5s ease infinite;
}

.board-3x3 {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.45rem;
}

.cell {
  display: grid;
  place-items: center;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 1.65rem;
  font-weight: 700;
}

.cell .x {
  color: #ff8f87;
  animation: pop 0.45s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.cell .o {
  color: #7ee9d4;
  animation: pop 0.45s cubic-bezier(0.34, 1.45, 0.64, 1) 0.15s both;
}

.cell.pulse {
  animation: cell-pulse 2.2s ease infinite;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.25rem;
}

.score-row small {
  display: block;
  font-size: 0.65rem;
  color: rgba(245, 246, 248, 0.5);
  margin-bottom: 0.15rem;
}

.score-row strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.score-row > div:last-child {
  text-align: right;
}

.vs {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(245, 246, 248, 0.35);
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(18, 20, 26, 0.08);
  z-index: 1;
}

.ring-1 {
  width: min(88%, 380px);
  aspect-ratio: 1;
  animation: spin 28s linear infinite;
  background: conic-gradient(from 90deg, transparent, rgba(0, 194, 160, 0.2), transparent 40%);
  mask: radial-gradient(farthest-side, transparent calc(100% - 1px), #000 calc(100% - 1px));
}

.ring-2 {
  width: min(70%, 300px);
  aspect-ratio: 1;
  animation: spin 18s linear infinite reverse;
  border-color: rgba(110, 182, 255, 0.25);
}

.band {
  margin: 0 var(--space) 2rem;
  border-radius: calc(var(--radius) + 0.5rem);
  background: var(--ink);
  color: #f5f6f8;
  overflow: hidden;
}

.band-track {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 246, 248, 0.45);
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  animation: marquee 22s linear infinite;
  width: max-content;
}

.band-body {
  padding: clamp(2.5rem, 6vw, 4rem);
  max-width: 36rem;
}

.band-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}

.band-body p {
  color: rgba(245, 246, 248, 0.65);
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
}

.band .btn-fill {
  background: var(--mint);
  color: #06241e;
  box-shadow: none;
}

.band .btn-fill:hover {
  background: #12d9b4;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem var(--space) 2rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.footer a {
  font-weight: 600;
  color: var(--ink);
}

.footer a:hover {
  color: var(--mint-deep);
}

/* —— Legal / Privacy —— */
.legal {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 2 * var(--space)));
  margin: 0 auto 3rem;
  padding-bottom: 1rem;
}

.legal-hero {
  margin-bottom: 2rem;
}

.legal-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.legal-updated {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.legal-body {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.25rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  backdrop-filter: blur(10px);
}

.legal-body p,
.legal-body li {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.65;
}

.legal-body p + p {
  margin-top: 0.9rem;
}

.legal-body h2 {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 2rem 0 0.75rem;
}

.legal-body h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.25rem 0 0.5rem;
}

.legal-body ul {
  margin: 0.6rem 0 0.4rem 1.15rem;
}

.legal-body li + li {
  margin-top: 0.35rem;
}

.legal-body a {
  color: var(--mint-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.legal-body strong {
  color: var(--ink);
  font-weight: 600;
}

.legal-page .blob-c {
  display: none;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6%, 8%) scale(1.08); }
}

@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10%, -6%) scale(1.12); }
}

@keyframes drift-c {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-8%, 10%); }
}

@keyframes float-phone {
  0%, 100% { transform: rotateY(-12deg) rotateX(6deg) translateY(0); }
  50% { transform: rotateY(-12deg) rotateX(6deg) translateY(-12px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(0, 194, 160, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(0, 194, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 194, 160, 0); }
}

@keyframes tick-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes cell-pulse {
  0%, 100% { background: rgba(0, 194, 160, 0.08); border-color: rgba(0, 194, 160, 0.2); }
  50% { background: rgba(0, 194, 160, 0.2); border-color: rgba(0, 194, 160, 0.45); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 2.5rem;
  }

  .hero-art {
    order: -1;
    min-height: 360px;
  }

  .phone {
    width: min(100%, 250px);
    transform: none;
    animation: float-phone-flat 6s ease-in-out infinite;
  }
}

@keyframes float-phone-flat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 560px) {
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
