/* ChessBits landing — dark cinematic brand */

:root {
  --bg: #05070c;
  --bg-elevated: #0c1220;
  --bg-card: rgba(18, 28, 48, 0.72);
  --border: rgba(205, 215, 239, 0.12);
  --text: #e8eefc;
  --text-muted: #a8b4d0;
  --brand: #226ce0;
  --brand-light: #cdd7ef;
  --brand-glow: rgba(34, 108, 224, 0.45);
  --radius: 16px;
  --header-h: 64px;
  --container: 1100px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-light);
  text-decoration: none;
}

a:hover {
  color: #fff;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(5, 7, 12, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand:hover {
  color: #fff;
}

.brand-icon {
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.brand-wordmark {
  display: block;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.35));
}

.brand-wordmark--nav {
  width: 108px;
  filter: none;
}

.brand-wordmark--hero {
  width: min(340px, 78vw);
  margin-inline: auto;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.55));
}

.brand-wordmark--footer {
  width: 96px;
  filter: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: #fff;
}

.nav-cta {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff !important;
  box-shadow: 0 0 20px var(--brand-glow);
}

.nav-cta:hover {
  filter: brightness(1.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */

.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    url("assets/home_backdrop.png") center bottom / cover no-repeat,
    #000;
}

@media (min-width: 900px) {
  .hero-backdrop {
    background:
      url("assets/home_backdrop_landscape.png") center / cover no-repeat,
      #000;
  }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(5, 7, 12, 0.55) 0%,
      rgba(5, 7, 12, 0.35) 40%,
      rgba(5, 7, 12, 0.88) 100%
    ),
    radial-gradient(
      ellipse 70% 55% at 50% 35%,
      rgba(34, 108, 224, 0.18),
      transparent 70%
    );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  max-width: 720px;
}

.hero-kicker {
  margin: 0 0 1rem;
  color: var(--brand-light);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wordmark {
  margin: 0;
  display: flex;
  justify-content: center;
}

.hero-tagline {
  margin: 1.75rem auto 1.5rem;
  max-width: 36rem;
  color: var(--brand-light);
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75);
}

.play-badge {
  display: inline-block;
  width: min(220px, 70vw);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.play-badge img {
  width: 100%;
  height: auto;
}

.play-badge:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.06);
}

.play-badge--cta {
  width: min(240px, 75vw);
}

/* Sections */

.section {
  padding: 4.5rem 0;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.02em;
  text-align: center;
}

.section-lead {
  margin: 0 auto 2.5rem;
  max-width: 38rem;
  color: var(--text-muted);
  text-align: center;
  font-size: 1.05rem;
}

/* Features */

.features {
  background:
    radial-gradient(
      ellipse 80% 50% at 50% 0%,
      rgba(34, 108, 224, 0.12),
      transparent 60%
    ),
    var(--bg);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  padding: 1.35rem 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.feature-card h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: rgba(34, 108, 224, 0.18);
  color: var(--brand-light);
  box-shadow: inset 0 0 0 1px rgba(34, 108, 224, 0.35);
}

.feature-icon svg {
  display: block;
}

/* Screenshots */

.screenshots {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.shot-carousel {
  width: min(100%, 360px);
  margin-inline: auto;
}

.shot-viewport {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
}

.shot-scroller {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 12px;
}

.shot-scroller::-webkit-scrollbar {
  display: none;
}

.shot-scroller:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

.shot-card {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  text-align: left;
}

.shot-card img {
  width: 100%;
  border-radius: 28px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 48px rgba(0, 0, 0, 0.45);
}

.shot-copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 7.5rem;
  margin-top: 1rem;
  padding: 0 0.15rem;
}

.shot-copy h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.shot-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.shot-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(18, 28, 48, 0.85);
  color: var(--brand-light);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.shot-nav:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.shot-nav:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.shot-nav:disabled {
  opacity: 0.35;
  cursor: default;
  background: rgba(18, 28, 48, 0.45);
  color: var(--text-muted);
}

.shot-nav:disabled:hover {
  background: rgba(18, 28, 48, 0.45);
  border-color: var(--border);
  color: var(--text-muted);
}

.shot-pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.shot-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.shot-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(205, 215, 239, 0.28);
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.shot-dot:hover {
  background: rgba(205, 215, 239, 0.55);
}

.shot-dot[aria-selected="true"] {
  background: var(--brand);
  transform: scale(1.2);
  box-shadow: 0 0 12px var(--brand-glow);
}

.shot-dot:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.shot-status {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* CTA */

.cta {
  text-align: center;
  background:
    radial-gradient(
      ellipse 60% 70% at 50% 100%,
      rgba(34, 108, 224, 0.22),
      transparent 65%
    ),
    var(--bg);
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta .section-lead {
  margin-bottom: 1.25rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  background: #020307;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-brand .brand-icon,
.footer-brand > img:first-child {
  border-radius: 8px;
}

.footer-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Mobile nav */

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem 1rem;
    background: rgba(5, 7, 12, 0.96);
    border-bottom: 1px solid var(--border);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .site-nav a:last-child {
    border-bottom: 0;
    margin-top: 0.35rem;
    text-align: center;
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    position: relative;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .play-badge {
    transition: none;
  }
}
