:root {
  --cream: #f5efe4; --cream-2: #ede4d3; --paper: #fbf8f2;
  --ink: #2b2723; --muted: #7b7166; --line: rgba(43, 39, 35, .12); --accent: #a2583f;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }

.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 3rem); padding-top: max(.9rem, env(safe-area-inset-top));
  background: rgba(245, 239, 228, .88); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.back { text-decoration: none; font-size: .88rem; color: var(--muted); letter-spacing: .02em; }
.back:hover { color: var(--ink); }
.countries { display: flex; gap: 1.4rem; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; }
.countries a { text-decoration: none; color: var(--muted); padding: .2rem 0; border-bottom: 1px solid transparent; }
.countries a:hover { color: var(--ink); border-color: var(--ink); }

.intro { text-align: center; padding: clamp(3.5rem, 10vw, 7rem) 1.5rem clamp(2rem, 6vw, 4rem); max-width: 760px; margin: 0 auto; }
.eyebrow { margin: 0 0 1rem; font-size: .75rem; letter-spacing: .32em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(2.8rem, 9vw, 5.4rem); line-height: 1.02; letter-spacing: -.01em; }
h1 em { font-style: italic; color: var(--accent); }
.lede { margin: 1.4rem auto 0; max-width: 30rem; color: var(--muted); font-size: 1.02rem; }

.country { padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 8vw, 6rem); max-width: 1400px; margin: 0 auto; scroll-margin-top: 4rem; }
.country + .country { border-top: 1px solid var(--line); }
.country-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.country-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1; }
.native { font-family: "Shippori Mincho", serif; font-size: .45em; color: var(--muted); margin-left: .6rem; letter-spacing: .15em; vertical-align: middle; }
.count { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(.5rem, 1.6vw, 1.1rem); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.photo { position: relative; margin: 0; padding: 0; border: 0; background: var(--cream-2); cursor: zoom-in; overflow: hidden; border-radius: 3px; aspect-ratio: var(--ar, 1); display: block; width: 100%; }
.photo.feature { grid-column: 1 / -1; }
@media (min-width: 900px) { .photo.feature { grid-column: span 2; grid-row: span 2; } }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .5s; opacity: 0; }
.photo img.loaded { opacity: 1; }
.photo:hover img { transform: scale(1.025); }
.photo:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.foot { display: flex; justify-content: center; gap: .7rem; flex-wrap: wrap; padding: 2.5rem 1rem calc(3rem + env(safe-area-inset-bottom)); font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: #1c1916; display: grid; place-items: center; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; width: 100%; height: 100%; display: grid; place-items: center; padding: max(3.5rem, env(safe-area-inset-top)) .5rem max(3.5rem, env(safe-area-inset-bottom)); }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .25s, transform .25s; }
.lb-stage img.swap { opacity: 0; }
.lb-close, .lb-nav { position: absolute; background: none; border: 0; color: #f5efe4; cursor: pointer; font-family: var(--serif); line-height: 1; opacity: .8; }
.lb-close:hover, .lb-nav:hover { opacity: 1; }
.lb-close { top: max(.6rem, env(safe-area-inset-top)); right: .9rem; font-size: 2.6rem; padding: .3rem .6rem; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 3.4rem; padding: 1rem; }
.lb-prev { left: .2rem; } .lb-next { right: .2rem; }
.lb-count { position: absolute; bottom: max(1rem, env(safe-area-inset-bottom)); margin: 0; color: rgba(245, 239, 228, .7); font-size: .78rem; letter-spacing: .25em; }
@media (hover: none) { .lb-nav { display: none; } }

/* ---------- animations ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 20; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.drift { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.top, .intro, main, .foot { position: relative; z-index: 2; }
.top { z-index: 10; transition: padding .35s ease, box-shadow .35s ease; }
.top.scrolled { box-shadow: 0 6px 24px rgba(43, 39, 35, .06); }

.intro .eyebrow, .intro .lede { opacity: 0; transform: translateY(14px); animation: up .9s cubic-bezier(.2, .7, .2, 1) forwards; }
.intro .eyebrow { animation-delay: .1s; letter-spacing: .6em; animation-name: up, track; }
.intro .lede { animation-delay: 1.05s; }
.split span { display: inline-block; opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(6px); animation: word 1s cubic-bezier(.2, .7, .2, 1) forwards; }
.split span:nth-of-type(1) { animation-delay: .25s; } .split span:nth-of-type(2) { animation-delay: .4s; }
.split em span:nth-of-type(1) { animation-delay: .58s; } .split em span:nth-of-type(2) { animation-delay: .74s; }
.split em { position: relative; display: inline-block; }
.split em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; animation: line 1.1s cubic-bezier(.7, 0, .2, 1) 1.15s forwards; }

.country-head h2, .country-head .count { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.country-head .count { transition-delay: .15s; }
.country-head { position: relative; padding-bottom: 1rem; }
.country-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.4s cubic-bezier(.7, 0, .2, 1) .2s; }
.country-head.in h2, .country-head.in .count { opacity: 1; transform: none; }
.country-head.in::after { transform: scaleX(1); }

.photo { opacity: 0; transform: translateY(40px) scale(.97); clip-path: inset(12% 0 0 0 round 3px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1), clip-path 1.1s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.photo.in { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 3px); }
.photo img { will-change: transform; transform: translateY(var(--py, 0)) scale(1.08); transition: opacity .5s; }
.photo:hover img { transform: translateY(var(--py, 0)) scale(1.12); transition: transform .8s cubic-bezier(.2, .7, .2, 1), opacity .5s; }
.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 250, 240, .35) 50%, transparent 60%); transform: translateX(-100%); pointer-events: none; }
.photo.feature img { transform: translateY(var(--py, 0)) scale(1.16); }
.photo.feature:hover img { transform: translateY(var(--py, 0)) scale(1.2); }
.photo:hover::after { transform: translateX(100%); transition: transform 1s ease; }

.lightbox { opacity: 0; transition: opacity .35s ease; }
.lightbox.open { opacity: 1; }
.lb-stage img { transform: scale(.94); }
.lightbox.open .lb-stage img { transform: scale(1); transition: opacity .3s, transform .45s cubic-bezier(.2, .7, .2, 1); }
.lb-stage img.swap { opacity: 0; transform: translateX(var(--dir, 0)) scale(.98); }
.fly { position: fixed; z-index: 101; object-fit: cover; border-radius: 3px; transition: all .45s cubic-bezier(.2, .7, .2, 1); pointer-events: none; }

@keyframes up { to { opacity: 1; transform: none; } }
@keyframes track { to { letter-spacing: .32em; } }
@keyframes word { to { opacity: 1; transform: none; filter: none; } }
@keyframes line { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .photo, .country-head h2, .country-head .count, .intro .eyebrow, .intro .lede, .split span { opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; }
  .drift, .progress { display: none; }
}
