/* fl718-peru.css — Peru desktop styles
   Version: 1.0.0
   Last updated: 2026-05-15
   Body class: fl718-peru-page
   Prototype source: Photo Pages/Location Pages/Peru/peru-index.html
*/

/* ============================================================
   ALL CSS SCOPED TO: body.fl718-peru-page
   Every rule uses this body class as scope prefix.
   Never write unscoped rules — they bleed into other pages.
   ============================================================ */

/* ------------------------------------------------------------
   BASE RESET & BODY
   GeneratePress article/content wrappers stripped — our template
   renders outside the GP article flow; these prevent the white
   box + padding that GP's separate-containers layout injects.
   ------------------------------------------------------------ */
body.fl718-peru-page {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background-color: #f0f0ed;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

body.fl718-peru-page .inside-article,
body.fl718-peru-page .site-main,
body.fl718-peru-page .content-area {
  padding: 0;
  margin: 0;
  background: transparent;
}

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

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

/* ------------------------------------------------------------
   VISUALLY HIDDEN — accessible text, not visible on screen.
   ------------------------------------------------------------ */
body.fl718-peru-page .fl718-peru-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-peru-page .fl718-peru-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  margin-top: -56px; /* pull hero under the fixed nav — eliminates the gap when nav retracts */
  overflow: clip;
  background-color: #e8e8e4;
}

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

/* ============================================================
   HERO GRADIENT — upper-left corner atmosphere.
   ============================================================ */
body.fl718-peru-page .fl718-peru-hero__gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 55%;
  height: 52%;
  background: radial-gradient(ellipse at 0% 0%, rgba(18, 20, 22, 0.42) 0%, transparent 75%);
  z-index: 5;
  pointer-events: none;
}

/* ============================================================
   HERO TITLE BLOCK
   ============================================================ */
body.fl718-peru-page .fl718-peru-hero__title-block {
  position: absolute;
  top: clamp(32px, 9vh, 72px);
  left: 0;
  padding: 0 clamp(28px, 4vw, 52px);
  z-index: 10;
  pointer-events: none;
}

body.fl718-peru-page .fl718-peru-hero__eyebrow {
  display: block;
  font-family: 'Spectral', Georgia, serif;
  font-size: clamp(9px, 0.82vw, 11px);
  font-weight: 200;
  font-style: italic;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: rgba(248, 246, 240, 0.42);
  margin-bottom: clamp(12px, 1.8vh, 22px);
  opacity: 0;
}

body.fl718-peru-page .fl718-peru-hero__title {
  display: block;
  font-family: 'Spectral', Georgia, serif;
  font-size: clamp(62px, 8.5vw, 128px);
  font-weight: 200;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: none;
  color: rgba(248, 246, 240, 0.90);
  line-height: 0.9;
  margin: 0;
  opacity: 0;
}

body.fl718-peru-page .fl718-peru-hero__year-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(14px, 2.2vh, 28px);
  opacity: 0;
}

body.fl718-peru-page .fl718-peru-hero__year-rule {
  display: block;
  width: 1px;
  height: 38px;
  background: rgba(248, 246, 240, 0.28);
  flex-shrink: 0;
}

body.fl718-peru-page .fl718-peru-hero__year {
  display: block;
  font-family: 'Spectral', Georgia, serif;
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.28em;
  color: rgba(248, 246, 240, 0.50);
}

body.fl718-peru-page .fl718-peru-hero__caption {
  position: absolute;
  top: calc(55% - 155px);
  left: clamp(28px, 4vw, 52px);
  font-family: 'Spectral', Georgia, serif;
  font-size: clamp(13px, 1.45vw, 19px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.04em;
  color: rgba(248, 246, 240, 0.86);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
  max-width: 44ch;
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

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

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

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

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

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

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

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

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

/* ============================================================
   HOVER EFFECT — warm mountain veil
   ============================================================ */

body.fl718-peru-page .fl718-peru-item__veil {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 12, 0.18);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  will-change: opacity;
}

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

/* ============================================================
   LIGHTBOX
   ============================================================ */

body.fl718-peru-page .fl718-peru-lb-dark {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(12, 11, 8, 0.0);
  pointer-events: none;
  filter: blur(0px);
}

body.fl718-peru-page .fl718-peru-lb-dark--active {
  pointer-events: auto;
}

body.fl718-peru-page .fl718-peru-lb-stage {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(12, 11, 8, 0.0);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}

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

body.fl718-peru-page .fl718-peru-lb-image-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  max-width: calc(100vw - 120px);
  max-height: calc(100dvh - 120px);
  opacity: 0;
  transform-origin: center center;
}

body.fl718-peru-page .fl718-peru-lb-image {
  max-width: 100%;
  max-height: calc(100dvh - 180px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 14px rgba(0, 0, 0, 0.09),
    0 12px 40px rgba(0, 0, 0, 0.07);
}

body.fl718-peru-page .fl718-peru-lb-caption {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.10em;
  color: rgba(220, 216, 208, 0.65);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.5;
  opacity: 0;
  min-height: 1.4em;
}

body.fl718-peru-page .fl718-peru-lb-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  cursor: default;
}

body.fl718-peru-page .fl718-peru-lb-ui {
  position: fixed;
  inset: 0;
  z-index: 9200;
  pointer-events: none;
  opacity: 0;
}

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

body.fl718-peru-page .fl718-peru-lb-close-btn {
  position: absolute;
  top: clamp(1rem, 2vh, 1.6rem);
  right: clamp(1rem, 2vw, 1.6rem);
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: rgba(220, 216, 208, 0.65);
  transition: color 0.2s ease;
}

body.fl718-peru-page .fl718-peru-lb-close-btn:hover {
  color: rgba(220, 216, 208, 1);
}

body.fl718-peru-page .fl718-peru-lb-close-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  fill: none;
}

body.fl718-peru-page .fl718-peru-lb-counter {
  position: absolute;
  bottom: clamp(1.2rem, 2.5vh, 2rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Spectral', Georgia, serif;
  font-weight: 300;
  font-style: italic;
  font-size: 0.78rem;
  color: rgba(220, 216, 208, 0.45);
  letter-spacing: 0.22em;
  white-space: nowrap;
  pointer-events: none;
}

body.fl718-peru-page .fl718-peru-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: rgba(220, 216, 208, 0.45);
  transition: color 0.2s ease;
}

body.fl718-peru-page .fl718-peru-lb-nav:hover {
  color: rgba(220, 216, 208, 0.85);
}

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

body.fl718-peru-page .fl718-peru-lb-nav svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

body.fl718-peru-page .fl718-peru-lb-close-btn:focus-visible,
body.fl718-peru-page .fl718-peru-lb-nav:focus-visible {
  outline: 2px solid rgba(220, 216, 208, 0.45);
  outline-offset: 3px;
}

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

/* Reduced motion — lightbox appears at final state immediately */
@media (prefers-reduced-motion: reduce) {
  body.fl718-peru-page .fl718-peru-lb-stage {
    opacity: 1 !important;
    background: rgba(12, 11, 8, 0.94) !important;
  }
  body.fl718-peru-page .fl718-peru-lb-image-wrap {
    opacity: 1 !important;
  }
  body.fl718-peru-page .fl718-peru-lb-ui {
    opacity: 1 !important;
  }
}

/* ============================================================
   AFTER-CONTENT — Horizon Line pattern
   ============================================================ */

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

body.fl718-peru-page .fl718-peru-after__dateline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 40px;
}

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

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

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

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

body.fl718-peru-page .fl718-peru-after__rule {
  width: 100%;
  height: 1px;
  background: #c8c2b8;
  margin-bottom: 36px;
  transform-origin: left center;
}

body.fl718-peru-page .fl718-peru-after__eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #98928a;
  margin-bottom: 24px;
}

body.fl718-peru-page .fl718-peru-after__strip {
  display: flex;
  gap: 14px;
  margin-bottom: 36px;
  overflow-x: clip;
}

/* Wipe bar — full-viewport dark overlay, sweeps left to right on link-out */
body.fl718-peru-page .fl718-peru-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 — fixed-position spans appended to body during link-out */
body.fl718-peru-page .fl718-peru-burst-char {
  position: fixed;
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 200;
}

body.fl718-peru-page .fl718-peru-after__bottom-rule {
  width: 100%;
  height: 1px;
  background: #c8c2b8;
  margin-bottom: 28px;
}

/* Taxonomy nav — 2-col CSS grid */
body.fl718-peru-page .fl718-peru-after__taxonomy {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px 24px;
}

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

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

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

body.fl718-peru-page .fl718-peru-after__tax-link:hover {
  color: #3a3530;
}

/* Separators: visible — no JS animation on taxonomy in Peru */
body.fl718-peru-page .fl718-peru-after__tax-sep {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #c8c2b8;
  padding: 0 4px;
  user-select: none;
}

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

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

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

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

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

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

  /* Horizontal scroll strip on mobile */
  body.fl718-peru-page .fl718-peru-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-peru-page .fl718-peru-after__strip::-webkit-scrollbar {
    display: none;
  }

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

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

/* Reduced motion: show all grid photos immediately */
@media (prefers-reduced-motion: reduce) {
  body.fl718-peru-page .fl718-peru-item {
    opacity: 1 !important;
    transform: none !important;
  }
  body.fl718-peru-page .fl718-peru-after__dateline,
  body.fl718-peru-page .fl718-peru-after__rule,
  body.fl718-peru-page .fl718-peru-after__eyebrow,
  body.fl718-peru-page .fl718-ws-city,
  body.fl718-peru-page .fl718-peru-after__bottom-rule,
  body.fl718-peru-page .fl718-peru-after__taxonomy {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* No-JS: show everything immediately */
body.fl718-peru-page:not(.fl718-js-loaded) .fl718-peru-item {
  opacity: 1;
}
body.fl718-peru-page:not(.fl718-js-loaded) .fl718-peru-hero__image {
  opacity: 1;
}
body.fl718-peru-page:not(.fl718-js-loaded) .fl718-peru-hero__eyebrow,
body.fl718-peru-page:not(.fl718-js-loaded) .fl718-peru-hero__title,
body.fl718-peru-page:not(.fl718-js-loaded) .fl718-peru-hero__year-block,
body.fl718-peru-page:not(.fl718-js-loaded) .fl718-peru-hero__caption {
  opacity: 1;
}
