/* Rhythm Racer — Mobile layout (loads only on phones & small tablets) */

:root {
  --nav-height: 60px;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

/* ── Navigation ── */

.site-nav {
  padding: 0 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  z-index: 102;
  backdrop-filter: none;
  background: rgba(5, 5, 16, 0.98);
}

.nav-brand img {
  height: 22px;
  max-width: min(160px, 42vw);
}

.nav-toggle {
  position: relative;
  z-index: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.65rem;
}

.nav-links {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 101;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  background: rgba(5, 5, 16, 0.98);
  border-bottom: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-links.open {
  display: flex;
}

.nav-links li {
  border-bottom: 1px solid rgba(51, 204, 255, 0.08);
}

.nav-links a {
  display: block;
  padding: 1rem 0.75rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

/* ── Layout & typography ── */

.container {
  width: min(var(--max-width), 100% - 1.25rem);
}

section {
  padding: 2.25rem 0;
}

.content-section .container {
  padding: 1.35rem 1.15rem;
  border-radius: var(--radius);
}

.content-section + .content-section .container {
  margin-top: 1rem;
}

.section-title {
  font-size: clamp(1.35rem, 6.5vw, 1.85rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.section-subtitle {
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

/* ── Hero ── */

.hero {
  min-height: auto;
  padding: 1.25rem 0 2rem;
}

.hero-grid {
  gap: 1.25rem;
}

.hero .hero-content {
  padding: 1.25rem 1.1rem;
}

.hero-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(2rem, 11vw, 2.75rem);
  line-height: 1.12;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1rem;
  line-height: 1.55;
  max-width: none;
}

.hero-hook {
  font-size: 0.78rem;
  margin-bottom: 1.25rem;
}

.hero-actions {
  flex-direction: column;
  gap: 0.75rem;
}

.hero-actions .btn {
  width: 100%;
  min-height: 48px;
  padding: 0.9rem 1.25rem;
}

.hero-meta {
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.hero-visual {
  order: -1;
}

.hero-image-wrap {
  border-radius: var(--radius);
}

.hero-badge {
  font-size: 0.58rem;
  padding: 0.35rem 0.75rem;
}

/* Dim background animation on mobile — readability + battery */
#site-scrim {
  opacity: 0.72 !important;
}

#tunnel-canvas {
  opacity: 0.55 !important;
}

/* ── Buttons & cards ── */

.btn {
  min-height: 44px;
}

.features-grid {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.feature-card {
  padding: 1.35rem;
}

.feature-card:hover {
  transform: none;
}

.feature-card-link:hover .feature-card {
  transform: none;
}

/* ── Gallery & trailer ── */

.screenshot-grid {
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.trailer-wrap {
  border-radius: var(--radius);
}

.trailer-modal-inner {
  width: calc(100% - 1.5rem);
  margin: 0 0.75rem;
}

.trailer-modal-close {
  top: -2.25rem;
  right: 0.25rem;
  min-height: 40px;
  padding: 0.5rem 1rem;
}

/* ── CTA band ── */

.cta-band .container {
  padding: 1.75rem 1.25rem;
}

.cta-band .btn {
  width: 100%;
}

/* ── Page headers ── */

.page-header {
  padding: 1.5rem 0 1rem;
}

.page-header .header-panel {
  padding: 1.35rem 1.1rem;
}

.page-header .section-title {
  font-size: clamp(1.4rem, 7vw, 2rem);
}

/* ── Mode jump nav ── */

.mode-jump-nav {
  padding: 0.6rem 0;
  margin-bottom: 0.75rem;
}

.mode-jump-inner {
  gap: 0.4rem;
  padding: 0 0.625rem;
  scroll-padding-inline: 0.625rem;
  -webkit-overflow-scrolling: touch;
}

.mode-jump-link {
  font-size: 0.72rem;
  padding: 0.65rem 1.1rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.mode-card {
  margin-bottom: 1.25rem;
  scroll-margin-top: calc(var(--nav-height) + 52px);
  border-radius: var(--radius);
}

#mode-comparison {
  scroll-margin-top: calc(var(--nav-height) + 52px);
}

.mode-card-header {
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.15rem;
}

.mode-number {
  font-size: 1.75rem;
}

.mode-card-header h2 {
  font-size: 1.15rem;
}

.mode-tagline {
  font-size: 0.88rem;
}

.mode-accent {
  display: inline-block;
  font-size: 0.58rem;
  padding: 0.3rem 0.65rem;
  margin-left: auto;
}

.mode-card-body {
  padding: 1.15rem;
}

.mode-description p {
  font-size: 0.92rem;
  line-height: 1.6;
}

.mode-screenshot img {
  max-height: 220px;
  border-radius: var(--radius);
}

/* Compare table → stacked cards */
.compare-panel {
  padding: 1rem;
  overflow-x: visible;
}

.compare-table thead {
  display: none;
}

.compare-table tbody tr {
  display: block;
  margin-bottom: 0.85rem;
  padding: 0.85rem;
  border: 1px solid rgba(51, 204, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
}

.compare-table tbody tr:last-child {
  margin-bottom: 0;
}

.compare-table tbody td {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(51, 204, 255, 0.06);
  background: transparent;
  font-size: 0.88rem;
}

.compare-table tbody td:last-child {
  border-bottom: none;
}

.compare-table tbody td:first-child {
  display: block;
  font-size: 0.92rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(51, 204, 255, 0.15);
}

.compare-table tbody td:not(:first-child)::before {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  flex-shrink: 0;
}

.compare-table tbody td:nth-child(2)::before { content: "Race"; }
.compare-table tbody td:nth-child(3)::before { content: "Cruise"; }
.compare-table tbody td:nth-child(4)::before { content: "Local MP"; }
.compare-table tbody td:nth-child(5)::before { content: "Stream"; }

/* ── Sticky wishlist ── */

.sticky-wishlist {
  padding: 0.65rem 1rem;
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

.sticky-wishlist .btn {
  max-width: none;
  min-height: 48px;
}

/* ── Footer ── */

.site-footer {
  padding: 2rem 0 1.5rem;
  text-align: center;
}

.footer-inner {
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

/* ── Press kit ── */

.press-grid {
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.fact-sheet dl {
  grid-template-columns: 1fr;
  gap: 0.25rem;
}

.fact-sheet dt {
  margin-top: 0.5rem;
}

.press-actions {
  flex-direction: column;
  align-items: stretch;
}

.press-actions .btn,
.press-actions .btn-copy {
  width: 100%;
  min-height: 44px;
}

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

.lightbox {
  padding: 1rem;
}

.lightbox img {
  max-width: 100%;
  max-height: 85vh;
}

/* ── Touch polish ── */

a, button, .btn, .nav-toggle, .mode-jump-link {
  -webkit-tap-highlight-color: rgba(51, 204, 255, 0.15);
}

@media (hover: none) {
  .feature-card:hover,
  .mode-card:hover,
  a.feature-card-link:hover .feature-card {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .mode-jump-link {
    font-size: 0.65rem;
    padding: 0.55rem 0.85rem;
  }
}
