/* fl718-quito.css — Quito desktop styles
   Version: 1.0.0
   Last updated: 2026-05-15
   Scoped to: body.fl718-quito-page
   All rules prefixed with body class — no unscoped selectors.
*/

/* ------------------------------------------------------------
   BASE RESET & BODY
   ------------------------------------------------------------ */
body.fl718-quito-page {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
  background-color: #f0f0ee;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

/* GP content wrappers stripped — prevents white box + padding from separate-containers layout */
body.fl718-quito-page .inside-article,
body.fl718-quito-page .site-main,
body.fl718-quito-page .content-area {
  padding: 0;
  margin: 0;
  background: transparent;
}

/* Box-sizing via :where() — zero specificity, never fights other rules */
:where(body.fl718-quito-page) *,
:where(body.fl718-quito-page) *::before,
:where(body.fl718-quito-page) *::after {
  box-sizing: border-box;
}

body.fl718-quito-page img {
  max-width: 100%;
  display: block;
}

/* ------------------------------------------------------------
   VISUALLY HIDDEN — accessible text, not visible on screen.
   ------------------------------------------------------------ */
body.fl718-quito-page .fl718-quito-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

body.fl718-quito-page .fl718-quito-hero {
  position: relative;
  width: 100%;
  height: calc(100vh + 56px);
  margin-top: -56px; /* pull hero under fixed nav — eliminates gap when nav retracts */
  overflow: clip;
  background-color: #e8e9ea;
}

body.fl718-quito-page .fl718-quito-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  display: block;
  opacity: 0;
  transform-origin: center center;
}

/* ============================================================
   HERO GRADIENT — upper portion atmosphere.
   ============================================================ */
body.fl718-quito-page .fl718-quito-hero__gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 65%;
  background:
    linear-gradient(to bottom, rgba(8, 10, 14, 0.48) 0%, transparent 100%),
    radial-gradient(ellipse at 50% 0%, rgba(10, 14, 20, 0.50) 0%, transparent 70%);
  z-index: 5;
  pointer-events: none;
}

/* ============================================================
   HERO TITLE BLOCK
   ============================================================ */
body.fl718-quito-page .fl718-quito-hero__title-block {
  position: absolute;
  top: clamp(32px, 9vh, 72px);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
  pointer-events: none;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Eyebrow — "Ecuador" */
body.fl718-quito-page .fl718-quito-hero__eyebrow {
  display: block;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(8px, 0.72vw, 10px);
  font-weight: 300;
  font-style: normal;
  letter-spacing: 0.50em;
  text-transform: uppercase;
  color: rgba(240, 244, 248, 0.82);
  text-shadow: 0 1px 8px rgba(4, 6, 10, 0.45);
  margin-bottom: 16px;
  line-height: 1;
  opacity: 0;
}

/* "Quito" — Libre Baskerville 400, editorial weight, mixed case. */
body.fl718-quito-page .fl718-quito-hero__title {
  display: block;
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(54px, 7.0vw, 106px);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.10em;
  color: rgba(240, 244, 248, 0.97);
  line-height: 0.92;
  margin: 0;
  opacity: 0;
  text-shadow: 0 2px 24px rgba(4, 6, 10, 0.50), 0 1px 6px rgba(4, 6, 10, 0.30);
}

/* Subtitle block */
body.fl718-quito-page .fl718-quito-hero__subtitle-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
  opacity: 0;
}

/* Thin horizontal rule */
body.fl718-quito-page .fl718-quito-hero__subtitle-rule {
  display: block;
  width: 28px;
  height: 1px;
  background: rgba(240, 244, 248, 0.38);
}

/* Subtitle text block */
body.fl718-quito-page .fl718-quito-hero__subtitle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Location line — "South America" */
body.fl718-quito-page .fl718-quito-hero__location {
  display: block;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(9px, 0.88vw, 12px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.22em;
  color: rgba(240, 244, 248, 0.78);
  text-shadow: 0 1px 8px rgba(4, 6, 10, 0.45);
}

/* Year — Caveat handwriting */
body.fl718-quito-page .fl718-quito-hero__year {
  display: block;
  font-family: 'Caveat', cursive;
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(240, 244, 248, 0.65);
  text-shadow: 0 1px 8px rgba(4, 6, 10, 0.45);
  margin-top: 6px;
  line-height: 1;
}

/* Reduced motion: show all hero text immediately at final state. */
@media (prefers-reduced-motion: reduce) {
  body.fl718-quito-page .fl718-quito-hero__image {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  body.fl718-quito-page .fl718-quito-hero__eyebrow,
  body.fl718-quito-page .fl718-quito-hero__title,
  body.fl718-quito-page .fl718-quito-hero__subtitle-block {
    opacity: 1 !important;
    transform: none !important;
  }
  body.fl718-quito-page .fl718-quito-hero__air-veil {
    opacity: 0 !important;
  }
  body.fl718-quito-page .fl718-quito-hero__lightbar {
    display: none !important;
  }
}

/* ============================================================
   GALLERY GRID — 3-column masonry layout
   ============================================================ */

body.fl718-quito-page .fl718-quito-grid {
  columns: 3;
  column-gap: 8px;
  padding: 8px;
  padding-top: 0;
  padding-bottom: 12vh;
}

@media (max-width: 768px) {
  body.fl718-quito-page .fl718-quito-grid {
    columns: 2;
    padding-top: 10vh;
  }
}

@media (max-width: 480px) {
  body.fl718-quito-page .fl718-quito-grid {
    columns: 1;
    padding: 8px;
    padding-top: 8vh;
    padding-bottom: 8vh;
  }
}

/* ------------------------------------------------------------
   GALLERY ITEMS — shared base
   ------------------------------------------------------------ */

body.fl718-quito-page .fl718-quito-item {
  break-inside: avoid;
  margin: 0 0 8px 0;
  overflow: clip;
  cursor: pointer;
  position: relative;
  display: block;
  opacity: 0;
}

body.fl718-quito-page .fl718-quito-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   HOVER EFFECT — "The Cloud Crosses"
   ============================================================ */

body.fl718-quito-page .fl718-quito-item__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(185, 200, 218, 0.30) 0%,
    rgba(185, 200, 218, 0.18) 35%,
    rgba(185, 200, 218, 0.08) 70%,
    rgba(185, 200, 218, 0.02) 100%
  );
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  transform: translateY(-100%);
}

@media (prefers-reduced-motion: reduce) {
  body.fl718-quito-page .fl718-quito-item__veil {
    display: none !important;
  }
}

/* ============================================================
   LIGHTBOX — "The Window Opens"
============================================================ */

/* Dark veil — cool altitude sky */
body.fl718-quito-page .fl718-quito-lb-dark {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 60% at 50% 50%,
    rgba(14, 18, 26, 0.88) 0%,
    rgba(8, 12, 20, 0.96) 60%,
    rgba(4, 6, 12, 0.99) 100%
  );
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
}

/* Stage — positioning layer */
body.fl718-quito-page .fl718-quito-lb-stage {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}

body.fl718-quito-page .fl718-quito-lb-stage--active {
  pointer-events: auto;
}

/* Backdrop — sibling of image-wrap, NOT child. */
body.fl718-quito-page .fl718-quito-lb-backdrop {
  position: fixed;
  inset: 0;
  cursor: pointer;
  z-index: 0;
}

/* Photo wrap */
body.fl718-quito-page .fl718-quito-lb-image-wrap {
  position: relative;
  z-index: 1;
  max-width: min(88vw, 1200px);
  max-height: 88vh;
  box-shadow:
    0 0 0 1px rgba(160, 180, 210, 0.10),
    0 12px 70px rgba(4, 6, 12, 0.65),
    0 0 140px rgba(4, 6, 12, 0.35);
}

body.fl718-quito-page .fl718-quito-lb-image {
  display: block;
  max-width: min(88vw, 1200px);
  max-height: 88vh;
  object-fit: contain;
  opacity: 0;
  filter: brightness(1.5) saturate(0);
}

/* Caption — analog photos only */
body.fl718-quito-page .fl718-quito-lb-caption {
  position: absolute;
  bottom: -1.8rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 300;
  font-style: italic;
  color: rgba(220, 228, 236, 0.52);
  letter-spacing: 0.06em;
  margin: 0;
}

/* UI layer */
body.fl718-quito-page .fl718-quito-lb-ui {
  position: fixed;
  inset: 0;
  z-index: 9200;
  pointer-events: none;
  opacity: 0;
}

body.fl718-quito-page .fl718-quito-lb-ui--active {
  pointer-events: auto;
}

/* Close button */
body.fl718-quito-page .fl718-quito-lb-close-btn {
  position: absolute;
  top: clamp(1rem, 2.5vw, 1.8rem);
  right: clamp(1rem, 2.5vw, 1.8rem);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 18, 26, 0.40);
  border: 1px solid rgba(220, 228, 240, 0.12);
  border-radius: 50%;
  cursor: pointer;
  color: rgba(220, 228, 240, 0.80);
  transition: background 0.2s ease;
}

body.fl718-quito-page .fl718-quito-lb-close-btn:hover {
  background: rgba(100, 130, 180, 0.25);
  color: #fff;
}

body.fl718-quito-page .fl718-quito-lb-close-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* Counter */
body.fl718-quito-page .fl718-quito-lb-counter {
  position: absolute;
  bottom: clamp(1rem, 2.5vw, 1.8rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(220, 228, 240, 0.36);
  white-space: nowrap;
  pointer-events: none;
}

/* Prev/next nav */
body.fl718-quito-page .fl718-quito-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 18, 26, 0.22);
  border: none;
  cursor: pointer;
  color: rgba(220, 228, 240, 0.55);
  transition: background 0.2s ease, color 0.2s ease;
}

body.fl718-quito-page .fl718-quito-lb-nav:hover {
  background: rgba(100, 130, 180, 0.18);
  color: rgba(220, 228, 240, 0.90);
}

body.fl718-quito-page .fl718-quito-lb-nav svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.fl718-quito-page .fl718-quito-lb-prev { left: clamp(0.8rem, 2vw, 1.6rem); }
body.fl718-quito-page .fl718-quito-lb-next { right: clamp(0.8rem, 2vw, 1.6rem); }

body.fl718-quito-page .fl718-quito-lb-close-btn:focus-visible,
body.fl718-quito-page .fl718-quito-lb-nav:focus-visible {
  outline: 2px solid rgba(160, 190, 220, 0.60);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  body.fl718-quito-page .fl718-quito-lb-image-wrap {
    max-width: 100vw;
    max-height: 100svh;
  }
  body.fl718-quito-page .fl718-quito-lb-image {
    max-height: 88svh;
  }
  body.fl718-quito-page .fl718-quito-lb-prev { left: 0.25rem; }
  body.fl718-quito-page .fl718-quito-lb-next { right: 0.25rem; }
}

/* Reduced motion — lightbox appears instantly at final state. */
@media (prefers-reduced-motion: reduce) {
  body.fl718-quito-page .fl718-quito-lb-image {
    opacity: 1 !important;
    filter: none !important;
  }
}

/* ============================================================
   AFTER-CONTENT — International Static Burst pattern
   ============================================================ */

/* Container */
body.fl718-quito-page .fl718-quito-after {
  max-width: 960px;
  margin: 0 auto;
  padding: 80px 40px 140px;
}

/* 1. DATELINE */
body.fl718-quito-page .fl718-quito-after__dateline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 40px;
}

body.fl718-quito-page .fl718-quito-after__city {
  font-family: 'Courier Prime', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #2e3038;
}

body.fl718-quito-page .fl718-quito-after__sep {
  font-family: 'Courier Prime', monospace;
  font-size: 13px;
  font-weight: 400;
  color: #c2c4c8;
  margin: 0 20px;
  user-select: none;
}

body.fl718-quito-page .fl718-quito-after__coords {
  font-family: 'Courier Prime', monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #8a8e98;
}

body.fl718-quito-page .fl718-quito-after__year {
  font-family: 'Courier Prime', monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #8a8e98;
}

/* 2. DIVIDER RULE */
body.fl718-quito-page .fl718-quito-after__rule {
  width: 100%;
  height: 1px;
  background: #c2c4c8;
  margin-bottom: 36px;
  transform-origin: left center;
}

/* 3. EYEBROW */
body.fl718-quito-page .fl718-quito-after__eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #8a8e98;
  margin-bottom: 24px;
}

/* 4. SIBLING LOCATION CARDS */
body.fl718-quito-page .fl718-quito-after__strip {
  display: flex;
  gap: 14px;
  margin-bottom: 36px;
  overflow-x: clip;
}

/* Wipe bar */
body.fl718-quito-page .fl718-quito-wipe-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #111;
  transform: translateX(-100%);
  pointer-events: none;
  z-index: 9999;
}

/* Burst chars */
body.fl718-quito-page .fl718-quito-burst-char {
  position: fixed;
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: rgba(220, 228, 240, 0.90);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 200;
}

/* 5. BOTTOM RULE */
body.fl718-quito-page .fl718-quito-after__bottom-rule {
  width: 100%;
  height: 1px;
  background: #c2c4c8;
  margin-bottom: 28px;
}

/* BYLINE BLOCK — between hero and grid */
body.fl718-quito-page .fl718-quito-byline-block {
  padding: 72px clamp(40px, 5vw, 80px) 64px;
}

body.fl718-quito-page .fl718-quito-after__byline-line {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  color: #5a5e68;
  margin: 0;
  display: block;
}

/* 6b. TAXONOMY NAV — 2-col CSS grid */
body.fl718-quito-page .fl718-quito-after__taxonomy {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px 24px;
}

body.fl718-quito-page .fl718-quito-after__tax-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 6px;
}

body.fl718-quito-page .fl718-quito-after__tax-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c2c4c8;
  margin-right: 10px;
  white-space: nowrap;
}

body.fl718-quito-page .fl718-quito-after__tax-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8e98;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
  padding: 13px 0;
}

body.fl718-quito-page .fl718-quito-after__tax-link:hover {
  color: #2e3038;
}

/* Separators: hidden via CSS. JS runs harmlessly on them. */
body.fl718-quito-page .fl718-quito-after__tax-sep {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #c2c4c8;
  padding: 0 4px;
  user-select: none;
  display: none;
}

/* After-content animation initial states */
@media (prefers-reduced-motion: no-preference) {
  body.fl718-quito-page .fl718-quito-after__dateline  { opacity: 0; }
  body.fl718-quito-page .fl718-quito-after__rule      { transform: scaleX(0); }
  body.fl718-quito-page .fl718-quito-after__eyebrow   { opacity: 0; }
  body.fl718-quito-page .fl718-ws-city                { opacity: 0; }
  body.fl718-quito-page .fl718-quito-after__bottom-rule { opacity: 0; }
  body.fl718-quito-page .fl718-quito-after__taxonomy   { opacity: 0; }
}

/* Mobile */
@media (max-width: 700px) {
  body.fl718-quito-page .fl718-quito-after {
    padding: 64px 0 100px;
  }

  body.fl718-quito-page .fl718-quito-after__dateline {
    padding: 0 24px;
    flex-direction: column;
    gap: 6px;
  }

  body.fl718-quito-page .fl718-quito-after__sep {
    display: none;
  }

  body.fl718-quito-page .fl718-quito-after__rule,
  body.fl718-quito-page .fl718-quito-after__bottom-rule {
    margin-left: 24px;
    margin-right: 24px;
    width: calc(100% - 48px);
  }

  body.fl718-quito-page .fl718-quito-after__eyebrow {
    padding: 0 24px;
  }

  body.fl718-quito-page .fl718-quito-after__strip {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 0 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body.fl718-quito-page .fl718-quito-after__strip::-webkit-scrollbar {
    display: none;
  }

  body.fl718-quito-page .fl718-quito-after__taxonomy {
    grid-template-columns: 1fr;
    padding: 0 24px;
  }
}

/* ============================================================
   PREFERS-REDUCED-MOTION + NO-JS FALLBACKS
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  body.fl718-quito-page .fl718-quito-item {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  body.fl718-quito-page .fl718-quito-after__dateline,
  body.fl718-quito-page .fl718-quito-after__rule,
  body.fl718-quito-page .fl718-quito-after__eyebrow,
  body.fl718-quito-page .fl718-ws-city,
  body.fl718-quito-page .fl718-quito-after__bottom-rule,
  body.fl718-quito-page .fl718-quito-after__taxonomy {
    opacity: 1 !important;
    transform: none !important;
  }
}

body.fl718-quito-page:not(.fl718-js-loaded) .fl718-quito-item {
  opacity: 1;
  filter: none;
}
body.fl718-quito-page:not(.fl718-js-loaded) .fl718-quito-hero__image {
  opacity: 1;
}
body.fl718-quito-page:not(.fl718-js-loaded) .fl718-quito-hero__eyebrow,
body.fl718-quito-page:not(.fl718-js-loaded) .fl718-quito-hero__title,
body.fl718-quito-page:not(.fl718-js-loaded) .fl718-quito-hero__subtitle-block {
  opacity: 1;
}

/* ------------------------------------------------------------
   HERO ANIMATION SUPPORT — air veil + lightbar
   ------------------------------------------------------------ */
body.fl718-quito-page .fl718-quito-hero__air-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(232, 236, 240, 0.40);
  pointer-events: none;
  opacity: 1;
}

body.fl718-quito-page:not(.fl718-js-loaded) .fl718-quito-hero__air-veil {
  opacity: 0;
}

body.fl718-quito-page .fl718-quito-hero__lightbar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3vh;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.13) 50%,
    transparent 100%
  );
  z-index: 3;
  pointer-events: none;
  opacity: 0;
}
