/* ==========================================================================
   Last One Standing — Responsive rules (revamped)
   Breakpoints: ≤1280px laptop, ≤1024px tablet landscape,
                ≤768px tablet portrait / large phone, ≤560px phone

   Type strategy: desktop sizes live in styles.css (mostly clamp()).
   These overrides cap the oversized display faces and step body text
   down at each breakpoint so nothing looks bloated on small screens.
   ========================================================================== */

/* --------------------------------------------------------------------------
   ≤ 1280px — compact laptop
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .brand__tagline {
    display: none;
  }

  .format-card {
    flex-basis: calc((100% - 28px) / 2);
  }

  .news-card {
    flex-basis: calc((100% - 84px) / 4);
  }
}

/* --------------------------------------------------------------------------
   ≤ 1024px — tablet landscape: nav collapses, grids tighten
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --header-height: 80px;
  }

  .site-nav,
  .site-header__cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .mobile-menu {
    display: flex;
  }

  /* Media filters: even chip grid — everything fits on screen, no scroll */
  .media__filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
    margin-bottom: 40px;
  }

  .media__filters .tab-btn {
    padding: 8px 8px;
    font-size: 1.15rem;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
  }

  /* Typography — first step down */
  .heading-xl {
    font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  }

  .cta__title {
    font-size: clamp(2.5rem, 5.5vw, 4rem);
  }

  .entries-card__value {
    font-size: clamp(3.75rem, 6vw, 5.5rem);
    letter-spacing: 5px;
  }

  /* Layout */
  .countdown__grid,
  .about__grid,
  .partner__grid {
    grid-template-columns: 1fr;
  }

  .entries-card {
    max-width: 480px;
  }

  .challenges__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .challenges__head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .format-card {
    flex-basis: calc((100% - 28px) / 2);
  }

  .news-card {
    flex-basis: calc((100% - 56px) / 3);
  }

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

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

  .prize__info {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .prize__info-item {
    border-left: 0;
    border-top: 1px solid #dcdcdc;
    padding: 32px 0 0;
  }

  .prize__info-item:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .site-footer__columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__arrows {
    /* stats + arrows no longer share a row; pin the arrows
       to the bottom-right of the hero content instead */
    position: absolute;
    z-index: 3;
    right: 32px;
    bottom: 28px;
  }
}

/* --------------------------------------------------------------------------
   ≤ 768px — tablet portrait / large phone
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* ----- Typography: display faces scale with the viewport, not a big min ----- */
  .heading-xl {
    font-size: clamp(1.875rem, 7.5vw, 2.5rem);
  }

  .hero__title {
    font-size: clamp(2.5rem, 9.5vw, 3.25rem);
  }

  .hero__lead {
    font-size: 1.0625rem;
  }

  .hero__edition {
    font-size: 0.875rem;
    letter-spacing: 0.18em;
  }

  .hero__stat-value {
    font-size: clamp(1.375rem, 5vw, 1.75rem);
  }

  .hero__stat-label {
    font-size: 0.875rem;
  }

  .cta__title {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }

  .cta__text {
    font-size: 1.0625rem;
  }

  .countdown__value {
    font-size: clamp(1.875rem, 8vw, 2.5rem);
  }

  .countdown__unit {
    font-size: 0.9375rem;
  }

  .entries-card__value {
    font-size: clamp(3rem, 14vw, 4rem);
    letter-spacing: 4px;
  }

  .format-card__title {
    font-size: clamp(1.375rem, 5vw, 1.75rem);
  }

  .news-card__title {
    font-size: 1.5rem;
  }

  .venue-bar__value {
    font-size: 1.25rem;
  }

  .media__filters {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }

  .media__filters .tab-btn {
    font-size: 1.05rem;
    padding: 7px 6px;
  }

  .about__pillar-title {
    font-size: 1.375rem;
  }

  .section {
    padding-block: clamp(48px, 9vw, 64px);
  }

  /* ----- Layout ----- */
  .venue-bar__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .venue-bar__item {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding: 24px 0 0;
  }

  .venue-bar__item:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .countdown__timer {
    grid-template-columns: repeat(2, 1fr);
  }

  .countdown__cell:nth-child(2) {
    border-right: 0;
  }

  .countdown__cell:nth-child(-n+2) {
    border-bottom: 1px solid var(--color-line);
  }

  .countdown__cell--accent {
    border-color: var(--color-red);
  }

  .countdown__title {
    margin-bottom: 32px;
  }

  .challenges__grid,
  .prize__columns {
    grid-template-columns: 1fr;
  }

  .format-card {
    flex-basis: 100%;
  }

  .news-card {
    flex-basis: calc((100% - 28px) / 2);
  }

  .carousel__arrows {
    position: static;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
  }

  .hero {
    min-height: 0;
  }

  .hero__content {
    padding-block: 64px 96px;
  }

  .hero__stat {
    flex: 1 1 100%;
    padding: 12px 18px;
  }

  .hero__stats {
    width: 100%;
  }

  .hero__stat--red {
    flex: 1 1 100%;
  }

  .hero__arrows {
    right: 24px;
  }

  .site-footer__columns {
    grid-template-columns: 1fr;
  }

  .site-footer__legal {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------------
   ≤ 560px — phone: compact type scale + tighter chrome
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
  :root {
    --container-pad: 20px;
    --header-height: 64px;
  }

  /* ----- Header ----- */
  .brand__logo {
    height: 44px;
  }

  /* ----- Buttons: smaller, full-width where stacked ----- */
  .btn {
    min-height: 48px;
    padding: 0 22px;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
  }

  .hero__actions .btn,
  .format-card .btn {
    font-size: 0.9375rem;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .cta .btn {
    width: 100%;
    min-width: 0;
  }

  /* ----- Headlines ----- */
  .heading-xl {
    font-size: 2rem;
    line-height: 1.05;
  }

  .hero__title {
    font-size: clamp(2.125rem, 11vw, 2.5rem);
  }

  .hero__lead {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .hero__edition {
    font-size: 0.8125rem;
  }

  .hero__content {
    padding-block: 56px 88px;
  }

  .hero__stat-value {
    font-size: 1.5rem;
  }

  .hero__stat-label {
    font-size: 0.8125rem;
  }

  .cta__title {
    font-size: clamp(1.875rem, 9vw, 2.125rem);
  }

  .cta__text {
    font-size: 1rem;
  }

  /* ----- Stats / numbers ----- */
  .countdown__value {
    font-size: clamp(1.75rem, 9vw, 2rem);
  }

  .countdown__unit {
    font-size: 0.8125rem;
  }

  .countdown__cell {
    padding: 20px 10px;
  }

  .entries-card {
    padding: 24px 20px;
  }

  .entries-card__label {
    margin-bottom: 20px;
    font-size: 0.8125rem;
  }

  .entries-card__value {
    font-size: clamp(2.75rem, 16vw, 3.25rem);
    letter-spacing: 2px;
  }

  .venue-bar__value {
    font-size: 1.125rem;
  }

  .media__filters {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
    margin-bottom: 32px;
  }

  .media__filters .tab-btn {
    font-size: 0.95rem;
    padding: 6px 4px;
    border-radius: 8px;
  }

  /* ----- Cards ----- */
  .format-card__title {
    font-size: 1.375rem;
    margin: 4px 0;
  }

  .format-card .btn {
    width: 100%;
  }

  .news-card {
    flex-basis: 100%;
  }

  .news-card__title {
    font-size: 1.375rem;
  }

  .news-card__date {
    margin: 14px 0 6px;
    font-size: 0.9375rem;
  }

  .news-card__source {
    font-size: 0.9375rem;
  }

  .challenge-card__number {
    font-size: 0.8125rem;
  }

  .challenge-card__name {
    font-size: 1.125rem;
    border-bottom-width: 2px;
  }

  .about__pillar-title {
    font-size: 1.25rem;
  }

  .about__pillar-text {
    font-size: 0.9375rem;
  }

  /* ----- Prize / FAQ ----- */
  .prize__panel {
    padding: 24px 16px;
  }

  .prize__col-title {
    font-size: 1.125rem;
    margin-bottom: 16px;
  }

  .prize__row {
    padding: 12px 10px;
    font-size: 0.9375rem;
  }

  .prize__info-text {
    font-size: 1.0625rem;
  }

  .prize__info-note {
    font-size: 0.875rem;
  }

  .prize__tabs .tab-btn--wide {
    min-width: 0;
    width: 100%;
  }

  .faq__tabs .tab-btn,
  .challenges__toggle .tab-btn,
  .compete__toggle .tab-btn {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
  }

  .compete__toggle .tab-btn {
    min-width: 0;
  }

  .accordion-item__trigger {
    padding: 18px 16px;
    font-size: 1rem;
  }

  .challenges__intro {
    font-size: 1rem;
  }

  /* ----- Lightbox ----- */
  .lightbox__caption {
    font-size: 0.9375rem;
  }

  /* ----- Footer ----- */
  .site-footer__heading {
    font-size: 1.25rem;
    margin-bottom: 16px;
  }

  .site-footer__about-text,
  .site-footer__legal {
    font-size: 0.875rem;
  }

  .site-footer__links a {
    font-size: 0.9375rem;
  }

  .site-footer__email {
    font-size: 1.0625rem;
  }

  .site-footer__help {
    font-size: 1rem;
  }

  .site-footer__brands {
    flex-direction: column;
    align-items: flex-start;
  }

  /* ----- Mobile menu ----- */
  .mobile-menu__link {
    font-size: 1.0625rem;
    padding: 14px 6px;
  }
}
