/* ————————————————————————————————
   Inaugural Capital Markets Gala
   linen by day, door-blue at dusk
———————————————————————————————— */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/CormorantGaramond-400i.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/CormorantGaramond-500i.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/CormorantGaramond-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/CormorantGaramond-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Jost-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Jost-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  --linen: #F5F1E8;
  --linen-deep: #EDE7D9;
  --ink: #23262B;
  --ink-soft: #4A4C50;
  --door: #16233D;
  --door-panel: #1D3153;
  --brass: #A5854E;
  --rose: #C9ADA2;
  --rose-deep: #B8988C;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Avenir Next", Avenir, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
img { display: block; max-width: 100%; }

body {
  font-family: var(--serif);
  background: var(--linen);
  color: var(--ink);
  transition: background-color 1.1s ease, color 1.1s ease;
  -webkit-font-smoothing: antialiased;
}
body.dusk { background: var(--door); color: var(--linen); }

/* ————— type utilities ————— */
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--brass);
}
.rule-diamond {
  display: flex; align-items: center; justify-content: center;
  margin: 1.4rem auto;
}
.rule-diamond span {
  position: relative; display: block;
  width: 72px; height: 1px; background: currentColor; opacity: 0.5;
}
.rule-diamond span::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 5px; height: 5px; background: var(--brass);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ————— nav ————— */
#topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 2rem;
  background: color-mix(in srgb, var(--linen) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform: translateY(-100%);
  transition: transform 0.45s ease, background-color 1.1s ease;
  border-bottom: 1px solid rgba(35,38,43,0.08);
}
#topnav.visible { transform: translateY(0); }
body.dusk #topnav {
  background: color-mix(in srgb, var(--door) 84%, transparent);
  border-bottom-color: rgba(245,241,232,0.12);
}
#topnav .brand {
  font-family: var(--sans); font-weight: 500;
  letter-spacing: 0.42em; text-transform: uppercase;
  font-size: 0.8rem; color: inherit; text-decoration: none;
}
.navlinks { display: flex; gap: 1.6rem; }
.navlinks a {
  font-family: var(--sans); font-weight: 400; font-size: 0.68rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: inherit; text-decoration: none; opacity: 0.72;
  padding-bottom: 3px; border-bottom: 1px solid transparent;
  transition: opacity 0.25s, border-color 0.25s;
}
.navlinks a:hover, .navlinks a.active { opacity: 1; border-bottom-color: var(--brass); }

/* ————— hero ————— */
.hero {
  display: grid; grid-template-columns: 58% 42%;
  min-height: 100vh; min-height: 100svh;
}
.hero-photo {
  overflow: hidden;
  /* a 32px stand-in paints on the first frame so the hero is never blank */
  background-image: url('data:image/webp;base64,UklGRlABAABXRUJQVlA4IEQBAACQBwCdASogACwAPrVMn0mnJKKhMAgA4BaJQBXEXiu3pdPqon4lLIWcQznG2EMG/29nInCaO6QWl3TdXiit7/RTLFj7awIA/tCwAsPesvyxIAoBcukxER9vIF6fDvWiZ9lKDGBFExB5re0i05sktPmS7Y8bncJ2D+/We7BAe+yLdVd2Bs+LbPELTBLFGtrZIP9NM1rYOAKhYG1fGuNu7j9mL5maeoyj2hRftlnXSg94f4091PyyGqA5x91G0d4DhhuswNThH4Db0RR5Xm0ta3eFY6AFO/+KTD7+FI83QeFh70ZCtSgYXMoSEXbQcoDITPuMBqiqzKPA+BDms+MU3RPzHZIQY3xH3XaGlsOyXTGrd7rjoIAA19YKOROoAxjrupqHmKdbzt3qHf5GDO4ahz8KuzzGGfAfTSCpAE42Y1ViQswAAAA=');
  background-size: cover; background-position: center;
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover;
  animation: kenburns 26s ease-out both;
}
@keyframes kenburns {
  from { transform: scale(1.09); }
  to   { transform: scale(1.0); }
}
.hero-panel {
  position: relative;
  background: var(--rose);
  color: var(--ink);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 4rem 3rem 6rem;
}
.hero-panel .eyebrow { color: #7A5C50; margin-bottom: 2.2rem; }
.hero-panel h1 {
  font-weight: 500; font-size: clamp(2.4rem, 3.6vw, 3.6rem);
  line-height: 1.14; letter-spacing: 0.01em;
}
.hero-sub {
  margin-top: 1rem; font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  font-weight: 500;
}
.hero-panel .rule-diamond { color: var(--ink); }
.hero-panel .rule-diamond span::after { background: #7A5C50; }
.scroll-cue {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
}
.cue-line {
  display: block; width: 1px; height: 56px;
  background: linear-gradient(to bottom, transparent, #6E564C);
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.6); transform-origin: top; opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ————— chapters ————— */
.chapter { padding: 7rem 2rem 5rem; max-width: 1280px; margin: 0 auto; scroll-margin-top: 64px; }
.chapter-head { text-align: center; max-width: 640px; margin: 0 auto 4rem; }
.chapter-head h2 {
  font-weight: 500; font-style: italic;
  font-size: clamp(2rem, 3vw, 2.9rem);
  letter-spacing: 0.01em;
}
.chapter-note {
  font-size: 1.12rem; line-height: 1.6; color: inherit; opacity: 0.78;
}

/* reveal on scroll — only applied once the observer is confirmed working,
   so content stays visible if scripting or IntersectionObserver is unavailable */
.js-reveal .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* clickable figures — the button carries no chrome of its own, it just makes
   the photograph reachable and operable by keyboard */
main figure { position: relative; overflow: hidden; }
main figure picture { display: block; width: 100%; height: 100%; }
.photo-btn {
  display: block; width: 100%; height: 100%;
  padding: 0; border: 0; background: none;
  font: inherit; color: inherit; cursor: zoom-in;
}
.photo-btn:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: -2px;
}
main figure img { cursor: zoom-in; transition: transform 0.6s ease; width: 100%; height: 100%; object-fit: cover; }
main figure img:hover { transform: scale(1.025); }

/* ————— editorial grid (setting) ————— */
.ed-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 170px;
}
.ed-a { grid-column: span 3; grid-row: span 3; }
.ed-b { grid-column: span 2; grid-row: span 3; }
.ed-c { grid-column: span 1; grid-row: span 2; }
.ed-d { grid-column: span 1; grid-row: span 1; }
.ed-e { grid-column: span 2; grid-row: span 2; }
.ed-f { grid-column: span 2; grid-row: span 2; }
.ed-g { grid-column: span 1; grid-row: span 2; }
.ed-h { grid-column: span 1; grid-row: span 2; }
.ed-i { grid-column: span 3; grid-row: span 2; }
.ed-j { grid-column: span 3; grid-row: span 2; }

/* ————— features ————— */
.feature { max-width: 980px; margin: 0 auto 3rem; }
.feature img { width: 100%; height: min(72vh, 620px); object-fit: cover; object-position: center 38%; }

/* ————— strips ————— */
.strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 3rem;
}
.strip figure { aspect-ratio: 3 / 4; }

/* ————— masonry (reception, dinner) ————— */
.masonry { columns: 3; column-gap: 14px; }
.masonry figure { margin-bottom: 14px; break-inside: avoid; }

/* ————— portrait wall ————— */
.portrait-wall {
  display: grid; gap: 10px;
  grid-template-columns: repeat(6, 1fr);
}
.portrait-wall figure { aspect-ratio: 3 / 4; }
.portrait-wall figure img { transition: transform 0.5s ease, box-shadow 0.5s ease; }
.portrait-wall figure:hover img {
  transform: scale(1.04);
}
.portrait-wall figure::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid transparent; transition: border-color 0.4s; pointer-events: none;
}
.portrait-wall figure:hover::after { border-color: var(--brass); }

/* ————— remarks ————— */
.remarks-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-template-rows: 300px 300px;
}
.rm-a { grid-row: span 2; }
.rm-b { grid-column: span 2; }

/* ————— gallery ————— */
.gallery-masonry { columns: 4; column-gap: 12px; }
.gallery-masonry figure { margin-bottom: 12px; break-inside: avoid; }

/* ————— footer ————— */
footer {
  text-align: center; padding: 6rem 2rem 4rem;
  transition: background-color 1.1s ease, color 1.1s ease;
}
.f-brand {
  font-family: var(--sans); font-weight: 500; font-size: 1rem;
  letter-spacing: 0.5em; text-transform: uppercase;
}
.f-line { font-style: italic; font-size: 1.1rem; margin-top: 0.4rem; }

/* ————— lightbox ————— */
#lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 22, 27, 0.96);
  display: flex; align-items: center; justify-content: center;
}
#lightbox[hidden] { display: none; }
#lbImg { max-width: 90vw; max-height: 86vh; object-fit: contain; box-shadow: 0 20px 80px rgba(0,0,0,0.6); }
/* the stand-in low-res frame is softened so it reads as "loading", not "blurry" */
#lightbox.loading #lbImg { filter: blur(6px); transform: scale(1.01); }
#lbImg { transition: filter 0.35s ease; }
.lb-spinner {
  position: absolute; top: 50%; left: 50%;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(245,241,232,0.25);
  border-top-color: var(--brass);
  border-radius: 50%;
  opacity: 0; transition: opacity 0.25s ease;
  pointer-events: none;
}
#lightbox.loading .lb-spinner { opacity: 1; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#lightbox button {
  position: absolute; background: none; border: none;
  color: var(--linen); cursor: pointer;
  font-family: var(--serif); line-height: 1;
  opacity: 0.75; transition: opacity 0.2s;
}
#lightbox button:hover { opacity: 1; }
.lb-close { top: 1.2rem; right: 1.8rem; font-size: 2.6rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 3.4rem; padding: 1rem; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
/* counter and full-resolution control sit together in the bar at the foot of
   the viewer, where the eye already goes to read the photo number */
.lb-bar {
  position: absolute; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 1.5rem;
  max-width: 92vw;
}
.lb-counter {
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.3em;
  color: var(--linen); opacity: 0.7; white-space: nowrap;
}
/* Download is the primary action, so it carries the solid fill; viewing at full
   resolution stays secondary as an outline */
#lightbox .lb-download {
  position: static;
  font-family: var(--sans); font-weight: 500; font-size: 0.68rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.62rem 1.15rem;
  color: #16233D;
  background: var(--brass);
  border: 1px solid var(--brass);
  border-radius: 2px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.25s ease;
}
#lightbox .lb-download:hover { filter: brightness(1.12); }

/* the original is the quiet third option: plain text, no chrome */
#lightbox .lb-original {
  position: static;
  font-family: var(--sans); font-size: 0.64rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--linen); opacity: 0.7;
  text-decoration: none;
  border-bottom: 1px solid rgba(245,241,232,0.35);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}
#lightbox .lb-original:hover { opacity: 1; border-bottom-color: var(--brass); }

#lightbox .lb-full {
  position: static;
  font-family: var(--sans); font-weight: 500; font-size: 0.68rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.62rem 1.15rem;
  color: var(--linen);
  background: rgba(165,133,78,0.22);
  border: 1px solid var(--brass);
  border-radius: 2px;
  opacity: 1;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease;
}
#lightbox .lb-full:hover:not(:disabled) { background: var(--brass); color: #16233D; }
#lightbox .lb-full:disabled { cursor: default; opacity: 0.5; }
#lightbox .lb-full[hidden] { display: none; }

/* focus visibility */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brass); outline-offset: 3px;
}

/* ————— responsive ————— */
@media (max-width: 1020px) {
  .ed-grid { grid-auto-rows: 130px; }
  .portrait-wall { grid-template-columns: repeat(4, 1fr); }
  .gallery-masonry { columns: 3; }
}
@media (max-width: 760px) {
  .navlinks { display: none; }
  .hero { grid-template-columns: 1fr; grid-template-rows: 56svh auto; }
  .hero-panel { padding: 3rem 1.2rem 4.6rem; }
  .hero-panel .eyebrow { font-size: 0.6rem; letter-spacing: 0.2em; margin-bottom: 1.6rem; }
  .hero-panel h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .eyebrow { font-size: 0.64rem; letter-spacing: 0.24em; }
  .f-brand { font-size: 0.86rem; letter-spacing: 0.34em; }
  #topnav .brand { letter-spacing: 0.28em; }
  .chapter { padding: 4.6rem 1.1rem 3rem; }
  .ed-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .ed-a { grid-column: span 2; grid-row: span 2; }
  .ed-b { grid-column: span 1; grid-row: span 2; }
  .ed-c { grid-column: span 1; grid-row: span 2; }
  .ed-d, .ed-g, .ed-h { grid-column: span 1; grid-row: span 1; }
  .ed-e, .ed-f, .ed-i, .ed-j { grid-column: span 2; grid-row: span 1; }
  .strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .masonry { columns: 2; column-gap: 10px; }
  .masonry figure { margin-bottom: 10px; }
  .portrait-wall { grid-template-columns: repeat(2, 1fr); }
  .remarks-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .rm-a { grid-column: span 2; grid-row: auto; }
  .rm-b { grid-column: span 2; }
  .gallery-masonry { columns: 2; column-gap: 10px; }
  .lb-prev, .lb-next { font-size: 2.6rem; padding: 0.5rem; }
  .lb-bar { flex-direction: column-reverse; gap: 0.7rem; bottom: 1rem; }
  #lightbox .lb-full, #lightbox .lb-download { font-size: 0.6rem; padding: 0.5rem 0.8rem; }
  .lb-bar { flex-wrap: wrap; justify-content: center; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-photo img { animation: none; }
  .cue-line { animation: none; }
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  main figure img { transition: none; }
  body, #topnav, footer { transition: none; }
}

/* cache-key reset */
