/* Tokens */
:root {
  --color-bg: #0A0A0A;
  --color-red: #D42B2B;
  --color-blue: #1A3A8F;
  --color-yellow: #F0C030;
  --color-offwhite: #F5F5F0;
  --color-text-dim: rgba(245, 245, 240, 0.6);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container-max: 1280px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
  --bp-tablet: 640px;
  --bp-desktop: 1024px;
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--color-bg);
  color: var(--color-offwhite);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
ul { list-style: none; }

/* Layout utility */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
@media (min-width: 1024px) {
  .container { padding: 0 var(--space-5); }
}

h1, h2, h3 {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

/* Eyebrow label */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-bottom: var(--space-2);
}
.eyebrow::before {
  content: "";
  width: 4px;
  height: 14px;
  background: var(--color-red);
  display: inline-block;
  flex-shrink: 0;
}
.eyebrow--yellow::before { background: var(--color-yellow); }

/* Logo mark (3 shapes: red square, yellow bar, blue diamond) */
.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.logo-mark__square { width: 14px; height: 14px; background: var(--color-red); }
.logo-mark__bar { width: 6px; height: 18px; background: var(--color-yellow); }
.logo-mark__diamond { width: 11px; height: 11px; background: var(--color-blue); transform: rotate(45deg); }

/* Header / nav */
.site-header {
  border-bottom: 1px solid rgba(245, 245, 240, 0.1);
  padding: var(--space-2) 0;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 900;
  letter-spacing: 0.1em;
  font-size: 14px;
}
.nav__toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
}
.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-offwhite);
  margin: 4px 0;
}
.nav__links {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--color-bg);
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3);
  border-bottom: 1px solid rgba(245, 245, 240, 0.1);
}
.nav__links.is-open { display: flex; }
.nav__link {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav__cta {
  display: none;
  background: var(--color-red);
  color: var(--color-offwhite);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-3);
  white-space: nowrap;
}

@media (min-width: 900px) {
  .nav__toggle { display: none; }
  .nav__links {
    display: flex;
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
    gap: var(--space-4);
  }
  .nav__cta { display: inline-block; }
}

/* Hero */
.hero { padding: var(--space-5) 0 var(--space-3) 0; }
.hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.hero__headline {
  font-size: clamp(36px, 8vw, 64px);
  margin-bottom: var(--space-3);
}
.hero__headline-line--2 {
  min-height: 1.9em;
}
.hero__highlight {
  display: inline-block;
  background: var(--color-red);
  padding: 0 var(--space-1);
}
.hero__body {
  color: var(--color-text-dim);
  max-width: 46ch;
  margin-bottom: var(--space-3);
}
.hero__body strong { color: var(--color-offwhite); }
.hero__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 420px;
  margin-bottom: var(--space-2);
}
.hero__form input {
  background: transparent;
  border: 1px solid rgba(245, 245, 240, 0.3);
  padding: var(--space-2) var(--space-3);
}
.hero__form button {
  background: var(--color-red);
  border: none;
  padding: var(--space-2) var(--space-3);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.hero__form-status {
  min-height: 1.2em;
  font-size: 13px;
  color: var(--color-yellow);
  margin-bottom: var(--space-2);
}
.hero__queue {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--color-text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero__avatars { display: flex; }
.hero__avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-bg);
  margin-left: -6px;
}
.hero__avatar:first-child { margin-left: 0; }
.hero__avatar--red { background: var(--color-red); }
.hero__avatar--blue { background: var(--color-blue); }
.hero__avatar--yellow { background: var(--color-yellow); }
.hero__media { display: flex; justify-content: center; }
.hero__phone {
  width: 100%;
  max-width: 320px;
  border: 1px solid rgba(245, 245, 240, 0.15);
}

@media (min-width: 640px) {
  .hero__form { flex-direction: row; }
  .hero__form input { flex: 1; }
}

@media (min-width: 1024px) {
  .hero__inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .hero__copy { max-width: 560px; }
  .hero__media { flex: 1; justify-content: flex-end; }
}

/* Ticker */
.ticker {
  background: var(--color-red);
  overflow: hidden;
  white-space: nowrap;
  padding: var(--space-2) 0;
}
.ticker__track {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  animation: ticker-scroll 30s linear infinite;
}
.ticker__item {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ticker__sep { color: var(--color-yellow); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
}

/* Problem */
.problem { padding: var(--space-3) 0 var(--space-6) 0; }
.problem__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.problem__copy h2 { font-size: clamp(28px, 5vw, 44px); margin-bottom: var(--space-3); }
.problem__body { color: var(--color-text-dim); max-width: 52ch; }
.problem__body strong { color: var(--color-offwhite); }
.problem__grid-block + .problem__grid-block { margin-top: var(--space-4); }
.problem__grid-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-bottom: var(--space-1);
}
.problem__grid-caption {
  font-size: 12px;
  color: var(--color-text-dim);
  margin-bottom: var(--space-2);
}
.problem__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-1);
}
.problem__grid span {
  aspect-ratio: 1;
  background: rgba(245, 245, 240, 0.06);
}
.problem__grid-cell--red { background: var(--color-red) !important; }
.problem__grid-cell--blue { background: var(--color-blue) !important; }
.problem__grid-cell--yellow { background: var(--color-yellow) !important; }

@media (min-width: 1024px) {
  .problem__inner { flex-direction: row; justify-content: space-between; }
  .problem__copy { max-width: 480px; }
  .problem__grids { width: 360px; flex-shrink: 0; }
}

/* Loop */
.loop { padding: var(--space-6) 0; }
.loop__header { margin-bottom: var(--space-5); }
.loop__header h2 { font-size: clamp(28px, 5vw, 44px); }
.loop__intro { color: var(--color-text-dim); max-width: 40ch; margin-top: var(--space-3); }
.loop__steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.loop__step { border-top: 1px solid rgba(245, 245, 240, 0.15); padding-top: var(--space-3); }
.loop__step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-weight: 900;
  font-size: 13px;
  margin-bottom: var(--space-2);
}
.loop__step-index--red { background: var(--color-red); }
.loop__step-index--yellow { background: var(--color-yellow); color: var(--color-bg); }
.loop__step-index--blue { background: var(--color-blue); }
.loop__step-index--outline { border: 1px solid var(--color-offwhite); }
.loop__step h3 { font-size: 16px; margin-bottom: var(--space-1); }
.loop__step p { color: var(--color-text-dim); font-size: 14px; }

@media (min-width: 1024px) {
  .loop__header { display: flex; justify-content: space-between; align-items: flex-end; }
  .loop__steps { grid-template-columns: repeat(4, 1fr); }
}

/* Carousel */
.carousel-section { padding: var(--space-6) 0; background: var(--color-offwhite); color: var(--color-bg); }
.carousel-section .eyebrow { color: rgba(10, 10, 10, 0.6); }
.carousel-section .eyebrow::before { background: var(--color-red); }
.carousel-section h2 { color: var(--color-bg); font-size: clamp(28px, 5vw, 40px); margin-bottom: var(--space-4); }
.carousel { position: relative; }
.carousel__track {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-2);
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide {
  flex: 0 0 80%;
  scroll-snap-align: start;
  padding: var(--space-3);
  min-height: 360px;
}
.carousel__slide--red { background: var(--color-red); }
.carousel__slide--dark { background: var(--color-bg); color: var(--color-offwhite); }
.carousel__slide--yellow { background: var(--color-yellow); color: var(--color-bg); }
.carousel__slide--outline { background: var(--color-offwhite); border: 2px solid var(--color-bg); }
.carousel__slide-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  min-height: 3em;
}
.carousel__slide-img { max-width: 220px; margin: 0 auto; border: 1px solid rgba(10, 10, 10, 0.15); }
.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.carousel__arrow {
  background: none;
  border: 1px solid rgba(10, 10, 10, 0.3);
  width: 36px;
  height: 36px;
  cursor: pointer;
}
.carousel__dots { display: flex; gap: var(--space-1); }
.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
}
.carousel__dot.is-active { background: var(--color-bg); }

@media (min-width: 640px) {
  .carousel__slide { flex: 0 0 45%; }
}
@media (min-width: 1024px) {
  .carousel__slide { flex: 0 0 23%; }
  .carousel__controls { justify-content: flex-end; }
}

/* Worlds */
.worlds { display: flex; flex-direction: column; }
.worlds__panel { padding: var(--space-6) 0; }
.worlds__panel--red { background: var(--color-red); }
.worlds__panel--blue { background: var(--color-blue); }
.worlds__panel-inner h2 { font-size: clamp(28px, 6vw, 44px); margin-bottom: var(--space-3); }
.worlds__panel-inner p { max-width: 40ch; margin-bottom: var(--space-3); opacity: 0.9; }
.worlds__list li {
  font-size: 13px;
  font-weight: 700;
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(245, 245, 240, 0.25);
}
.worlds__list li::before { content: "■ "; font-size: 10px; }

@media (min-width: 1024px) {
  .worlds { flex-direction: row; }
  .worlds__panel { flex: 1; }
}

/* Stats */
.stats { padding: var(--space-5) 0; }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.stats__number { font-size: clamp(32px, 6vw, 48px); font-weight: 900; }
.stats__label {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-top: var(--space-1);
}
@media (min-width: 640px) {
  .stats__grid { grid-template-columns: repeat(4, 1fr); }
}

/* FAQ */
.faq { padding: var(--space-6) 0; }
.faq__header { margin-bottom: var(--space-5); }
.faq__header h2 { font-size: clamp(28px, 5vw, 44px); margin-top: var(--space-1); }
.faq__list {
  display: grid;
  gap: var(--space-4);
}
.faq__item { border-top: 1px solid rgba(245, 245, 240, 0.15); padding-top: var(--space-3); }
.faq__item h3 { font-size: 18px; margin-bottom: var(--space-1); }
.faq__item p { color: var(--color-text-dim); max-width: 60ch; }
@media (min-width: 640px) {
  .faq__list { grid-template-columns: repeat(2, 1fr); gap: var(--space-4) var(--space-4); }
}

/* CTA */
.cta { background: var(--color-yellow); color: var(--color-bg); padding: var(--space-6) 0; }
.cta .eyebrow { color: rgba(10, 10, 10, 0.6); }
.cta .eyebrow::before { background: var(--color-bg); }
.cta h2 { font-size: clamp(32px, 7vw, 56px); margin-bottom: var(--space-3); max-width: 16ch; }
.cta__body { max-width: 48ch; margin-bottom: var(--space-4); }
.cta__form { max-width: 420px; margin-bottom: var(--space-1); }
.cta__form input {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(10, 10, 10, 0.4);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
}
.cta__form input::placeholder { color: rgba(10, 10, 10, 0.7); }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cta__button {
  padding: var(--space-2) var(--space-3);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--color-bg);
}
.cta__button--primary { background: var(--color-bg); color: var(--color-offwhite); }
.cta__button--outline { background: transparent; color: var(--color-bg); }
.cta__status { font-size: 13px; min-height: 1.2em; }

/* Hero highlight rotation */
.hero__highlight {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.hero__highlight.is-swapping {
  opacity: 0;
  transform: translateY(-6px);
}

/* Hero on-load entrance (above the fold — plays immediately, not scroll-triggered) */
@media (prefers-reduced-motion: no-preference) {
  .hero__headline-line {
    display: block;
    opacity: 0;
    transform: translateY(28px);
    animation: hero-line-in 0.7s ease forwards;
  }
  .hero__headline-line--1 { animation-delay: 0.05s; }
  .hero__headline-line--2 { animation-delay: 0.25s; }
  .hero__media--enter .hero__phone {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
    animation: hero-phone-in 0.8s ease forwards;
    animation-delay: 0.35s;
  }
}
@keyframes hero-line-in {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-phone-in {
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__highlight { transition: none; }
}

/* Scroll-triggered reveal system (JS toggles .is-visible via IntersectionObserver) */
@media (prefers-reduced-motion: no-preference) {
  [data-animate] {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }
  [data-animate="fade-up"] { transform: translateY(16px); }
  [data-animate="slide-left"] { transform: translateX(-40px); }
  [data-animate="slide-right"] { transform: translateX(40px); }
  [data-animate="scale-in"] { transform: scale(0.8); }
  [data-animate].is-visible {
    opacity: 1;
    transform: none;
  }
  [data-animate-delay="1"] { transition-delay: 0.08s; }
  [data-animate-delay="2"] { transition-delay: 0.16s; }
  [data-animate-delay="3"] { transition-delay: 0.24s; }
  [data-animate-delay="4"] { transition-delay: 0.32s; }

  /* Staggered per-cell pop for the "Seven Days on SideQuest" grid */
  .problem__grid--pop span:nth-child(1) { transition-delay: 0s; }
  .problem__grid--pop span:nth-child(2) { transition-delay: 0.05s; }
  .problem__grid--pop span:nth-child(3) { transition-delay: 0.1s; }
  .problem__grid--pop span:nth-child(4) { transition-delay: 0.15s; }
  .problem__grid--pop span:nth-child(5) { transition-delay: 0.2s; }
  .problem__grid--pop span:nth-child(6) { transition-delay: 0.25s; }
  .problem__grid--pop span:nth-child(7) { transition-delay: 0.3s; }
}

/* Carousel active/inactive punch */
@media (prefers-reduced-motion: no-preference) {
  .carousel__slide {
    transition: transform 0.35s ease, opacity 0.35s ease;
    transform: scale(0.96);
    opacity: 0.85;
  }
  .carousel__slide.is-active {
    transform: scale(1);
    opacity: 1;
  }
}

/* Hover nudges */
@media (prefers-reduced-motion: no-preference) {
  .hero__form button,
  .cta__button,
  .carousel__arrow,
  .nav__cta {
    transition: transform 0.15s ease;
  }
  .hero__form button:hover,
  .cta__button:hover,
  .carousel__arrow:hover,
  .nav__cta:hover {
    transform: translateY(-2px) scale(1.03);
  }
}

/* Footer */
.site-footer { padding: var(--space-4) 0; border-top: 1px solid rgba(245, 245, 240, 0.1); }
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--color-text-dim);
}
.site-footer__wordmark { display: flex; align-items: center; gap: var(--space-1); }
.site-footer__links { display: flex; gap: var(--space-3); }
@media (min-width: 640px) {
  .site-footer__inner { flex-direction: row; justify-content: space-between; }
}

/* Legal pages (Privacy / Terms) */
.legal { padding: var(--space-6) 0; }
.legal h1 { font-size: clamp(32px, 6vw, 48px); margin-bottom: var(--space-2); }
.legal__updated { color: var(--color-text-dim); font-size: 13px; margin-bottom: var(--space-5); }
.legal__body { max-width: 70ch; }
.legal__body h2 { font-size: 18px; margin: var(--space-5) 0 var(--space-2); }
.legal__body h2:first-child { margin-top: 0; }
.legal__body p { color: var(--color-text-dim); margin-bottom: var(--space-3); }
.legal__body ul { list-style: disc; padding-left: 1.2em; margin-bottom: var(--space-3); }
.legal__body li { color: var(--color-text-dim); margin-bottom: var(--space-1); }
.legal__body strong { color: var(--color-offwhite); }
.legal__body a { text-decoration: underline; }

/* Press kit */
.press-kit { padding: var(--space-6) 0; }
.press-kit h1 { font-size: clamp(32px, 6vw, 48px); margin-bottom: var(--space-3); }
.press-kit__intro { color: var(--color-text-dim); max-width: 60ch; margin-bottom: var(--space-6); }
.press-kit__section { margin-bottom: var(--space-6); }
.press-kit__section h2 { font-size: 20px; margin-bottom: var(--space-3); }
.press-kit__section p { color: var(--color-text-dim); max-width: 60ch; margin-bottom: var(--space-2); }
.press-kit__pitch {
  border-left: 3px solid var(--color-red);
  padding-left: var(--space-3);
  font-size: 18px;
  font-style: italic;
  max-width: 50ch;
  margin: var(--space-3) 0;
}
.press-kit__swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
}
.press-kit__swatch { border: 1px solid rgba(245, 245, 240, 0.15); }
.press-kit__swatch-color { height: 72px; }
.press-kit__swatch-label { padding: var(--space-2); font-size: 12px; }
.press-kit__swatch-label strong { display: block; color: var(--color-offwhite); margin-bottom: 2px; }
.press-kit__assets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
}
.press-kit__asset {
  border: 1px solid rgba(245, 245, 240, 0.15);
  padding: var(--space-4) var(--space-3);
  text-align: center;
}
.press-kit__asset img { margin: 0 auto var(--space-3); max-height: 40px; width: auto; }
.press-kit__asset a { text-decoration: underline; font-size: 13px; }
.press-kit__screens {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-1);
}
.press-kit__screen { flex: 0 0 auto; text-align: center; }
.press-kit__screen img {
  width: 120px;
  border: 1px solid rgba(245, 245, 240, 0.15);
  margin-bottom: var(--space-1);
}
.press-kit__screen-label { font-size: 11px; color: var(--color-text-dim); }
