/* ============================================================
   HUIBRECHT — Portrait Studies
   Editorial museum aesthetic
   ============================================================ */

:root {
  /* Palette — warm paper tones, charcoal text */
  --paper:      #f4ede0;   /* page background — aged cream */
  --paper-2:    #ebe2ce;   /* slightly darker for surfaces */
  --paper-3:    #ddd2b8;   /* deeper warm */
  --ink:        #1a1715;   /* near-black charcoal */
  --ink-soft:   #3a342d;
  --ink-muted:  #6b6258;
  --rule:       rgba(26, 23, 21, 0.14);
  --rule-soft:  rgba(26, 23, 21, 0.06);
  --accent:     #5d4a32;   /* warm umber */

  /* Typography */
  --serif:  "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans:   "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  /* Layout */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --maxw:   1440px;
  --section-pad: clamp(5rem, 12vw, 10rem);
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

::selection { background: var(--ink); color: var(--paper); }

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.09  0 0 0 0 0.07  0 0 0 0.045 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.55;
  mix-blend-mode: multiply;
  z-index: 1;
}
body > * { position: relative; z-index: 2; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem var(--gutter);
  transition: background 0.5s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(244, 237, 224, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.85rem var(--gutter);
  border-bottom-color: var(--rule);
}

.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav__brand {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  gap: 2.5rem;
}
.nav__links a {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
  position: relative;
  padding: 0.25rem 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 0.5rem; }
.nav__toggle span { width: 26px; height: 1px; background: var(--ink); transition: transform 0.3s; }

@media (max-width: 800px) {
  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--paper);
    gap: 2.5rem;
    transform: translateY(-100%);
    transition: transform 0.45s cubic-bezier(0.7, 0, 0.3, 1);
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { font-size: 1rem; }
  .nav__toggle { display: flex; z-index: 110; }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  padding: 8rem var(--gutter) 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 2rem;
  display: flex; align-items: center; gap: 1rem;
}
.hero__eyebrow::before {
  content: ""; width: 2.5rem; height: 1px; background: var(--ink-muted);
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 8.5vw, 7.5rem);
  line-height: 0.96;
  letter-spacing: -0.015em;
  margin: 0 0 2.5rem;
  color: var(--ink);
}
.hero__title .line {
  display: block;
  overflow: hidden;
}
.hero__title .line--italic {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  padding-left: clamp(1rem, 4vw, 3rem);
}

.hero__slogan {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 1.8vw, 1.65rem);
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: -1rem 0 2rem;
  padding-left: clamp(0.5rem, 2vw, 1.5rem);
  border-left: 1px solid var(--accent);
  line-height: 1.4;
}
.hero__slogan em {
  font-style: italic;
  font-weight: 500;
}

.hero__lede {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  font-weight: 400;
  line-height: 1.55;
  max-width: 38ch;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__plate {
  margin: 0;
  position: relative;
}
.hero__plate img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: contrast(1.02) saturate(0.95);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.05),
    0 30px 60px -25px rgba(50, 35, 20, 0.4);
}
.hero__plate figcaption {
  margin-top: 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  font-style: italic;
  text-align: right;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 60px;
  background: var(--ink-muted);
  opacity: 0.4;
  overflow: hidden;
}
.hero__scroll span {
  display: block;
  width: 100%; height: 50%;
  background: var(--ink);
  animation: scrollLine 2.4s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

@media (max-width: 900px) {
  .hero { padding-top: 7rem; padding-bottom: 3rem; min-height: auto; }
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__copy { order: 0; }
  .hero__plate { order: 1; max-width: 100%; margin: 0 auto; }
  .hero__plate img { aspect-ratio: 3 / 4; }
  .hero__plate figcaption { text-align: left; }
  .hero__title { font-size: clamp(3rem, 14vw, 5rem); }
  .hero__slogan { font-size: 1.15rem; }
  .hero__lede { font-size: 1rem; }
  .hero__actions { gap: 0.75rem; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; padding: 0.95rem 1.25rem; }
  .hero__scroll { display: none; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  transition: all 0.35s ease;
  border: 1px solid transparent;
  position: relative;
}
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover {
  background: var(--accent);
}
.btn--ghost {
  border-color: var(--ink);
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section__head {
  max-width: var(--maxw);
  margin: 0 auto var(--section-pad);
  padding: 0 var(--gutter);
}
.section__head--centered { text-align: center; }
.section__head--centered .section__lede { margin-left: auto; margin-right: auto; }

.section__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
  font-style: italic;
  font-family: var(--serif);
}

.section__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

.section__lede {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 50ch;
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   FEATURED 3-UP
   ============================================================ */
.featured {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--rule);
}

.featured__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}

.featured__item {
  margin: 0;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.featured__item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: contrast(1.02) saturate(0.92);
  transition: filter 0.6s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 20px 40px -20px rgba(50, 35, 20, 0.25);
}
.featured__item:hover img {
  filter: contrast(1.08) saturate(1);
  transform: scale(1.02);
}
.featured__item figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 1.25rem;
  margin-top: 1rem;
  border-top: 1px solid var(--rule);
  gap: 1rem;
}
.caption__title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
}
.caption__meta {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: right;
}

@media (max-width: 800px) {
  .featured__grid { grid-template-columns: 1fr; }
  .featured__item figcaption { flex-direction: column; gap: 0.5rem; }
  .caption__meta { text-align: left; }
}

/* ============================================================
   FULL GALLERY GRID
   ============================================================ */
.gallery {
  padding: var(--section-pad) 0;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.gallery__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: auto;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.gallery__item {
  margin: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: contrast(1.02) saturate(0.92);
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
}
.gallery__item--tall img { aspect-ratio: 4 / 6; }

.gallery__item:hover img {
  transform: scale(1.04);
  filter: contrast(1.08) saturate(1);
}
.gallery__item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 1.25rem 1.25rem;
  background: linear-gradient(to top, rgba(26,23,21,0.85), transparent);
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.gallery__item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.gallery__cta {
  text-align: center;
  margin-top: 4rem;
}

@media (max-width: 1000px) { .gallery__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .gallery__grid { grid-template-columns: repeat(2, 1fr); } }

/* Touch devices: hover-only captions never show — make them static below the image */
@media (hover: none) {
  .gallery__item figcaption {
    position: static;
    background: none;
    color: var(--ink-muted);
    opacity: 1;
    transform: none;
    padding: 0.75rem 0 0;
    font-size: 0.85rem;
    text-align: left;
  }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: var(--section-pad) 0;
}

.about__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(2.5rem, 8vw, 6rem);
  align-items: center;
}

.about__portrait { margin: 0; }
.about__portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: contrast(1.02) saturate(0.95);
  box-shadow: 0 30px 60px -25px rgba(50, 35, 20, 0.35);
}
.about__portrait figcaption {
  margin-top: 1rem;
  font-style: italic;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.about__copy p {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
  max-width: 56ch;
}

.about__facts {
  margin: 3rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 1rem;
}
.about__facts > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  align-items: baseline;
}
.about__facts dt {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0;
}
.about__facts dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}

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

@media (max-width: 600px) {
  .about__facts > div { grid-template-columns: 1fr; gap: 0.25rem; }
  .about__facts dt { font-size: 0.68rem; }
}

/* ============================================================
   COMMISSIONS / TIERS
   ============================================================ */
.commissions {
  padding: var(--section-pad) 0;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.tiers {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.tier {
  padding: 3rem 2.25rem;
  border-left: 1px solid var(--rule);
  text-align: center;
  background: transparent;
  transition: background 0.5s ease;
}
.tier:last-child { border-right: 1px solid var(--rule); }
.tier--feature { background: var(--paper-3); }
.tier:hover { background: var(--paper-3); }

.tier__roman {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}
.tier__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.005em;
}
.tier__size {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
}
.tier__desc {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
  max-width: 26ch;
  margin-left: auto; margin-right: auto;
}
.tier__time {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.commissions__note {
  max-width: 50ch;
  margin: 4rem auto 0;
  padding: 0 var(--gutter);
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-muted);
  font-size: 1rem;
}

@media (max-width: 900px) {
  .tiers { grid-template-columns: 1fr; }
  .tier { border-left: 0; border-top: 1px solid var(--rule); }
  .tier:last-child { border-right: 0; border-bottom: 1px solid var(--rule); }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: var(--section-pad) 0;
}

.contact__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}

.contact__lede {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 3.5rem;
}

.contact__list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 0;
}
.contact__list li {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: baseline;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  text-align: left;
}
.contact__list li:last-child { border-bottom: 1px solid var(--rule); }

.contact__label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.contact__value {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
  transition: color 0.3s;
}
a.contact__value:hover { color: var(--accent); }

@media (max-width: 600px) {
  .contact__list li { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 4rem var(--gutter) 3rem;
  background: var(--ink);
  color: var(--paper);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}
.footer__brand {
  display: inline-block;
  margin: 0;
  transition: opacity 0.3s ease;
}
.footer__brand img {
  width: 140px;
  height: auto;
  opacity: 0.92;
}
.footer__brand:hover img { opacity: 1; }
.footer__meta {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(244, 237, 224, 0.55);
  margin: 0;
  max-width: 60ch;
  line-height: 1.6;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 14, 0.96);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.lightbox.is-open {
  display: flex;
  opacity: 1;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  font-size: 2.5rem;
  color: var(--paper);
  line-height: 1;
  font-weight: 200;
  transition: opacity 0.3s;
}
.lightbox__close:hover { opacity: 0.6; }

.lightbox__figure {
  margin: 0;
  max-width: min(900px, 90vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.lightbox__figure figcaption {
  margin-top: 1.5rem;
  color: rgba(244, 237, 224, 0.85);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  text-align: center;
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
