/* ============================================================
   travel.css — shared stylesheet for all destination pages
   Per-page accent color is set on <body style="--accent:...">
   ============================================================ */

:root {
  --ink: #1b1f26;
  --ink-soft: #4a4f58;
  --paper: #f4f5f2;
  --surface: #ffffff;
  --nav-bg: #14171c;
  --accent: #0e4a84;      /* overridden per page */
  --accent-ink: #ffffff;  /* text color on top of accent */
  --radius: 12px;
  --font-display: "Zilla Slab", Georgia, serif;
  --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ---------------- Navigation ---------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  color: #fff;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;      /* Firefox */
  -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: block;
  padding: 7px 12px;
  border-radius: 999px;
  color: #d6d9de;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.nav-links a.active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 1rem;
  font-family: var(--font-body);
  cursor: pointer;
}

/* Mobile nav: hamburger + vertical menu */
@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--nav-bg);
    padding: 6px 10px 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 1rem;
  }
}

/* ---------------- Page header ---------------- */

.page-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}

.header-text .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}

.header-text h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  margin: 0;
}

/* Passport-stamp badge: the page signature */
.stamp {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 2px dashed var(--accent);
  border-radius: 10px;
  padding: 10px 16px;
  transform: rotate(-4deg);
  text-align: center;
  line-height: 1.7;
  user-select: none;
}

.stamp .stamp-big { font-size: 0.9rem; font-weight: 700; display: block; }

.photo-count {
  width: 100%;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------------- Gallery grid ---------------- */

.gallery {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 20px 60px;
  columns: 3 340px;      /* masonry: up to 3 wide columns, min 340px each */
  column-gap: 16px;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  border: 0;
  display: block;
  width: 100%;
  margin: 0 0 16px;
  break-inside: avoid;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.tile img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

.tile:hover img,
.tile:focus-visible img { transform: scale(1.06); }

.tile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.tile .caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.35;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  pointer-events: none;
}

/* Desktop: caption slides up on hover or keyboard focus */
.tile:hover .caption,
.tile:focus-visible .caption { transform: translateY(0); }

/* Touch devices have no hover: keep captions visible */
@media (hover: none) {
  .tile .caption { transform: translateY(0); font-size: 0.78rem; padding-top: 20px; }
}

@media (max-width: 600px) {
  .gallery { columns: 1; padding: 14px 14px 48px; }
  .tile { margin-bottom: 12px; }
  .page-header { padding: 26px 16px 4px; }
  .stamp { transform: rotate(-3deg); padding: 8px 12px; }
}

/* ---------------- Lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 16, 0.92);
  padding: 16px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 78vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lb-caption {
  margin-top: 14px;
  color: #fff;
  font-size: 0.95rem;
  text-align: center;
  max-width: 80vw;
}

.lb-counter {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 26px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.25); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

.lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}
.lb-close:hover { background: rgba(255, 255, 255, 0.25); }

@media (max-width: 600px) {
  .lb-btn { width: 42px; height: 42px; font-size: 22px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lightbox img { max-height: 70vh; }
}

body.no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------------- Homepage ---------------- */

.home-header .home-intro {
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 14px 0 0;
}

.dest-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 20px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.dest-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  background: var(--nav-bg);
}

.dest-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.dest-card:hover img,
.dest-card:focus-visible img { transform: scale(1.06); }

.dest-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.dest-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 55%);
}

.dest-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  line-height: 1.15;
}

.dest-meta {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

/* Accent-colored top ribbon per destination */
.dest-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--accent);
  z-index: 2;
}

@media (max-width: 600px) {
  .dest-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 12px 48px; }
  .dest-name { font-size: 1.05rem; }
  .dest-meta { font-size: 0.6rem; }
  .dest-card { aspect-ratio: 1 / 1; }
}
