/* ==========================================================================
   FINEST DEVOTION — site styles
   Estate Man: warm umber, deep black, editorial serif, generous air.
   No build step. Edit this file directly.
   ========================================================================== */

:root {
  --bg:        #0d0a08;
  --bg-raised: #14100c;
  --ink:       #e9e1d6;
  --ink-mute:  #9c9084;
  --ink-faint: #6b6157;
  --rule:      #2a2320;
  --accent:    #b8863f;
  --accent-dim:#7d5c2c;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  /* Display Didone — matches the painted FD icon. Wordmark only, never body copy. */
  --display: "Bodoni Moda", "Bodoni MT", Didot, "Times New Roman", serif;

  --measure: 34rem;
  --gutter: clamp(1.5rem, 5vw, 5rem);
}

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem);
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

/* ---------- type ---------- */

h1, h2, h3 {
  font-weight: 300;
  line-height: 1.15;
  margin: 0;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { margin: 0 0 1.4em; }

.lede {
  font-size: clamp(1.2rem, 1.4vw + 1rem, 1.55rem);
  line-height: 1.55;
  color: var(--ink);
}

.label {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 4rem 0;
}

/* ---------- layout ---------- */

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

.measure { max-width: var(--measure); }

.section { padding-block: clamp(4rem, 9vw, 8rem); }
/* For a section that follows a rule — the rule's own margin already separates
   it, so the full top padding doubles up. */
.section--tight { padding-block-start: clamp(1.5rem, 3vw, 2.5rem); }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.15rem;
}

/* Letterspaced Didone caps. The trailing letterspace on the last glyph is
   compensated with padding-left so the mark sits optically centred. */
.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  transition: color 0.2s;
}
.wordmark:hover { color: #d5a457; }

.nav {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.2rem);
  flex-wrap: wrap;
}

.nav a {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Phones: stack the nav under the wordmark, center both, and stop the header
   sticking. Six items beside the wordmark wrap into a cramped column, and a
   sticky bar that tall eats a third of a phone screen on a reading site.
   Navigation at the bottom of a long page is covered by the footer nav. */
@media (max-width: 46rem) {
  .site-head { position: static; }

  .site-head__inner {
    flex-direction: column;
    align-items: center;
    gap: 0.95rem;
    padding-block: 1.1rem;
  }

  /* Three and three. Flex-wrap broke wherever it happened to fit (4 then 2);
     a 3-column grid forces an even split and keeps the two rows aligned. */
  .nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem 0.5rem;
    width: 100%;
    max-width: 23rem;
    margin-inline: auto;
  }
  .nav a {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-align: center;
  }

  /* Footer: all six on one line. The 0.06em letterspacing was costing about a
     third of the row's width, so it goes first; the type then scales with the
     viewport so it still fits a 320px screen. */
  .foot-links {
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    gap: 0.4rem;
  }
  .foot-links a {
    font-size: clamp(0.52rem, 2.4vw, 0.62rem);
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
}

/* ---------- hero ---------- */

/* Mobile: stacked, image full width. The desktop rules below do the bleed. */
.hero {
  display: grid;
  align-content: center;
  gap: 2.5rem;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

/* Line breaks are set with <br> in the markup — no max-width, or the lines wrap. */
.hero h1 {
  max-width: none;
  font-size: clamp(1.9rem, 3.1vw, 2.9rem);
}

/* Container context so the headline can be sized against its own column
   rather than the viewport — see the nowrap rule in the 62rem block. */
.hero__text { display: grid; align-content: center; gap: 2rem; container-type: inline-size; }
/* Eyebrow sits tight to the headline rather than taking a full grid gap. */
.hero__text .label { display: block; margin-bottom: -1.4rem; }

/* Sources are all 1:1, so mobile shows them square and uncropped. Desktop
   overrides this with a fixed height and crops to a tall portrait. */
.hero__figure {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin: 0;
  background: linear-gradient(150deg, #1b1510, #0f0c09);
}

/* Every slide is stacked in the same box. Only .is-on is visible.
   The first image keeps loading="eager"; the rest are lazy. */
.hero__figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2.4s ease-in-out;
}
.hero__figure img.is-on { opacity: 1; }

/* No JS, or reduced motion: show the first frame and nothing else. */
.hero__figure img:first-child { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero__figure img { transition: none; }
}

/* Desktop: narrow type column at left, work bleeding off the right edge.
   The figure escapes .wrap's padding with a negative margin equal to the
   gutter, so it runs to the viewport edge with nothing beyond it. */
@media (min-width: 62rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(3rem, 6vw, 5rem);
    padding-block: 0;
  }

  /* The three lines are set with <br> and must never wrap. Sizing against the
     column (cqw) rather than the viewport guarantees the longest line fits
     whatever the column ends up being, so nowrap can never overflow. */
  .hero h1 {
    white-space: nowrap;
    font-size: min(2.9rem, 8cqw);
  }

  .hero__figure {
    aspect-ratio: auto;
    height: min(70vh, 39rem);
    margin-right: calc(var(--gutter) * -1);
  }
}

/* ---------- page head ---------- */

.page-head {
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
}

.page-head .label { display: block; margin-bottom: 1.4rem; }
.page-head p { color: var(--ink-mute); max-width: var(--measure); margin-top: 1.6rem; }

/* ---------- links & buttons ---------- */

.link {
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color 0.2s, color 0.2s;
}
.link:hover { border-bottom-color: var(--accent); color: var(--accent); }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1.05rem 2.4rem;
  border: 1px solid var(--accent-dim);
  color: var(--ink);
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.btn--ghost { border-color: var(--rule); }
.btn--ghost:hover { background: transparent; border-color: var(--ink-mute); color: var(--ink); }

/* ---------- index lists (journal / explorations) ---------- */

.entries { border-top: 1px solid var(--rule); }

.entry {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 2.5rem;
  padding-block: 2.4rem;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
  transition: background 0.2s;
}
.entry:hover { background: var(--bg-raised); }

.entry__meta { color: var(--ink-faint); }
.entry__title { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.entry__blurb { color: var(--ink-mute); margin: 0.7rem 0 0; max-width: var(--measure); }

@media (max-width: 40rem) {
  .entry { grid-template-columns: 1fr; gap: 0.6rem; }
}

/* ---------- gallery grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr));
  gap: clamp(1rem, 2.2vw, 2rem);
}

.card {
  display: block;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.35s;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-3px); }

.card__img {
  aspect-ratio: 1 / 1;
  background: linear-gradient(150deg, #1b1510, #0f0c09);
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.card__img img { width: 100%; height: 100%; object-fit: cover; }

.card__body { padding: 1.3rem 1.5rem 1.6rem; }
.card__title { font-size: 1.3rem; }
.card__note { color: var(--ink-faint); font-size: 0.9rem; margin: 0.4rem 0 0; }

/* ---------- page banner ---------- */
/* Full-bleed band beneath a page head. Escapes .wrap by sitting outside it. */

.banner {
  width: 100%;
  overflow: hidden;
  height: clamp(14rem, 34vh, 24rem);
  background: linear-gradient(150deg, #1b1510, #0f0c09);
  border-block: 1px solid var(--rule);
}
.banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }

/* ---------- preview strip (vault) ---------- */
/* Tighter than .grid — these are proof, not navigation, so they carry no
   labels and no hover lift. Three up on desktop, two on a phone. */

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(13rem, 45%), 1fr));
  gap: clamp(0.5rem, 1.2vw, 0.9rem);
}

/* Fixed four-up, so the last cell can act as a button rather than reflowing. */
.strip--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 52rem) { .strip--4 { grid-template-columns: repeat(4, 1fr); } }

.strip a { display: block; overflow: hidden; }

/* Final cell in a strip: a square that behaves like a button.
   Selector must out-specify `.strip a`, which sets display: block —
   otherwise the grid centring never applies. */
.strip a.strip__more {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--accent-dim);
  display: grid;
  place-content: center;
  place-items: center;
  text-align: center;
  padding: 1rem;
  transition: background 0.25s, border-color 0.25s;
}
/* padding-left compensates the trailing letterspace so the label sits
   optically centred rather than a few pixels left. */
.strip__more span {
  font-family: var(--sans);
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.5;
  letter-spacing: 0.18em;
  padding-left: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.strip a.strip__more:hover { background: var(--accent); border-color: var(--accent); }
.strip a.strip__more:hover span { color: var(--bg); }

.strip img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--rule);
  transition: opacity 0.25s, transform 0.4s;
}
.strip a:hover img { opacity: 0.82; transform: scale(1.03); }

/* ---------- lightbox ---------- */
/* Progressive: each thumbnail is a plain link to the full image, so with no JS
   it still opens. hero-free — see lightbox.js. */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6, 4, 3, 0.94);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 82vh; width: auto; height: auto; }

.lightbox__close {
  position: absolute;
  top: clamp(0.8rem, 3vw, 2rem);
  right: clamp(0.8rem, 3vw, 2rem);
  background: none;
  border: 0;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.6rem;
  z-index: 2;
}
.lightbox__close:hover { color: var(--ink); }

/* Arrows sit over the backdrop, vertically centred, clear of the image on
   wide screens and overlapping its edges on narrow ones. */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--ink-mute);
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1;
  cursor: pointer;
  padding: 1rem clamp(0.6rem, 2vw, 1.6rem);
  transition: color 0.2s;
  z-index: 2;
}
.lightbox__nav:hover { color: var(--accent); }
.lightbox__nav[hidden] { display: none; }
.lightbox__nav--prev { left: clamp(0.2rem, 2vw, 1.5rem); }
.lightbox__nav--next { right: clamp(0.2rem, 2vw, 1.5rem); }

.lightbox__count {
  position: absolute;
  bottom: clamp(0.9rem, 3vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

/* ---------- collections ---------- */
/* Three short blocks side by side, divided by rules rather than boxes. */

/* No border-top — the page-level <hr class="rule"> above already divides this
   from the hero. Adding one here produced a second line and a doubled gap. */
.collections {
  display: grid;
  gap: clamp(1.6rem, 3vw, 2.5rem);
}

.collection h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); margin-bottom: 0.5rem; }
.collection p  { color: var(--ink-mute); margin: 0; }

@media (min-width: 48rem) {
  .collections { grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 3.5rem); }
}

/* ---------- commission tiers ---------- */
/* Reuses the .collections three-up grid; adds a price and a plain list. */

.tier__price {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.9rem;
}

.tier ul { list-style: none; padding: 0; margin: 0; color: var(--ink-mute); }
.tier li { padding-left: 1.1rem; position: relative; margin-bottom: 0.5rem; }
.tier li::before { content: "—"; position: absolute; left: 0; color: var(--ink-faint); }

/* ---------- two-column text block ---------- */

.split { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.split h2 { margin-bottom: 1rem; }

@media (min-width: 48rem) {
  .split { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 5rem); }
}

/* ---------- prose (single entries) ---------- */

.prose { max-width: var(--measure); }
.prose h2 { margin: 3rem 0 1.2rem; }
.prose h3 { margin: 2.4rem 0 1rem; }
.prose em { color: var(--ink-mute); }
.prose blockquote {
  margin: 2.4rem 0;
  padding-left: 1.6rem;
  border-left: 1px solid var(--accent-dim);
  color: var(--ink-mute);
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: 3.5rem 4.5rem;
  color: var(--ink-faint);
}

.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-foot a { color: var(--ink-mute); }
.site-foot a:hover { color: var(--ink); }

.foot-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }

.fine { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.06em; line-height: 1.8; }

/* ---------- age gate ---------- */
/* Overlay only. Page content stays in the DOM so search engines can crawl it —
   see FD Website Strategy §7. Do not convert this to a redirect or server block. */

.agegate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: var(--gutter);
  text-align: center;
}

.agegate[hidden] { display: none; }

.agegate__inner { max-width: 30rem; }
.agegate .label {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  color: var(--accent);
  margin-bottom: 2rem;
}
.agegate h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.6rem; }
.agegate p { color: var(--ink-mute); }
.agegate__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2.4rem; }

/* ---------- utilities ---------- */

.stack > * + * { margin-top: 1.6rem; }
.mt-sm { margin-top: 1.2rem; }
.mt-lg { margin-top: clamp(2.5rem, 5vw, 4rem); }
.center { text-align: center; }
.muted { color: var(--ink-mute); }

/* Visible only to screen readers */
.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- art: series blocks ---------- */

/* One line lifted from the series' caption, set under its images. */
.series__quote {
  font-family: var(--display, inherit);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: var(--measure);
  margin: clamp(1.6rem, 3vw, 2.2rem) 0 0;
  padding-left: 1.4rem;
  border-left: 1px solid var(--accent-dim);
}
