/* =========================================================================
   Julian Bender — Photos Worth Framing
   An old-house gallery wall, hung with gilded frames.
   ========================================================================= */

:root {
  /* --- the wall --- */
  --wall-base:   #221c17;   /* deep warm brown plaster */
  --wall-deep:   #17120e;   /* shadowed corners */
  --wall-warm:   #2e251d;   /* lit centre */

  /* --- gilt frame palette --- */
  --gold-hi:   #f8ecc2;
  --gold:      #d9b45f;
  --gold-mid:  #c19a45;
  --gold-lo:   #8a6524;
  --gold-deep: #5c4116;

  /* --- mat + paper --- */
  --mat:       #efe7d7;
  --mat-shade: #ded3bd;

  /* --- ink / text --- */
  --ink:        #efe6d4;
  --ink-soft:   #c9bda6;
  --ink-mute:   #9c8f78;
  --ink-faint:  #6f6552;

  /* --- type --- */
  --serif:   "Playfair Display", Georgia, serif;
  --serif-2: "Cormorant Garamond", Georgia, serif;
  --sans:    "Jost", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1400px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* keep section headings clear of the fixed nav when jumping via the menu */
.statement, .gallery-section, .contact { scroll-margin-top: 88px; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  background-color: var(--wall-base);
  /* layered wall: centre glow, corner vignette, damask, plaster grain */
  background-image:
    radial-gradient(120% 90% at 50% 0%, rgba(255,225,170,.10), rgba(255,225,170,0) 42%),
    radial-gradient(120% 120% at 50% 42%, var(--wall-warm), rgba(0,0,0,0) 55%),
    radial-gradient(140% 130% at 50% 55%, rgba(0,0,0,0) 40%, var(--wall-deep) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cg fill='none' stroke='%23e9cf8f' stroke-opacity='0.045' stroke-width='1'%3E%3Cpath d='M0 0L72 72M72 0L0 72'/%3E%3C/g%3E%3Cg fill='%23e9cf8f' fill-opacity='0.05'%3E%3Ccircle cx='36' cy='36' r='2.3'/%3E%3Ccircle cx='0' cy='0' r='2.3'/%3E%3Ccircle cx='72' cy='0' r='2.3'/%3E%3Ccircle cx='0' cy='72' r='2.3'/%3E%3Ccircle cx='72' cy='72' r='2.3'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed, fixed, fixed, fixed;
  background-position: center top;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection { background: rgba(217,180,95,.30); color: #fff; }

/* ambient light spilling down the wall from the picture rail */
.wall-light {
  position: fixed; inset: 0 0 auto 0; height: 60vh; pointer-events: none; z-index: 0;
  background: radial-gradient(80% 100% at 50% -10%, rgba(255,221,160,.12), rgba(255,221,160,0) 70%);
}

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  background: linear-gradient(180deg, rgba(18,14,10,.82), rgba(18,14,10,0));
  backdrop-filter: blur(3px);
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.nav-monogram {
  display: grid; place-items: center; width: 34px; height: 34px;
  font-family: var(--serif); font-weight: 700; font-size: 14px; letter-spacing: .5px;
  color: var(--gold-hi);
  border: 1px solid rgba(217,180,95,.55);
  background: linear-gradient(135deg, rgba(217,180,95,.18), rgba(217,180,95,.02));
}
.nav-name { font-family: var(--serif); font-size: 18px; letter-spacing: .5px; }
.nav-links { display: flex; gap: clamp(16px, 3vw, 40px); }
.nav-links a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 400;
  padding-bottom: 3px; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--gold); transition: right .35s ease;
}
.nav-links a:hover { color: var(--gold-hi); }
.nav-links a:hover::after { right: 0; }
@media (max-width: 640px) {
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .nav-name { font-size: 16px; }
}

/* =========================================================================
   THE GILDED FRAME  (shared component)
   ========================================================================= */
.frame {
  position: relative;
  padding: clamp(11px, 1.5vw, 20px);
  border-radius: 2px;
  background:
    linear-gradient(135deg,
      var(--gold-hi) 0%, var(--gold) 14%, var(--gold-lo) 32%,
      var(--gold-hi) 50%, var(--gold-mid) 63%, var(--gold-deep) 82%, var(--gold) 100%);
  box-shadow:
    0 1px 1px rgba(0,0,0,.55),
    0 22px 42px -16px rgba(0,0,0,.8),
    0 6px 14px -8px rgba(0,0,0,.6),
    inset 0 0 0 1px rgba(255,244,214,.45),
    inset 0 2px 3px rgba(255,244,214,.35),
    inset 0 -3px 5px rgba(70,48,12,.6);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .55s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease;
}
/* carved inner + outer beading of the moulding */
.frame::before {
  content: ""; position: absolute; inset: 6px; border-radius: 1px;
  background:
    linear-gradient(135deg, rgba(255,244,214,.5), rgba(0,0,0,0) 45%),
    linear-gradient(315deg, rgba(90,62,18,.55), rgba(0,0,0,0) 45%);
  box-shadow:
    inset 0 0 0 1px rgba(90,62,18,.55),
    inset 0 0 0 2px rgba(255,244,214,.28);
  pointer-events: none;
}

/* the mat board */
.mat {
  position: relative;
  padding: clamp(10px, 1.5vw, 22px);
  background:
    linear-gradient(180deg, var(--mat), var(--mat-shade));
  box-shadow: inset 0 1px 2px rgba(255,255,255,.7);
}

/* the bevel-cut window + glass over the print */
.art-window {
  position: relative;
  overflow: hidden;
  background: #0c0a08;
  /* bevelled opening: bright top-left, shadowed bottom-right + inset depth */
  box-shadow:
    0 0 0 1px rgba(90,72,40,.35),
    inset 0 0 0 2px rgba(255,255,255,.55),
    inset 2px 2px 4px rgba(0,0,0,.35),
    inset 0 0 22px rgba(0,0,0,.28);
}
.art-window img { width: 100%; height: auto; }
/* smooth per-photo load-in (gallery only) */
.art-window img.fade-img { opacity: 0; transform: scale(1.04); transition: opacity 1s ease, transform 1.4s cubic-bezier(.2,.7,.2,1); }
.art-window img.fade-img.loaded { opacity: 1; transform: none; }
/* faint glass reflection */
.glass {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(118deg,
    rgba(255,255,255,.10) 0%, rgba(255,255,255,.02) 16%,
    rgba(255,255,255,0) 34%, rgba(255,255,255,0) 100%);
  mix-blend-mode: screen;
  opacity: .55;
}

/* frame size variants */
.frame--sm { padding: clamp(8px, 1vw, 13px); }
.frame--lg { padding: clamp(14px, 1.8vw, 26px); }

/* a brass picture light glowing over featured frames */
.has-light { overflow: visible; }
.frame-light {
  position: absolute; left: 50%; top: -34px; transform: translateX(-50%);
  width: 62%; height: 60px; pointer-events: none; z-index: 3;
}
.frame-light::before {   /* the warm cast of light onto art */
  content: ""; position: absolute; left: 50%; top: 30px; transform: translateX(-50%);
  width: 130%; height: 340px;
  background: radial-gradient(60% 80% at 50% 0%, rgba(255,220,150,.30), rgba(255,220,150,0) 72%);
}
.frame-light::after {    /* the little brass fixture */
  content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 120px; height: 12px; border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
  box-shadow: 0 3px 6px rgba(0,0,0,.6), inset 0 1px 1px rgba(255,255,255,.6);
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 120px clamp(20px, 5vw, 64px) 80px;
  text-align: center;
  overflow: hidden;
}
.hero-inner { max-width: 720px; position: relative; z-index: 2; }
.hero-kicker {
  font-family: var(--sans); font-weight: 400;
  text-transform: uppercase; letter-spacing: .5em;
  font-size: clamp(11px, 1.4vw, 14px); color: var(--gold);
  margin: 0 0 .4em; padding-left: .5em;
}
.hero-name {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(48px, 12vw, 148px); line-height: .92;
  margin: 0; color: var(--ink);
  letter-spacing: -.01em;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.hero-tagline {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font-family: var(--serif-2); font-style: italic; font-weight: 500;
  font-size: clamp(20px, 3.4vw, 34px); color: var(--gold-hi);
  margin: .55em 0 0;
}
.hero-tagline .rule { display: inline-block; width: clamp(28px, 8vw, 84px); height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.hero-sub {
  max-width: 44ch; margin: 1.6em auto 0; color: var(--ink-soft);
  font-size: clamp(14px, 1.7vw, 17px); line-height: 1.7;
}
.hero-cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  margin-top: 3em; color: var(--ink-mute); text-decoration: none;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  transition: color .3s ease;
}
.hero-cue:hover { color: var(--gold-hi); }
.hero-cue svg { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* frames faintly hung on the wall behind the name */
.hero-flank {
  position: absolute; top: 50%; margin: 0; z-index: 1;
  width: clamp(150px, 15vw, 240px);
  opacity: 0; filter: brightness(.7);
  transition: opacity 1.4s ease 0.3s;
}
.hero-flank--left  { left: clamp(-40px, 3vw, 60px);  transform: translateY(-54%) rotate(-2.5deg); }
.hero-flank--right { right: clamp(-40px, 3vw, 60px); transform: translateY(-46%) rotate(2deg); }
.hero-flank.in { opacity: .9; }
@media (max-width: 900px) { .hero-flank { display: none; } }

/* =========================================================================
   ARTIST STATEMENT
   ========================================================================= */
.section-kicker {
  font-family: var(--sans); font-weight: 500;
  text-transform: uppercase; letter-spacing: .42em;
  font-size: 12px; color: var(--gold); margin: 0 0 1em; padding-left: .4em;
}
.statement {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(40px, 8vw, 110px) clamp(20px, 5vw, 64px);
}
.statement-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 6vw, 90px);
  align-items: center;
}
.statement-frame { display: flex; justify-content: center; }
.statement-frame .piece { max-width: 560px; width: 100%; }
.statement-copy { max-width: 460px; }
.statement-head {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(34px, 6vw, 62px); line-height: 1.02;
  margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em;
}
.statement-copy p { color: var(--ink-soft); font-size: clamp(15px, 1.8vw, 18px); margin: 0 0 1.1em; }
.statement-sign {
  font-family: var(--serif-2); font-style: italic; font-weight: 500;
  font-size: clamp(22px, 3vw, 30px); color: var(--gold-hi); margin-top: .3em !important;
}
@media (max-width: 860px) {
  .statement-grid { grid-template-columns: 1fr; gap: 48px; }
  .statement-copy { max-width: 560px; margin: 0 auto; text-align: center; }
  .section-kicker { padding-left: 0; }
}

/* =========================================================================
   GALLERY
   ========================================================================= */
.gallery-section {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(24px, 5vw, 60px) clamp(20px, 5vw, 64px) clamp(60px, 10vw, 130px);
}
.gallery-head { text-align: center; max-width: 620px; margin: 0 auto clamp(28px, 4vw, 48px); }
.gallery-head .section-kicker { padding-left: 0; }
.gallery-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(32px, 6vw, 58px); line-height: 1.05; margin: 0 0 .35em; color: var(--ink);
}
.gallery-intro { color: var(--ink-mute); font-size: clamp(14px, 1.7vw, 17px); margin: 0; }

/* filter bar */
.filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 0 auto clamp(34px, 5vw, 60px);
}
.filter {
  font-family: var(--sans); font-weight: 400; font-size: 12px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft); background: transparent; cursor: pointer;
  padding: 9px 20px; border: 1px solid rgba(217,180,95,.28); border-radius: 2px;
  transition: color .3s ease, border-color .3s ease, background .3s ease;
}
.filter:hover { color: var(--gold-hi); border-color: rgba(217,180,95,.6); }
.filter.is-active {
  color: #241d15; border-color: var(--gold);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-mid));
  box-shadow: 0 4px 14px -6px rgba(217,180,95,.6);
}

/* the salon wall — masonry via columns */
.gallery {
  column-count: 4;
  column-gap: clamp(22px, 2.6vw, 46px);
}
@media (max-width: 1180px) { .gallery { column-count: 3; } }
@media (max-width: 800px)  { .gallery { column-count: 2; } }
@media (max-width: 520px)  { .gallery { column-count: 1; } }

.piece {
  break-inside: avoid;
  margin: 0 auto clamp(26px, 3vw, 52px);
  display: block; width: 100%;
  cursor: pointer;
}
.piece .frame { cursor: pointer; }

/* --- varied sizing + spacing for an organic salon hang --- */
.piece--lg { margin-bottom: clamp(30px, 3.4vw, 60px); }
.piece--lg .frame { padding: clamp(14px, 1.9vw, 27px); }
.piece--sm { width: 74%; margin-bottom: clamp(36px, 4.4vw, 74px); }
.piece--sm.al-l { margin-left: 0;    margin-right: auto; }
.piece--sm.al-r { margin-left: auto; margin-right: 0; }
.piece--sm.al-c { margin-left: auto; margin-right: auto; }
@media (max-width: 520px) {
  /* on a single column, ease the shrink so small pieces still read well */
  .piece--sm { width: 86%; }
}

.piece:hover .frame {
  transform: translateY(-6px) rotate(0deg);
  box-shadow:
    0 1px 1px rgba(0,0,0,.55),
    0 34px 60px -22px rgba(0,0,0,.85),
    0 10px 22px -10px rgba(0,0,0,.7),
    inset 0 0 0 1px rgba(255,244,214,.55),
    inset 0 2px 3px rgba(255,244,214,.4),
    inset 0 -3px 5px rgba(70,48,12,.6);
}
.piece:hover .glass { opacity: .85; }

/* museum placard beneath each frame */
.placard { text-align: center; padding-top: 16px; }
.placard-title {
  display: block; font-family: var(--serif-2); font-style: italic; font-weight: 500;
  font-size: clamp(16px, 1.9vw, 20px); color: var(--ink);
  transition: color .3s ease;
}
.piece:hover .placard-title { color: var(--gold-hi); }
.placard-sub {
  display: block; font-family: var(--sans); font-weight: 400;
  font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-mute); margin-top: 5px;
}

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================================
   CONTACT
   ========================================================================= */
.contact {
  position: relative; z-index: 1; text-align: center;
  padding: clamp(60px, 10vw, 140px) clamp(20px, 5vw, 64px) 40px;
  border-top: 1px solid rgba(217,180,95,.14);
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.35));
}
.contact-inner { max-width: 620px; margin: 0 auto; }
.contact .section-kicker { padding-left: 0; }
.contact-head {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(32px, 6vw, 60px); line-height: 1.03; margin: 0 0 .4em; color: var(--ink);
}
.contact-copy { color: var(--ink-soft); font-size: clamp(15px, 1.8vw, 18px); margin: 0 0 2em; }
.contact-btn {
  display: inline-block; text-decoration: none;
  font-family: var(--sans); font-weight: 500; font-size: 13px;
  letter-spacing: .24em; text-transform: uppercase; color: #241d15;
  padding: 15px 40px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-mid));
  box-shadow: 0 10px 26px -10px rgba(217,180,95,.7), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .3s ease, box-shadow .3s ease;
}
.contact-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -12px rgba(217,180,95,.85), inset 0 1px 0 rgba(255,255,255,.6); }
.contact-meta {
  font-family: var(--serif-2); font-style: italic; font-size: 20px;
  color: var(--ink-mute); margin: 2.4em 0 0;
}
.colophon { margin: 60px 0 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.credit { margin: 12px 0 0; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); }
.credit a {
  color: var(--gold); text-decoration: none;
  border-bottom: 1px solid rgba(217,180,95,.3); padding-bottom: 1px;
  transition: color .3s ease, border-color .3s ease;
}
.credit a:hover { color: var(--gold-hi); border-color: var(--gold); }

/* =========================================================================
   LIGHTBOX
   ========================================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: clamp(16px, 4vw, 54px);
  background: rgba(11,8,6,.94);
  backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .35s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }

.lb-stage {
  margin: 0; max-width: min(1180px, 92vw); max-height: 88vh;
  display: flex; flex-direction: column; align-items: center;
  transform: scale(.97); transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.lightbox.open .lb-stage { transform: scale(1); }
.frame--lightbox { padding: clamp(9px, 1.1vw, 16px); max-height: 78vh; }
.frame--lightbox .mat { padding: clamp(8px, 1vw, 16px); }
.frame--lightbox .art-window { max-height: 72vh; }
.frame--lightbox img { max-height: 72vh; width: auto; max-width: 100%; }

.lb-placard { text-align: center; padding-top: 18px; }
.lb-counter {
  display: block; margin-top: 8px; font-family: var(--sans);
  font-size: 11px; letter-spacing: .28em; color: var(--ink-faint);
}

.lb-close, .lb-nav {
  position: fixed; z-index: 102; cursor: pointer;
  background: rgba(30,24,18,.55); color: var(--ink-soft);
  border: 1px solid rgba(217,180,95,.28); border-radius: 50%;
  display: grid; place-items: center;
  transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
}
.lb-close { top: clamp(16px, 3vw, 30px); right: clamp(16px, 3vw, 30px); width: 48px; height: 48px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; }
.lb-prev { left: clamp(10px, 2.5vw, 34px); }
.lb-next { right: clamp(10px, 2.5vw, 34px); }
.lb-close:hover, .lb-nav:hover { color: var(--gold-hi); border-color: var(--gold); background: rgba(45,36,26,.8); }
.lb-nav:hover { transform: translateY(-50%) scale(1.08); }
@media (max-width: 620px) {
  .lb-nav { width: 44px; height: 44px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

/* =========================================================================
   MOTION PREFERENCES
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-flank { opacity: .9; }
}
