/*==================================================================
  Χ.Α.Ν.Θ. — MEDIA QUERIES
  ------------------------------------------------------------------
  The handoff is fixed at a 1447px column with no breakpoints
  designed. This implements the responsive pass it recommends
  (README § Responsive) — flagged as needing designer review.

  Desktop-first. Where a change is purely a matter of scale, the
  token is redefined rather than the rule, so it cascades to every
  component that uses it.

  Ladder: 1560 / 1300 / 1200 / 1000 / 900 / 768 / 640 / 576
==================================================================*/


/*==================== max-width: 1560px ====================*/
/* content column stops being 1447px and starts riding the gutters */
@media only screen and (max-width: 1560px) {
    :root {
        --w-split-media: 520px;
        --panel-column-gap: 50px;
    }
}


/*==================== max-width: 1300px ====================*/
/* The wedges never touch the copy — their reach is measured off the room the
   column leaves them (main.css § 2) — but from here down that room is the bare
   gutter, so they crowd the text rather than framing it. Dropped whole below
   this width: the layer holds nothing but the two of them. */
@media only screen and (max-width: 1300px) {
    .backdrop {
        display: none;
    }
}


/*==================== max-width: 1200px ====================*/
@media only screen and (max-width: 1200px) {
    :root {
        --size-42: 36px;
        --lh-60: 48px;

        --w-split-media: 420px;
        --split-img-h: 340px;

        --sp-66: 54px;
        --sp-70: 44px;
        --card-pd: 34px 36px 38px;
    }
}


/*==================== max-width: 1000px ====================*/
@media only screen and (max-width: 1000px) {
    :root {
        --main-pd-top-home: 48px;
        --main-pd-bottom: 64px;
        --sp-60: 48px;
    }

    /* image first, then text */
    .split,
    .split--reverse {
        flex-direction: column;
    }

    .split__media {
        flex: 0 0 auto;
        width: 100%;
    }

    .split__media img {
        height: 300px;
    }

    .split__text {
        padding-top: 0;
    }

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


/*==================== max-width: 900px ====================*/
@media only screen and (max-width: 900px) {
    :root {
        --size-42: 32px;
        --size-34: 28px;
        --lh-44: 38px;
    }

    /* header collapses to logo + hamburger; lang moves into the drawer */
    .nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .prose-panel {
        column-count: 1;
        column-rule: none;
    }

    .card-row {
        flex-direction: column;
        gap: var(--sp-26);
    }

    .card {
        width: 100%;
    }

    .modal__stage {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}


/*==================== max-width: 768px ====================*/
@media only screen and (max-width: 768px) {
    :root {
        --header-h: 88px;
        --size-26: 23px;
        --size-20: 18px;
        --lh-34: 30px;

        --split-img-h: 240px;
        --card-pd: 28px 26px 32px;
        --panel-pd: 32px 28px;
        --card-watermark: 220px;

        --footer-h: 152px;   /* logo over links */
    }

    .photo-pair {
        flex-wrap: wrap;
    }

    /* the pair stacks: each photo takes the column, up to its own width. The
       zoom button is what carries that here — the image only fills it */
    .photo-pair .zoom,
    .photo-pair > img {
        width: 100%;
        max-width: var(--photo-pair-w);
        margin-inline: auto;
    }

    .photo-pair .zoom img {
        width: 100%;
    }

    .footer__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sp-20);
    }
}


/*==================== max-width: 640px ====================*/
@media only screen and (max-width: 640px) {
    .video-grid {
        grid-template-columns: 1fr;
    }

    .video-card__thumb {
        height: auto;
        aspect-ratio: 16 / 10;
    }
}


/*==================== max-width: 576px ====================*/
@media only screen and (max-width: 576px) {
    :root {
        --gutter: var(--gutter-sm);

        --size-42: 27px;
        --size-34: 24px;
        --size-18: 16px;
        --size-17: 16px;
        --lh-60: 36px;
        --lh-44: 32px;
        --lh-30: 27px;
        --lh-29: 27px;

        --main-pd-top: 28px;
        --main-pd-top-home: 36px;
        --sp-66: 44px;
        --sp-60: 40px;
        --sp-46: 32px;

        --footer-h: 178px;   /* logo over stacked links */
    }

    .footer__links {
        flex-direction: column;
        gap: var(--sp-10);
    }
}
