/* trevor fawcett: site styles. Names and values match the "trevor fawcett" design system. */

@font-face {
  font-family: "Lintel";
  src: url("/static/fonts/lintel-regular.woff2") format("woff2"), url("/static/fonts/lintel-regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: block; /* preloaded; blocking briefly avoids a visible swap from Georgia */
}

/* ---------- Tokens ---------- */
:root {
  --red: #dc3522;
  --red-ink: #ffffff;
  --page: #ebebeb;
  --chrome-ink: #1e1e20;
  --chrome-dim: #56605f;
  --chrome-line: rgba(30, 30, 32, 0.12);
  --slate: #3c4746;
  --link-rest: color-mix(in oklab, var(--chrome-ink) 32%, transparent); /* a link's grey line before the red wipes in */

  --day-frost: rgba(255, 255, 255, 0.74);
  --day-ink: #1e1e20;
  --day-dim: #3c4746;
  --night-frost: rgba(30, 30, 32, 0.66);
  --night-ink: #ebebeb;
  --night-dim: #c3c8d4; /* lighter than the frost alone needs, for bright patches showing through it */
  --hero-ink: #ffffff;

  /* The viewer: slate in both themes; dim text is set for the card (4.9:1). --viewer-rgb draws the card, lines and map. */
  --viewer-bg: rgba(60, 71, 70, 0.95);
  --viewer-page: #3c4746;
  --viewer-ink: #ffffff;
  --viewer-dim: #d0d6d5;
  --viewer-soft: #dfe4e3;
  --viewer-line: rgba(255, 255, 255, 0.16);
  --viewer-rgb: 255 255 255;
  --viewer-step: rgba(255, 255, 255, 0.9);
  --viewer-step-hover: #ffffff;
  --viewer-step-ink: #3c4746;
  --viewer-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);

  /* behind the backgrounds until their photo arrives */
  --bg-day-fill: #7a8a99;
  --bg-night-fill: #070a16;
  --awip-ink: rgba(39, 41, 40, 0.06); /* the motto's letter grid */

  /* Pointing at a photo (see "Pointing at a photo") */
  --push: 1.04;
  --push-time: 0.7s;
  --push-ease: cubic-bezier(.16, 1, .3, 1);

  /* Type scale: nothing under 12px */
  --fs-xs: 0.75rem;   /* 12px */
  --fs-sm: 0.875rem;  /* 14px */
  --fs-md: 1rem;      /* 16px */
  --fs-lg: 1.375rem;  /* 22px */
  --fs-xl: 1.625rem;  /* 26px */

  --font-display: "Lintel", Georgia, "Times New Roman", serif;
  --font-body: Georgia, "Times New Roman", Times, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #1e1e20; --chrome-ink: #ebebeb; --chrome-dim: #a3abaa; --chrome-line: rgba(235, 235, 235, 0.14); --slate: #c9d1d0;
    --awip-ink: rgba(235, 235, 235, 0.06);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; } /* the day / night jump links */
  @view-transition { navigation: auto; }
}
body { margin: 0; background: var(--page); color: var(--day-ink); font-family: var(--font-body); font-size: var(--fs-md); line-height: 1.5; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
/* focusable for the jump and skip links, but no ring */
:is(section, main)[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
p, li { text-wrap: pretty; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.htmx-request, .htmx-request * { cursor: progress; }
/* after a delay, so a quick open shows nothing */
.tile.htmx-request { animation: tile-wait 0.9s ease-in-out 0.15s infinite alternate; }
@keyframes tile-wait { to { opacity: 0.72; } }

/* Lintel has one weight: never let the browser fake a bold */
.owner, .hello, .intro h1, .intro h2, .end a, .place b, .ptitle, .prose h2, .items b, .portrait, .thumb.count, .cap b, .lbl b, .checkout {
  font-weight: 400; font-synthesis: none;
}
.bar, .cap, .lbl, .pick, .add, .step, .pos, .checkout, .summary, .rm, .back, .status, .draft, .fine, .legal-list a { font-family: var(--font-display); }
/* Georgia's figures are old-style: line them up where numbers sit together */
.eyebrow, .count, .cap small, .dusk .line, .exif, .pick em, .place small, .roles time,
.badge, .items small, .items .amt, .summary .total, .thumb.count small, .lbl small { font-variant-numeric: lining-nums tabular-nums; }

main { position: relative; z-index: 1; }
.wrap { max-width: 1400px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- Header ---------- */
/* Light whatever the theme; the stacks dropping from it inherit this */
/* --chrome-dim darker than the page's: 5.2:1 on the 75% white over dark (the page's is 3.8:1) */
.bar, .foot, body::before {
  --chrome-bg: rgba(255, 255, 255, 0.75); --chrome-ink: #1e1e20; --chrome-dim: #434c4b;
  --chrome-line: rgba(30, 30, 32, 0.12); --page: #ebebeb; --slate: #3c4746;
  color-scheme: light;
}
/* Fills the safe area above the header on notched phones */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--chrome-bg); }
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9;
  view-transition-name: site-bar;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
  padding-block: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px), calc((100% - 1400px) / 2 + 16px));
  padding-right: max(16px, env(safe-area-inset-right, 0px), calc((100% - 1400px) / 2 + 16px));
  background: var(--chrome-bg); color: var(--chrome-ink);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--red);
}
.wordmark { display: flex; align-items: center; gap: 10px; letter-spacing: 0; color: var(--slate); text-decoration: none; }
.wordmark svg { width: 44px; height: 44px; fill: var(--red); flex: none; }
.identity { display: grid; }
.owner { font-family: var(--font-display); font-size: 1.3125rem; line-height: 1; }
.motto { font-family: var(--font-body); font-style: italic; font-size: 0.875rem; line-height: 1.6; }

.top-links { display: flex; gap: 14px; font-size: var(--fs-md); align-items: center; }
.top-links a { text-decoration: none; color: var(--chrome-dim); }
.top-links a[aria-current="page"], .top-links a:hover { color: var(--chrome-ink); }
.top-links > a[aria-current="page"], .photosbtn.on {
  text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 5px;
}

.halfnav { display: flex; flex-direction: column; gap: 1px; scroll-target-group: auto; }
.halfnav a { position: relative; display: grid; place-items: center; text-decoration: none; border-radius: 4px; color: var(--chrome-dim); line-height: 0; transition: color 0.3s; }
.halfnav a:hover { color: var(--chrome-ink); }
.halfnav svg { box-sizing: content-box; padding: 2px 5px; border-radius: 4px; transition: background 0.3s; }
/* 24px targets: the sun's extra reaches up and the moon's down, so they never overlap */
.halfnav a:first-child { padding-top: 6px; margin-top: -6px; }
.halfnav a + a { padding-bottom: 6px; margin-bottom: -6px; }
.halfnav a::after { content: ""; position: absolute; inset: -6px -5px -1px; }
.halfnav a + a::after { inset: -1px -5px -6px; }
@media (pointer: coarse) {
  .photosbtn, .top-links > a, .cartbtn { position: relative; }
  .photosbtn::after, .top-links > a::after { content: ""; position: absolute; inset: -10px -4px; }
  .cartbtn::after { content: ""; position: absolute; inset: -6px -8px; }
}
.halfnav a[aria-disabled] { opacity: 0.35; cursor: default; }
.halfnav a[aria-disabled]::after { content: none; }
/* :target-current where the browser tracks it; site.js adds .target-current elsewhere */
.halfnav a:is(:target-current, .target-current) { color: var(--chrome-ink); }
.halfnav a:is(:target-current, .target-current) svg { background: var(--chrome-line); }

.photosbtn { anchor-name: --photos-btn; display: inline-block; background: none; border: 0; padding: 4px 0; font: inherit; color: var(--chrome-dim); cursor: pointer; }
.photosbtn.on, .photosbtn:hover, .photosbtn[aria-expanded="true"] { color: var(--chrome-ink); }

.cartbtn { anchor-name: --cart-btn; position: relative; display: grid; place-items: center; width: 28px; height: 32px; padding: 0; background: none; border: 0; color: var(--chrome-dim); cursor: pointer; }
.cartbtn:hover, .cartbtn[aria-expanded="true"] { color: var(--chrome-ink); }
.cartbtn:disabled { opacity: 0.4; cursor: default; color: var(--chrome-dim); }
.cartbtn .bag { display: block; }
.badge { position: absolute; top: 0; right: -4px; min-width: 16px; height: 16px; padding: 0 5px; border-radius: 999px; background: var(--red); color: var(--red-ink); font: 400 var(--fs-xs)/16px var(--font-display); text-align: center; } /* Lintel: Georgia's figures drop below the line and touched the edge */

@media (max-width: 480px) {
  .top-links { margin-left: auto; }
}
@media (min-width: 481px) {
  .bar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .wordmark { justify-self: start; }
  .cartwrap { grid-column: 3; justify-self: end; }
}
@media (max-width: 760px) {
  .bar { gap: 8px 10px; }
  .wordmark svg { width: 34px; height: 34px; }
  .owner { font-size: 1rem; }
  .motto { font-size: 0.6875rem; }
  .top-links { gap: 10px; }
  .halfnav svg { padding-inline: 3px; }
  .halfnav a { padding-inline: 2px; margin-inline: -2px; } /* still 24px wide */
  .halfnav a::after, .halfnav a + a::after { inset-inline: -3px; }
}
/* the header just fits on one line at 360px */
@media (max-width: 400px) {
  .bar { column-gap: 8px; }
  .wordmark { gap: 6px; }
  .top-links { gap: 8px; }
}

.skip {
  position: fixed; z-index: 11; top: calc(8px + env(safe-area-inset-top, 0px));
  left: max(16px, env(safe-area-inset-left, 0px), calc((100% - 1400px) / 2 + 16px));
  padding: 8px 14px; border-radius: 4px 12px; border-bottom: 1px solid var(--red);
  background: rgba(255, 255, 255, 0.96); color: #1e1e20; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  font: var(--fs-md)/1.2 var(--font-display); text-decoration: none;
}
.skip:where(:not(:focus-within, :active)) {
  clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; white-space: nowrap;
}

/* ---------- Footer ---------- */
.foot {
  position: relative; z-index: 8;
  padding-block: 8px calc(8px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px), calc((100% - 1400px) / 2 + 16px));
  padding-right: max(16px, env(safe-area-inset-right, 0px), calc((100% - 1400px) / 2 + 16px));
  background: var(--chrome-bg); color: var(--chrome-dim);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid var(--red);
  font: italic var(--fs-sm)/1.5 var(--font-body);
  view-transition-name: site-foot;
}
.foot { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.foot p { margin: 0; }
.footbtn { anchor-name: --foot-btn; background: none; border: 0; padding: 0; font: inherit; color: var(--chrome-dim); cursor: pointer; }
.footbtn:hover, .footbtn[aria-expanded="true"] { color: var(--chrome-ink); }
@media (pointer: coarse) {
  .footbtn { position: relative; }
  .footbtn::after { content: ""; position: absolute; inset: -10px -6px; }
}
.foot .wip { color: var(--red); font-style: normal; font-family: var(--font-display); } /* review-site builds only */
@media (min-width: 761px) and (min-height: 521px) {
  body { padding-bottom: calc(38px + env(safe-area-inset-bottom, 0px)); } /* the footer's height */
  .foot { position: fixed; inset: auto 0 0; }
}

/* ---------- Photos and cart stacks ---------- */
/* The popover is a zero-size point under its button; anchor positioning places it (site.js where unsupported) */
.fanwrap { position: relative; }
.fan {
  position: fixed; inset: auto; width: 0; height: 0; margin: 14px 0 0 -12px; padding: 0; border: 0;
  background: none; color: inherit; overflow: visible;
  position-anchor: --photos-btn; top: anchor(bottom); left: anchor(left);
  /* keep the popover on screen while its items animate out */
  transition-property: display, overlay; transition-duration: 0.42s; transition-behavior: allow-discrete;
}
.fan-item {
  --i: 0; /* each item's position in the stack; the markup and site.js set it inline */
  --x: calc(var(--i) * var(--i) * -3px - var(--i) * 3px);
  --step: 74px;
  --closed: translate(0, calc(var(--i) * var(--step) * -1 - 30px)) rotate(0deg) scale(0.6);
  --open: translate(var(--x), 0) rotate(calc(var(--i) * 1.5deg)) scale(1);
  position: absolute; left: 0; top: calc(var(--i) * var(--step));
  display: flex; align-items: center; gap: 12px; text-decoration: none; width: max-content;
  opacity: 0; transform-origin: 0 50%;
  transform: var(--closed);
  transition: transform 0.42s cubic-bezier(.2,.9,.25,1.15), opacity 0.25s ease;
  transition-delay: calc(var(--i) * 45ms);
}
/* [data-closing] is site.js's exit animation for browsers that cannot transition display */
.fan:popover-open:not([data-closing]) .fan-item { opacity: 1; transform: var(--open); }
/* Same selector as the open rule: a weaker one here would lose and the stack would appear without animating */
@starting-style { .fan:popover-open:not([data-closing]) .fan-item { opacity: 0; transform: var(--closed); } }
/* Hover bridge: hit areas span the gaps, so a slow pointer never leaves the stack */
/* Countries that don't fit below the button on a short window (site.js) */
.fan-item[data-overflow] { display: none; }
.fan-item::before { content: ""; position: absolute; inset: -9px -28px; } /* wide: lower rows bend and tilt sideways */
.fan-item:first-child::before { top: -18px; }

.thumb {
  width: 96px; height: 63px; border-radius: 4px 12px; overflow: hidden; display: grid; place-items: center;
  background: var(--chrome-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.28), 0 0 0 1px var(--chrome-line); color: var(--chrome-ink); font-size: var(--fs-lg); transition: transform 0.2s;
}
.thumb img, .thumb .split img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.count { font-family: var(--font-display); font-size: var(--fs-xl); letter-spacing: 0; flex-direction: column; display: flex; justify-content: center; align-items: center; line-height: 1; gap: 3px; }
.thumb.count small { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-xs); letter-spacing: 0.04em; color: var(--chrome-dim); }
.lbl {
  background: var(--chrome-bg); color: var(--chrome-ink); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 5px 10px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,0.2); display: flex; gap: 8px; align-items: baseline;
}
.lbl b { font-size: var(--fs-sm); }
.lbl small { font-family: var(--font-body); font-size: var(--fs-xs); color: var(--chrome-dim); }
.lbl small:empty { display: none; }
.fan-item:hover .thumb, .fan-item:focus-visible .thumb, .fan-link:focus-visible .thumb { transform: scale(1.08); }
.fan-item[aria-current] .lbl { background: var(--chrome-ink); }
.fan-item[aria-current] .lbl b { color: var(--page); }
.fan-item[aria-current] .lbl small { color: var(--page); opacity: 0.7; }

.fan.cartfan { position-anchor: --cart-btn; left: auto; right: anchor(right); margin-left: 0; }
.cartfan .fan-item { left: auto; right: 0; transform-origin: 100% 50%; }
.cartfan .fan-link { display: flex; flex-direction: row-reverse; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
/* Rebuilt while open (after a remove): the items stay put rather than replaying the opening */
.fan[data-instant] .fan-item { transition: none; }
/* With a mouse it shows on hover or focus; on touch screens it is always there */
.unfan {
  position: absolute; top: -7px; right: -7px; z-index: 1;
  display: grid; place-items: center; width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 2px 7px; background: var(--red); color: var(--red-ink);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3); cursor: pointer;
  opacity: 0; transition: opacity 0.15s, transform 0.15s;
}
.fan-item:hover .unfan, .fan-item:focus-within .unfan { opacity: 1; }
.unfan:hover { transform: scale(1.12); }
@media (pointer: coarse) {
  .unfan { opacity: 1; }
  .unfan::after { content: ""; position: absolute; inset: -8px; } /* a bigger target than it looks */
}
.thumb.go { background: var(--red); color: var(--red-ink); }
.thumb.go small { color: var(--red-ink); opacity: 0.85; }
.lbl.go { background: var(--red); }
.lbl.go b, .lbl.go small { color: var(--red-ink); }

.fan.footfan { position-anchor: --foot-btn; top: auto; bottom: anchor(top); left: auto; right: anchor(right); margin: 0 0 12px; }
.footfan .fan-item {
  --closed: translate(0, calc(var(--i) * var(--step) + 30px)) rotate(0deg) scale(0.6);
  --open: translate(var(--x), 0) rotate(calc(var(--i) * -1.5deg)) scale(1);
  top: auto; left: auto; right: 0; bottom: calc(var(--i) * var(--step));
  flex-direction: row-reverse; transform-origin: 100% 50%; font-style: normal;
}
.footfan .fan-item:first-child::before { top: -9px; bottom: -18px; }
.licon { display: block; }

/* On the narrowest phones the photos stack can run off the left edge (a phone layout is deferred) */
@media (max-width: 760px) {
  .lbl small { display: none; }
  .cartfan .lbl b { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Country backgrounds ---------- */
/* Phones (up to 760px) get the 800px copy, others the 1600px one; only the one in use is fetched */
.bg { position: fixed; inset: 0; z-index: 0; background: var(--bg-day-fill) center / cover no-repeat; background-image: var(--bg, none), var(--pv, none); }
@media (max-width: 760px) { .bg { background-image: var(--bg-sm, var(--bg, none)), var(--pv, none); } }
.bg-night { opacity: 0; background-color: var(--bg-night-fill); }
.bg-night.bg-only { opacity: 1; }
/* Night fades in as the dusk band scrolls through; site.js does the same where scroll-driven animations are missing */
@keyframes nightfall { from { opacity: 0; } to { opacity: 1; } }
/* The 0% is deliberate: it filters out browsers with only partial support */
/*noinspection CssRedundantUnit*/
@supports ((animation-timeline: view()) and (animation-range: 0% 100%)) {
  html { timeline-scope: --dusk; }
  .dusk { view-timeline: --dusk block; }
  .bg-night:not(.bg-only) {
    animation: nightfall auto linear both;
    animation-timeline: --dusk;
    /* Valid (CSS Scroll-driven Animations); the IDE's CSS grammar doesn't know timeline range names yet */
    /*noinspection CssInvalidPropertyValue*/
    animation-range-start: entry 0%;
    /*noinspection CssInvalidPropertyValue*/
    animation-range-end: contain 20vh;
  }
}
/* The wash: the photo's own preview over it, masked; its strength is 50% x --wash-scroll (site.js) */
.bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--pv, none) center / cover no-repeat; filter: saturate(0.85) brightness(0.9);
  opacity: calc(0.5 * var(--wash-scroll, 0.45));
  transition: opacity 0.3s linear;
  mask-image:
    linear-gradient(105deg, #000 0%, #000 28%, transparent 66%),
    radial-gradient(ellipse 70% 65% at 62% 48%, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.45) 55%, #000 100%);
  mask-composite: add;
}
/* Darkening behind the intro, for white text on bright skies (about 4:1 or better) */
.bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.44), rgba(0,0,0,0.14) 45%, rgba(0,0,0,0) 65%),
    linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.1) 45%, rgba(0,0,0,0.05) 70%, rgba(0,0,0,0.25));
}

/* ---------- Country intros, dusk band and end ---------- */
.intro, .dusk, .end a { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 2px 16px rgba(0, 0, 0, 0.45); }
.intro .eyebrow, .intro p, .intro .count { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 0, 0, 0.5); }

.intro { padding-block: clamp(72px, 18vh, 200px) 40px; color: var(--hero-ink); }
.eyebrow { font-family: var(--font-body); font-size: var(--fs-sm); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.92; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.intro h1, .intro h2 {
  font-family: var(--font-display); letter-spacing: -0.02em; line-height: 0.92;
  font-size: clamp(4rem, 15vw, 13.125rem); margin: 14px 0 18px; text-wrap: balance;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.45), 0 4px 28px rgba(0, 0, 0, 0.4);
}
.intro p { max-width: 46ch; font-size: var(--fs-md); margin: 0; }
.count { margin-top: 18px; font-family: var(--font-body); font-size: var(--fs-sm); opacity: 0.92; }

.dusk { padding-block: 22vh; color: #fff; text-align: center; }
.dusk .line { display: flex; align-items: center; gap: 16px; font-family: var(--font-body); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.dusk .line::before, .dusk .line::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.55); }

.end { padding-block: 40px 64px; color: var(--night-ink); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: baseline; }
.end a { font-family: var(--font-display); font-size: clamp(1.75rem, 1rem + 3.2vw, 3.5rem); letter-spacing: 0; text-decoration: none; }
.end a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* ---------- Photo tiles (masonry) ---------- */
.grid { --tile-gap: 36px; columns: 3 300px; column-gap: var(--tile-gap); padding-block: 8px 48px; }
.tile { text-decoration: none; break-inside: avoid; margin: 0 0 var(--tile-gap); border-radius: 4px 14px; overflow: hidden; cursor: pointer; position: relative; display: block; width: 100%; padding: 3px 3px 0; border: 0; text-align: left; font: inherit; background: none; color: inherit; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background var(--push-time) var(--push-ease); }
.day .tile { background: var(--day-frost); }
.night .tile { background: var(--night-frost); }
/* clips the push-in, so the frame never moves */
.tile .clip { display: block; overflow: hidden; border-radius: 2px 12px; }
.tile img { display: block; width: 100%; height: auto; border-radius: 2px 12px; }

.cap { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; padding: 9px 11px 11px; }
.cap b { font-size: var(--fs-md); }
.cap small { margin-top: 1px; }
.cap small { display: block; font-family: var(--font-body); font-size: var(--fs-xs); }
.day .cap { color: var(--day-ink); }
.day .cap small { color: var(--day-dim); }
.night .cap { color: var(--night-ink); }
.night .cap small { color: var(--night-dim); }

/* ---------- Photo viewer ---------- */
.viewer {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0;
  background: var(--viewer-bg); color: var(--viewer-ink);
  grid-template-columns: minmax(0, 1fr) 320px; gap: 24px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  opacity: 0;
  transition-property: opacity, display, overlay, background-color;
  transition-duration: 0.2s;
  transition-behavior: allow-discrete;
}
.viewer[open] { display: grid; opacity: 1; }
@starting-style { .viewer[open] { opacity: 0; } }
.viewer:modal { overscroll-behavior: contain; }
.viewer::backdrop { background: transparent; overflow: hidden; overscroll-behavior: contain; }
.photo-page {
  position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px;
  min-height: calc(100dvh - 66px); padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
  background: var(--viewer-page); color: var(--viewer-ink); transition: background-color 0.2s;
}
.photo-page .close { position: absolute; top: 12px; }
/* Grounds picked with the swatches (localStorage tf-lightbox, set on <html> before the first paint) */
html[data-lightbox="white"] :is(.viewer, .photo-page) {
  --viewer-bg: rgba(255, 255, 255, 0.95);
  --viewer-page: #ffffff;
  --viewer-ink: #1e1e20;
  --viewer-dim: #4f5857; /* 5.9:1 on the card */
  --viewer-soft: #2f3837;
  --viewer-line: rgba(30, 30, 32, 0.14);
  --viewer-rgb: 30 30 32;
  --viewer-step: #3c4746;
  --viewer-step-hover: #2a3231;
  --viewer-step-ink: #ffffff;
  --viewer-shadow: none;
}
html[data-lightbox="white"] .vtint { display: none; } /* a night photo's colours would only grey the white */
html[data-lightbox="black"] :is(.viewer, .photo-page) {
  --viewer-bg: rgba(12, 12, 13, 0.95);
  --viewer-page: #0c0c0d;
}
.lbox {
  position: absolute; top: calc(19px + env(safe-area-inset-top, 0px)); right: calc(max(12px, env(safe-area-inset-right, 0px)) + 48px);
  display: flex; gap: 8px;
}
.photo-page .lbox { top: 19px; }
.lbox button {
  position: relative; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 2px 7px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgb(var(--viewer-rgb) / 0.45);
}
.lbox [data-lb="slate"] { background: #3c4746; }
.lbox [data-lb="white"] { background: #ffffff; }
.lbox [data-lb="black"] { background: #0c0c0d; }
.lbox [aria-pressed="true"] { outline: 1.5px solid var(--viewer-ink); outline-offset: 2px; }
.lbox button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@media (pointer: coarse) { .lbox button::after { content: ""; position: absolute; inset: -4px; } }
:is(.viewer, .photo-page) figure { margin: 0; display: grid; place-items: center; min-height: 0; min-width: 0; }
/* horizontal swipes step (site.js) */
.viewer figure { touch-action: pan-y; }
/* Sized from --ar and the width and height attributes, so the box is final before the image loads */
:is(.viewer, .photo-page) figure img {
  --max-h: calc(100dvh - 64px);
  width: min(100%, var(--max-h) * var(--ar, 1.5)); height: auto; border-radius: 3px 10px;
}
.photo-page figure img { --max-h: calc(100dvh - 160px); }
.close {
  position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  background: var(--red); color: var(--red-ink); border: 0; border-radius: 3px 10px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35); transition: transform 0.15s;
}
.close:hover { transform: scale(1.08); }
.close svg { display: block; }
@media (pointer: coarse) { .close::after { content: ""; position: absolute; inset: -4px; } }
.panel {
  align-self: center; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  padding: 20px; border-radius: 4px 16px;
  background: rgb(var(--viewer-rgb) / 0.1); box-shadow: inset 0 0 0 1px rgb(var(--viewer-rgb) / 0.08);
}
/* the browser's smoothing of the few-pixel preview is the blur */
.vtint { position: fixed; inset: 0; z-index: -1; background: center / cover no-repeat; opacity: 0.2; filter: saturate(1.15); pointer-events: none; }
.photo-page .vtint { position: absolute; }
/* At most 190px tall: a taller map is narrower instead */
.cmap { position: relative; width: min(100%, 190px * var(--ar, 1.5)); margin: 0 auto 2px; --map-water: #7fadc9; }
.cmap svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.cmap .grat { stroke: rgb(var(--viewer-rgb) / 0.08); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cmap .coast { fill: none; stroke: var(--map-water); stroke-linejoin: round; }
.cmap .coast.far { stroke-width: 14; opacity: 0.2; }
.cmap .coast.near { stroke-width: 5; opacity: 0.45; }
.cmap .around { fill: rgb(var(--viewer-rgb) / 0.05); stroke: rgb(var(--viewer-rgb) / 0.18); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.cmap .self { fill: rgb(var(--viewer-rgb) / 0.16); stroke: rgb(var(--viewer-rgb) / 0.5); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.cpin { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }
.cpin-dot { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--viewer-soft); }
.cpin-nm {
  position: absolute; top: 0; left: 8px; translate: 0 -55%; white-space: nowrap;
  font: var(--fs-xs)/1 var(--font-display); color: var(--viewer-dim); text-shadow: var(--viewer-shadow);
}
.cpin.left .cpin-nm { left: auto; right: 8px; }
.cpin.below .cpin-nm { left: 0; top: 8px; translate: -50% 0; }
.cpin.above .cpin-nm { left: 0; top: auto; bottom: 8px; translate: -50% 0; }
.cpin.here { z-index: 1; }
.cpin.here .cpin-dot { left: -5px; top: -5px; width: 10px; height: 10px; background: var(--red); box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, 0.4); }
.cpin.here .cpin-nm { color: var(--viewer-ink); }
.cpin.here:not(.below, .above) .cpin-nm { left: 11px; }
.cpin.here.left .cpin-nm { left: auto; right: 11px; }
.ptitle { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.15; letter-spacing: 0; margin: 0; text-wrap: balance; }
.exif { font-family: var(--font-body); font-size: var(--fs-xs); color: var(--viewer-dim); }
.story { font-size: var(--fs-sm); color: var(--viewer-soft); margin: 0; max-width: 40ch; }
.pnav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 4px; }
.pnav .pos { font-size: var(--fs-xs); color: var(--viewer-dim); text-align: center; font-variant-numeric: lining-nums tabular-nums; }
.step {
  justify-self: start; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0;
  border-radius: 3px 10px; background: var(--viewer-step); color: var(--viewer-step-ink); cursor: pointer; /* slate on white, white on slate */
  transition: background 0.15s;
}
.step svg { display: block; }
.step.next { justify-self: end; }
.step:not(:disabled, [aria-disabled="true"]):hover { background: var(--viewer-step-hover); }
.step:is(:disabled, [aria-disabled="true"]) { opacity: 0.35; cursor: default; }
.own { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--viewer-line); display: grid; gap: 10px; }
.own > span { font-size: var(--fs-xs); color: var(--viewer-dim); }
/* Download choices as pills (also on the checkout page) */
.pick { display: flex; flex-wrap: wrap; gap: 6px; border: 0; margin: 0; padding: 0; }
.pick label { font-size: var(--fs-xs); padding: 5px 10px; border: 1px solid rgb(var(--viewer-rgb) / 0.2); border-radius: 999px; cursor: pointer; color: var(--viewer-soft); }
.pick label:has(input:checked) { border-color: var(--viewer-ink); color: var(--viewer-ink); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick label:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.pick em { font-style: normal; font-family: var(--font-body); margin-left: 4px; }
.buy { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.buy .add { flex: 1; min-height: 44px; }
/* a fixed size, so a narrow card can't squash it */
.tocart {
  position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 3px 10px; background: var(--viewer-step); color: var(--viewer-step-ink); transition: background 0.15s;
}
.tocart:hover { background: var(--viewer-step-hover); }
.tocart[aria-disabled="true"] { opacity: 0.4; }
.tocart .bag { display: block; }
.tocart .badge { top: 7px; right: 5px; } /* on the bag, as in the header */
.add { background: var(--red); color: var(--red-ink); border: 0; font: var(--fs-md)/1 var(--font-display); padding: 14px 16px; border-radius: 4px 12px; cursor: pointer; }
.vfull {
  position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(max(12px, env(safe-area-inset-right, 0px)) + 146px); /* 12px clear of the current swatch's ring, as the close button is of the swatches */
  display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 36px; height: 36px; padding: 0 10px; border: 0;
  border-radius: 3px 10px; background: var(--viewer-step); color: var(--viewer-step-ink); cursor: pointer;
  font: var(--fs-sm)/1 var(--font-display); transition: background 0.15s;
}
.photo-page .vfull { top: 12px; }
.vfull:hover { background: var(--viewer-step-hover); }
.vfull svg { display: block; flex: none; }
.vfull .i-back, .vfull-txt { display: none; }
@media (pointer: coarse) { .vfull::after { content: ""; position: absolute; inset: -4px; } }

/* Details hidden (html[data-full]): the photo as big as fits, the time rail along its foot, previous / next at its ends */
html[data-full] .vfull { padding-left: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
html[data-full] .vfull .i-open { display: none; }
html[data-full] .vfull .i-back, html[data-full] .vfull-txt { display: revert; }
html[data-full] :is(.viewer, .photo-page) { grid-template-columns: minmax(0, 1fr); }
html[data-full] .viewer figure img { --max-h: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
html[data-full] .photo-page figure img { --max-h: calc(100dvh - 114px); }
html[data-full] :is(.viewer, .photo-page) :is(.panel, .pnav) { display: contents; }
html[data-full] :is(.viewer, .photo-page) .panel > :not(.pnav) { display: none; }
html[data-full] :is(.viewer, .photo-page) .step {
  position: absolute; z-index: 3; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
html[data-full] :is(.viewer, .photo-page) .step.prev { left: max(16px, env(safe-area-inset-left, 0px)); }
html[data-full] :is(.viewer, .photo-page) .step.next { right: max(16px, env(safe-area-inset-right, 0px)); }
html[data-full] :is(.viewer, .photo-page) .step:is(:disabled, [aria-disabled="true"]) { opacity: 0.4; box-shadow: none; }
html[data-full] :is(.viewer, .photo-page) .pos { display: none; }
/* A shade along the foot, so the rail reads on a bright photo */
html[data-full] :is(.viewer, .photo-page) figure { position: relative; }
html[data-full] :is(.viewer, .photo-page) :is(.close, .lbox, .vfull) { z-index: 4; } /* above the photo, which is positioned for its shade */
html[data-full] :is(.viewer, .photo-page) figure::after {
  content: ""; position: absolute; left: -16px; right: -16px; bottom: -16px; height: 110px; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18) 55%, transparent);
}
html[data-full][data-lightbox="white"] :is(.viewer, .photo-page) figure::after { background: linear-gradient(to top, rgba(255, 255, 255, 0.6), transparent); }
html[data-full] .photo-page figure::after { bottom: -24px; }

.vcap { display: none; }
html[data-full] .vcap {
  position: absolute; z-index: 4; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px));
  max-width: calc(100% - 300px); display: grid; gap: 2px; color: #fff; pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.45);
}
html[data-full] .photo-page .vcap { top: 12px; }
.vcap b { font: 400 clamp(1rem, 1.4vw, 1.5rem)/1.2 var(--font-display); font-synthesis: none; text-wrap: balance; }
.vcap small { font: clamp(0.75rem, 0.95vw, 1rem)/1.35 var(--font-body); font-variant-numeric: lining-nums tabular-nums; opacity: 0.92; }
html[data-full][data-lightbox="white"] .vcap { color: var(--viewer-ink); text-shadow: 0 0 6px #fff, 0 0 2px #fff; }

/* ---------- The time rail ---------- */
/* The stops share their stretch evenly, so each press of next moves one stop */
.trail { display: none; }
html[data-full] .trail {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 4px; height: 36px;
  left: calc(max(16px, env(safe-area-inset-left, 0px)) + 50px); right: calc(max(16px, env(safe-area-inset-right, 0px)) + 50px);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.tseg {
  flex: var(--n) 1 0; min-width: 0; height: 4px; border-radius: 999px; background: var(--c);
  display: flex; justify-content: space-around; align-items: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 1px 4px rgba(0, 0, 0, 0.45);
}
.t-night { --c: #16203a; }
.t-blue { --c: #3a64a6; }
.t-gold { --c: #e3a24c; }
.t-day { --c: #a9c8da; }
.t-none { --c: rgba(255, 255, 255, 0.4); } /* no time known */
.tstop {
  position: relative; flex: 0 1 24px; min-width: 0; height: 24px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; color: inherit; text-decoration: none;
}
.tstop::before, .tstop::after { content: ""; grid-area: 1 / 1; border-radius: 50%; }
.tstop::before { width: clamp(4px, 60%, 8px); aspect-ratio: 1; background: #fff; box-shadow: 0 0 0 1px rgba(30, 30, 32, 0.45), 0 1px 3px rgba(0, 0, 0, 0.4); transition: transform 0.15s; }
.tstop[aria-current="true"] { cursor: default; }
.tstop[aria-current="true"]::after { width: 20px; height: 20px; border: 3px solid var(--red); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); } /* 3px thick, the extra pixel outside */
.tstop:focus-visible { outline: none; }
.tstop:focus-visible::before { outline: 2px solid var(--red); outline-offset: 3px; }
/* not loaded until pointed at or focused */
.tstop .peek {
  display: none; position: absolute; bottom: 30px; left: 50%; translate: -50% 0; width: 168px; padding: 5px;
  border-radius: 3px 10px; background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(12px); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  pointer-events: none; text-align: left;
}
.tstop.edge-l .peek { left: 0; translate: none; }
.tstop.edge-r .peek { left: auto; right: 0; translate: none; }
.tstop .peek img { display: block; width: 100%; height: auto; border-radius: 2px 7px; }
.tstop .peek span { display: block; padding: 5px 2px 1px; font: var(--fs-xs)/1.25 var(--font-display); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.tstop:focus-visible .peek { display: block; }
@media (hover: hover) and (pointer: fine) {
  .tstop:hover::before { transform: scale(1.45); }
  .tstop:hover .peek { display: block; }
}
@media (prefers-reduced-motion: reduce) { .tstop::before { transition: none; } }
/* With the details hidden, the controls fade after a few still seconds (site.js marks .idle) */
html[data-full] :is(.viewer, .photo-page) :is(.close, .lbox, .vfull, .step, .trail, .vcap) { transition: opacity 0.3s, background 0.15s; }
html[data-full] .idle :is(.close, .lbox, .vfull, .step, .trail, .vcap) { opacity: 0; transition: opacity 0.8s, background 0.15s; }
html[data-full] .idle { cursor: none; }

/* A phone held upright: a plain column, since a grid overlapped in Firefox for Android */
@media (max-width: 760px) and (orientation: portrait) {
  .viewer[open] { display: flex; flex-direction: column; gap: 24px; overflow-y: auto; padding-top: calc(60px + env(safe-area-inset-top, 0px)); }
  .viewer figure { flex: none; }
  .viewer figure img { --max-h: 60dvh; }
  .panel { align-self: stretch; }
  html[data-full] .viewer[open] { justify-content: center; }
  html[data-full] .vcap { top: calc(60px + env(safe-area-inset-top, 0px)); max-width: calc(100% - 32px); } /* under the controls */
  html[data-full] .viewer figure img { --max-h: calc(100dvh - 140px); }
}
@media (max-width: 760px) {
  .photo-page { display: flex; flex-direction: column; padding-top: 60px; }
  .photo-page figure img { --max-h: 70dvh; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .viewer { grid-template-columns: minmax(0, 1fr) minmax(200px, 38%); grid-template-rows: minmax(0, 1fr); gap: 20px; padding-block: calc(12px + env(safe-area-inset-top, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)); }
  .viewer figure img { --max-h: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .panel { align-self: stretch; overflow-y: auto; margin-top: 48px; padding-top: 14px; gap: 10px; } /* clear of the close button */
  .ptitle { font-size: var(--fs-lg); }
  .own { margin-top: 8px; }
}

/* ---------- Home, about and not found ---------- */
.page { position: relative; z-index: 1; background: var(--page); color: var(--chrome-ink); min-height: 100dvh; }
.page .wrap { padding-block: clamp(48px, 10vh, 120px) 72px; }
.hello { font-family: var(--font-display); letter-spacing: -0.01em; line-height: 1.08; font-size: clamp(2.25rem, 1rem + 4.5vw, 5rem); margin: 0 0 20px; max-width: 16ch; text-wrap: balance; color: var(--slate); }
.hello b { font-weight: 400; color: var(--red); }
.hello-sm { font-size: clamp(2rem, 1.25rem + 2.6vw, 3.5rem); }
.sub { font-size: var(--fs-md); color: var(--chrome-dim); max-width: 52ch; margin: 0; }
.sub a { color: var(--chrome-ink); }
/* The red layer rests anchored right, so leaving wipes it out that way; only its size animates */
:is(.sub, .prose) a:not(.back, .legal-list a), .consent a {
  text-decoration: none;
  background:
    linear-gradient(var(--red), var(--red)) no-repeat 100% 100% / 0 1px,
    linear-gradient(var(--link-rest), var(--link-rest)) no-repeat 0 100% / 100% 1px;
  transition: background-size var(--push-time) var(--push-ease);
}
:is(:is(.sub, .prose) a:not(.back, .legal-list a), .consent a):is(:hover, :focus-visible) { background-position: 0 100%, 0 100%; background-size: 100% 1px, 100% 1px; }

/* ---------- All photos ---------- */
.photos-head { margin-bottom: clamp(32px, 5vw, 56px); }
.tally {
  margin: 0 0 14px; font: var(--fs-xs)/1.4 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--chrome-dim); font-variant-numeric: lining-nums tabular-nums;
}

/* ---------- Home: the intro beside a map of the countries ---------- */
.home .wrap { padding-block: clamp(24px, 5vh, 64px) 72px; }
.home-hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px);
  align-items: center; min-height: calc(100dvh - 190px);
}
.home-intro .hello { font-size: clamp(2.25rem, 1rem + 3.6vw, 4.25rem); }
.home-all { margin: 28px 0 0; }
.home-all .back { font-size: var(--fs-md); color: var(--chrome-ink); }
@media (max-width: 760px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
}

.homemap {
  position: relative; container-type: inline-size; margin-top: clamp(24px, 5vw, 72px); /* room above Europe for its photos */
  --map-water: #8db9d6; --map-land: color-mix(in oklab, var(--chrome-ink) 10%, var(--page));
  --thumb: clamp(40px, 13.7cqi, 110px); --reach: clamp(38px, 13cqi, 100px); /* in proportion down to a 290px map */
}
/* On the dark page a light blue glows, so it is softer there (--water-k scales the strokes) */
@media (prefers-color-scheme: dark) { .homemap { --map-water: #4a7c9c; --water-k: 0.5; } }
.map { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.map .grat { stroke: var(--chrome-line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.map .eq { stroke: color-mix(in oklab, var(--chrome-dim) 45%, transparent); stroke-dasharray: 3 5; }
.map text { font: 11px var(--font-body); fill: var(--chrome-dim); font-variant-numeric: lining-nums; }
.map .land { fill: var(--map-land); fill-opacity: 0.75; } /* the grid and the motto's letters show faintly through */
.map .coast { fill: none; stroke: var(--map-water); stroke-linejoin: round; stroke-linecap: round; }
/* three widths, so the blue fades out to sea */
.map .coast.far { stroke-width: 24; opacity: calc(0.12 * var(--water-k, 1)); }
.map .coast.mid { stroke-width: 13; opacity: calc(0.2 * var(--water-k, 1)); }
.map .coast.near { stroke-width: 5; opacity: calc(0.42 * var(--water-k, 1)); }

/* The pin is a point; its photo sits --ox / --oy away from it */
.pin {
  position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; z-index: 2;
  text-decoration: none; color: var(--chrome-ink);
  --dx: calc(var(--ox) * var(--reach)); --dy: calc(var(--oy) * var(--reach));
}
.pin:is(:hover, :focus-visible) { z-index: 3; }
.pin:focus-visible { outline: none; }
.pin:focus-visible .ph { outline: 2px solid var(--red); outline-offset: 2px; }
.pin-dot {
  position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, 0.35);
}
.pin-line {
  position: absolute; left: 0; top: 0; height: 1px; transform-origin: 0 50%;
  width: calc(hypot(var(--dx), var(--dy)) - var(--thumb) * 0.4);
  rotate: atan2(var(--dy), var(--dx)); background: var(--chrome-dim); opacity: 0.6;
}
.pin-card { position: absolute; left: var(--dx); top: var(--dy); translate: -50% -50%; display: grid; gap: 4px; justify-items: center; }
.pin-card .ph {
  display: block; width: var(--thumb); border-radius: 4px 12px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--chrome-line); transition: transform 0.2s;
}
.pin-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.pin:is(:hover, :focus-visible) .ph { transform: scale(1.08); }
.pin-card .nm { font: var(--fs-xs)/1 var(--font-display); white-space: nowrap; padding: 2px 7px 4px; border-radius: 999px; /* Lintel sits low in its line: 1px of padding moves from top to bottom so the name looks centred in this small pill */ background: rgba(255, 255, 255, 0.8); color: #1e1e20; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.map-seen) .map { animation: map-in 1.2s ease-out backwards; }
  html:not(.map-seen) .pin-dot { animation: pin-drop 0.6s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--i) * 260ms + 500ms); }
  html:not(.map-seen) .pin-line { animation: pin-line 0.5s var(--push-ease) backwards; animation-delay: calc(var(--i) * 260ms + 850ms); }
  html:not(.map-seen) .pin-card { animation: pin-bloom 0.8s var(--push-ease) backwards; animation-delay: calc(var(--i) * 260ms + 950ms); }
}
/* Beside the intro, photos near an edge pop out past the map (wideOffsets in map.go) */
@media (min-width: 761px) {
  @container (min-width: 560px) {
    .pin { --dx: calc(var(--wox, var(--ox)) * var(--reach)); --dy: calc(var(--woy, var(--oy)) * var(--reach)); }
  }
}
/* smaller names keep Europe's labels apart */
@container (max-width: 540px) {
  .pin-card .nm { font-size: 10px; padding: 1px 5px 3px; }
}
@keyframes map-in { from { opacity: 0; } }
@keyframes pin-drop { from { translate: 0 -60px; opacity: 0; } 40% { opacity: 1; } }
@keyframes pin-line { from { scale: 0 1; } }
@keyframes pin-bloom { from { translate: calc(-50% - var(--dx)) calc(-50% - var(--dy)); scale: 0.1; opacity: 0; } }

/* The motto, a Georgia letter per cell: sized to the cell so they never overlap; the head script handles the pop-in */
.page > .wrap { position: relative; z-index: 1; }
.awip {
  position: fixed; inset: 0; z-index: 0;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(3, 1fr);
  container-type: size; pointer-events: none; user-select: none;
  color: var(--awip-ink); font-family: var(--font-body);
  view-transition-name: awip; /* stays put while home and about crossfade */
}
.awip span {
  display: grid; place-items: center; line-height: 1;
  font-size: min(26.6cqh, 15cqi);
  animation: awip-pop 0.4s ease-in backwards; animation-delay: calc(var(--i) * 80ms);
}
.awip-seen .awip span { animation: none; }
@keyframes awip-pop {
  0% { transform: scale(0.1); opacity: 0; }
  60% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}
@media (max-width: 760px), (orientation: portrait) {
  .awip { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(6, 1fr); }
  .awip span { font-size: min(13.3cqh, 30cqi); }
}

.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.place { text-decoration: none; display: grid; gap: 10px; }
.place .split { aspect-ratio: 640 / 420; border-radius: 4px 14px; }
.place > span:last-child { display: block; }
.place b { font-family: var(--font-display); font-size: var(--fs-xl); letter-spacing: 0; }
.place small { font-family: var(--font-body); font-size: var(--fs-xs); color: var(--chrome-dim); margin-left: 8px; }
.split { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; }
.split img { display: block; width: 100%; height: 100%; object-fit: cover; }
.split .split-night { position: absolute; inset: 0; clip-path: polygon(62% 0, 100% 0, 100% 100%, 38% 100%); }

.about-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.portrait { aspect-ratio: 4 / 5; max-width: 100%; border-radius: 4px 16px; background: var(--chrome-line); display: grid; place-items: center; letter-spacing: 0; }
.portrait svg { width: 45%; height: auto; }
.prose { max-width: 62ch; min-width: 0; }
.prose p { margin: 0 0 14px; font-size: var(--fs-md); }
.prose h2 { font-family: var(--font-display); font-size: var(--fs-lg); letter-spacing: 0; margin: 40px 0 12px; color: var(--slate); }
.roles { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.roles li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
.roles time { font-family: var(--font-body); font-size: var(--fs-xs); color: var(--chrome-dim); padding-top: 3px; }
.roles small { display: block; color: var(--chrome-dim); }
.draft { font-size: var(--fs-xs); color: var(--chrome-dim); border: 1px dashed var(--chrome-line); border-radius: 4px 12px; padding: 10px 12px; margin-bottom: 28px; }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .portrait { max-width: 180px; }
  .roles li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Small print ---------- */
.legal { max-width: 68ch; }
.legal .updated { font-size: var(--fs-xs); color: var(--chrome-dim); margin-bottom: 28px; }
.legal ul { padding-left: 1.2em; margin: 0 0 14px; }
.legal li { margin-bottom: 4px; }
.legal-list { list-style: none; padding: 0 !important; display: grid; gap: 18px; margin-top: 24px !important; }
.legal-list a { font-size: var(--fs-lg); color: var(--slate); text-decoration: none; }
.legal-list small { display: block; color: var(--chrome-dim); font-size: var(--fs-sm); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 20px; margin: 0 0 14px; }
.facts dt { font-family: var(--font-display); color: var(--chrome-dim); font-size: var(--fs-sm); padding-top: 2px; }
.facts dd { margin: 0; }
.back-sp { margin-top: 40px !important; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 10px; } }

/* ---------- Checkout ---------- */
.co { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; margin-top: 12px; }
.co-list { min-width: 0; display: grid; gap: 24px; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.items li { display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding-block: 18px; border-bottom: 1px solid var(--chrome-line); }
.items li:first-child { border-top: 1px solid var(--chrome-line); }
.items li.empty { display: block; color: var(--chrome-dim); }
.items .pic { display: block; border-radius: 3px 12px; overflow: hidden; }
.items img { width: 168px; height: 112px; object-fit: cover; border-radius: 3px 12px; display: block; }
.items b a { text-decoration: none; }
.items b { font-family: var(--font-display); font-size: var(--fs-lg); letter-spacing: 0; display: block; }
.items small { font-size: var(--fs-xs); color: var(--chrome-dim); display: block; font-family: var(--font-body); margin: 2px 0 10px; }
.items .pick label { color: var(--chrome-dim); border-color: var(--chrome-line); }
.items .pick label:has(input:checked) { color: var(--chrome-ink); border-color: var(--chrome-ink); }
.items .rm { background: none; border: 0; color: var(--chrome-dim); font-size: var(--fs-xs); text-decoration: underline; cursor: pointer; padding: 0; margin-top: 10px; }
.items .amt { font-family: var(--font-body); font-size: var(--fs-md); text-align: right; }
.back { font-size: var(--fs-sm); color: var(--chrome-dim); text-decoration: none; }
.back:hover { color: var(--chrome-ink); }
/* Standalone links: the same wipe, from nothing */
.prose :is(.legal-list a, .back) { text-decoration: none; }
:is(.back, .legal-list a) {
  background: linear-gradient(var(--red), var(--red)) no-repeat 100% 100% / 0 1px;
  transition: background-size var(--push-time) var(--push-ease), color 0.2s;
}
:is(.back, .legal-list a):is(:hover, :focus-visible) { background-position: 0 100%; background-size: 100% 1px; }
.summary { position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); /* header height + 24px */ display: grid; gap: 12px; padding: 20px; border-radius: 4px 16px; background: var(--chrome-line); }
.summary .row { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); }
/* Secondary text on the summary's tinted panel, where --chrome-dim is only 4.3:1 (this is 6.6:1) */
.summary .dim { color: color-mix(in oklab, var(--chrome-ink) 80%, transparent); font-size: var(--fs-sm); }
.summary .total { font-family: var(--font-body); font-size: var(--fs-md); border-top: 1px solid var(--chrome-line); padding-top: 12px; }
.checkout { background: var(--red); color: var(--red-ink); border: 0; font-size: var(--fs-md); line-height: 1; padding: 14px 16px; border-radius: 4px 12px; cursor: pointer; }
.checkout:disabled { opacity: 0.4; cursor: default; }
.summary .fine { font-size: var(--fs-xs); color: color-mix(in oklab, var(--chrome-ink) 80%, transparent); margin: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-xs); line-height: 1.45; color: color-mix(in oklab, var(--chrome-ink) 80%, transparent); cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--red); cursor: pointer; }
.consent a { color: inherit; }
.order { margin-top: 12px; max-width: 880px; display: grid; gap: 24px; }
.order .sub { max-width: 60ch; }
.order .fine { font-size: var(--fs-xs); color: var(--chrome-dim); margin: 0; }
.order-items img { aspect-ratio: 3 / 2; }
.dl { justify-self: end; background: var(--red); color: var(--red-ink); font: var(--fs-sm)/1 var(--font-display); padding: 11px 14px; border-radius: 3px 10px; text-decoration: none; }
@media (max-width: 760px) {
  .co { grid-template-columns: 1fr; gap: 28px; }
  .summary { position: static; }
  .items li { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .items img { width: 96px; height: 64px; }
  .items .amt { grid-column: 2; text-align: left; }
  .dl { grid-column: 2; justify-self: start; }
}

/* ---------- Pointing at a photo ---------- */
/* A moving frame slides out from under the pointer and flickers, so only the picture moves. Mouse only, so a tap never sticks mid-effect; keyboard focus gets the same. */
:is(.tile .clip img, .place .split img, .items .pic img) {
  transition: scale var(--push-time) var(--push-ease);
}
:is(.cap b, .place b, .items b a) {
  background: linear-gradient(var(--red), var(--red)) no-repeat 100% 100% / 0 1px;
  transition: background-size var(--push-time) var(--push-ease);
}
@media (hover: hover) and (pointer: fine) {
  :is(.tile:hover .clip img, .place:hover .split img, .items li:has(a[data-open]:hover) .pic img) { scale: var(--push); }
  :is(.tile:hover .cap b, .place:hover b, .items li:has(a[data-open]:hover) b a) { background-position: 0 100%; background-size: 100% 1px; }
  .day .tile:hover { background: rgba(255, 255, 255, 0.9); }
  .night .tile:hover { background: rgba(30, 30, 32, 0.82); }
}
/* No ring: focus returns here when the viewer closes, and a ring looked like a stray frame */
:is(.tile, .place):focus-visible { outline: none; }
:is(.tile:focus-visible .clip img, .place:focus-visible .split img) { scale: var(--push); }
:is(.tile:focus-visible .cap b, .place:focus-visible b, .items b a:focus-visible) { background-position: 0 100%; background-size: 100% 1px; }
:is(.tile, .place .split, .items .pic) { transition-property: scale, background; transition-duration: 140ms, var(--push-time); transition-timing-function: ease-out, var(--push-ease); }
.tile:active, .items .pic:active, .place:active .split { scale: 0.985; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .fan-item { --closed: var(--open); transition: opacity 0.15s; transition-delay: 0s; }
  .fan { transition-duration: 0.15s; }
  .viewer { transition-duration: 0.1s; }
  .close, .unfan { transition: none; }
  .awip span { animation: none; }
  :is(.tile, .place, .items li) img { scale: 1 !important; transition: none; }
  :is(.cap b, .place b, .items b a, .back, .legal-list a, .sub a, .prose a, .consent a) { transition: none; }
  .tile.htmx-request { animation: none; opacity: 0.8; }
}
