/* ============================================================
   Curious Lines, N1 Dusk Folio (WL-6pc-4)
   Warm near-black, the photograph glows. Cartographic register.
   ============================================================ */

:root {
  /* Dusk palette */
  --bg:           #13110f;
  --paper:        #1a1815;
  --paper-deep:   #0a0907;
  --ink:          #f0ede8;
  --ink-pure:     #ffffff;
  --ink2:         #a8a097;
  --ink3:         #75706a;
  --accent:       #d4724a;
  --rule:         rgba(240, 237, 232, 0.10);
  --divider:      rgba(240, 237, 232, 0.16);

  /* Type */
  --serif: "Cormorant Garamond", "Source Serif 4", Georgia, serif;
  --sans:  "DM Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --script: "Sacramento", "Allura", cursive;

  /* Layout */
  --max:        1280px;
  --max-inner:  1200px;
  --gutter:     clamp(1.5rem, 4.5vw, 3.75rem);
  --nav-h:      78px;

  /* Motion */
  --ease-exp: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

::selection { background: var(--accent); color: var(--bg); }

/* Typography ------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: 0.005em;
  color: var(--ink);
}

.display-hero {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.0;
  color: var(--ink-pure);
}
.display-hero em { font-style: italic; }
/* Stepped hero, quiet turn: the italic walks right and drops
   to a murmur */
.hero-copy .display-hero em {
  display: block;
  margin-left: clamp(2.5rem, 9vw, 8rem);
  margin-top: 0.3rem;
  font-size: 0.62em;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.88);
}

.display-section {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  line-height: 1.1;
}

.display-card {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.05;
}

.display-quote {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  line-height: 1.22;
  text-align: center;
}
.display-quote em { font-style: italic; }

.body-lede {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
  max-width: 31rem;
}

.body-prose {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink2);
  max-width: 30rem;
}

.muted { color: var(--ink2); }
.faint { color: var(--ink3); }

/* Coord chip — short mono line preceded by a leading bar ----- */

.coord {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink3);
}
.coord::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}
.coord.no-bar::before { display: none; }
.coord.accent { color: var(--accent); }
.coord.right { justify-content: flex-end; }
.coord.right::before { display: none; }
.coord.right::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  margin-left: 0.5rem;
}

/* Fig-meta block — small mono stack with cartographic feel --- */

.fig-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: rgba(243, 236, 221, 0.78);
}
.fig-meta.right { text-align: right; }

/* Layout ----------------------------------------------------- */

.wrap {
  max-width: var(--max-inner);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Hero ------------------------------------------------------- */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: var(--bg);
}
/* The fixed light-meter bar eats the bottom 52px of the viewport */
body.has-meter .hero {
  height: calc(100vh - 52px);
  height: calc(100svh - 52px);
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}
/* Panorama slides drift edge to edge; 3:2 slides hold still.
   Reduced-motion is handled by the global animation kill switch. */
@keyframes hero-pan {
  from { object-position: 0% 58%; }
  to   { object-position: 100% 58%; }
}
.hero img[data-pan] {
  animation: hero-pan 40s ease-in-out infinite alternate;
}

/* Slide index — one tick per frame, the live one burns terracotta */
.hero-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1.4rem;
  display: flex;
  gap: 0.55rem;
  z-index: 2;
}
.hero-dots button {
  appearance: none;
  border: none;
  padding: 6px;             /* invisible hit area around the 5px dot */
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.hero-dots button::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.5s, transform 0.5s;
}
.hero-dots button:hover::before {
  background: rgba(255, 255, 255, 0.7);
}
.hero-dots button.on::before {
  background: var(--accent);
  transform: scale(1.35);
}

/* No scrim on the hero: text carries its own legibility */
.hero-copy,
.hero-figmeta .fig-meta {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 2px 14px rgba(0, 0, 0, 0.35);
}
/* Deep-frost pill behind the nav (Ila's pick, 2026-07-19) */
body.has-hero .masthead .nav-links {
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  background: rgba(10, 9, 7, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.has-hero .masthead .nav-links a {
  opacity: 1;
  text-shadow: none;
}
body.has-hero .masthead .wordmark svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1.75rem, 3.5vw, 2.25rem) var(--gutter);
  z-index: 2;
}

.hero-copy {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  max-width: 660px;
  color: var(--ink-pure);
}
.hero-copy .coord {
  color: rgba(243, 236, 221, 0.82);
}
.hero-copy h1 {
  margin: 1.5rem 0 0;
}
.hero-copy p {
  margin-top: 1.75rem;
}

.hero-figmeta {
  grid-column: 2;
  grid-row: 3;
  align-self: end;
  justify-self: end;
}

/* Masthead (sits in hero on home, sticky band elsewhere) ---- */

.masthead {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: clamp(1.5rem, 3vw, 2.25rem) var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
/* Home masthead stays fixed on scroll; transparent over the hero,
   compact frosted band once you slide down */
body.has-hero .masthead {
  position: fixed;
  transition: background 0.35s, padding 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
body.has-hero .masthead.scrolled {
  background: rgba(10, 9, 7, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(240, 237, 232, 0.1);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}
body.has-hero .masthead .wordmark svg {
  transition: width 0.35s, height 0.35s;
}
body.has-hero .masthead.scrolled .wordmark svg {
  width: 160px;
  height: 40px;
}
/* the pill is redundant once the band itself is frosted */
body.has-hero .masthead.scrolled .nav-links {
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body:not(.has-hero) .masthead {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
body:not(.has-hero) { padding-top: 0; }

.wordmark {
  display: inline-flex;
  align-items: flex-start;
  text-decoration: none;
}

/* Nav links ------------------------------------------------- */

.nav-links {
  display: flex;
  gap: clamp(1.25rem, 2.4vw, 2.4rem);
  list-style: none;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  opacity: 0.84;
  transition: opacity 0.2s, color 0.2s;
}
.nav-links a:hover { opacity: 1; color: var(--accent); }
.nav-links a.active { opacity: 1; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 0.45rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  border-radius: 0;
}

@media (max-width: 820px) {
  /* Toggle sits hard right; the empty <nav> must not steal the slot */
  .masthead { justify-content: flex-start; }
  .masthead nav { display: contents; }
  .nav-toggle {
    display: inline-block;
    margin-left: auto;
    background: rgba(10, 9, 7, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(240, 237, 232, 0.22);
    border-radius: 999px;
    padding: 0.5rem 1rem;
  }
  /* Drops from the right edge as a frosted card, not a full-width slab.
     Matches the hero nav pill's specificity so it wins on the home page too. */
  .masthead .nav-links,
  body.has-hero .masthead .nav-links {
    display: none;
    position: absolute;
    top: calc(100% - 0.35rem);
    right: var(--gutter);
    left: auto;
    min-width: 11.5rem;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    background: rgba(10, 9, 7, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(240, 237, 232, 0.14);
    border-radius: 3px;
    padding: 1.1rem 1.25rem;
    gap: 1rem;
  }
  .masthead .nav-links.open,
  body.has-hero .masthead .nav-links.open { display: flex; }
  .nav-links a { opacity: 0.9; }
}

/* Contact sheet strip (replaced the waypoint ticker) -------- */

.filmstrip {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  padding: 0.35rem 0 0.8rem;
}
.film-edge {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: rgba(240, 180, 90, 0.55);
  padding: 0.35rem var(--gutter) 0.15rem;
}
.film-track {
  display: flex;
  width: max-content;
  animation: film-drift 55s linear infinite;
}
/* JS drifts + drags the roll; the CSS animation is the no-JS fallback. */
.filmstrip { cursor: grab; touch-action: pan-y; }
.filmstrip.dragging { cursor: grabbing; }
.filmstrip img { user-select: none; -webkit-user-drag: none; }
.film-run { display: flex; }
.frame { position: relative; margin: 0 0.45rem; flex: none; }
.frame::before,
.frame::after {
  content: "";
  display: block;
  height: 11px;
  margin: 0 2px;
  background-image: radial-gradient(rgba(240, 237, 232, 0.5) 2.2px, transparent 2.6px);
  background-size: 15px 11px;
  background-position: center;
}
.frame::before { margin-bottom: 4px; }
.frame::after { margin-top: 4px; }
.frame a { display: block; position: relative; }
.frame img { height: 100px; width: auto; filter: brightness(0.92); transition: filter 0.4s; }
.frame:hover img { filter: brightness(1.05); }
.frame .fno {
  position: absolute;
  bottom: -1px;
  right: 2px;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  color: rgba(240, 180, 90, 0.85);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}
.frame svg.grease {
  position: absolute;
  inset: 7px -10px 7px -10px;
  width: calc(100% + 20px);
  height: calc(100% - 14px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.frame svg.grease path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
}
.frame.circled svg.grease,
.frame:hover svg.grease { opacity: 0.9; }

@keyframes film-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Darkroom develop — the four theme cards, home page only ---- */

body.has-hero .theme-card img {
  filter: grayscale(1) brightness(1.55) contrast(0.55) sepia(0.12);
  transition: transform 0.8s var(--ease-exp), filter 2.2s ease-in;
}
body.has-hero .theme-card.developed img { filter: grayscale(0) brightness(0.96) contrast(1) sepia(0); }
body.has-hero .theme-card:hover img { transform: scale(1.04); }

/* Light meter — scroll progress as an exposure scale --------- */

body.has-meter { padding-bottom: 52px; }
.light-meter {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(10, 9, 7, 0.94);
  border-top: 1px solid var(--rule);
  padding: 0.5rem var(--gutter) 0.6rem;
  backdrop-filter: blur(6px);
}
.meter-scale { position: relative; height: 24px; }
.meter-ticks {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--ink3);
  border-top: 1px solid var(--rule);
  padding-top: 8px;
}
.meter-ticks span::before {
  content: "";
  display: block;
  width: 1px;
  height: 5px;
  background: var(--ink3);
  margin: -8px auto 3px;
}
.meter-needle {
  position: absolute;
  top: -4px;
  left: 0;
  width: 1.5px;
  height: 15px;
  background: var(--accent);
  transition: left 0.25s var(--ease-exp);
}
.meter-needle::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -2.75px;
  border: 3.5px solid transparent;
  border-top: 5px solid var(--accent);
}
.meter-read {
  position: absolute;
  right: 0;
  top: -2px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--ink2);
}
@media (max-width: 600px) {
  .light-meter { display: none; }
  body.has-meter { padding-bottom: 0; }
}

/* Sections --------------------------------------------------- */

.section {
  padding: clamp(5rem, 9vw, 9rem) 0;
}
.section.paper {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section-intro {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.section-intro .coord {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--accent);
}
.section-intro .coord::before { display: none; }
.section-intro h2 {
  margin-top: 1.4rem;
  font-style: italic;
}
.section-intro p {
  max-width: 34rem;
  margin: 1.25rem auto 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink2);
}

/* Contour divider (SVG topo lines) -------------------------- */

.contour-divider {
  display: block;
  width: 100%;
  height: 18px;
  margin: clamp(3rem, 6vw, 4.5rem) 0;
}
.contour-divider path { fill: none; stroke: var(--divider); stroke-width: 1; }

/* Theme cards (2x2 grid) ------------------------------------ */

.themes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 740px) {
  .themes-grid { grid-template-columns: 1fr; }
}

.theme-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper);
  text-decoration: none;
  isolation: isolate;
}
.theme-card img,
.theme-card .photo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--paper);
  filter: brightness(0.92);
  transition: transform 0.8s var(--ease-exp), filter 0.6s var(--ease-exp);
  z-index: 0;
}
.theme-card:hover img,
.theme-card:hover .photo-bg {
  transform: scale(1.04);
  filter: brightness(1.0);
}
.theme-card .placeholder-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--ink3);
  background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 12px, #211e1a 12px, #211e1a 24px);
  z-index: 0;
}
.theme-card-top {
  position: absolute;
  top: 1.4rem;
  left: 1.4rem;
  right: 1.4rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: rgba(240, 237, 232, 0.78);
  z-index: 2;
}
.theme-card-body {
  position: absolute;
  inset: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, transparent 40%, rgba(19, 17, 15, 0.88) 100%);
  color: var(--ink);
  z-index: 1;
}
.theme-card-body h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.05;
  color: var(--ink);
}
.theme-card-body p {
  margin-top: 0.85rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.7;
  opacity: 0.82;
  max-width: 22.5rem;
}
.theme-card-enter {
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Featured story (split layout) ----------------------------- */

.featured {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
  max-width: var(--max-inner);
  margin: 0 auto;
}
.featured-photo {
  aspect-ratio: 3 / 2;
  background: var(--paper-deep);
  overflow: hidden;
  position: relative;
}
.featured-photo img { width: 100%; height: 100%; object-fit: cover; }
.featured-photo .placeholder-bg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em;
  color: var(--ink3);
  background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 12px, #211e1a 12px, #211e1a 24px);
}
.featured-body h3 {
  margin-top: 1.25rem;
  font-style: italic;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.08;
}
.featured-body p {
  margin-top: 1.4rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink2);
  max-width: 32rem;
}
.featured-meta {
  margin-top: 1.75rem;
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.read-essay {
  display: inline-block;
  margin-top: 1.75rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.18rem;
  transition: opacity 0.2s;
}
.read-essay:hover { opacity: 0.78; }

@media (max-width: 820px) {
  .featured { grid-template-columns: 1fr; }
}

/* Quote ------------------------------------------------------ */

.quote-wrap {
  max-width: 62rem;
  margin: 0 auto;
}
.quote-wrap blockquote {
  margin: 3.5rem 0;
}
.quote-cite {
  text-align: center;
  margin-bottom: 3.5rem;
}

/* About teaser ---------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: clamp(3rem, 6vw, 5.5rem);
  align-items: center;
  max-width: var(--max-inner);
  margin: 0 auto;
}
.about-body h3 {
  margin-top: 1.4rem;
  font-style: italic;
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  line-height: 1.15;
}
.about-body p {
  margin-top: 1.4rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink2);
  max-width: 30rem;
}
.about-photo {
  aspect-ratio: 4 / 5;
  background: var(--paper-deep);
  overflow: hidden;
  position: relative;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
/* underprint: photo screens into the paper, side edges fade (same family as .chart-under) */
.about-photo.underprint { background: transparent; }
.about-photo.underprint img {
  mix-blend-mode: screen;
  opacity: 0.62;
  filter: saturate(0.75);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent);
}
.about-photo .placeholder-bg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em;
  color: var(--ink3);
  background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 12px, #211e1a 12px, #211e1a 24px);
}
.about-photo .corner-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: rgba(243, 236, 221, 0.7);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.25rem 0.55rem;
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* Footer ----------------------------------------------------- */

.colophon {
  background: var(--paper-deep);
  color: #d4cab2;
  padding: clamp(4rem, 7vw, 5.5rem) var(--gutter) 2.25rem;
}
.colophon-inner {
  max-width: var(--max-inner);
  margin: 0 auto;
}
.colophon-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  align-items: flex-start;
  margin-top: 3rem;
}
.colophon-brand p {
  margin-top: 1.4rem;
  font-family: var(--sans);
  font-size: 0.825rem;
  line-height: 1.8;
  opacity: 0.7;
  max-width: 20rem;
}
.colophon-col h4 {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 1rem;
  color: #d4cab2;
}
.colophon-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
  font-family: var(--sans);
  font-size: 0.84rem;
}
.colophon-col a { color: inherit; opacity: 0.85; }
.colophon-col a:hover { opacity: 1; color: var(--accent); }

.colophon-bottom {
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
}

@media (max-width: 820px) {
  .colophon-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .colophon-grid { grid-template-columns: 1fr; }
}

/* Page opening (for sub-pages without hero photo) ----------- */

.opening {
  /* block-only: every .opening is also a .wrap, whose gutter must survive */
  padding-block: clamp(6rem, 11vw, 9rem) clamp(2.5rem, 4vw, 4rem);
}
.opening .coord { color: var(--accent); }
.opening h1 {
  margin-top: 1.4rem;
  font-style: italic;
  font-size: clamp(2.75rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  max-width: 18ch;
}
.opening .body-lede {
  margin-top: 1.75rem;
  color: var(--ink2);
  max-width: 38rem;
}

/* About lead photo band ------------------------------------- */

.about-lead {
  position: relative;
  width: 100%;
  height: clamp(280px, 48vh, 500px);
  overflow: hidden;
}
.about-lead img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.about-lead .corner-tag {
  position: absolute;
  bottom: 1rem;
  right: var(--gutter);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: rgba(243, 236, 221, 0.75);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.25rem 0.55rem;
}

/* Side map-lines with scroll parallax (About) ---------------- */

.map-lines {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 90px;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
}
.map-lines.left { left: 0; }
.map-lines.right { right: 0; transform: scaleX(-1); }
.map-lines svg { width: 100%; height: 133.333%; display: block; }
.map-lines path { fill: none; stroke-width: 1; will-change: transform; }
.map-lines .ml-a { stroke: rgba(240, 237, 232, 0.11); }
.map-lines .ml-b { stroke: rgba(240, 237, 232, 0.07); }
.map-lines .ml-c { stroke: rgba(240, 237, 232, 0.05); }
.map-lines .ml-accent { stroke: rgba(212, 114, 74, 0.4); stroke-dasharray: 4 7; }
body.has-maplines .grat-ticks,
body.has-maplines .grat-label,
body.has-maplines .rebate-print { display: none; }
@media (max-width: 1100px) { .map-lines { display: none; } }

/* Gallery masonry ------------------------------------------- */

.masonry {
  column-count: 3;
  column-gap: 1.25rem;
}
.masonry .photo {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  background: var(--paper);
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
}
.masonry .photo img { width: 100%; display: block; }
.masonry .photo .placeholder {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--ink3);
  background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 12px, #211e1a 12px, #211e1a 24px);
}
.masonry .photo:nth-child(3n) .placeholder { height: 380px; }
.masonry .photo:nth-child(4n) .placeholder { height: 240px; }
.masonry .photo:nth-child(5n) .placeholder { height: 320px; }
@media (max-width: 900px) { .masonry { column-count: 2; } }
@media (max-width: 600px) { .masonry { column-count: 1; } }

/* Story list (sub-pages) ------------------------------------ */

.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.story:last-child { border-bottom: 1px solid var(--rule); }
.story .photo {
  aspect-ratio: 4 / 3;
  background: var(--paper-deep);
  overflow: hidden;
}
.story .photo img { width: 100%; height: 100%; object-fit: cover; }
.story .photo .placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.18em;
  color: var(--ink3);
  background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 12px, #211e1a 12px, #211e1a 24px);
}
.story h3 {
  margin-top: 1rem;
  font-style: italic;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}
.story p {
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink2);
  max-width: 32rem;
}
@media (max-width: 820px) { .story { grid-template-columns: 1fr; } }

/* Plate (sub-page photograph card) -------------------------- */

.plate {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.plate .photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--paper-deep);
  overflow: hidden;
}
.plate .photo img { width: 100%; height: 100%; object-fit: cover; }
.plate .photo .placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.18em;
  color: var(--ink3);
  background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 12px, #211e1a 12px, #211e1a 24px);
}
.plate-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.plate-meta .title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2vw, 2rem);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
}
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Forms ----------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}
.field label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
}
.field input,
.field textarea,
.field select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  padding: 0.7rem 0;
  font-family: var(--sans);
  font-size: 1rem;
  resize: vertical;
  border-radius: 0;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.field select { color: var(--ink); }
.field select option { color: #000; }

/* Hero slideshow -------------------------------------------- */

.hero img.hero-slide { opacity: 0; transition: opacity 1.8s ease; }
.hero img.hero-slide.on { opacity: 1; }
.hero-copy .coord,
.hero-figmeta .fig-meta { transition: opacity 0.6s ease; }
.hero-copy .coord.swap,
.hero-figmeta .fig-meta.swap { opacity: 0; }

/* Chart margins: graticule (left) + rebate print (right) ----- */

.grat-ticks {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 14px;
  z-index: 40;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to bottom, rgba(240, 237, 232, 0.18) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(to bottom, rgba(240, 237, 232, 0.30) 0 1px, transparent 1px 120px);
  background-size: 6px 100%, 11px 100%;
  background-repeat: no-repeat;
}
.grat-ticks.left { left: 0; }
.grat-ticks.right { right: 0; transform: scaleX(-1); }
.grat-label {
  position: fixed;
  left: 17px;
  top: 50%;
  transform: rotate(180deg) translateY(50%);
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--ink3);
  z-index: 40;
  pointer-events: none;
  transition: opacity 0.4s;
}
.grat-label.swap { opacity: 0; }
.rebate-print {
  position: fixed;
  right: 19px;
  top: 50%;
  transform: rotate(180deg) translateY(50%);
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  color: rgba(240, 180, 90, 0.45);
  white-space: nowrap;
  z-index: 40;
  pointer-events: none;
}
@media (max-width: 1100px) {
  .grat-ticks, .grat-label, .rebate-print { display: none; }
}

/* Focus-bracket cursor on clickable photographs -------------- */

.theme-card,
.frame a,
.photo[data-lightbox] {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="34" height="34"><g fill="none" stroke="white" stroke-width="1.6" opacity="0.95"><path d="M2 10 V2 H10"/><path d="M24 2 H32 V10"/><path d="M32 24 V32 H24"/><path d="M10 32 H2 V24"/><circle cx="17" cy="17" r="1.6" fill="white" stroke="none"/></g></svg>') 17 17, pointer;
}

/* Rewind to top ---------------------------------------------- */

.rewind-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: inherit;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  cursor: pointer;
  opacity: 0.75;
  transition: color 0.2s, border-color 0.2s, opacity 0.2s;
}
.rewind-btn:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }
.rewind-btn svg { width: 16px; height: 16px; }
.rewind-btn.spinning svg { animation: reel-spin 0.5s linear infinite reverse; }
@keyframes reel-spin { to { transform: rotate(360deg); } }
.film-flutter {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0 3px, transparent 3px 26px);
}
.film-flutter.on { animation: flutter-fx 0.7s steps(9) forwards; }
@keyframes flutter-fx {
  0% { opacity: 0.9; background-position: 0 0; }
  100% { opacity: 0; background-position: 0 900px; }
}

/* Scroll fade-in -------------------------------------------- */

.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease-exp), transform 0.9s var(--ease-exp);
}
.fade-in.in { opacity: 1; transform: none; }
.fade-in.delay-1 { transition-delay: 0.08s; }
.fade-in.delay-2 { transition-delay: 0.16s; }
.fade-in.delay-3 { transition-delay: 0.24s; }
.fade-in.delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Contact chart --------------------------------------------- */

.opening-chart {
  position: relative;
  min-height: clamp(24rem, 52vh, 32rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* The chart is an underlay, not a framed panel: it lightens the page
   where its drawn lines are and dissolves at the edges */
.chart-under {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 40%;
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 85%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 85%, transparent 100%);
}
.opening-chart-copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}
.chart-cap {
  position: absolute;
  right: 0;
  bottom: clamp(1rem, 3vw, 2rem);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--ink3);
}
@media (max-width: 820px) {
  .chart-under { opacity: 0.4; }
  .chart-cap { position: static; margin-top: 1.5rem; }
}

/* GET IN TOUCH lead-in (about) ------------------------------ */

.window-line {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  color: var(--ink2);
  margin-bottom: 1.6rem;
}

/* Negative sleeve (about, philosophy) ----------------------- */

.neg-sleeve {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: rgba(240, 237, 232, 0.06);
  border: 1px solid var(--rule);
  padding: 10px 8px;
  margin-top: 1.8rem;
}
.neg-sleeve img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  filter: invert(1) sepia(0.35) contrast(0.85) brightness(0.9);
  opacity: 0.9;
}
.neg-cap {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--ink3);
  margin-top: 0.7rem;
}

/* Utility --------------------------------------------------- */

.center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-4 { margin-top: clamp(2.5rem, 5vw, 4rem); }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* Stories page: essays above, the photoblog archive beneath ---- */

.waiting-line {
  text-align: center;
  margin: clamp(1rem, 4vw, 2.5rem) 0 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--ink);
}

.archive-head {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}
.archive-head .ledger {
  border-left: 1px solid var(--rule);
  padding-left: clamp(1.25rem, 3vw, 2rem);
}
.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink3);
}
.ledger-row:last-child { border-bottom: none; }
.ledger-row b {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}
@media (max-width: 820px) {
  .archive-head { grid-template-columns: 1fr; }
  .archive-head .ledger {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 0.75rem;
  }
}

.photoblog-cta {
  text-align: center;
  margin: clamp(2.5rem, 6vw, 4rem) 0 clamp(1rem, 3vw, 2rem);
}
.btn-accent {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: #13110f;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.85rem 1.9rem;
  text-decoration: none;
  transition: background 0.35s var(--ease-exp), color 0.35s var(--ease-exp);
}
.btn-accent:hover { background: transparent; color: var(--accent); }

.log-entry {
  display: grid;
  grid-template-columns: 3fr 8fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: center;
  padding: clamp(1.25rem, 3vw, 1.9rem) 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.log-entry:first-of-type { border-top: 1px solid var(--rule); }
.log-plate { aspect-ratio: 3 / 2; overflow: hidden; }
.log-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82) saturate(0.9);
  transition: filter 0.5s var(--ease-exp);
}
.log-entry:hover .log-plate img { filter: brightness(1) saturate(1); }
.log-entry h4 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  margin: 0.45rem 0 0.35rem;
  color: var(--ink);
}
.log-entry p {
  color: var(--ink3);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
  max-width: 52ch;
}
.stamp-row {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink3);
  display: flex;
  gap: 0.9rem;
}
.stamp-row .yr { color: var(--accent); }
@media (max-width: 620px) {
  .log-entry { grid-template-columns: 1fr; gap: 0.9rem; }
}

.open-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--divider);
}
.open-btn {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--ink);
  border: 1px solid rgba(240, 237, 232, 0.28);
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.35s var(--ease-exp), color 0.35s var(--ease-exp), background 0.35s var(--ease-exp);
}
.open-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(212, 114, 74, 0.07);
}
@media (max-width: 620px) { .open-bar { flex-direction: column; align-items: flex-start; } }

/* Home teaser: the photoblog note under the Stories block */
.teaser-split {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  border-top: 1px solid var(--rule);
}
.teaser-note {
  color: var(--ink3);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0.8rem 0 1.2rem;
  max-width: 44ch;
}
