:root {
  --bg: #e9e8e5;          /* soft warm gray background */
  --ink: #1c1c1b;
  --muted: #7b7a76;
  --line: #d4d2cd;
  --tile: #dcdad6;        /* placeholder while photos load */
  --sidebar: 280px;
  --gap: 12px;
  --row: 420px;           /* target row height of the photo grid */
  --serif: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 300 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  padding: 56px 40px 32px 48px;
  display: flex; flex-direction: column;
  overflow-y: auto; background: var(--bg); z-index: 20;
}
.brand-name {
  display: block;
  font: 500 18px/1.3 var(--serif);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.menu-btn { display: none; }

.nav { margin-top: 44px; flex: 1; display: flex; flex-direction: column; }
.nav > ul { list-style: none; margin: 0; padding: 0; }
.nav > ul > li { margin: 0 0 14px; }
.nav > ul > li > a, .folder-toggle {
  font-size: 12px; font-weight: 400;
  letter-spacing: .2em; text-transform: uppercase;
  transition: color .2s;
}
.nav > ul > li > a:hover, .folder-toggle:hover { color: var(--muted); }
.nav a.active, .folder-toggle.active { color: var(--ink); font-weight: 500; }

.sub {
  margin: 0; padding: 0 0 0 1px;
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease, margin .35s ease;
}
.sub > * { min-height: 0; }
.folder.open .sub { margin: 12px 0 8px; }
.sub-inner { overflow: hidden; list-style: none; margin: 0; padding: 0; }
.folder.open .sub { grid-template-rows: 1fr; }
.sub a {
  display: block; padding: 3px 0;
  font-size: 13.5px; color: var(--muted);
  letter-spacing: .03em; text-transform: lowercase;
  transition: color .2s, transform .2s;
}
.sub a:hover { color: var(--ink); }
.sub a.active { color: var(--ink); }

.copyright {
  margin-top: auto; padding-top: 32px;
  font-size: 11px; color: var(--muted); letter-spacing: .08em;
}

/* ---------- Main ---------- */
.main {
  margin-left: var(--sidebar);
  padding: 56px 48px 80px 8px;
  min-height: 100vh;
}
.view { animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { margin: 0 0 28px; display: flex; align-items: baseline; gap: 16px; }
.page-title {
  margin: 0; font: 300 32px/1.1 var(--serif); letter-spacing: -.01em;
}
.page-title.country { text-transform: lowercase; }
.page-meta { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* Home slideshow */
.slideshow {
  display: block;
  position: relative;
  height: calc(100vh - 112px); min-height: 360px;
  /* Never wider than 2:1 — on ultrawide screens the photo would otherwise be
     zoomed way in (cropping most of it and blowing up the watermark) */
  max-width: calc(max(100vh - 112px, 360px) * 2);
  margin: 0 auto;
  overflow: hidden; background: var(--tile);
}
/* Home page fits the screen exactly — no scrolling */
body.is-home, body.is-gallery {
  height: 100vh; height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column;
}
body.is-home .main, body.is-gallery .main {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding-bottom: 56px;
}
body.is-home .view, body.is-gallery .view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.is-home .slideshow { flex: 1; height: auto; min-height: 0; width: 100%; }
.slideshow .slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.4s ease;
}
.slideshow .slide.on { opacity: 1; }
.slideshow img { width: 100%; height: 100%; object-fit: cover; object-position: right bottom; }
.slide-cap {
  position: absolute; left: 24px; bottom: 20px; z-index: 3;
  color: #fff; font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
/* Copyright overlay: only shown on phones, where the crop hides the baked-in watermark */
.slide-wm {
  display: none;
  position: absolute; right: 16px; bottom: 20px; z-index: 3;
  color: #fff; opacity: .7; font-size: 11px; letter-spacing: .12em;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}

/* Destinations index — each country is an Instax Mini print */
.dest-grid {
  display: grid; gap: 44px 32px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  overflow-x: clip;               /* no sideways scrollbar while prints fly in */
  padding: 4px 2px 12px;
}
.dest-card {
  /* Instax Mini proportions: 54 x 86mm card, 46 x 62mm picture,
     thin border on top and sides, thick strip at the bottom */
  display: flex; flex-direction: column;
  aspect-ratio: 54 / 86;
  padding: 7.4% 7.4% 0;
  background: #fbfaf6;
  background-image: linear-gradient(160deg, rgba(255,255,255,.7), rgba(0,0,0,.025));
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 22px -6px rgba(0,0,0,.18);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
  will-change: transform;
}
.dest-card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 16px 32px -8px rgba(0,0,0,.24); }
.dest-card.flying { box-shadow: 0 30px 50px -12px rgba(0,0,0,.35); }
.dest-card .frame {
  position: relative; flex: none; aspect-ratio: 46 / 62; overflow: hidden;
  background: var(--tile);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.dest-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease, opacity .6s; }
.dest-card:hover img { transform: scale(1.035); }
.dest-card .label {
  flex: 1; display: flex; justify-content: space-between; align-items: center;
  padding: 0 1px;
  font-size: 14px; letter-spacing: .04em; text-transform: lowercase;
}
.dest-card .label span { color: var(--muted); font-size: 11px; letter-spacing: .1em; }

/* Country gallery — big photo + momentum-scrolling thumbnail strip */
body.is-gallery .main { padding: 0; }
.gal {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 1fr 104px; grid-template-rows: 1fr;
  grid-template-areas: "stage strip";
}
.gal-head { display: none; }   /* desktop: no title, the photo gets the space */
.gal-stage {
  grid-area: stage; position: relative; min-height: 0;
  padding: 40px 24px 40px 8px; cursor: zoom-in; touch-action: none;
}
.gal-photo { position: relative; width: 100%; height: 100%; }
.gal-pic {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity .3s cubic-bezier(.6,0,.9,1);   /* fading out: holds, then goes */
  background: var(--x, 0) var(--y, 0) / var(--w, 0) var(--h, 0) no-repeat;   /* tiny blurred preview, only if nothing else is ready */
}
.gal-pic.show { opacity: 1; transition: opacity .3s cubic-bezier(.1,.6,.3,1); }   /* fading in: quick start */
.gal-pic img {
  position: absolute; left: var(--x); top: var(--y);
  width: var(--w); height: var(--h); object-fit: fill;
}
.gal-pic img:not([src]) { visibility: hidden; }
.gal-pic .hi { opacity: 0; transition: opacity .9s cubic-bezier(.4,0,.2,1); }   /* slow, gentle focus-in */
.gal-pic .hi.in { opacity: 1; }
.gal-pic .hi.instant { transition: none; }
.gal-stage .shield { inset: 40px 24px 40px 8px; }
.gal-strip {
  grid-area: strip; position: relative; overflow: hidden;
  touch-action: none; cursor: grab; user-select: none;
}
.gal-strip:active { cursor: grabbing; }
.gal-track { position: absolute; left: 50%; top: 50%; will-change: transform; }
.gal-thumb {
  position: absolute; left: 0; top: 0;
  width: 66px; height: 44px; padding: 0; overflow: hidden;
  background: var(--tile) center / cover no-repeat;   /* blurry preview until the thumb loads */
  transition: opacity .3s; contain: strict;
}
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.gal-thumb.on { opacity: .45; }
.gal-frame {
  position: absolute; left: 50%; top: 50%; width: 78px; height: 56px;
  transform: translate(-50%, -50%); border: 1px solid rgba(0,0,0,.4); pointer-events: none;
}

img.lazy { opacity: 0; }
img.loaded { opacity: 1; }

.pager {
  display: flex; justify-content: space-between; margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
}
.pager a { color: var(--muted); transition: color .2s; text-transform: lowercase; letter-spacing: .04em; font-size: 14px; }
.pager a:hover { color: var(--ink); }

.prose { max-width: 560px; font-size: 16px; line-height: 1.8; }
.prose p { margin: 0 0 1.2em; }
.prose a { border-bottom: 1px solid var(--line); transition: border-color .2s; }
.prose a:hover { border-color: var(--ink); }
.empty { color: var(--muted); }

/* ---------- Download protection ---------- */
/* Images ignore the pointer, so right-click / long-press lands on the frame
   instead of the <img>. No "Save image" option appears. */
.tile img, .dest-card img, .slideshow img, .lightbox img, .gal img {
  pointer-events: none;
  -webkit-user-drag: none; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.shield { position: absolute; inset: 0; z-index: 2; }
@media print { img { display: none !important; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s ease;
}
.lightbox.show { opacity: 1; }
.lightbox[hidden] { display: none; }
.lb-viewport { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; }
.lb-track { display: flex; width: 300%; height: 100%; will-change: transform; transform: translate3d(-33.3333%,0,0); }
.lb-track.animating { transition: transform .42s cubic-bezier(.22,.61,.36,1); }
.lb-slide {
  flex: 0 0 33.3333%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 55px 90px;
}
.lb-slide img {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto;
  opacity: 0; transition: opacity .3s ease;
}
.lb-slide img.loaded { opacity: 1; }
.lb-btn { position: absolute; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; opacity: .55; transition: opacity .2s; }
.lb-btn:hover { opacity: 1; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.2; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; bottom: 22px; left: 0; right: 0; text-align: center;
  font-size: 11px; letter-spacing: .22em; color: var(--muted);
}

/* ---------- Tablet / phone ---------- */
@media (max-width: 1100px) { :root { --row: 320px; --sidebar: 240px; } .sidebar { padding-left: 32px; padding-right: 28px; } }

@media (max-width: 760px) {
  :root { --row: 260px; --gap: 8px; }
  .sidebar {
    position: sticky; top: 0; width: auto; height: auto; bottom: auto;
    padding: 18px 16px; border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .brand { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
  .brand-name { font-size: 16px; }
  .menu-btn { display: grid; gap: 6px; width: 28px; height: 28px; align-content: center; }
  .menu-btn span { display: block; height: 1px; background: var(--ink); transition: transform .4s cubic-bezier(.52,.16,.24,1); }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  /* Full-screen menu — slides down like apple.com */
  .nav {
    position: fixed; inset: 0; z-index: 1; margin: 0;
    height: 100vh; height: 100dvh;
    padding: 96px 28px 40px;
    background: var(--bg);
    overflow-y: auto; overscroll-behavior: contain;
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .5s cubic-bezier(.52,.16,.24,1) .1s, visibility 0s .6s;
  }
  .sidebar.menu-open .nav {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path .55s cubic-bezier(.52,.16,.24,1), visibility 0s;
  }
  /* Items drift down and fade in one after another */
  .nav .anim {
    opacity: 0; transform: translateY(-14px);
    transition: opacity .15s ease, transform .2s ease;
  }
  .sidebar.menu-open .nav .anim {
    opacity: 1; transform: none;
    transition: opacity .45s ease calc(.18s + var(--d) * .035s),
                transform .6s cubic-bezier(.52,.16,.24,1) calc(.18s + var(--d) * .035s);
  }
  .nav > ul > li { margin: 0 0 22px; }
  .folder-toggle { font-size: 12px; color: var(--muted); }
  .sub, .folder.open .sub { grid-template-rows: 1fr; margin: 14px 0 12px; }
  .sub a {
    padding: 5px 0; font-size: 28px; font-weight: 500; line-height: 1.25;
    letter-spacing: -.01em; color: var(--ink);
  }
  .sub a.active { color: var(--muted); }
  .nav > ul > li > a { font-size: 12px; }
  .nav .social svg { width: 24px; height: 24px; }
  .copyright { padding-top: 32px; }
  body.no-scroll { overflow: hidden; }

  .main { margin-left: 0; padding: 24px 16px 56px; }
  .page-title { font-size: 28px; }
  .slideshow { height: calc(100vh - 150px); max-width: none; }
  body.is-home .main { padding-bottom: 16px; }
  body.is-gallery .main { padding: 0; }
  .gal { grid-template-columns: 1fr; grid-template-rows: 1fr 76px auto; grid-template-areas: "stage" "strip" "head"; }
  .gal-head { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 8px 16px 10px; }
  .gal-head .page-title { font-size: 11px; letter-spacing: .02em; }
  .gal-head .page-meta { font-size: 8px; }
  .gal-stage { padding: 12px 8px; }
  .gal-stage .shield { inset: 12px 8px; }
  .gal-strip { background: rgba(255,255,255,.35); }
  .gal-thumb { width: 36px; height: 54px; }
  .gal-frame { width: 44px; height: 62px; }
  .slideshow img { object-position: center; }
  .slide-wm { display: block; }
  .slide-cap { left: 16px; }
  .dest-grid { grid-template-columns: 1fr 1fr; gap: 22px 14px; }
  .dest-card .label { font-size: 12px; }
  .dest-card .label span { font-size: 10px; }
  .lb-slide { padding: 60px 10px 70px; }   /* 20px gap between photos while swiping */
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

/* Instagram icon */
.social { margin-top: 10px; }
.social a { display: inline-flex; opacity: .8; transition: opacity .2s; }
.social a:hover { opacity: 1; }
.social svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.4; }
.social .dot { fill: var(--ink); stroke: none; }
