/* ===== Responsive Styles ===== */
/*
 * Strategy: Mobile-First Base → Tablet (768px) → Desktop (1024px) → Large (1440px)
 *
 * All desktop values that exist in sections.css / components.css are treated as
 * "desktop defaults". This file's mobile base overrides them, then each media
 * query progressively restores the appropriate layout.
 */

/* ============================================
   MOBILE (< 768px) — Base / Default
   ============================================ */

/* ---- Navigation ---- */
.nav {
  padding: 10px 0;
}

.nav .nav__container {
  width: calc(100% - 24px);
  min-height: 58px;
  padding-left: 14px;
  padding-right: 10px;
  border-radius: 14px;
}

.nav__logo-kicker {
  display: none;
}

.nav__logo-icon {
  width: 34px;
  height: 34px;
}

.nav .nav__logo-image {
  height: 34px;
  max-width: 170px;
  max-height: 36px;
}

.nav__links {
  display: none;
}

.nav__actions .btn--outline {
  display: none;
}

.nav__actions {
  display: none;
}

.nav__hamburger {
  display: flex;
}

/* ---- Hero ---- */
.hero {
  padding-top: calc(var(--space-16) + 60px);
  min-height: auto;
}

.hero__container {
  grid-template-columns: 1fr;
  text-align: center;
}

.hero__content {
  max-width: 100%;
  order: 1;
}

.hero__visual {
  order: 2;
  min-height: 400px;
}

.hero__subtitle {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

.hero__actions,
.hero__cta {
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.hero__trust,
.hero__stats-bar {
  justify-content: center;
}

.hero__stats-bar {
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.hero__stat {
  align-items: center;
}

/* ---- Phone mockup (mobile) ---- */
.phone-mockup {
  width: 220px;
  height: 440px;
}

.phone-mockup__notch {
  width: 80px;
  height: 22px;
  top: 10px;
}

/* ---- Floating elements (mobile) ---- */
.floating-element {
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
}

.floating-element svg {
  width: 14px;
  height: 14px;
}

/* ---- Features / Bento grid (mobile) ---- */
.bento-grid {
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.bento-card--hero {
  grid-column: auto;
  grid-row: auto;
}

/* ---- Showcase ---- */
.showcase {
  grid-template-columns: 1fr;
  gap: var(--space-8);
  padding: var(--space-10) 0;
}

/* ---- Showcase images (mobile) ---- */
.showcase__image {
  max-width: 100%;
}

.showcase__video-wrapper {
  max-width: 100%;
}

.runtime-visual {
  max-width: 560px;
}

/* ---- Product preview (mobile) ---- */
.product-preview {
  border-radius: var(--radius-lg);
  margin-left: calc(-1 * var(--space-5));
  margin-right: calc(-1 * var(--space-5));
  border-left: none;
  border-right: none;
}

.showcase:nth-child(even) {
  direction: ltr;
}

.showcase__content {
  max-width: 100%;
  text-align: center;
}

.showcase__tags {
  justify-content: center;
}

.showcase__visual {
  order: -1;
}

.showcase:nth-child(even) .showcase__visual {
  order: 0;
}

/* ---- Stats ---- */
.stats-grid {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.stat-item__number {
  font-size: var(--text-4xl);
}

/* ---- Contact ---- */
.contact-grid {
  grid-template-columns: 1fr;
  max-width: 400px;
  margin: 0 auto;
}

/* ---- Hero platforms (mobile) ---- */
.hero__platforms {
  justify-content: center;
}

/* ---- Hero download bar (mobile) ---- */
.hero__download {
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-6);
}

.hero__download-buttons {
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.download-btn {
  width: 100%;
  max-width: 280px;
  justify-content: center;
}

/* ---- Footer ---- */
.footer__grid {
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

/* ---- Section spacing (mobile) ---- */
.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section-header {
  margin-bottom: var(--space-10);
}

.section-header h2 {
  font-size: var(--text-3xl);
}

/* ---- Container padding (mobile) ---- */
.container {
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

@media (max-width: 360px) {
  .nav .nav__logo-image {
    height: 32px;
    max-width: 150px;
  }

  .mobile-menu__actions {
    grid-template-columns: 96px 124px;
  }
}

/* ============================================
   TABLET (>= 768px)
   ============================================ */

@media (min-width: 768px) {
  .nav__logo-kicker {
    display: block;
  }

  .nav .nav__container {
    min-height: 60px;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
    border-radius: 14px;
  }

  .nav__logo-icon {
    width: 38px;
    height: 38px;
  }

  .nav .nav__logo-image {
    height: 38px;
    max-width: 220px;
    max-height: 40px;
  }

  .nav__actions {
    display: flex;
  }

  /* Product preview: restore margins */
 .product-preview {
    margin-left: auto;
    margin-right: auto;
   border-radius: var(--radius-xl);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
  }

  /* Bento: 2 columns (tablet) */
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }

  /* Scenarios removed — now part of bento-grid */

  /* Showcase: restore side-by-side */
  .showcase {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    padding: var(--space-12) 0;
  }

  .showcase:nth-child(even) {
    direction: rtl;
  }

  .showcase__content {
    max-width: 480px;
    text-align: left;
  }

  .showcase__tags {
    justify-content: flex-start;
  }

  .showcase__visual {
    order: 0;
  }

  .runtime-visual {
    max-width: 560px;
  }

  .showcase:nth-child(even) .showcase__visual {
    order: 0;
  }

  /* Stats: 4 columns */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Contact: 3 columns */
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
  }

  /* Hero platforms: row */
  .hero__platforms {
    justify-content: flex-start;
  }

  /* Hero download bar: side by side */
  .hero__download {
    flex-direction: row;
    gap: var(--space-12);
    padding: var(--space-8) var(--space-10);
  }

  .hero__download-buttons {
    flex-direction: row;
    width: auto;
  }

  .download-btn {
    width: auto;
    max-width: none;
  }

  /* Hero download bar (desktop) */
  .hero__download {
    gap: var(--space-16);
    padding: var(--space-10) var(--space-16);
  }

  /* Footer: 2 columns */
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }

  /* Section spacing */
  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }

  .section-header h2 {
    font-size: var(--text-4xl);
  }

  /* Container padding */
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }

  /* Hero visual */
  .hero__visual {
    min-height: 450px;
  }

  /* Hero CTA: restore horizontal */
  .hero__cta {
    flex-direction: row;
    align-items: center;
  }

  /* Stats bar: restore horizontal */
  .hero__stats-bar {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-8);
  }

  .hero__stat {
    align-items: flex-start;
  }

  /* Phone mockup */
  .phone-mockup {
    width: 240px;
    height: 480px;
  }
}

@media (max-width: 520px) {
  .runtime-visual {
    width: 100%;
    max-width: 100%;
  }

  .runtime-visual__live {
    top: 8px;
    left: 8px;
    padding: 5px 8px;
    font-size: 9px;
  }

  .runtime-visual__status {
    right: 10px;
    bottom: 9px;
    left: 10px;
    gap: 4px;
    padding: 6px;
    border-radius: 12px;
  }

  .runtime-visual__online,
  .runtime-visual__fps,
  .runtime-visual__uptime {
    min-height: 28px;
    font-size: 9px;
  }

  .runtime-visual__uptime span {
    display: none;
  }
}

/* ============================================
   DESKTOP (>= 1024px)
   ============================================ */

@media (min-width: 1024px) {
  .nav .nav__container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    width: 100%;
    padding-left: var(--space-10);
    padding-right: var(--space-10);
  }

  .nav .nav__logo-image {
    height: 40px;
    max-width: 230px;
  }

  .nav__logo {
    justify-self: start;
  }

  .nav__links {
    justify-self: center;
  }

  .nav__actions {
    justify-self: end;
  }

  /* ---- Navigation: restore desktop nav ---- */
  .nav__links {
    display: flex;
  }

  .nav__actions .btn--outline {
    display: inline-flex;
  }

  .nav__hamburger {
    display: none;
  }

  /* ---- Hero: restore 2-column layout ---- */
  .hero {
    padding-top: calc(var(--space-20) + 60px);
    padding-bottom: var(--space-20);
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero__container {
    grid-template-columns: 1fr 1fr;
    text-align: left;
    gap: var(--space-12);
  }

  .hero__content {
    max-width: 560px;
    order: 0;
  }

  .hero__visual {
    order: 0;
    min-height: 500px;
  }

  .hero__subtitle {
    margin-left: 0;
    margin-right: 0;
    max-width: 440px;
  }

  .hero__actions,
  .hero__cta {
    justify-content: flex-start;
  }

  .hero__trust,
  .hero__stats-bar {
    justify-content: flex-start;
  }

  /* ---- Phone mockup: desktop size ---- */
  .phone-mockup {
    width: 280px;
    height: 560px;
  }

  .phone-mockup__notch {
    width: 100px;
    height: 28px;
    top: 12px;
  }

  /* ---- Floating elements: desktop size ---- */
  .floating-element {
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-5);
  }

  .floating-element svg {
    width: 18px;
    height: 18px;
  }

  /* ---- Bento: 4 columns with hero span (desktop) ---- */
  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
  }

  .bento-card--hero {
    grid-column: 3 / 5;
    grid-row: 1 / 3;
  }

  .bento-card__title {
    font-size: var(--text-lg);
  }

  /* ---- Showcase: desktop spacing ---- */
  .showcase {
    gap: var(--space-16);
    padding: var(--space-16) 0;
  }

  /* ---- Scenarios: 3 columns ---- */
  /* ---- Stats: desktop spacing ---- */
  .stats-grid {
    gap: var(--space-12);
  }

  .stat-item__number {
    font-size: var(--text-5xl);
  }

  /* ---- Footer: 4 columns ---- */
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-12);
  }

  /* ---- Section: full spacing ---- */
  .section {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }

  /* ---- Container: desktop padding ---- */
  .container {
    padding-left: var(--space-10);
    padding-right: var(--space-10);
  }
}

/* ============================================
   LARGE (>= 1440px)
   ============================================ */

@media (min-width: 1440px) {
  :root {
    --container-padding: var(--space-16);
  }

  .nav .nav__container {
    padding-left: var(--space-16);
    padding-right: var(--space-16);
  }

  .hero__container {
    gap: var(--space-20);
  }

  .hero__content {
    max-width: 600px;
  }

  .container {
    padding-left: var(--space-16);
    padding-right: var(--space-16);
  }
}

/* ============================================
   LANDSCAPE / SHORT VIEWPORT
   ============================================ */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding-top: calc(var(--space-8) + 60px);
    padding-bottom: var(--space-8);
    min-height: auto;
  }

  .hero__visual {
    min-height: 300px;
  }

  .phone-mockup {
    width: 180px;
    height: 360px;
  }
}
