/* ============================================================
   Premium client gallery — warm light theme
   Design language: subtraction. The UI recedes; photographs lead.
   ============================================================ */
:root {
  --bg:        #FAF8F4;   /* warm paper off-white — the canvas */
  --bg-alt:    #F2EEE7;   /* deeper warm neutral */
  --ink:       #1A1814;   /* warm near-black (never pure #000) */
  --ink-soft:  #6B6258;   /* warm taupe-grey for secondary text */
  --hairline:  #E6E0D6;   /* faint warm divider */
  --accent:    #8A7B6B;   /* muted stone — used only for tiny details */
  --gap:       12px;       /* grid gutter */
  --row:       380px;      /* target justified-row height (desktop) */
  --ease:      cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }

/* ----------------------------- Hero ----------------------------- */
/* The hero is pinned; the gallery (.page) scrolls up and over it for a soft,
   cinematic hand-off from cover photograph to the grid. */
.hero {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 540px;
  width: 100%;
  overflow: hidden;
  display: grid;
  z-index: 0;
}

/* The gallery surface that rises over the pinned hero. */
.page {
  position: relative;
  z-index: 1;
  background: var(--bg);
  box-shadow: 0 -44px 70px -30px rgba(26, 24, 20, .5);
}
.hero__img {
  position: absolute; inset: 0;
  background-image: var(--lqip);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}
.hero__img--loaded {
  animation: kenburns 24s ease-out forwards;
}
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.12); } }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(20,18,14,.16) 0%, rgba(20,18,14,0) 26%),
    linear-gradient(to top, rgba(20,18,14,.42) 0%, rgba(20,18,14,0) 42%);
}
.hero__content {
  position: relative;
  align-self: end;
  text-align: center;
  padding: 0 1.5rem 12vh;
  color: #fff;
  width: 100%;
  opacity: 0;
  transform: translateY(14px);
  animation: rise .9s var(--ease) .25s forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }
.hero__eyebrow {
  margin: 0 0 1.1rem;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .42em;
  text-indent: .42em;
  opacity: .9;
}
.hero__title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.8rem, 8vw, 6.4rem);
  line-height: 1.02;
  letter-spacing: .01em;
  text-shadow: 0 1px 40px rgba(0,0,0,.25);
}
.hero__meta {
  margin: 1.3rem 0 0;
  font-size: .76rem;
  font-weight: 400;
  letter-spacing: .26em;
  text-indent: .26em;
  opacity: .92;
}
.hero__scroll {
  position: absolute;
  left: 50%; bottom: 2.4rem;
  transform: translateX(-50%);
  width: 1px; height: 46px;
  border: 0; padding: 0; background: transparent;
  cursor: pointer;
  overflow: hidden;
}
.hero__scroll span {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.65);
  animation: drip 2.4s var(--ease) infinite;
}
@keyframes drip {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* Hero call-to-action: obvious download on arrival, with a scroll hint so it's
   clear the gallery continues below. */
.hero__actions { margin-top: clamp(1.5rem, 4vw, 2.3rem); }
.hero__dl {
  font: inherit; font-size: .76rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: #fff; background: rgba(255,255,255,.14);
  border: 1.5px solid rgba(255,255,255,.9); border-radius: 100px;
  padding: .85rem 2.1rem; cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .35s var(--ease), color .35s var(--ease);
}
.hero__dl:hover { background: #fff; color: var(--ink); }
.hero__hint {
  margin: .85rem 0 0; font-size: .72rem; font-weight: 400;
  letter-spacing: .1em; color: rgba(255,255,255,.85);
}

/* --------------------------- Sticky bar -------------------------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: .95rem clamp(1.2rem, 5vw, 3.5rem);
  background: rgba(250,248,244,.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), opacity .3s var(--ease);
}
.bar--stuck { border-bottom-color: var(--hairline); }
/* Get the bar fully out of the way while a photo is open in the lightbox. */
body.pswp-active .bar { opacity: 0; pointer-events: none; }
.bar__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 500;
  letter-spacing: .02em;
}
.bar__dl {
  font: inherit; font-size: .72rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 100px;
  padding: .62rem 1.35rem;
  cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease);
}
.bar__dl:hover { background: var(--ink); color: var(--bg); }

/* ----------------------------- Body ----------------------------- */
main { padding: 0 clamp(1.2rem, 5vw, 3.5rem); }
.intro {
  max-width: 34rem;
  margin: clamp(3.5rem, 9vw, 6.5rem) auto;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* --------------------------- The grid --------------------------- */
.grid { margin: 0 auto clamp(3rem, 8vw, 6rem); }

/* Section heading (a "families & kids" subfolder becomes a titled section) */
.section {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: .02em;
  color: var(--ink);
  margin: clamp(2.6rem, 7vw, 5rem) 0 clamp(1.4rem, 3vw, 2rem);
}
.section::after {
  content: "";
  display: block;
  width: 38px; height: 1px;
  background: var(--accent);
  opacity: .5;
  margin: .85rem auto 0;
}
.grid > .section:first-child { margin-top: clamp(1rem, 3vw, 2rem); }
.grid__row { display: flex; gap: var(--gap); margin-bottom: var(--gap); }
.grid__row--center { justify-content: center; }
.grid__row--full { display: block; }

.cell {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--bg-alt) var(--lqip) center/cover no-repeat;
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.cell.in { opacity: 1; transform: none; }
.cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(14px);
  transform: scale(1.02);
  transition: opacity .8s var(--ease), filter .9s var(--ease), transform 1.4s var(--ease);
}
.cell img.loaded { opacity: 1; filter: blur(0); }
@media (hover: hover) {
  .cell:hover img.loaded { transform: scale(1.045); }
}
.cell--full {
  width: 100%;
  cursor: zoom-in;
  margin-bottom: var(--gap);
}
.cell--full img { transition-duration: 1s, 1.1s, 1.8s; }

/* ---------------------------- Footer ---------------------------- */
.foot {
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--hairline);
}
.foot__mark {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.4rem;
  margin: 0 0 .6rem;
  color: var(--ink);
}
.foot__count {
  margin: 0;
  font-size: .68rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-soft);
}

/* Big "finish line" download button at the end of the gallery. */
.foot__dl {
  font: inherit; font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--bg); background: var(--ink);
  border: 0; border-radius: 100px;
  padding: 1rem 2.5rem; margin: 0 0 1.3rem; cursor: pointer;
  transition: background .35s var(--ease), transform .35s var(--ease);
}
.foot__dl:hover { background: var(--accent); transform: translateY(-1px); }

/* ---------------------------- Modal ----------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 1.5rem;
  background: rgba(26,24,20,.46);
  backdrop-filter: blur(6px);
  opacity: 0;
  animation: fade .35s var(--ease) forwards;
}
@keyframes fade { to { opacity: 1; } }
.modal[hidden] { display: none; }
.modal__box {
  position: relative;
  background: var(--bg);
  width: min(30rem, 100%);
  padding: clamp(2rem, 5vw, 3rem);
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 80px -30px rgba(26,24,20,.4);
  transform: translateY(10px);
  animation: rise .5s var(--ease) forwards;
  text-align: center;
}
.modal__close {
  position: absolute; top: .6rem; right: .9rem;
  background: none; border: 0; cursor: pointer;
  font-size: 1.7rem; line-height: 1; color: var(--ink-soft);
}
.modal__title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  margin: 0 0 .6rem;
}
.modal__sub { color: var(--ink-soft); line-height: 1.6; margin: 0 auto 1.6rem; max-width: 24rem; }
.modal__form { display: flex; flex-direction: column; gap: .8rem; }
.modal__input {
  font: inherit; font-size: 1rem;
  text-align: center; letter-spacing: .04em;
  padding: .85rem 1rem;
  background: #fff;
  border: 1px solid var(--hairline);
  color: var(--ink);
  outline: none;
  transition: border-color .3s var(--ease);
}
.modal__input:focus { border-color: var(--accent); }
.modal__submit {
  font: inherit; font-size: .74rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  padding: .9rem 1rem;
  border: 1px solid var(--ink);
  background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: background .35s var(--ease), color .35s var(--ease);
}
.modal__submit:hover { background: var(--ink); color: var(--bg); }
.modal__submit--solid { background: var(--ink); color: var(--bg); }
.modal__submit--solid:hover { background: var(--accent); border-color: var(--accent); }
.modal__error { color: #9a3b2f; font-size: .82rem; margin: .2rem 0 0; }
.modal__hint { color: var(--ink-soft); font-size: .78rem; margin: 1rem 0 0; }

/* ------------------------ PhotoSwipe tweaks --------------------- */
.pswp { --pswp-bg: #14110d; --pswp-placeholder-bg: #14110d; }
.pswp__bg { background: #14110d; }
.pswp__button--dl {
  display: flex; align-items: center; justify-content: center;
}
.pswp__button--dl svg { width: 22px; height: 22px; fill: #fff; }

/* ----------------------------- Mobile --------------------------- */
@media (max-width: 720px) {
  :root { --row: 240px; --gap: 8px; }
  .hero__content { padding-bottom: 14vh; }
}

/* --------------------- Reduced motion respect ------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .cell, .hero__content { opacity: 1; transform: none; }
  .cell img { opacity: 1; filter: none; }
}
