:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #131238;
  --accent-primary: #44ccaa;
  --accent-secondary: #7b68ee;
  --accent-tertiary: #d85548;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-tertiary: #c7c7d7;
  --label-neutral: #d8d8e9;
  --label-success: #44ccaa;
  --label-info: #8b7ef2;
  --label-danger: #e56b5f;
  /* Type Scale */
  --fs-h1: clamp(3.25rem, 7vw, 4.375rem);     /* 52-70px - Hero */
  --fs-h2: clamp(2.25rem, 4.5vw, 2.875rem);   /* 36-46px - Section titles */
  --fs-h3: 1.75rem;                           /* 28px - Card titles */
  --fs-headline: 1.5rem;                      /* 24px - Headline */
  --fs-body: 1.25rem;                         /* 20px - Body */
  --fs-description: 1rem;                     /* 16px - Description */
  --fs-ui: 1rem;                              /* 16px - UI elements */
  --radius-continuous-lg: 32px;
  --radius-continuous-md: 18px;
  --radius-pill: 999px;
  --line: rgba(255, 255, 255, 0.12);
  --surface: rgba(255, 255, 255, 0.03);
  --max-width: 960px;
  --content-gutter-inline: 32pt;
  --zigzag-width: 32px;
  --zigzag-height: 12px;
  /* Real device / gameplay PNGs (replaced placeholders): centered soft halo */
  --asset-drop-shadow: drop-shadow(0 0 10px rgba(0, 0, 0, 0.3));
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  /* Home is taller than Privacy — without this, a scrollbar only on one page
     narrows the layout and shifts centered content (icon + label) sideways. */
  scrollbar-gutter: stable;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: linear-gradient(180deg, #070215 0%, #2E1F5B 100%);
  line-height: 1.55;
  font-size: var(--fs-body);
}

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

.container {
  width: min(var(--max-width), calc(100% - 2 * var(--content-gutter-inline)));
  margin: 0 auto;
}

@keyframes nav-pill-enter {
  0% {
    opacity: 0;
    transform: translate3d(0, calc(-100% - 1.25rem), 0);
    animation-timing-function: cubic-bezier(0.33, 0, 0.2, 1);
  }
  70% {
    opacity: 1;
    transform: translate3d(0, 4px, 0);
    animation-timing-function: cubic-bezier(0.22, 1.2, 0.36, 1);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: calc(1rem + 10px) var(--content-gutter-inline) 1rem;
  pointer-events: none;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.6rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-pill);
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 4px 24px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  animation: nav-pill-enter 0.88s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s both;
}

html.flipit-nav-already-entered .nav-pill {
  animation: none;
  opacity: 1;
  transform: none;
}

.footer-logo {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s ease;
}

.footer-grid a.footer-logo {
  color: var(--text-primary);
  margin-bottom: 0;
}

.footer-grid a.footer-logo:hover {
  color: var(--text-primary);
  opacity: 0.85;
}

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

.nav-link {
  color: var(--text-primary);
  font-size: var(--fs-body);
  mix-blend-mode: plus-lighter;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.4;
}

.nav-link--disabled {
  mix-blend-mode: normal;
  color: rgba(255, 255, 255, 0.4);
  opacity: 1;
  pointer-events: none;
  cursor: not-allowed;
}

.hero {
  min-height: 92vh;
  padding: 5.8em 0 3.5rem;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  position: relative;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  position: sticky;
  top: 118px;
  z-index: 1;
  width: 100%;
  transition: opacity 0.25s linear;
}

.hero-content--static {
  position: static;
  top: auto;
  opacity: 1;
  transition: none;
}

.hero-content h1 {
  max-width: none;
}

.hero-app-icon {
  width: 100px;
  max-width: min(28vw, 100px);
  height: auto;
  display: block;
  border-radius: 22px;
}

.hero-app-name {
  margin: -0.2rem 0 0;
}

.hero-content h1 em {
  font-style: normal;
  color: var(--accent-primary);
}

.hero-description {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  max-width: 56ch;
  margin: 0 0 1rem;
  line-height: 1.6;
  mix-blend-mode: plus-lighter;
  text-wrap: balance;
}

.hero-devices {
  position: relative;
  /* Definite width so % widths on hero images resolve (fit-content + width:100% = intrinsic size in Safari). */
  width: min(700px, 100%);
  margin: clamp(2.2rem, 6vh, 4rem) auto 0;
  z-index: 2;
}

.device-frame {
  --placeholder-tilt: 0deg;
  border-radius: var(--radius-continuous-lg);
  background: #e7e7eb;
  border: 1px solid #d5d5db;
  color: #7a7a86;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: var(--fs-ui);
  transform: rotate(var(--placeholder-tilt));
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-reduced-motion: reduce) {
  .device-frame {
    transition: none;
  }

  .nav-pill {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.device-frame.ipad-hero {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 0;
  line-height: 0;
  border: none;
  background: transparent;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
}

.device-frame.ipad-hero img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  filter: var(--asset-drop-shadow);
}

.device-frame.phone-hero {
  position: absolute;
  display: block;
  bottom: 0;
  right: -112px;
  width: auto;
  height: auto;
  padding: 0;
  line-height: 0;
  border: none;
  background: transparent;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
}

.device-frame.phone-hero img {
  width: 196px;
  max-width: 100%;
  height: auto;
  display: block;
  filter: var(--asset-drop-shadow);
}

.device-frame.ipad-hero picture,
.device-frame.phone-hero picture,
.split-ipad .device-frame.ipad.split-ipad__frame picture,
.phone-stack-assets .device-frame.phone-medium picture,
.site-brand-link picture {
  display: block;
  line-height: 0;
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2 {
  font-family: "Noto Serif", Georgia, serif;
  font-weight: 500;
}

h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-weight: 500;
}

h1 {
  max-width: 15ch;
  font-size: var(--fs-h1);
  line-height: 1.08;
  margin-bottom: 0.6rem;
  text-wrap: balance;
}

h2 {
  font-size: var(--fs-h2);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: var(--fs-h3);
  margin-bottom: 0.45rem;
}

.section {
  position: relative;
  padding: 3rem 0;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--max-width), calc(100% - 2 * var(--content-gutter-inline)));
  height: var(--zigzag-height);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 8' preserveAspectRatio='none'%3E%3Cpath d='M0 4 Q4 0 8 4 Q12 8 16 4' fill='none' stroke='rgba(255,255,255,0.14)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(90deg, transparent, black 3%, black 97%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 3%, black 97%, transparent);
  background-size: var(--zigzag-width) var(--zigzag-height);
  background-repeat: repeat-x;
  background-position: center;
}

.section-alt {
  background: transparent;
}

.split-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: center;
}

.split-row.reverse {
  grid-template-columns: 1.4fr 1fr;
}

.split-row.reverse .split-text {
  order: 2;
}

.split-row.reverse .split-phones {
  order: 1;
}

.split-text h2 {
  margin-bottom: 1rem;
  line-height: 1.15;
}

.split-text p {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  line-height: 1.6;
  margin: 0;
  mix-blend-mode: plus-lighter;
}

.split-ipad {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.split-row.reverse .split-ipad {
  order: 1;
}

.split-ipad .device-frame.ipad.split-ipad__frame {
  display: block;
  width: 100%;
  max-width: min(560px, 100%);
  height: auto;
  aspect-ratio: auto;
  margin: 0;
  padding: 0;
  line-height: 0;
  border: none;
  background: transparent;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
}

.split-ipad .device-frame.ipad.split-ipad__frame img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  filter: var(--asset-drop-shadow);
}

.phone-stack {
  display: flex;
  gap: 0;
  position: relative;
}

.phone-stack .device-frame {
  width: 225px;
  height: 450px;
  border-radius: 28px;
  flex-shrink: 0;
}

.phone-stack .device-frame:nth-child(1) {
  z-index: 3;
}

.phone-stack .device-frame:nth-child(2) {
  margin-left: -50px;
  z-index: 2;
}

.phone-stack .device-frame:nth-child(3) {
  margin-left: -50px;
  z-index: 1;
}

.phones-right .phone-stack {
  justify-content: flex-end;
}

.phones-left .phone-stack {
  justify-content: flex-start;
}

.device-frame.phone-medium {
  width: 225px;
  height: 450px;
  border-radius: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.phone-stack-assets.phone-stack .device-frame.phone-medium {
  display: block;
  width: 225px;
  height: auto;
  padding: 0;
  line-height: 0;
  border: none;
  background: transparent;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
}

.phone-stack-assets .device-frame.phone-medium img {
  width: 100%;
  height: auto;
  display: block;
  filter: var(--asset-drop-shadow);
}

/* Two difficulty / card-type stacks: tighter “deck” until in view, then fan out */
.phone-stack-assets .device-frame.phone-medium {
  transform: rotate(var(--placeholder-tilt)) translateY(0);
  transform-origin: bottom center;
  transition:
    transform 0.85s cubic-bezier(0.25, 0.82, 0.25, 1),
    margin-left 0.85s cubic-bezier(0.25, 0.82, 0.25, 1);
}

.phones-right .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(1) {
  transform: rotate(6deg) translateY(8px);
}

.phones-right .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(2) {
  transform: translateY(4px);
  margin-left: -105px;
}

.phones-right .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(3) {
  transform: rotate(-6deg) translateY(8px);
  margin-left: -105px;
}

.phones-left .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(1) {
  transform: rotate(-6deg) translateY(8px);
}

.phones-left .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(2) {
  transform: translateY(4px);
  margin-left: -105px;
}

.phones-left .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(3) {
  transform: rotate(6deg) translateY(8px);
  margin-left: -105px;
}

@media (prefers-reduced-motion: reduce) {
  .phone-stack-assets .device-frame.phone-medium {
    transition: none;
  }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  gap: 1rem;
}

.footer-title {
  font-size: var(--fs-ui);
  color: var(--label-neutral);
  margin-top: 0;
  margin-bottom: 0.55rem;
}

.footer-grid a {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  font-size: var(--fs-body);
  mix-blend-mode: plus-lighter;
}

.footer-grid a:hover {
  color: var(--text-primary);
}

.footer-coming-soon {
  margin: 0 0 0.4rem;
  color: var(--text-secondary);
  font-size: var(--fs-body);
  mix-blend-mode: plus-lighter;
}

.copyright {
  text-align: center;
  margin-top: 1.6rem;
  color: var(--text-secondary);
  font-size: var(--fs-body);
  mix-blend-mode: plus-lighter;
}

main .section:first-of-type {
  border-top: none;
  padding-top: 3rem;
}

main .section:first-of-type::before {
  display: none;
}

@media (max-width: 767px) {
  .nav-pill {
    gap: 1rem;
    padding: 0.5rem 0.65rem;
  }

  .nav-links {
    gap: 0.9rem;
  }

  .section {
    padding: 2.5rem 0;
  }

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

  .split-row,
  .split-row.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .split-row.reverse .split-text,
  .split-row.reverse .split-phones,
  .split-row.reverse .split-ipad {
    order: unset;
  }

  .phone-stack {
    justify-content: center !important;
  }

  .split-phones,
  .split-ipad {
    display: flex;
    justify-content: center;
  }

  .phone-stack .device-frame {
    width: 175px;
    height: 350px;
    border-radius: 22px;
  }

  .phone-stack .device-frame:nth-child(2),
  .phone-stack .device-frame:nth-child(3) {
    margin-left: -35px;
  }

  .phones-right .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(2),
  .phones-right .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(3),
  .phones-left .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(2),
  .phones-left .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(3) {
    margin-left: -62px;
  }

  .phones-right .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(1) {
    transform: rotate(5deg) translateY(6px);
  }

  .phones-right .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(2) {
    transform: translateY(3px);
  }

  .phones-right .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(3) {
    transform: rotate(-5deg) translateY(6px);
  }

  .phones-left .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(1) {
    transform: rotate(-5deg) translateY(6px);
  }

  .phones-left .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(2) {
    transform: translateY(3px);
  }

  .phones-left .phone-stack-assets--collapsed .device-frame.phone-medium:nth-child(3) {
    transform: rotate(5deg) translateY(6px);
  }

  .phone-stack-assets.phone-stack .device-frame.phone-medium {
    width: 175px;
    height: auto;
  }

  .hero {
    min-height: auto;
    padding: 6em 0 3em;
  }

  .hero-devices {
    width: min(280px, 100%);
    margin-top: 1.25rem;
  }

  .hero-content {
    position: static;
    top: auto;
  }

  .device-frame.ipad-hero {
    width: min(280px, 100%);
    height: auto;
    border-radius: 0;
    overflow: visible;
  }

  .device-frame.phone-hero {
    right: -45px;
    bottom: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
  }

  .device-frame.phone-hero img {
    width: 78px;
    max-width: 22vw;
    height: auto;
  }

  .privacy-page {
    padding: 6em 0 3rem;
  }
}

/* Privacy policy page */
.privacy-page {
  padding: 5.8em 0 3rem;
}

.privacy-page .hero-grid {
  margin-bottom: 2.25rem;
}

.site-brand-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.site-brand-link:hover {
  opacity: 0.85;
}

.privacy-page__title {
  text-align: center;
  font-family: "Noto Serif", Georgia, serif;
  font-size: var(--fs-h2);
  font-weight: 500;
  margin: 0;
}

.privacy-page__body {
  max-width: min(52rem, 100%);
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: var(--fs-body);
  line-height: 1.65;
  mix-blend-mode: plus-lighter;
}

.privacy-page__body p {
  margin: 0 0 1.25rem;
}

.privacy-page__body p:last-child {
  margin-bottom: 0;
}
