/* ── PHOTOGRAPH DETAIL PAGE ── */

/* ── PHOTOGRAPH HERO HEADER ── */
#photograph-header {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-bottom: 1px solid #1a1a2e;
  background: #0a0f07;
}

/* map sits behind everything — unchanged behaviour from world-map.js */
#photograph-map {
  position: absolute;
  inset: 0;
  max-width: none;
  margin: 0;
  border: none;
  box-shadow: none;
  opacity: 0.1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}
#photograph-map svg {
  height: 100%;
  width: auto;
  min-width: 100%;
  display: block;
  flex-shrink: 0;
}
#photograph-map #photograph-map-svg-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* vignette — radial fade so text stays legible over the map */
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(10, 15, 7, 0.72) 100%);
  pointer-events: none;
  z-index: 1;
}

/* scanlines — sits above vignette, below content */
.hero-scanlines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.0)  0px,
    rgba(0, 0, 0, 0.0)  1px,
    rgba(0, 0, 0, 0.2)  1px,
    rgba(0, 0, 0, 0.2)  2px
  );
  pointer-events: none;
  z-index: 2;
}

/* text content layer */
.hero-content {
  position: relative;
  z-index: 5;
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

/* two-column split: text left, flag right */
.hero-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.hero-left {
  flex: 1;
  min-width: 0;
}

.hero-right {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 4px;
}

.hero-eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: #F5B545;
  letter-spacing: 4px;
  opacity: 0.7;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero-headline {
  font-family: 'VT323', monospace;
  font-size: 76px;
  color: #e8d5a0;
  line-height: 0.88;
  letter-spacing: 4px;
}

/* accent word — mode toggled via data-accent-mode on #photograph-header */
.hero-accent {
  display: inline;
  transition: color 0.2s;
}
#photograph-header[data-accent-mode="filled"] .hero-accent {
  color: #F5B545;
  -webkit-text-stroke: 0;
}
#photograph-header[data-accent-mode="hollow"] .hero-accent {
  -webkit-text-stroke: 1.5px #F5B545;
  color: transparent;
}

.hero-footer {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #444;
  letter-spacing: 3px;
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero-footer::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: #F5B545;
  opacity: 0.35;
  flex-shrink: 0;
}

@keyframes hero-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.hero-cursor {
  display: inline-block;
  width: 2px;
  height: 0.8em;
  background: #F5B545;
  vertical-align: middle;
  margin-left: 4px;
  animation: hero-cursor-blink 1.2s step-end infinite;
}

/* ── HERO CARD (flag + country info, right side of hero) ── */
#hero-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  width: 160px;
  flex-shrink: 0;
}

.hc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.hc-header-text { text-align: right; }

.hc-country {
  font-family: 'Share Tech Mono', monospace;
  font-size: 16px;
  color: #e8d5a0;
  letter-spacing: 2px;
  display: block;
}

.hc-years {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--offwhite);
  letter-spacing: 1px;
  display: block;
  margin-top: 2px;
}

.hc-divider {
  width: 100%;
  height: 1px;
  background: var(--red);
  margin-bottom: 10px;
}

.hc-stats {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-end;
}

.hc-stat { text-align: right; }

.hc-stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--offwhite);
  letter-spacing: 2px;
  display: block;
  text-transform: uppercase;
}

.hc-stat-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  color: var(--yellow);
  letter-spacing: 0.5px;
  display: block;
  margin-top: 1px;
}

.hc-stat-val.hc-hi { color: #F5B545; }

.hc-stat-coord {
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  color: #E89020;
  letter-spacing: 0.5px;
  display: block;
}

/* ── PHOTOGRAPH INFO FILM STRIP ── */
.film-info-strip {
  margin-bottom: 18px;
  border-left: 6px solid #0d0d0d;
  border-right: 6px solid #0d0d0d;
}
.film-info-sprocket-row {
  background: #0d0d0d;
  border-top: 2px solid #1a1a1a;
  border-bottom: 2px solid #1a1a1a;
  padding: 3px 8px;
  overflow: hidden;
}
.film-info-holes {
  height: 7px;
  width: 100%;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0px, transparent 6px,
    #050505 6px, #050505 18px,
    transparent 18px, transparent 28px
  );
  border-top: 1px solid #2a2a2a;
  border-bottom: 1px solid #2a2a2a;
}
.film-info-rebate {
  background: #0a0a0a;
  padding: 10px 16px 12px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* ── PHOTOGRAPH INFO + DESC ── */
#photograph-info {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--dim, #555);
  letter-spacing: 1px;
  line-height: 1.9;
  flex-shrink: 0;
}
#photograph-info .hl { color: var(--cyan, #0ff); }

#photograph-desc {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: #777;
  padding: 0 0 0 24px;
  max-width: 420px;
  line-height: 1.75;
  letter-spacing: 0.5px;
  border-left: 1px solid #1e1e1e;
  align-self: center;
}

/* ── CONTACT SHEET WRAP ── */
#image-grid-wrap {
  padding: 16px 20px 40px;
  background: #111;
}

#image-grid {
  max-width: 1050px;
  margin: 0 auto;
}

.grid-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #444;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.grid-meta span { color: #888; }

/* ── FILM STRIP ── */
.film-strip { margin-bottom: 2px; }

.sprocket-row {
  background: #0d0d0d;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0 2px;
  border-top: 2px solid #1a1a1a;
  border-bottom: 2px solid #1a1a1a;
}

.sprocket-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3px 0;
}

.sprocket-hole {
  width: 10px;
  height: 6px;
  background: #050505;
  border: 1px solid #2a2a2a;
  border-radius: 1px;
}

.frame-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  background: #0d0d0d;
  padding: 2px;
}

/* ── INDIVIDUAL FRAME ── */
.img-tile {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
}

.img-tile-inner {
  position: relative;
  width: 100%;
  height: 144px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d0d;
  padding: 2px;
}

.img-tile-inner canvas,
.img-tile-inner img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  image-rendering: auto;
  transition: filter 0.1s;
  position: relative;
  z-index: 10000;
}

.img-tile:hover .img-tile-inner img,
.img-tile:hover .img-tile-inner canvas {
  filter: brightness(1.08) contrast(1.05) saturate(0.7);
}

.img-tile.selected .img-tile-inner {
  outline: 2px solid #e8d5a0;
  outline-offset: -2px;
}

.img-tile-rebate {
  background: #0d0d0d;
  border-top: 1px solid #1a1a1a;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: #e8d5a0;
  letter-spacing: 1px;
  padding: 2px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.7;
}

.img-tile-rebate .frame-title {
  color: #555;
  font-size: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

/* ── PREV / NEXT PHOTOGRAPH NAV ── */
#photograph-nav {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px 20px;
  border-top: 1px solid #1a1a2e;
}

.photograph-nav-link {
  color: var(--cyan);
  text-decoration: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  letter-spacing: 1px;
}
.photograph-nav-link:hover { color: var(--yellow); }
.photograph-nav-link .arrow {
  font-size: 18px;
  font-family: 'VT323', monospace;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .hero-content {
    padding: 28px 24px 24px;
  }

  .hero-body {
    flex-direction: column-reverse;
    gap: 16px;
  }

  .hero-headline {
    font-size: 52px;
  }
}
@media (max-width: 480px) {
  .hero-headline {
    font-size: 40px;
  }

  #photograph-header[data-accent-mode="hollow"] .hero-accent {
    -webkit-text-stroke-width: 1px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   FILMSTRIP LIGHTBOX
   ══════════════════════════════════════════════════════════════════════════ */

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

#lightbox.open { display: flex; }

#lb-filmstrip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(90vw, 900px);
  cursor: default;
}

.lb-sprocket-row {
  background: #0d0d0d;
  border-top: 2px solid #1e1e1e;
  border-bottom: 2px solid #1e1e1e;
  display: flex;
  align-items: center;
  padding: 4px 0;
  overflow: hidden;
}

.lb-hole {
  width: 14px;
  height: 9px;
  background: #000;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  flex-shrink: 0;
  margin: 0 9px;
}

@keyframes film-advance {
  0%   { transform: translateX(0);     }
  40%  { transform: translateX(-18px); }
  100% { transform: translateX(0);     }
}

@keyframes film-rewind {
  0%   { transform: translateX(0);    }
  40%  { transform: translateX(18px); }
  100% { transform: translateX(0);    }
}

.lb-sprocket-row.advance { animation: film-advance 0.3s ease-out; }
.lb-sprocket-row.rewind  { animation: film-rewind  0.3s ease-out; }

.lb-edge-data {
  background: #0a0a0a;
  border-left: 6px solid #0d0d0d;
  border-right: 6px solid #0d0d0d;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: #e8d5a0;
  letter-spacing: 3px;
  padding: 3px 12px;
  display: flex;
  justify-content: space-between;
  opacity: 0.45;
}

#lb-image-wrap {
  background: #0f0f0f;
  border-left: 6px solid #0d0d0d;
  border-right: 6px solid #0d0d0d;
  position: relative;
  line-height: 0;
}

#lightbox-img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
  image-rendering: auto;
  transition: opacity 0.12s ease;
}

#lightbox-img.loading { opacity: 0; }

#lb-rebate {
  background: #0a0a0a;
  border-left: 6px solid #0d0d0d;
  border-right: 6px solid #0d0d0d;
  border-top: 1px solid #1a1a1a;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#lb-rebate .lb-title { color: #e8d5a0; letter-spacing: 1px; }
#lb-rebate .lb-num   { color: #444;    letter-spacing: 1px; }
#lb-rebate .lb-film  { color: #2a2a2a; font-size: 9px; letter-spacing: 2px; }

#lightbox-prev,
#lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'VT323', monospace;
  font-size: 52px;
  color: #333;
  cursor: pointer;
  padding: 0 16px;
  user-select: none;
  line-height: 1;
  transition: color 0.08s;
  z-index: 100000;
}
#lightbox-prev { left: 0; }
#lightbox-next { right: 0; }
#lightbox-prev:hover,
#lightbox-next:hover { color: #e8d5a0; }

#lightbox-close {
  position: fixed;
  top: 14px;
  right: 18px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #444;
  cursor: pointer;
  letter-spacing: 2px;
  z-index: 100000;
}
#lightbox-close:hover { color: #e8d5a0; }

/* ══════════════════════════════════════════════════════════════════════════
   TRAVEL LOG TERMINAL
   Reusable retro terminal widget rendered by js/travel-log.js.
   Content is defined in a <script id="travel-log-data" type="application/json">
   block in the page HTML — no HTML authoring needed in the template.

   Animation note: .tl-warn and .tl-status-alert reuse the `flicker` keyframe
   from main.css. .tl-cursor reuses `blink` from main.css. Only .tl-scanlines
   and .tl-vignette are defined here because crt-effects.css scopes its rules
   to #photograph-map and #lightbox and will not reach this widget.
   ══════════════════════════════════════════════════════════════════════════ */

#travel-log-terminal {
  margin: 30px auto 32px;
  background: #1f0d10;
  border: 3px solid #5c1e28;
  border-radius: 4px;
  overflow: hidden;
  max-width: var(--prose-width);
}

/* ── Chrome bar ── */
.tl-chrome {
  background: #2b1018;
  border-bottom: 1px solid #3d1620;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tl-chrome-left  { display: flex; align-items: center; gap: 10px; }
.tl-chrome-dot   { width: 8px; height: 8px; border-radius: 50%; background: #F26076; }
.tl-chrome-label { font-family: 'Share Tech Mono', monospace; font-size: 11px; color: #FFD150; letter-spacing: 2px; }
.tl-chrome-right { font-family: 'Share Tech Mono', monospace; font-size: 10px; color: #5c1e28; letter-spacing: 1px; }

/* ── Screen ── */
.tl-screen {
  background: #160a0d;
  padding: 24px 28px 28px;
  position: relative;
  overflow: hidden;
}

/* Scanlines — defined here, not in crt-effects.css, which targets other IDs */
.tl-scanlines {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    rgba(0,0,0,0.3) 2px, rgba(0,0,0,0.3) 4px
  );
  pointer-events: none;
  z-index: 10;
}

/* Vignette — same rationale as .tl-scanlines */
.tl-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,0.25) 100%);
  pointer-events: none;
  z-index: 11;
}

/* ── Content layer ── */
.tl-content {
  position: relative;
  z-index: 2;
  font-family: 'Share Tech Mono', monospace;
  color: #FFD150;
}

/* System header */
.tl-system-name  { font-size: 10px; color: #5c1e28; letter-spacing: 4px; margin-bottom: 2px; }
.tl-system-title { font-size: var(--text-lg); color: #FFD150; letter-spacing: 3px; margin-bottom: 2px; }
.tl-system-sub   { font-size: var(--text-sm); color: #F26076; letter-spacing: 2px; margin-bottom: 10px; }

/* Tabs */
.tl-tabs { display: flex; margin-bottom: 14px; border-bottom: 1px solid #3d1620; }
.tl-tab  {
  font-size: 11px; color: #5c1e28; letter-spacing: 2px;
  padding: 4px 12px 6px;
  border: 1px solid transparent; border-bottom: none;
  margin-bottom: -1px;
}
.tl-tab--active {
  color: #FFD150;
  border-color: #F26076;
  border-bottom: 1px solid #160a0d;
  background: #160a0d;
}

/* Metadata fields */
.tl-fields     { margin-bottom: 10px; }
.tl-field-row  { display: flex; margin-bottom: 3px; font-size: 11px; }
.tl-field-label { color: #8a2e3e; min-width: 120px; letter-spacing: 1px; }
.tl-field-value { color: #FFD150; letter-spacing: 1px; }
/* Warning — reuses `flicker` keyframe from main.css */
.tl-field-value--warn { color: #F26076; animation: flicker 4s ease-in-out infinite; }

/* Meter bars */
.tl-meters      { margin-bottom: 10px; }
.tl-meter-row   { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 11px; }
.tl-meter-label { color: #8a2e3e; min-width: 36px; letter-spacing: 1px; }
.tl-meter-track { flex: 1; max-width: 160px; height: 8px; background: #1f0d10; border: 1px solid #3d1620; }
.tl-meter-fill        { height: 100%; background: #FFD150; }
.tl-meter-fill--low   { background: #F26076; }
.tl-meter-value       { color: #FFD150; font-size: 11px; min-width: 50px; }

/* Divider */
.tl-divider { border: none; border-top: 1px solid #5c1e28; margin: 10px 0; }

/* Section heading */
.tl-section { font-size: 10px; color: #F26076; letter-spacing: 3px; margin: 10px 0 7px; }

/* Log entry text and inline spans */
.tl-entry         { font-size: var(--text-base); color: #e8c0c5; line-height: 1.6; letter-spacing: 0.3px; margin-bottom: 8px; }
.tl-entry--dim    { color: #a05060; }
.tl-entry--hi     { color: #FFD150; }
.tl-entry--note   { color: #F26076; }
.tl-entry--del    { color: #5c1e28; text-decoration: line-through; text-decoration-color: #5c1e28; }

/* System noise */
.tl-noise { font-size: 10px; color: #2e0818; letter-spacing: 1px; margin: 2px 0; }

/* Prompt + cursor — cursor reuses `blink` keyframe from main.css */
.tl-prompt { font-size: 12px; color: #8a2e3e; margin-top: 14px; letter-spacing: 1px; }
.tl-cursor {
  display: inline-block; width: 9px; height: 13px;
  background: #FFD150; vertical-align: middle; margin-left: 1px;
  animation: blink 2s step-end infinite;
}

/* Footer status bar — alert reuses `flicker` keyframe from main.css */
.tl-status       { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 8px; border-top: 1px solid #3d1620; font-size: 10px; color: #5c1e28; letter-spacing: 2px; }
.tl-status-alert { color: #F26076; animation: flicker 4s ease-in-out infinite; }

/* Entry separator — slightly more prominent than a standard divider */
.tl-entry-divider {
  border-color: #3d1620;
  margin: 18px 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   TRAVEL LOG — FULLSCREEN EXPAND ADDITIONS
   Append to photograph.css below the existing travel-log rules.
   ══════════════════════════════════════════════════════════════════════════ */
 
/* ── Chrome: right-side wrapper (unit label + expand button side by side) ── */
.tl-chrome-right-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
 
/* ── Chrome: ■ block indicators ── */
.tl-chrome-ind {
  font-size: 10px;
  color: #5c1e28;
  letter-spacing: 2px;
}
.tl-chrome-ind--on {
  color: #F26076;
}
 
/* ── Expand / Close button ── */
.tl-expand-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: #F26076;
  letter-spacing: 1px;
  border: 1px solid #8a2e3e;
  padding: 2px 8px;
  cursor: pointer;
  background: transparent;
  transition: color 0.1s, border-color 0.1s;
}
.tl-expand-btn:hover {
  color: #FFD150;
  border-color: #FFD150;
}
.tl-close-btn:hover {
  color: #F26076;
  border-color: #F26076;
}
 
/* ── Chrome becomes clickable in collapsed state ── */
#travel-log-terminal .tl-chrome {
  cursor: pointer;
}
 
/* ── Fullscreen screen (taller padding than collapsed) ── */
.tl-screen--fs {
  padding: 28px 36px 32px;
}
 
/* ── Fullscreen overlay backdrop ── */
#tl-overlay {
  position: fixed;
  inset: 0;
  z-index: 99997;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  animation: tl-overlay-in 0.15s ease-out;
}
@keyframes tl-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#tl-overlay.tl-overlay--closing {
  animation: tl-overlay-out 0.16s ease-in forwards;
}
@keyframes tl-overlay-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
 
/* ── Overlay inner panel ── */
#tl-overlay-inner {
  width: 100%;
  max-width: 860px;
  background: #1f0d10;
  border: 3px solid #5c1e28;
  border-radius: 4px;
  overflow: hidden;
  animation: tl-panel-in 0.18s ease-out;
}
@keyframes tl-panel-in {
  from { transform: scale(0.97); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
 
