/* Kevin Pedeaux Photographs. Luxury register: warm white wall, colorless interface,
   one serif display face on a compressed scale, color only from the photographs. */

@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-garamond.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/fonts/geist-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/fonts/geist-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --ground: #FAF7F2;
  --matte: #F1EDE6;
  --ink: #1A1816;
  --ink-soft: #5F5A53;
  --hairline: rgba(26, 24, 22, 0.16);

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-text: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-h1: clamp(2.1rem, 1.5rem + 2.2vw, 2.9rem);
  --fs-h2: clamp(1.7rem, 1.4rem + 1vw, 2.15rem);
  --fs-h3: 1.3rem;
  --fs-lead: 1.125rem;
  --fs-body: 1rem;
  --fs-label: 0.75rem;
  --track-label: 0.12em;

  --chapter-gap: clamp(6rem, 12vw, 11rem);
  --pad: clamp(1.25rem, 1rem + 2vw, 3rem);
  --container: 1240px;
  --gutter: clamp(1.5rem, 3vw, 3rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-1: 0.4s;
  --dur-2: 0.8s;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-text); font-size: var(--fs-body); line-height: 1.6; color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 500; }

.label { font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; font-weight: 500; color: var(--ink-soft); }

.skip-nav { position: absolute; top: -60px; left: 16px; z-index: 999; background: var(--ink); color: var(--ground); padding: 10px 16px; transition: top 150ms ease; }
.skip-nav:focus { top: 12px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(250, 247, 242, 0.9); }

.link { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; text-decoration-color: currentColor; transition: text-decoration-color var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease); }
.link:hover { text-decoration-color: transparent; opacity: 0.6; }
.link--label { font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; font-weight: 500; }

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

/* Header: the name on the door, centered, with a quiet row of labels under it */
.header { padding: 2rem var(--pad) 1.25rem; text-align: center; border-bottom: 1px solid var(--hairline); }
.wordmark { display: inline-block; text-decoration: none; font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; letter-spacing: 0.01em; line-height: 1; }
.wordmark span { display: block; margin-top: 0.5rem; font-family: var(--font-text); font-size: 0.6875rem; letter-spacing: 0.3em; text-transform: uppercase; font-weight: 500; color: var(--ink-soft); padding-left: 0.3em; }
.nav { margin-top: 1.25rem; }
.nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 2rem; }
.nav a { display: inline-block; padding: 0.5rem 0; font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; font-weight: 500; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color var(--dur-1) var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }

/* Chapters: one picture, one idea */
.chapter { padding-top: var(--chapter-gap); }
.chapter__text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; max-width: 30rem; }
.chapter__text p { font-size: var(--fs-lead); color: var(--ink-soft); }
.chapter__text .link { margin-top: 0.4rem; }

.hero { padding-top: clamp(3rem, 7vw, 6rem); text-align: center; }
.hero .chapter__text { align-items: center; margin: 0 auto 2.75rem; max-width: 36rem; }
.hero__frame { max-width: 780px; margin: 0 auto; }
.hero__frame figcaption { margin-top: 1rem; }

/* A photograph hangs matted: never cropped, never larger than its file */
.matted { background: var(--matte); padding: clamp(1rem, 3vw, 2.5rem); display: block; }
.matted img { margin: 0 auto; box-shadow: 0 1px 2px rgba(26, 24, 22, 0.12), 0 12px 32px -12px rgba(26, 24, 22, 0.28); }
a.matted { text-decoration: none; }
a.matted img { transition: opacity var(--dur-1) var(--ease); }
a.matted:hover img { opacity: 0.88; }

.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.split--flip .split__media { order: 2; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } .split--flip .split__media { order: 0; } }

.ornament { display: block; width: 26px; height: 26px; margin: var(--chapter-gap) auto 0; color: var(--ink); }

/* Collections index: seven rooms */
.rooms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); margin-top: 3rem; }
.room a { display: block; text-decoration: none; }
.room__frame { background: var(--matte); aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; padding: 12%; }
.room__frame img { max-height: 100%; width: auto; max-width: 100%; box-shadow: 0 8px 22px -10px rgba(26, 24, 22, 0.35); transition: opacity var(--dur-1) var(--ease); }
.room a:hover img { opacity: 0.85; }
.room h3 { margin-top: 1rem; }
.room .label { margin-top: 0.3rem; display: block; }
@media (max-width: 900px) { .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.section-head { display: flex; flex-direction: column; gap: 0.9rem; max-width: 34rem; }
.section-head p { font-size: var(--fs-lead); color: var(--ink-soft); }

/* Gallery pages */
.page-head { padding: clamp(3rem, 7vw, 5.5rem) 0 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.9rem; }
.page-head p { font-size: var(--fs-lead); color: var(--ink-soft); max-width: 36rem; }
.siblings { margin-top: 2.5rem; padding: 1rem 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.siblings ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.75rem; }
.siblings a { display: inline-block; padding: 0.4rem 0; font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; font-weight: 500; text-decoration: none; color: var(--ink-soft); border-bottom: 1px solid transparent; }
.siblings a:hover, .siblings a[aria-current="page"] { color: var(--ink); border-bottom-color: currentColor; }

.wall { margin-top: clamp(3rem, 6vw, 5rem); columns: 3; column-gap: var(--gutter); }
.wall figure { break-inside: avoid; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.wall a { display: block; text-decoration: none; }
.wall img { width: 100%; box-shadow: 0 1px 2px rgba(26, 24, 22, 0.12), 0 12px 28px -14px rgba(26, 24, 22, 0.3); transition: opacity var(--dur-1) var(--ease); }
.wall a:hover img { opacity: 0.88; }
.wall figcaption { margin-top: 0.9rem; }
.caption__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; line-height: 1.2; }
.caption__meta { display: block; margin-top: 0.25rem; }
@media (max-width: 1000px) { .wall { columns: 2; } }
@media (max-width: 600px) { .wall { columns: 1; } }

.onward { margin-top: var(--chapter-gap); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }

/* One photograph on the wall */
.work { padding-top: clamp(2rem, 5vw, 4rem); }
.work__frame { background: var(--matte); padding: clamp(1rem, 4vw, 3.5rem); display: flex; justify-content: center; }
.work__frame img { max-height: 82vh; width: auto; max-width: 100%; box-shadow: 0 1px 2px rgba(26, 24, 22, 0.12), 0 18px 44px -16px rgba(26, 24, 22, 0.35); }
.plate { margin: 2.25rem auto 0; max-width: 34rem; text-align: center; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.plate h1 { font-size: var(--fs-h2); }
.plate dl { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.5rem; margin-top: 0.75rem; }
.plate dl div { display: flex; gap: 0.5rem; align-items: baseline; }
.plate dd { font-size: 0.9375rem; }
.pager { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--hairline); display: flex; justify-content: space-between; gap: 1.5rem; }
.pager a { text-decoration: none; display: flex; flex-direction: column; gap: 0.3rem; max-width: 46%; padding: 0.4rem 0; }
.pager a:hover .pager__title { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.pager__title { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.2; }
.pager__next { text-align: right; margin-left: auto; align-items: flex-end; }

/* The index: an archival ledger */
.ledger { margin-top: 3rem; width: 100%; border-collapse: collapse; }
.ledger caption { text-align: left; padding-bottom: 0.75rem; }
.ledger th { text-align: left; font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; font-weight: 500; color: var(--ink-soft); padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid var(--ink); }
.ledger td { padding: 0.8rem 1rem 0.8rem 0; border-bottom: 1px solid var(--hairline); vertical-align: baseline; font-size: 0.9375rem; color: var(--ink-soft); }
.ledger td:first-child { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.ledger td a { text-decoration: none; }
.ledger td a:hover { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
@media (max-width: 640px) { .ledger th:nth-child(4), .ledger td:nth-child(4) { display: none; } }

/* Prose pages */
.prose { max-width: 38rem; margin: 3rem auto 0; display: flex; flex-direction: column; gap: 1.25rem; font-size: 1.0625rem; }
.prose h2 { margin-top: 1.5rem; }
.prose ul { list-style: disc; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.prose .signoff { font-family: var(--font-display); font-size: 1.4rem; }
.portrait-pair { max-width: 52rem; margin: 3.5rem auto 0; }

/* Footer: letterhead, and the page ends on the name */
.footer { margin-top: var(--chapter-gap); padding: 4.5rem var(--pad) 3rem; border-top: 1px solid var(--hairline); }
.footer__grid { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer__heading { font-family: var(--font-text); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; font-weight: 500; margin-bottom: 0.9rem; color: var(--ink-soft); }
.footer__human { color: var(--ink-soft); max-width: 22rem; }
.footer__human a { color: var(--ink); }
.footer li a { display: inline-block; padding: 0.3rem 0; text-decoration: none; }
.footer li a:hover { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.footer__mark { text-align: center; margin-top: var(--chapter-gap); }
.footer__mark .wordmark { font-size: 2rem; }
.footer__legal { margin-top: 2.5rem; text-align: center; font-size: 0.8125rem; color: var(--ink-soft); }
.footer__legal a { text-underline-offset: 0.3em; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }

.corerail-credit { width: 100%; display: flex; justify-content: center; margin-top: 2rem; color: var(--ink-soft); }
.corerail-badge { display: inline-flex; align-items: center; gap: 0.55em; text-decoration: none; color: inherit; }
.corerail-badge:hover .corerail-badge__label, .corerail-badge:focus-visible .corerail-badge__label { text-decoration: underline; text-underline-offset: 3px; }
.corerail-badge__label { font-size: 0.8125rem; letter-spacing: 0.01em; white-space: nowrap; }
.corerail-badge__art { height: 1.3em; width: auto; flex-shrink: 0; display: block; }
.corerail-credit [fill="#6B7F5E"] { fill: var(--corerail-sage, #5C6E50); }

/* Motion: one easing, fade up once */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .link, .nav a, a.matted img, .wall img, .room__frame img, .skip-nav { transition: none; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
