/* fl718-cdmx-2022-2023.css - CDMX 2022-2023 (Mexico City, page A), desktop styles
   Version: 1.0.0
   Last updated: 2026-12-03
   Built by Photo Pages/Location Pages/Mexico City/Year Pages/CDMX 2022-2023/ship-tools/build_ship.py from the signed-off
   cdmx-2022-2023-index.html; do not hand-edit, change the builder and rerun.
   Every selector opens with body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page): the registry loads this sheet on BOTH viewports (the phone
   sheet depends on its handle), so the scope keeps the desktop rules off the phone template. The phone sheet
   is self-sufficient. No overflow-x:hidden; :hover only inside the grid script's (hover:hover) and (pointer:fine) gate.
   Dropped on purpose: the prototype's .fl718-cdmx2223-navstub and its after-content stand-in (the shared component owns that). */

    /* ============================================================
       ALL CSS SCOPED TO: body.fl718-cdmx-2022-2023-page
       Every rule below uses this body class as its scope prefix.
       Never write an unscoped rule.
       ============================================================ */

    /* ------------------------------------------------------------
       BASE. Palette (his "yes to all", 2026-11-28): body #ebe9e6, text #1c1b19,
       hero starts on black, no invented accent, never #c44536 (reserved for
       the menu/footer frame). Muted #66635e and rules #d3d0cb are the NYC 2023
       neutrals, used only by the after-content stand-in.
       First-paint rule (Web_Animation_Reference.md, first-paint flash): the body
       paints a dark first-viewport band BEFORE the hero markup parses, so a
       slow script never flashes beige above the black start.
       ------------------------------------------------------------ */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) {
      margin: 0;
      padding: 0;
      /* overflow-x: clip, NOT hidden: hidden creates a scroll container
         that breaks position:sticky and ScrollTrigger pins site-wide. */
      overflow-x: clip;
      background-color: #ebe9e6;
      background-image: linear-gradient(#0b0b0b, #0b0b0b);
      background-repeat: no-repeat;
      background-position: top left;
      background-size: 100% 100vh;
      color: #1c1b19;
      -webkit-font-smoothing: antialiased;
    }
    :where(body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page)) *,
    :where(body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page)) *::before,
    :where(body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page)) *::after { box-sizing: border-box; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) img { max-width: 100%; display: block; }

    /* ============================================================
       HERO. Black start state lives HERE, in CSS: the photograph and all
       three text lines start at opacity 0 and nothing overrides that while
       JS is merely pending. Their end states live in the matched-pair
       rules below (.fl718-no-gsap, <noscript>, scripting:none, reduced
       motion). Ship the start and the end together or not at all.

       Hero height rule: calc(100vh + 56px), no negative margin (the prototype's 56px stand-in element does not exist on the live site).
       ============================================================ */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero {
      position: relative;
      width: 100%;
      height: calc(100vh + 56px);   /* live: no 56px spacer above the hero (measured on the NYC pages), so no -56px pull; the type math below still counts the 56px below the fold */
      overflow: clip;
      background-color: #0b0b0b;
      container-type: size;           /* every cq unit below = this box */
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero {
      --iw: max(100cqw, 177.7778cqh);              /* cover-rendered image width, shared by the type and the entrance */
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__stage { position: absolute; inset: 0; transform-origin: 0 0; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: 0% 100%;       /* bottom-left-anchored (his pick, 2026-11-29): a narrow window crops the RIGHT edge only, the woman and kid at the left always stay: a wide window crops sky, never the type */
      display: block;
      color: transparent; font-size: 0;   /* QA 1: if the photo fails, its alt text must not paint in the corner */
      opacity: 0;                     /* START STATE (black hero); entrance = hero script */
    }

    /* Text block: image-space, bottom-left. START VALUES, tuned in Step 3 on
       the real crop. Measured zones on the 1600x900 frame (editorial notes):
       black mirror base x 380-690 / y 740-900 (white type reads well);
       white dress fabric x 0-300 / y 620-800 (washes white type out: avoid);
       pavement right of x 700 mid-grey; the woman in the mirror (x ~36%,
       y ~45%) and the pair at far right (x > 76%) carry the subjects.
       So: left edge at 23.75% of the image width (x 380), width 42%
       (ends x 1052, short of the pillar at 1090), bottom edge 1.5% above the
       image bottom plus 56px (the hero is 100vh + 56px and its lowest 56px sit
       below the fold, so the type must clear them). --iw is the cover-rendered
       image width; 16:9 so its height is --iw * .5625. */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__text {
      --iw: max(100cqw, 177.7778cqh);
      position: absolute;
      z-index: 5;
      inset: 0;                        /* full overlay: each line is placed on its own in image space (his placer numbers, 2026-11-29) */
      --ix: 0px;            /* image left edge (left-anchored) */
      --iy: calc(100cqh - var(--iw) * .5625);          /* image top edge (bottom-anchored) */
      color: #f4f2ec;
      text-shadow: 0 1px 14px rgba(6, 5, 5, .45);
      pointer-events: none;
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__title {
      display: block;
      position: absolute;
      left: calc(var(--ix) + var(--iw) * .1845);
      top: calc(var(--iy) + (var(--iw) * .5625 - 56px) * .7607);   /* y = fraction of the image above the fold (the hero's lowest 56px sit below it) */
      margin: 0;
      font: 800 calc(var(--iw) * .0356) / .95 'Fraunces', serif;
      letter-spacing: .005em;
      text-transform: none;           /* title case, his pick */
      color: #f4f2ec;
      opacity: 0;                     /* START STATE */
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__yearrow {
      display: flex;
      position: absolute;
      left: calc(var(--ix) + var(--iw) * .1845);
      top: calc(var(--iy) + (var(--iw) * .5625 - 56px) * .835);   /* y = fraction of the image above the fold (the hero's lowest 56px sit below it) */
      align-items: center;
      gap: calc(var(--iw) * .0075);
      margin: 0;
      font: 400 calc(var(--iw) * .0150) / 1 'Bungee', sans-serif;  /* year in Bungee, his pick 2026-11-29 (shop-sign block letters; stand-in for painted lettering) */
      letter-spacing: .06em;
      opacity: 0;                     /* START STATE */
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__rule {
      display: block;
      width: calc(var(--iw) * .04);
      height: 1px;
      background: #f4f2ec;
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__by {
      display: block;
      position: absolute;
      left: calc(var(--ix) + var(--iw) * .185);
      top: calc(var(--iy) + (var(--iw) * .5625 - 56px) * .875);   /* y = fraction of the image above the fold (the hero's lowest 56px sit below it) */
      width: calc(var(--iw) * .42);
      margin: 0;
      color: #efd58a;                 /* the byline keeps the street's soft yellow (his ask: one line keeps colour) */
      font: italic 300 calc(var(--iw) * .013) / 1.42 'DM Sans', sans-serif;
      opacity: 0;                     /* START STATE */
    }

    /* MATCHED END STATES. Equal-or-higher specificity than the start rules
       above (the extra class on <body> or the later position in the sheet),
       so none of these can lose to the hiding rule. Inline GSAP styles still
       win at runtime. Four ways in: the script failed (.fl718-no-gsap), JS is
       off (<noscript> block in <head> + @media scripting), reduced motion. */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page).fl718-no-gsap .fl718-cdmx2223-hero__img   { opacity: 1; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page).fl718-no-gsap .fl718-cdmx2223-hero__title { opacity: 1; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page).fl718-no-gsap .fl718-cdmx2223-hero__yearrow { opacity: .95; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page).fl718-no-gsap .fl718-cdmx2223-hero__by    { opacity: .92; }
    @media (scripting: none) {
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__img   { opacity: 1; }
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__title { opacity: 1; }
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__yearrow { opacity: .95; }
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__by    { opacity: .92; }
    }
    @media (prefers-reduced-motion: reduce) {
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__img   { opacity: 1; }
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__title { opacity: 1; }
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__yearrow { opacity: .95; }
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__by    { opacity: .92; }
    }

    /* ============================================================
       GALLERY GRID. CSS-columns masonry, NYC 2023 defaults: 3 columns,
       8px gutters, 8px frame, 14vh above and 12vh below. 106 photographs,
       FIVE of them portrait (2:3, grid positions 19, 26, 36, 38, 41); the
       height each portrait reserves comes from its declared width/height.
       Sequence = his export sequences/cdmx-2022-2023-desktop-sequence-2026-11-29.md
       (tentatively locked). Columns land 36/33/37 naturally at 1024-2560 wide; no
       break-before needed. Positions 16 and 23 are shared with live NYC 2023.
       ============================================================ */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-grid {
      columns: 3;
      column-gap: 8px;
      padding: 8px;
      padding-top: 14vh;
      padding-bottom: 12vh;
    }
    /* The one legitimate size-driven breakpoint: 3 -> 2 columns. The 1-column
       step is the mobile template's job (Step 5); it is here only so a narrow
       desktop window is not absurd. Nothing under 769px is polished. */
    @media (max-width: 768px) {
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-grid { columns: 2; padding-top: 10vh; }
    }
    @media (max-width: 480px) {
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-grid { columns: 1; }
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-item {
      break-inside: avoid;
      margin: 0 0 8px 0;
      position: relative;
      display: block;
      cursor: pointer;
      isolation: isolate;
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-item:focus { outline: none; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-item:focus-visible { outline: 2px solid #403e3c; outline-offset: 3px; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-item img {
      width: 100%;
      height: auto;
      display: block;
      opacity: 0;                     /* START STATE: neutral reveal (grid script) */
    }
    /* GRID ENTRANCE "Double image": the ghost overlay. Clipped to the tile frame
       (the tile itself is NOT clipped, so its focus ring still shows), no pointer
       events. The .fl718-cdmx2223-ghost img rule must out-rank the tile img start state. */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-ghosts { position: absolute; inset: 0; z-index: 2; overflow: clip; pointer-events: none; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-ghost { position: absolute; inset: 0; isolation: isolate; opacity: 0; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-ghost img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 1; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-item .fl718-cdmx2223-ghost img { opacity: 1; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-ghost i { position: absolute; inset: 0; mix-blend-mode: multiply; }
    /* MATCHED END STATES for the grid reveal. */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-item.fl718-cdmx2223-in img { opacity: 1; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page).fl718-no-gsap .fl718-cdmx2223-item img { opacity: 1; }
    @media (scripting: none) {
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-item img { opacity: 1; }
    }
    @media (prefers-reduced-motion: reduce) {
      body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-item img { opacity: 1; }
    }
    /* HOVER: see Script 3b (Double take). */
    /* <picture> wrappers (the shared photo helper emits one per tile and per hero): block, and the hero one fills the stage like the bare img did. */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-item picture { display: block; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-hero__stage picture { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

    /* ============================================================
       LIGHTBOX, the standard QUIET contract (flaneur-photo-gallery -> Lightbox).
       Layer 1 (9000) dark | Layer 2 (9100) stage | Layer 3 (9200) UI.
       Solid #0a0908; no counter; no caption; a faint glyph-only close.
       State-scoping contract: every control is pointer-events:none by default;
       auto is granted ONLY under the --active class. A closed lightbox must
       never swallow a click on the photo beneath it.
       Signature (his pick 2026-11-30): a quiet ghost echo on OPENING only; arrows
       and close stay a plain fade.
       ============================================================ */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-dark {
      position: fixed; inset: 0; background: #0a0908;
      opacity: 0; z-index: 9000; pointer-events: none;
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-stage {
      position: fixed; inset: 0; z-index: 9100;
      display: flex; align-items: center; justify-content: center;
      padding: 60px 72px;             /* 72px sides: clear of the 44px arrows at 24px from the edge */
      opacity: 0; pointer-events: none;
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-stage--active { pointer-events: auto; }
    /* LIGHTBOX ECHO (opening only): a thin overlay laid over the lightbox photo, clipped to its box, never on the photo layer. */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-echo { position: absolute; inset: 0; overflow: clip; pointer-events: none; z-index: 2; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-echo__g { position: absolute; inset: 0; isolation: isolate; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-echo__g img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-echo__g i { position: absolute; inset: 0; mix-blend-mode: multiply; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-image-wrap {
      position: relative; max-width: 100%; max-height: 100%;
      display: flex; align-items: center; justify-content: center;
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-image {
      max-width: 100%; max-height: calc(100vh - 120px);
      width: auto; height: auto;
      display: block;
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-ui {
      position: fixed; inset: 0; z-index: 9200; opacity: 0; pointer-events: none;
    }
    /* Close and arrows. GeneratePress styles every <button> (button:focus at
       specificity 0,1,1 beats a bare class), so EVERY state is declared at
       this scope. Rest 22% white, hover 55%, per the quiet default. */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-close-btn,
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-nav {
      position: fixed; background: transparent; border: none; border-radius: 50%;
      width: 44px; height: 44px; padding: 0; margin: 0;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; pointer-events: none;
      color: rgba(238, 236, 233, .22);
      transition: color .35s ease;
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-ui--active .fl718-cdmx2223-lb-close-btn,
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-ui--active .fl718-cdmx2223-lb-nav { pointer-events: auto; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-close-btn:hover,
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-nav:hover,
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-close-btn:focus,
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-nav:focus,
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-close-btn:active,
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-nav:active { background: transparent; border: none; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-close-btn:hover,
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-nav:hover { color: rgba(238, 236, 233, .55); }
    /* Keyboard ring: CLEARLY visible (2px off-white, 2px offset, about 12:1 on
       the backdrop). Never Chrome's default blue on an unstyled control. */
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-close-btn:focus-visible,
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-nav:focus-visible { outline: 2px solid #eeece9; outline-offset: 2px; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-close-btn svg,
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-nav svg {
      width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.25; fill: none;
    }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-close-btn { top: 24px; right: 24px; }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
    body.fl718-cdmx-2022-2023-page:not(.fl718-cdmx-2022-2023-mobile-page) .fl718-cdmx2223-lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
  
