/* Fonts, served from /fonts (Latin, SIL Open Font License). Each has a fallback sized to the same
   width and height, so text doesn't jump when the real font arrives. Measured with canvas metrics. */
@font-face { font-family: 'Italiana'; src: url('/fonts/italiana.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Infant'; src: url('/fonts/cormorant-infant.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Infant'; src: url('/fonts/cormorant-infant-italic.woff2') format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Italiana Fallback'; src: local('Georgia'), local('Times New Roman'); size-adjust: 93.93%; ascent-override: 99.01%; descent-override: 26.62%; line-gap-override: 0%; }
@font-face { font-family: 'Cormorant Fallback'; src: local('Georgia'), local('Times New Roman'); font-style: normal; size-adjust: 89.36%; ascent-override: 102.95%; descent-override: 32.45%; line-gap-override: 0%; }
@font-face { font-family: 'Cormorant Fallback'; src: local('Georgia Italic'), local('Georgia-Italic'), local('Times New Roman Italic'); font-style: italic; size-adjust: 78.68%; ascent-override: 116.93%; descent-override: 36.86%; line-gap-override: 0%; }
@font-face { font-family: 'Montserrat Fallback'; src: local('Arial'), local('ArialMT'), local('Helvetica'); size-adjust: 110.46%; ascent-override: 87.82%; descent-override: 22.63%; line-gap-override: 0%; }

:root {
  /* Colours. These are only the fallback: the live values come from
     /content/theme.json (inlined by the Worker, re-applied by app.js). Change colours there.
     Fallback = the devineflaw-navy brand theme. */
  color-scheme: dark;
  --bg: #050a30;             /* page background */
  --bg-2: #0f2854;           /* placeholder behind images while they load, soft glows */
  --fg: #f5f7fc;             /* main text */
  --fg-soft: #bde8f5;        /* subtitles, quotes, descriptions */
  --muted: #8fa9cf;          /* labels, dates, footer */
  --line: #1c4d8d;           /* hairlines, soft glows */
  --accent: #bde8f5;         /* small labels, links, keyboard focus ring */
  --on-photo: #f5f7fc;       /* text laid over photos */
  --on-photo-soft: #bde8f5;  /* secondary text over photos */
  --photo-shade: rgba(5, 10, 48, 0.7);   /* shade behind text on photos */
  --lightbox: rgba(5, 10, 48, 0.97);     /* photo viewer backdrop, dark photo frames */
  --logo-text: #f4f6fc;      /* brand logo lettering (light logo file) */
  --logo-mark: #bde8f5;      /* brand logo camera (light logo file) */
  /* Over photos the logo always uses the light logo file's pair, whatever the theme. Not
     theme settings: these are the brand artwork's own colours. */
  --logo-text-on-photo: #f4f6fc;
  --logo-mark-on-photo: #bde8f5;

  /* Glass: thin, clear, precision-cut sheets. No tint, no drop shadow; light catches the top edge
     and fades down the sides. These are for the page background; .on-photo switches to the photo variant. */
  /* a clear sheet over a deep tint of the page colour, so text on it stays readable even where it overlaps a bright photo */
  --glass-fill: linear-gradient(180deg, color-mix(in srgb, var(--fg) 5%, transparent), color-mix(in srgb, var(--fg) 1.5%, transparent)),
    linear-gradient(color-mix(in srgb, var(--bg) 72%, transparent), color-mix(in srgb, var(--bg) 72%, transparent));
  --glass-edge: color-mix(in srgb, var(--fg) 12%, transparent);   /* hairlines */
  --glass-rim: color-mix(in srgb, var(--fg) 38%, transparent);    /* the lit top edge */
  --glass-blur: blur(20px) saturate(115%);
  --btn-fg: var(--fg);
  --btn-fill-fg: var(--bg);
  /* fine film grain, drawn in the text colour */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --display: 'Italiana', 'Italiana Fallback', Georgia, serif;          /* titles */
  --serif: 'Cormorant Infant', 'Cormorant Fallback', Georgia, serif;    /* subtitles, quotes, body */
  --label: 'Montserrat', 'Montserrat Fallback', system-ui, sans-serif;  /* wide-spaced labels, like the logo */
  --gutter: clamp(18px, 4.5vw, 64px);
  --row: clamp(170px, 24vw, 320px);
  --gap: 6px;
  --ease: cubic-bezier(.16, .84, .24, 1);
  --ease-soft: cubic-bezier(.45, 0, .2, 1);
}

/* ============================== base ============================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 19px/1.65 var(--serif);
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::after {   /* film grain over everything, very faint */
  content: ''; position: fixed; inset: -60px; z-index: 95; pointer-events: none;
  background-image: var(--grain); opacity: .025;
  animation: grain 1s steps(5) infinite;
}
@keyframes grain { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-22px, 14px); } 40% { transform: translate(16px, -24px); } 60% { transform: translate(-12px, -8px); } 80% { transform: translate(24px, 18px); } }
main { flex: 1; outline: none; position: relative; min-height: 100svh; }   /* holds the footer below the fold until the page is drawn */
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link {
  position: fixed; left: 14px; top: -80px; z-index: 100; padding: 12px 20px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--line); text-decoration: none; font: 400 11px var(--label); letter-spacing: .2em;
}
.skip-link:focus { top: 14px; }
.logo { display: block; height: var(--logo-h, 56px); width: auto; aspect-ratio: 1114.07 / 599.53; overflow: visible; }

/* type */
.eyebrow { display: block; font: 400 10.5px/1.6 var(--label); letter-spacing: .42em; text-transform: uppercase; color: var(--accent); }
.on-photo .eyebrow { color: color-mix(in srgb, var(--on-photo) 88%, var(--on-photo-soft)); }
.display { font: 400 clamp(48px, 8vw, 124px)/.98 var(--display); letter-spacing: .01em; margin: 0; }
.display-m { font: 400 clamp(38px, 5.4vw, 78px)/1.04 var(--display); letter-spacing: .01em; margin: 0; }
.display-s { font: 400 clamp(28px, 3vw, 42px)/1.1 var(--display); letter-spacing: .02em; margin: 0; }
.lede { font: 300 italic clamp(20px, 1.9vw, 26px)/1.5 var(--serif); color: var(--fg-soft); }
.on-photo .lede { color: var(--on-photo-soft); }
.rich p:last-child { margin-bottom: 0; }
.rich a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.rich strong { font-weight: 600; }
.rich em { color: var(--fg-soft); }

/* ============================== liquid glass ============================== */

.on-photo {
  color: var(--on-photo);
  /* clear sheet over the photo shade, deep enough that light text stays readable over white skies and snow */
  --glass-fill: linear-gradient(180deg, color-mix(in srgb, var(--on-photo) 7%, transparent), transparent 60%),
    linear-gradient(color-mix(in srgb, var(--photo-shade) 68%, transparent), color-mix(in srgb, var(--photo-shade) 74%, transparent));
  --glass-edge: color-mix(in srgb, var(--on-photo) 18%, transparent);
  --glass-rim: color-mix(in srgb, var(--on-photo) 62%, transparent);
  --btn-fg: var(--on-photo);
  --btn-fill-fg: var(--lightbox);
}
/* a soft dark halo around words laid over photos */
.on-photo .display, .on-photo .display-m, .on-photo .display-s, .on-photo .lede, .on-photo .eyebrow, .on-photo .rich, .on-photo blockquote, .on-photo .meta-row {
  text-shadow: 0 1px 20px color-mix(in srgb, var(--photo-shade) 75%, transparent), 0 0 2px color-mix(in srgb, var(--photo-shade) 40%, transparent);
}
.glass {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.glass::after {   /* prism rim: light enters top-left — bright hairline along the top, fading down the sides, none at the bottom */
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(90deg, var(--glass-rim), color-mix(in srgb, var(--glass-rim) 45%, transparent) 55%, transparent) top / 100% 1px no-repeat,
    linear-gradient(180deg, var(--glass-rim), var(--glass-edge) 25%, transparent 80%) left / 1px 100% no-repeat,
    linear-gradient(180deg, var(--glass-edge), transparent 60%) right / 1px 100% no-repeat;
}
.glass::before {   /* a faint band of light passes across on hover */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, color-mix(in srgb, var(--glass-edge) 60%, transparent) 50%, transparent 65%);
  transform: translateX(-110%); transition: transform 1.6s var(--ease);
}
.glass:hover::before, .glass:focus-within::before { transform: translateX(110%); }

/* soft glowing light drifting behind sections without a photo */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 22%, black 78%, transparent); mask-image: linear-gradient(to bottom, transparent, black 22%, black 78%, transparent); }
.aurora::before, .aurora::after {
  content: ''; position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(80px); opacity: .45;
  background: radial-gradient(circle, var(--line), transparent 65%);
  left: -12vmax; top: -18vmax; animation: float-a 26s var(--ease-soft) infinite alternate;
}
.aurora::after { left: auto; top: auto; right: -16vmax; bottom: -22vmax; background: radial-gradient(circle, var(--bg-2), transparent 65%); opacity: .8; animation: float-b 32s var(--ease-soft) infinite alternate; }
@keyframes float-a { to { transform: translate(18vw, 14vh) scale(1.15); } }
@keyframes float-b { to { transform: translate(-16vw, -10vh) scale(.9); } }
.section > :not(.aurora):not(.photo-bg) { position: relative; z-index: 1; }

/* buttons: a hairline frame; on hover light fills it from the left */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 14px; padding: 17px 28px 16px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  font: 400 10.5px/1 var(--label); letter-spacing: .34em; text-transform: uppercase; color: var(--btn-fg);
  background: none; border: 1px solid color-mix(in srgb, var(--btn-fg) 34%, transparent);
  transition: color .7s var(--ease), border-color .7s var(--ease), translate .6s var(--ease);
}
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--btn-fg);
  transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease);
}
.btn:hover, .btn:focus-visible { color: var(--btn-fill-fg); border-color: var(--btn-fg); }
.btn:hover::after, .btn:focus-visible::after { transform: scaleX(1); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.2; transition: transform .6s var(--ease); }
.btn:hover svg { transform: translateX(5px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.center .btn-row { justify-content: center; }

.link-draw {
  position: relative; display: inline-block; text-decoration: none; padding-bottom: 8px;
  font: 400 10.5px/1 var(--label); letter-spacing: .34em; text-transform: uppercase; color: var(--muted); transition: color .4s var(--ease);
}
.link-draw::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(.3); transform-origin: left; transition: transform .7s var(--ease); }
.link-draw:hover { color: var(--fg); }
.link-draw:hover::after { transform: scaleX(1); }

/* dates: a season, with the full date on hover, focus or tap */
.date { position: relative; display: inline-block; cursor: help; white-space: nowrap; border-bottom: 1px dotted color-mix(in srgb, currentColor 50%, transparent); outline-offset: 3px; }
.date::after {
  content: attr(data-full); position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 5;
  padding: 10px 16px 9px; white-space: nowrap; pointer-events: none;
  font: 400 italic 17px/1 var(--serif); letter-spacing: .01em; text-transform: none; color: var(--fg);
  background: color-mix(in srgb, var(--bg) 88%, transparent); border-top: 1px solid var(--glass-rim);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  opacity: 0; transform: translate(-50%, 8px) scale(.96); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.date:hover::after, .date:focus-visible::after, .date.show::after { opacity: 1; transform: translate(-50%, 0) scale(1); }
.date.below::after { bottom: auto; top: calc(100% + 10px); }

/* ============================== header: one hairline bar — logo left, menu right ============================== */
/* Clear over photos (the photo stays whole); a frosted strip once the page scrolls. */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 96px; padding: 0 var(--gutter);
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: clamp(24px, 4vw, 72px);
  --logo-h: 52px; color: var(--fg);
  transition: height .7s var(--ease), translate .7s var(--ease), background-color .7s var(--ease);
}
.site-header::after {   /* the hairline under the bar, fading out at both ends */
  content: ''; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--glass-edge) 18%, var(--glass-edge) 82%, transparent);
}
.site-header.scrolled {
  height: 70px; --logo-h: 40px;
  background: color-mix(in srgb, var(--bg) 66%, transparent);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.site-header.on-photo.scrolled { background: color-mix(in srgb, var(--photo-shade) 30%, transparent); }
.site-header.away { translate: 0 -100%; }
.site-header.on-photo { color: var(--on-photo); --logo-text: var(--logo-text-on-photo); --logo-mark: var(--logo-mark-on-photo); --glass-edge: color-mix(in srgb, var(--on-photo) 22%, transparent); }
.brand { grid-row: 1; grid-column: 1; display: block; text-decoration: none; }
.brand .logo { transition: height .7s var(--ease), filter .6s var(--ease); }
.brand:hover .logo { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--logo-mark) 35%, transparent)); }
.site-header .nav { grid-row: 1; grid-column: 2; display: flex; align-items: center; justify-content: flex-end; gap: clamp(22px, 3vw, 52px); }
.site-header .nav a {
  padding: 12px 0; text-decoration: none; white-space: nowrap;
  font: 400 10.5px/1 var(--label); letter-spacing: .36em; text-transform: uppercase;
  opacity: .58; transition: opacity .5s var(--ease);
}
.site-header.on-photo .nav a { opacity: .74; }
.site-header .nav a:hover { opacity: .92; }
.site-header .nav a[aria-current="page"] { opacity: 1; }   /* the page you're on is simply brighter */
.menu-toggle { display: none; }

@media (max-width: 700px) {
  .site-header, .site-header.scrolled { grid-template-columns: auto 1fr auto; height: 66px; padding: 0 8px 0 18px; --logo-h: 38px; }
  .brand { grid-column: 1; }
  .site-header .nav { display: none; }
  .menu-toggle {
    grid-column: 3; display: grid; place-items: center; position: relative;
    width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  }
  .menu-toggle span { position: absolute; width: 22px; height: 1px; background: currentColor; transition: transform .6s var(--ease); }
  .menu-toggle span:first-child { transform: translateY(-3px); }
  .menu-toggle span:last-child { transform: translateY(3px); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
}

/* the phone menu: a full-screen sheet of glass */
.menu-panel {
  position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 100px 24px 48px; color: var(--fg);
  background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(30px) saturate(115%); backdrop-filter: blur(30px) saturate(115%);
  clip-path: circle(0% at calc(100% - 30px) 33px); visibility: hidden;
  transition: clip-path .9s var(--ease), visibility 0s linear .9s;
}
.menu-panel.open { clip-path: circle(150% at calc(100% - 30px) 33px); visibility: visible; transition: clip-path .9s var(--ease); }
.menu-panel a { display: block; padding: 4px 0; font: 400 clamp(42px, 12vw, 60px)/1.2 var(--display); text-decoration: none; opacity: 0; translate: 0 28px; transition: opacity .8s var(--ease), translate .8s var(--ease); transition-delay: calc(.12s + var(--i, 0) * .06s); }
.menu-panel.open a { opacity: 1; translate: 0 0; }
.menu-panel a[aria-current="page"] { font-style: italic; color: var(--accent); }
.menu-quote { margin: 40px 0 0; max-width: 28ch; text-align: center; font: 300 italic 19px/1.5 var(--serif); color: var(--muted); opacity: 0; transition: opacity 1s var(--ease) .5s; }
.menu-panel.open .menu-quote { opacity: 1; }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--fg); translate: 0 0; }
@media (min-width: 701px) { .menu-panel { display: none; } }
.menu-links { text-align: center; }

/* ============================== sections: shared ============================== */

.section { position: relative; padding: clamp(72px, 13vw, 190px) var(--gutter); }
.section + .section:not(.on-photo):not(.flush) { padding-top: clamp(40px, 6vw, 90px); }
main > .section:first-child:not(.on-photo) { padding-top: clamp(150px, 18vw, 240px); }
.section-head { max-width: 1240px; margin: 0 auto clamp(44px, 6vw, 84px); display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; }
.section-head .display-m { margin-top: 16px; }
.center { text-align: center; }

/* full-bleed photo behind a section */
.photo-bg { position: absolute; inset: 0; overflow: hidden; background: var(--lightbox); z-index: 0; }
.photo-bg img { position: absolute; left: 0; top: -15%; width: 100%; height: 130%; object-fit: cover; }
.photo-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--photo-shade) 45%, transparent), color-mix(in srgb, var(--photo-shade) 88%, transparent)); }

/* ============================== hero ============================== */

/* The hero grows with its words: the panel sits at the bottom, but never slides under the header. */
.hero {
  position: relative; min-height: max(100svh, 620px); overflow: hidden; background: var(--lightbox);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 128px var(--gutter) clamp(36px, 8vh, 90px);
}
.hero.short { min-height: max(86svh, 560px); }
.hero.no-photo { background: var(--bg); color: var(--fg); justify-content: center; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 2s var(--ease-soft); overflow: hidden; }
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; scale: 1.02; transition: scale 12s linear; }
.hero-slide.active img { scale: 1.13; }
.hero:not(.no-photo)::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--photo-shade) 90%, transparent), transparent 60%),
    linear-gradient(to bottom, color-mix(in srgb, var(--photo-shade) 70%, transparent), transparent 26%);
}
.hero-inner { position: relative; z-index: 3; display: flex; align-items: flex-end; gap: 24px; }
.hero.no-photo .hero-inner { align-items: center; justify-content: center; text-align: center; }
.hero-card { width: min(620px, 100%); padding: clamp(30px, 3.4vw, 52px); }
.hero-card.wide { width: min(780px, 100%); }
.hero-card .display.long { font-size: clamp(38px, 4.4vw, 70px); line-height: 1.04; }
.hero.no-photo .hero-card { width: min(860px, 100%); }
.hero-card .display { margin: 18px 0 0; font-size: clamp(44px, 6.2vw, 96px); }
.hero-card .lede { margin: 20px 0 0; }
.hero-card .btn-row { margin-top: 30px; }
.hero-foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; padding-top: 22px; }
.hero-foot::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, var(--glass-edge), transparent); }
.hero-chapter-text { display: grid; gap: 8px; min-width: 0; text-decoration: none; }
.hero-chapter-text .eyebrow { font-size: 9.5px; }
.hero-chapter-text strong { font: 400 24px/1 var(--display); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: letter-spacing .8s var(--ease); }
.hero-chapter-text:hover strong { letter-spacing: .08em; }
.hero-controls { display: flex; align-items: center; gap: 2px; }
.hero-dot, .hero-pause { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; background: none; cursor: pointer; color: inherit; }
.hero-dot svg { position: absolute; inset: 2px; width: 34px; height: 34px; transform: rotate(-90deg); }
.hero-dot circle { fill: none; stroke: color-mix(in srgb, currentColor 28%, transparent); stroke-width: 1; }
.hero-dot circle.run { stroke: currentColor; stroke-dasharray: 100.53; stroke-dashoffset: 100.53; }
.hero-dot[aria-current="true"] circle.run { animation: dotrun var(--slide-ms, 7000ms) linear forwards; }
.hero.paused .hero-dot[aria-current="true"] circle.run { animation-play-state: paused; }
.hero-dot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: currentColor; opacity: .45; transition: opacity .4s; }
.hero-dot[aria-current="true"]::after { opacity: 1; }
.hero-pause svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
@keyframes dotrun { to { stroke-dashoffset: 0; } }
.scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 0; width: 1px; height: 64px; overflow: hidden; }
.scroll-cue::after { content: ''; position: absolute; left: 0; top: -64px; width: 1px; height: 64px; background: linear-gradient(to bottom, transparent, currentColor); animation: cue 2.8s var(--ease) infinite; }
@keyframes cue { to { top: 64px; } }
@media (max-width: 640px) {
  .hero { padding: 96px 0 0; }
  .hero-inner { flex-direction: column; align-items: stretch; gap: 0; }
  .hero-card { padding: 28px 22px 24px; }
  .hero-chapter-text .eyebrow { letter-spacing: .28em; }
  .scroll-cue { display: none; }
}

/* ============================== intro ============================== */

.intro { text-align: center; overflow: hidden; }
.intro .display-m { max-width: 17ch; margin: 22px auto 0; }
.intro .rich { max-width: 40rem; margin: 36px auto 0; font: 300 italic clamp(21px, 2vw, 26px)/1.6 var(--serif); color: var(--fg-soft); }
.ornament { display: block; width: 1px; height: 80px; margin: 50px auto 0; background: linear-gradient(to bottom, var(--accent), transparent); transform-origin: top; }

/* ============================== quote ============================== */

.quote { display: grid; place-items: center; min-height: 92svh; text-align: center; overflow: hidden; }
.quote.no-photo { min-height: 0; }
.quote figure { margin: 0; max-width: 1000px; }
.quote .mark { display: block; height: .5em; font: 400 clamp(120px, 16vw, 220px)/.9 var(--display); color: color-mix(in srgb, var(--accent) 60%, transparent); }
.quote.on-photo .mark { color: color-mix(in srgb, var(--on-photo-soft) 60%, transparent); }
.quote blockquote { margin: 0; font: 300 italic clamp(34px, 4.8vw, 72px)/1.2 var(--serif); letter-spacing: -.005em; }
.quote .word { display: inline-block; opacity: 0; filter: blur(10px); translate: 0 .35em; transition: opacity 1.1s var(--ease), translate 1.1s var(--ease), filter 1.1s var(--ease); transition-delay: calc(var(--i) * 55ms); }
.quote.in .word { opacity: 1; filter: blur(0); translate: 0 0; }
.quote figcaption { margin-top: 40px; }
.quote figcaption::before { content: ''; display: block; width: 1px; height: 46px; margin: 0 auto 22px; background: currentColor; opacity: .45; }

/* ============================== story ============================== */

.story-row { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.story.flip .story-media { order: 2; }
.story-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); }
.story-media img { position: absolute; left: 0; top: -10%; width: 100%; height: 120%; object-fit: cover; }
.story-card { z-index: 2; margin-left: -14%; padding: clamp(34px, 4.4vw, 64px); }
.story.flip .story-card { margin-left: 0; margin-right: -14%; }
.story-card .display-m { margin: 18px 0 26px; }
.story-card .btn-row { margin-top: 30px; }
.story.text-only .story-row { grid-template-columns: 1fr; max-width: 820px; }
.story.text-only .story-card { margin: 0; }
.story-no { position: absolute; z-index: 3; top: -.42em; right: .15em; font: 300 clamp(90px, 11vw, 160px)/1 var(--serif); font-variant-numeric: lining-nums; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 55%, transparent); pointer-events: none; }
.story-media .story-no { top: auto; bottom: -.12em; left: .12em; right: auto; -webkit-text-stroke-color: color-mix(in srgb, var(--on-photo) 70%, transparent); }
@media (max-width: 640px) {
  .story-row { grid-template-columns: 1fr; }
  .story.flip .story-media { order: 0; }
  .story-card, .story.flip .story-card { margin: -80px 10px 0; }
  .story.text-only .story-card { margin: 0; }
}

/* ============================== single image ============================== */

.image-section { padding: 0; }
.image-section .frame { position: relative; height: 94svh; min-height: 480px; overflow: hidden; background: var(--lightbox); }
.image-section .frame img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; object-fit: cover; }
.image-section .frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--photo-shade) 70%, transparent), transparent 45%); pointer-events: none; }
.image-section .caption { position: absolute; z-index: 2; left: var(--gutter); bottom: var(--gutter); width: min(560px, calc(100% - 2 * var(--gutter))); padding: clamp(24px, 3vw, 38px); }
.image-section .caption .display-s { margin-top: 12px; }
.image-section .caption .rich { margin-top: 12px; color: var(--on-photo-soft); }

/* ============================== collections: editorial chapters ============================== */

.chapters { max-width: 1240px; margin: 0 auto; display: grid; gap: clamp(70px, 10vw, 150px); }
.chapter { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 5vw, 90px); align-items: center; text-decoration: none; color: inherit; }
.chapter:nth-child(even) { grid-template-columns: 1fr 1.35fr; }
.chapter:nth-child(even) .chapter-media { order: 2; }
.chapter-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-2); transition: transform .9s var(--ease), box-shadow .9s var(--ease); }
.chapter-media img { position: absolute; left: 0; top: -10%; width: 100%; height: 120%; object-fit: cover; transition: scale 1.8s var(--ease); }
.chapter:hover .chapter-media { box-shadow: 0 40px 90px -30px color-mix(in srgb, var(--accent) 30%, transparent); }
.chapter:hover .chapter-media img { scale: 1.07; }
.chapter-media::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to top, color-mix(in srgb, var(--photo-shade) 70%, transparent), transparent 35%); }
.chapter-media .count { position: absolute; z-index: 2; left: 20px; bottom: 18px; font: 400 9.5px/1 var(--label); letter-spacing: .3em; text-transform: uppercase; color: var(--on-photo); }
.chapter-no { display: block; margin-bottom: 20px; font: 400 clamp(70px, 9vw, 130px)/.8 var(--display); color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 65%, transparent); transition: letter-spacing 1s var(--ease), color 1s var(--ease); }
.chapter:hover .chapter-no { letter-spacing: .1em; color: color-mix(in srgb, var(--accent) 12%, transparent); }
.chapter-title { font: 400 clamp(42px, 5vw, 76px)/1 var(--display); margin: 0 0 20px; transition: letter-spacing 1s var(--ease); }
.chapter:hover .chapter-title { letter-spacing: .03em; }
.chapter .lede { margin: 0 0 26px; }
.chapter-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font: 400 10.5px/1.4 var(--label); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.chapter .enter { display: inline-flex; align-items: center; gap: 14px; color: var(--fg); }
.chapter .enter svg { width: 40px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1; transition: transform .8s var(--ease); }
.chapter:hover .enter svg { transform: translateX(10px); }
.collections-more { display: flex; justify-content: center; margin-top: clamp(60px, 8vw, 110px); }
.empty-note { max-width: 34rem; margin: 0 auto; text-align: center; }
@media (max-width: 640px) {
  .chapter, .chapter:nth-child(even) { grid-template-columns: 1fr; gap: 24px; }
  .chapter:nth-child(even) .chapter-media { order: 0; }
  .chapter-no { font-size: 56px; margin-bottom: 14px; }   /* sits above the title, never on it */
  .chapter-title { font-size: clamp(38px, 11vw, 52px); }
}

/* ============================== highlights: drifting filmstrips ============================== */

.highlights { padding-left: 0; padding-right: 0; overflow: hidden; }
.highlights .section-head { padding: 0 var(--gutter); }
.strips { display: grid; gap: 14px; rotate: -2deg; margin: 0 -40px; }
.strip { display: flex; width: max-content; gap: 14px; animation: marquee var(--strip-s, 70s) linear infinite; }
.strip.reverse { animation-direction: reverse; }
.strips:hover .strip, .strips:focus-within .strip { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.strip a { position: relative; flex: none; display: block; height: clamp(170px, 22vw, 300px); aspect-ratio: var(--ar, 1.5); overflow: hidden; background: var(--bg-2); transition: scale .8s var(--ease), filter .8s var(--ease), opacity .8s; }
.strip a img { width: 100%; height: 100%; object-fit: cover; }
.strips:hover .strip a { filter: brightness(.78) saturate(.85); }
.strips .strip a:hover, .strips .strip a:focus-visible { filter: none; scale: 1.05; z-index: 2; }
.strip .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 16px 14px; color: var(--on-photo); background: linear-gradient(to top, color-mix(in srgb, var(--photo-shade) 85%, transparent), transparent); font: 400 italic 17px/1.2 var(--serif); opacity: 0; translate: 0 10px; transition: opacity .6s var(--ease), translate .6s var(--ease); }
.strip a:hover .cap, .strip a:focus-visible .cap { opacity: 1; translate: 0 0; }

/* ============================== instagram ============================== */

.instagram { overflow: hidden; text-align: center; padding-left: 0; padding-right: 0; }
.ig-track { display: flex; width: max-content; animation: marquee 40s linear infinite; margin-top: 26px; }
.ig-track span { padding-right: .5em; white-space: nowrap; font: 400 clamp(70px, 12vw, 190px)/1.05 var(--display); color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--fg) 40%, transparent); transition: color 1s var(--ease); }
.instagram:hover .ig-track span { color: color-mix(in srgb, var(--fg) 10%, transparent); }
.instagram .btn-row { justify-content: center; margin-top: 34px; padding: 0 var(--gutter); }

/* ============================== contact ============================== */

.contact-grid { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.contact-card { display: grid; gap: 14px; align-content: start; padding: clamp(30px, 4vw, 50px); text-decoration: none; transition: translate .8s var(--ease); }
.contact-card:hover { translate: 0 -8px; }
.contact-card svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1; }
.contact-card .display-s { overflow-wrap: anywhere; }
.contact-text { max-width: 40rem; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }

/* ============================== call to action ============================== */

.cta { display: grid; place-items: center; min-height: 86svh; text-align: center; overflow: hidden; }
.cta.no-photo { min-height: 0; }
.cta-card { width: min(780px, 100%); padding: clamp(44px, 6vw, 84px) clamp(26px, 5vw, 76px); }
.cta-card .display-m { margin: 20px 0 0; }
.cta-card .rich { margin-top: 20px; }
.cta-card .btn-row { margin-top: 38px; }

/* ============================== text (markdown) ============================== */

.prose { max-width: 720px; margin: 0 auto; }
.prose h1 { font: 400 clamp(48px, 7vw, 100px)/1 var(--display); margin: 0 0 44px; text-align: center; }
.prose h2 { font: 400 clamp(32px, 3.4vw, 50px)/1.1 var(--display); margin: 60px 0 18px; }
.prose h3 { font: 400 27px/1.2 var(--display); margin: 38px 0 10px; }
.prose img { margin: 40px 0; width: 100%; }
.prose hr { border: 0; height: 1px; margin: 60px auto; width: 40%; background: linear-gradient(to right, transparent, var(--line), transparent); }
.prose em { color: var(--fg-soft); }
.prose a { color: var(--accent); text-underline-offset: 4px; }
.prose ul { padding-left: 1.2em; }

/* ============================== gallery page ============================== */

.gallery-hero { position: relative; min-height: max(92svh, 560px); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 128px var(--gutter) clamp(24px, 6vw, 80px); }
.gallery-hero .photo-bg::after { background: linear-gradient(to top, color-mix(in srgb, var(--photo-shade) 92%, transparent), transparent 60%), linear-gradient(to bottom, color-mix(in srgb, var(--photo-shade) 70%, transparent), transparent 26%); }
.gallery-hero-card { z-index: 2; width: min(780px, 100%); padding: clamp(28px, 3.6vw, 52px); }
.gallery-hero-card .display { margin: 20px 0 0; }
.gallery-hero-card .lede { margin: 22px 0 0; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; margin-top: 24px; font: 400 10.5px/1.4 var(--label); letter-spacing: .3em; text-transform: uppercase; color: var(--on-photo-soft); }
.back { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 400 10px/1 var(--label); letter-spacing: .36em; text-transform: uppercase; opacity: .8; transition: opacity .4s; }
.back svg { width: 24px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1; transition: transform .7s var(--ease); }
.back:hover { opacity: 1; }
.back:hover svg { transform: translateX(-7px); }
@media (max-width: 640px) { .gallery-hero { padding: 96px 0 0; } }

.justified { display: flex; flex-wrap: wrap; gap: var(--gap); padding: var(--gap); }
.justified::after { content: ''; flex-grow: 1; }
.tile {
  position: relative; margin: 0; cursor: zoom-in; background: var(--bg-2); overflow: hidden;
  flex-grow: var(--ar); flex-basis: calc(var(--row) * var(--ar)); height: var(--row);
  border: 0; padding: 0; color: var(--on-photo);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.5s var(--ease), filter .9s var(--ease); }
.tile-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 18px 16px; background: linear-gradient(to top, color-mix(in srgb, var(--photo-shade) 85%, transparent), transparent); text-align: left; font: 400 italic 18px/1.25 var(--serif); opacity: 0; translate: 0 12px; transition: opacity .6s var(--ease), translate .6s var(--ease); }
.justified:hover .tile img { filter: brightness(.8) saturate(.9); }
.justified .tile:hover img, .justified .tile:focus-visible img { filter: none; scale: 1.06; }
.tile:hover .tile-caption, .tile:focus-visible .tile-caption { opacity: 1; translate: 0 0; }
.tile-caption small, .lb-stage figcaption small { display: block; margin-top: 6px; font: 400 9.5px/1.5 var(--label); font-style: normal; letter-spacing: .26em; text-transform: uppercase; color: var(--on-photo-soft); }
.tile:focus-visible { outline-offset: -4px; }
@media (hover: none) { .justified:hover .tile img { filter: none; } }
@media (max-width: 560px) { :root { --row: 150px; --gap: 4px; } }

.chapter-nav { max-width: 1240px; margin: 0 auto; padding: clamp(80px, 10vw, 150px) var(--gutter) 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chapter-nav a { position: relative; min-height: clamp(240px, 28vw, 360px); overflow: hidden; color: var(--on-photo); text-decoration: none; display: flex; align-items: flex-end; padding: 16px; background: var(--lightbox); }
.chapter-nav a.next { justify-content: flex-end; }
.chapter-nav a.only { grid-column: 1 / -1; }
.chapter-nav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.75); transition: scale 1.8s var(--ease), filter 1s var(--ease); }
.chapter-nav a:hover img { scale: 1.08; filter: brightness(.95); }
.chapter-nav a::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--photo-shade) 85%, transparent), transparent 55%); }
.chapter-nav .nav-label { position: relative; z-index: 1; display: grid; gap: 10px; padding: 10px 12px; }
.chapter-nav .nav-label .eyebrow { color: var(--on-photo-soft); }
.chapter-nav a.next .nav-label { text-align: right; }
.chapter-nav strong { font: 400 clamp(30px, 3vw, 44px)/1 var(--display); }
@media (max-width: 620px) { .chapter-nav { grid-template-columns: 1fr; } }
.gallery-all { display: flex; justify-content: center; padding: clamp(44px, 6vw, 70px) var(--gutter) 0; }

/* ============================== error pages ============================== */

.error-page { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; padding: 120px var(--gutter) 60px; }
.error-page.no-photo { background: var(--bg); }
.error-code {
  position: absolute; z-index: 1; left: 50%; top: 50%; translate: -50% -52%; white-space: nowrap; pointer-events: none;
  font: 400 clamp(240px, 54vw, 780px)/1 var(--display); color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--fg) 30%, transparent);
  animation: breathe 12s var(--ease-soft) infinite alternate;
}
@keyframes breathe { from { letter-spacing: -.03em; opacity: .7; } to { letter-spacing: .06em; opacity: 1; } }
.error-page.on-photo .error-code { -webkit-text-stroke-color: color-mix(in srgb, var(--on-photo) 42%, transparent); }
.error-card { position: relative; z-index: 2; width: min(660px, 100%); padding: clamp(36px, 5vw, 64px); text-align: center; }
.error-card .display-m { margin: 20px 0 0; }
.error-card .lede { margin: 20px 0 0; }
.error-card .btn-row { margin-top: 34px; justify-content: center; }

/* ============================== footer: one slim line ============================== */

.site-footer {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px;
  padding: 18px var(--gutter); font: 400 9.5px/1.4 var(--label); letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
}
.site-footer::before { content: ''; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: linear-gradient(to right, transparent, var(--line), transparent); }
.footer-brand { display: block; text-decoration: none; opacity: .85; transition: opacity .4s; --logo-h: 30px; }
.footer-brand:hover { opacity: 1; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer-links a { text-decoration: none; transition: color .4s; }
.footer-links a:hover { color: var(--fg); }
.footer-copy { margin: 0; }
@media (max-width: 620px) {
  .site-footer { flex-direction: column; justify-content: center; text-align: center; gap: 14px; padding: 28px var(--gutter) 84px; }
  .footer-links { justify-content: center; }
}

/* ============================== back to top, toast, cursor ============================== */

.to-top {
  position: fixed; z-index: 30; right: clamp(14px, 3vw, 30px); bottom: clamp(14px, 3vw, 30px);
  width: 50px; height: 50px; display: grid; place-items: center; padding: 0; cursor: pointer; border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: var(--fg);
  opacity: 0; translate: 0 20px; pointer-events: none; transition: opacity .6s var(--ease), translate .6s var(--ease);
}
@media (max-width: 620px) { .to-top { width: 44px; height: 44px; right: 12px; bottom: 14px; } }
.to-top.show { opacity: 1; translate: 0 0; pointer-events: auto; }
.to-top svg { position: relative; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.2; transition: transform .6s var(--ease); }
.to-top:hover svg { transform: translateY(-4px); }
.to-top .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top .ring circle { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--progress, 0) * 100); }
.to-top[hidden] { display: grid; }

.toast {
  position: fixed; z-index: 99; left: 50%; bottom: 30px; padding: 15px 26px; color: var(--on-photo);
  font: 400 10.5px/1 var(--label); letter-spacing: .3em; text-transform: uppercase;
  opacity: 0; translate: -50% 20px; pointer-events: none; transition: opacity .5s var(--ease), translate .5s var(--ease);
  background: color-mix(in srgb, var(--lightbox) 80%, transparent);
}
.toast.show { opacity: 1; translate: -50% 0; }

.cursor {
  position: fixed; z-index: 90; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none;
  display: grid; place-items: center; color: var(--bg); background: var(--fg); opacity: 0;
  transition: width .6s var(--ease), height .6s var(--ease), margin .6s var(--ease), opacity .4s, background-color .6s;
  font: 500 9px/1 var(--label); letter-spacing: .24em; text-transform: uppercase;
}
.cursor.on { opacity: .9; }
.cursor.view { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: color-mix(in srgb, var(--fg) 88%, transparent); }
.cursor span { opacity: 0; transition: opacity .3s; padding-left: .24em; }
.cursor.view span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ============================== motion: scroll reveals ============================== */

.reveal { opacity: 0; translate: 0 44px; transition: opacity 1.4s var(--ease), translate 1.4s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; translate: 0 0; }
.reveal-img { clip-path: inset(14% 8% 14% 8%); transition: clip-path 1.8s var(--ease); transition-delay: var(--d, 0s); }
.reveal-img img { scale: 1.3; transition: scale 2.4s var(--ease); }
.reveal-img.in { clip-path: inset(0 0 0 0); }
.reveal-img.in img { scale: 1; }
.chapter:hover .reveal-img.in img { scale: 1.07; }
.mask { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.mask > span { display: block; translate: 0 110%; rotate: 2deg; transform-origin: left top; transition: translate 1.4s var(--ease), rotate 1.4s var(--ease); transition-delay: var(--d, 0s); }
.in .mask > span, .mask.in > span { translate: 0 0; rotate: 0deg; }
.line-grow { transform: scaleY(0); transition: transform 1.8s var(--ease) .4s; }
.in .line-grow, .line-grow.in { transform: scaleY(1); }
.parallax { will-change: transform; }
main.page-enter { animation: pagein 1s var(--ease) both; }
/* first page load: the first screen is drawn in place, no entrance animation (see observeReveals) */
.no-entrance .reveal, .no-entrance .reveal-img, .no-entrance .reveal-img img, .no-entrance .mask > span, .no-entrance .quote .word, .no-entrance .line-grow { transition: none !important; }
@keyframes pagein { from { opacity: 0; filter: blur(8px); } }

/* ============================== photo viewer ============================== */
/* A dark room lit by the photo itself: a blurred copy glows behind it, a counter and the
   chapter name sit top left, a filmstrip runs along the bottom, and everything but the
   photo fades away while the mouse rests. */

.lightbox {
  position: fixed; inset: 0; z-index: 97; background: var(--lightbox); color: var(--on-photo);
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px; grid-template-rows: auto minmax(0, 1fr) auto;
  animation: lb-in .7s var(--ease);
  --glass-edge: color-mix(in srgb, var(--on-photo) 18%, transparent);
  --ui: opacity .7s var(--ease), translate .7s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } }

/* the glow: the current photo, blurred and dimmed, crossfading */
.lb-ambient { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.lb-ambient img {
  position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover;
  filter: blur(80px) saturate(1.5) brightness(.72); opacity: 0; transition: opacity 1.4s var(--ease-soft);
}
.lb-ambient img.on { opacity: 1; }
.lb-ambient::after {   /* keep the edges dark so the photo stays the brightest thing in the room */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 65% at center, color-mix(in srgb, var(--lightbox) 18%, transparent), color-mix(in srgb, var(--lightbox) 82%, transparent) 100%);
}
.lightbox > :not(.lb-ambient) { position: relative; z-index: 1; }

/* top bar */
.lb-bar {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px var(--gutter) 14px; transition: var(--ui);
}
.lb-bar::after { content: ''; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px; background: linear-gradient(90deg, var(--glass-edge), transparent 70%); }
.lb-title { display: flex; align-items: baseline; gap: 22px; min-width: 0; }
.lb-count { display: flex; align-items: baseline; gap: 6px; font: 400 10.5px/1 var(--label); letter-spacing: .3em; color: var(--on-photo-soft); white-space: nowrap; }
.lb-now { font: 300 42px/1 var(--serif); font-variant-numeric: lining-nums; letter-spacing: .02em; color: var(--on-photo); }   /* Italiana's 0 and 1 read as O and I */
.lb-gallery { display: grid; gap: 6px; min-width: 0; }
.lb-gallery strong { font: 400 22px/1 var(--display); letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-gallery span { font: 400 9.5px/1 var(--label); letter-spacing: .34em; text-transform: uppercase; color: var(--on-photo-soft); }
.lb-actions { display: flex; align-items: center; }
.lb-btn, .lb-nav { display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--on-photo); }
.lb-btn { position: relative; width: 46px; height: 46px; opacity: .7; transition: opacity .4s var(--ease); }
.lb-btn:hover { opacity: 1; }
.lb-btn::after {   /* a hairline draws under the button you point at */
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 8px; height: 1px; background: currentColor;
  transform: scaleX(0); transition: transform .5s var(--ease);
}
.lb-btn:hover::after { transform: scaleX(1); }
.lb-btn:focus-visible, .lb-nav:focus-visible, .lb-thumb:focus-visible { outline: 1px solid var(--on-photo-soft); outline-offset: -8px; }
.lb-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.lb-btn[hidden] { display: none; }
.lb-close { margin-left: 14px; }
.lb-close::before { content: ''; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 1px; background: var(--glass-edge); }

/* the photo */
.lb-stage { grid-row: 2; grid-column: 2; margin: 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 0 18px; }
.lb-viewport { position: relative; flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; cursor: zoom-in; }
.lb-viewport.zoomed { cursor: grab; }
.lb-viewport.dragging { cursor: grabbing; }
.lb-viewport img {
  max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transform-origin: 0 0;
  box-shadow: 0 50px 140px -40px color-mix(in srgb, var(--lightbox) 75%, transparent);
  transition: opacity .8s var(--ease), translate .9s var(--ease), transform .45s var(--ease), filter .8s var(--ease); will-change: transform;
}
.lb-viewport.dragging img, .lb-viewport.pinching img { transition: opacity .4s var(--ease); }
.lb-viewport img.loading { opacity: 0; translate: var(--from, 0px) 0; filter: blur(6px); transition: none; }
.lb-stage figcaption {
  margin-top: 18px; min-height: 1.35em; padding: 0 14px; text-align: center;
  font: 300 italic clamp(19px, 1.7vw, 24px)/1.35 var(--serif); letter-spacing: .01em; color: var(--on-photo-soft); transition: var(--ui);
}

/* previous / next: tall quiet zones with a thin arrow */
.lb-nav { grid-row: 2; width: 96px; height: 100%; opacity: .55; transition: opacity .5s var(--ease), translate .7s var(--ease); }
.lb-nav:hover { opacity: 1; }
.lb-nav svg { width: 44px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1; transition: transform .7s var(--ease); }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-prev:hover svg { transform: translateX(-8px); }
.lb-next:hover svg { transform: translateX(8px); }

/* filmstrip */
.lb-strip {
  grid-row: 3; grid-column: 1 / -1; display: flex; gap: 6px; justify-content: safe center;
  padding: 0 var(--gutter) 18px; overflow-x: auto; scrollbar-width: none; transition: var(--ui);
}
.lb-strip::-webkit-scrollbar { display: none; }
.lb-thumb {
  position: relative; flex: none; height: 58px; aspect-ratio: var(--ar, 1.5); padding: 0; border: 0; cursor: pointer; background: var(--bg-2);
  opacity: .38; filter: saturate(.6); transition: opacity .6s var(--ease), filter .6s var(--ease);
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: .8; filter: none; }
.lb-thumb[aria-current="true"] { opacity: 1; filter: none; }
.lb-thumb::after {   /* a hairline of light over the current photo */
  content: ''; position: absolute; left: 0; right: 0; top: -7px; height: 1px; background: var(--on-photo);
  transform: scaleX(0); transition: transform .7s var(--ease);
}
.lb-thumb[aria-current="true"]::after { transform: scaleX(1); }
.lb-strip.single { display: none; }

/* cinema: while the mouse rests, only the photo remains */
.lightbox.idle .lb-bar { opacity: 0; translate: 0 -10px; }
.lightbox.idle .lb-strip { opacity: 0; translate: 0 10px; }
.lightbox.idle .lb-nav, .lightbox.idle figcaption { opacity: 0; }
.lightbox.idle .lb-viewport { cursor: none; }

@media (max-width: 640px) {
  .lightbox { grid-template-columns: 1fr; }
  .lb-nav { display: none; }
  .lb-stage { grid-column: 1; padding: 14px 0 12px; }
  .lb-bar { padding: 12px 8px 10px 18px; }
  .lb-title { gap: 14px; }
  .lb-now { font-size: 30px; }
  .lb-gallery strong { font-size: 17px; }
  .lb-gallery span, .lb-full { display: none; }
  .lb-btn { width: 42px; }
  .lb-close { margin-left: 8px; }
  .lb-thumb { height: 44px; }
  .lb-strip { justify-content: flex-start; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}

/* ============================== phones: smaller type, more photo ============================== */
/* Desktop sizes made the hero panel cover most of the photo on a phone. */

@media (max-width: 640px) {
  body { font-size: 17px; line-height: 1.6; }
  /* small capitals stay at 12px or more on phones, so they're comfortable to read */
  .eyebrow { font-size: 12px; letter-spacing: .2em; }
  .site-footer, .meta-row, .back, .skip-link, .chapter-meta, .chapter-media .count, .nav-side a, .link-draw { font-size: 12px; letter-spacing: .16em; }
  .display { font-size: clamp(34px, 10vw, 44px); }
  .display-m { font-size: clamp(28px, 8.4vw, 36px); }
  .display-s { font-size: clamp(22px, 6.4vw, 28px); }
  .lede { font-size: 17px; line-height: 1.5; }
  .btn { padding: 13px 20px 12px; gap: 10px; font-size: 12px; letter-spacing: .18em; }
  .btn svg { width: 15px; height: 15px; }

  .hero-card { padding: 20px 18px 16px; }
  .hero-card .display { font-size: clamp(30px, 9vw, 38px); margin-top: 10px; }
  .hero-card .display.long { font-size: clamp(26px, 7.8vw, 32px); }
  .hero-card .lede { margin-top: 10px; }
  .hero-card .btn-row { margin-top: 16px; }
  .hero-foot { margin-top: 16px; padding-top: 12px; }
  .hero-chapter-text { gap: 6px; }
  .hero-chapter-text strong { font-size: 18px; }
  .hero-chapter-text .eyebrow { font-size: 12px; letter-spacing: .14em; }
  .hero-dot, .hero-pause { width: 32px; height: 32px; }
  .hero-dot svg { inset: 2px; width: 28px; height: 28px; }

  .gallery-hero-card { padding: 20px 18px; }
  .gallery-hero-card .lede { margin-top: 12px; }
  .meta-row { margin-top: 14px; }

  .intro .rich { font-size: 18px; margin-top: 22px; }
  .section-head { margin-bottom: 30px; }
  .quote { min-height: 68svh; }
  .quote .mark { font-size: 90px; }
  .quote blockquote { font-size: clamp(24px, 7vw, 30px); }
  .quote figcaption { margin-top: 26px; }

  /* stories: the number moves to the photo's top corner, where the text panel never covers it */
  .story-card, .story.flip .story-card { margin: -36px 10px 0; padding: 24px 20px; }
  .story-card .display-m { margin: 12px 0 16px; }
  .story-media .story-no { top: 8px; bottom: auto; left: 12px; right: auto; font-size: 68px; line-height: 1; }

  .image-section .frame { height: 70svh; }
  .image-section .caption { padding: 18px 20px; }
  .cta { min-height: 64svh; }
  .cta-card { padding: 30px 20px; }
  .cta-card .btn-row { margin-top: 24px; }
  .contact-card { padding: 22px 20px; gap: 10px; }
  .error-card { padding: 28px 20px; }
  .error-card .lede { margin-top: 12px; }
  .ig-track span { font-size: 56px; }
  .chapter .lede { margin-bottom: 16px; }
}

/* ============================== reduced motion: everything still, everything visible ============================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
  .reveal, .quote .word { opacity: 1; translate: 0 0; filter: none; }
  .reveal-img { clip-path: none; }
  .reveal-img img, .hero-slide img, .hero-slide.active img { scale: 1; }
  .mask > span { translate: 0 0; rotate: 0deg; }
  .line-grow { transform: none; }
  .strip, .ig-track { transform: none; }
  .strips { overflow-x: auto; }
  .cursor { display: none; }
}
