
@media (min-width: 1500px) {
  :root {
    --content-max: 820px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  :root {
    --maze-w: clamp(110px, 20vw, 170px);
  }

  :root[data-theme="dark"] {
    --maze-w: clamp(120px, 23vw, 190px);
  }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --gutter: 20px;
    --maze-w: 46px;
  }

  :root[data-theme="dark"] {
    --maze-w: 54px;
    --maze-bg-w: 136px;
  }

  :root[data-theme="light"] {
    --maze-bg-w: 120px;
  }

  .page__main {
    padding-inline: 20px 18px;
  }

  .site-header {
    padding-top: 22px;
  }

  .header-actions {
    gap: 10px;
  }

  .lang__btn span {
    display: none;
  }

  .lang__btn {
    width: 34px;
    height: 34px;
    justify-content: center;
  }

  .lang__menu {
    inset-inline-end: -6px;
  }

  /* Hero */
  :root[data-theme="light"] .hero__title {
    font-size: clamp(2.5rem, 12.8vw, 3.6rem);
  }

  :root[data-theme="dark"] .hero__title {
    font-size: clamp(2.2rem, 10.6vw, 3.2rem);
  }

  .eyebrow {
    font-size: 0.78rem;
  }

  /* Signup: stacked, full width, thumb-friendly */
  .signup__row {
    flex-direction: column;
  }

  :root[data-theme="dark"] .signup__row {
    gap: 8px;
  }

  .signup__input,
  .btn-primary {
    width: 100%;
    height: 48px;
  }

  :root[data-theme="light"] .signup__input {
    border-bottom: 0;
  }

  .btn-primary,
  :root[data-theme="dark"] .btn-primary,
  :root[data-theme="light"] .btn-primary {
    min-width: 0;
  }

  .signup__input {
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  /* Video */
  .video-card {
    aspect-ratio: 4 / 3.4;
  }

  .video-card__title {
    max-width: calc(100% - 32px);
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  /* Evidence header: title, lead, then controls */
  .evidence__head {
    grid-template-columns: 1fr;
  }

  .evidence__controls {
    grid-row: 3;
    margin-top: 14px;
  }

  .ctrl-btn {
    flex: 1;
    justify-content: center;
    height: 42px;
  }

  /* Footer */
  .site-footer {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  :root[data-theme="dark"] .site-footer__rule {
    display: none;
  }

  .site-footer__tagline {
    margin-inline-start: auto;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__tagline {
    margin-inline-start: 0;
  }
}

/* Short landscape screens */
@media (max-height: 480px) and (orientation: landscape) {
  .maze {
    height: 100vh;
  }
}
