/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── VARIABLES ─── */
:root {
  --bg:        #0a0a08;
  --bg2:       #111110;
  --cream:     #e8e2d6;
  --gold:      #c9a96e;
  --dim:       #9a9486;
  --mono:      'Space Mono', monospace;
  --sans:      'Inter', system-ui, -apple-system, sans-serif;
  --serif:     'Playfair Display', Georgia, serif;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --bg-rgb:    10,10,8;
  --cream-rgb: 232,226,214;
  --grain-opacity: 0.5;
}

[data-theme="light"] {
  --bg:        #f7f4ef;
  --bg2:       #ede9e2;
  --cream:     #1c1b18;
  --gold:      #9e6f20;
  --dim:       #5a5448;
  --bg-rgb:    247,244,239;
  --cream-rgb: 28,27,24;
  --grain-opacity: 0.15;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  cursor: default;
  overflow-x: hidden;
  transition: background .4s, color .4s;
}

/* grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: var(--grain-opacity);
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 48px;
  height: 64px;
  background: rgba(var(--bg-rgb), .88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(var(--cream-rgb), .08);
  transition: background .4s, border-color .4s;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  letter-spacing: .03em;
  color: var(--cream);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  transition: color .25s;
  position: relative;
  opacity: .7;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .3s var(--ease);
}
.nav-links a:hover { color: var(--gold); opacity: 1; }
.nav-links a:hover::after { width: 100%; }

.theme-toggle {
  background: none;
  border: 1px solid rgba(var(--cream-rgb), .2);
  cursor: pointer;
  color: var(--cream);
  font-size: 14px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  transition: color .25s, border-color .25s, background .25s;
  margin-left: 20px;
  opacity: .7;
}
.theme-toggle:hover { color: var(--gold); border-color: var(--gold); opacity: 1; background: rgba(var(--cream-rgb),.05); }

.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-burger span { display: block; width: 22px; height: 1px; background: var(--cream); transition: transform .3s, opacity .3s; }
.nav-burger.open span:first-child { transform: translateY(6px) rotate(45deg); }
.nav-burger.open span:last-child  { transform: translateY(-6px) rotate(-45deg); }

/* ─── SHUTTER LINE ─── */
.shutter {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--gold);
  transform-origin: left;
  animation: shutter 1.4s cubic-bezier(0.77,0,0.175,1) forwards;
  z-index: 9998;
}
@keyframes shutter {
  0%   { transform: scaleX(0); opacity: 1; }
  70%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes imgReveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slowZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1.0); }
}

/* ─── HERO ─── */
.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
}
.hero-right {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-right::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(to right,  rgba(var(--bg-rgb),.92) 0%, rgba(var(--bg-rgb),.5) 45%, transparent 75%),
    linear-gradient(to top,    rgba(var(--bg-rgb),.5) 0%, transparent 30%);
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(15%) contrast(1.05);
  opacity: 0;
  animation: imgReveal 1.5s .2s ease forwards, slowZoom 20s 1.5s ease-out forwards;
}
.hero-left {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 56px 80px;
  max-width: 600px;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 1s .3s ease forwards;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(64px, 8vw, 112px);
  font-weight: 900;
  line-height: .88;
  letter-spacing: -.02em;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 1s .5s ease forwards;
}
.hero-title em { font-style: italic; color: var(--gold); display: block; }
.hero-tagline {
  max-width: 380px;
  color: rgba(var(--cream-rgb),.8);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 1s .7s ease forwards;
}
.hero-scroll {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb),.6);
  opacity: 0;
  animation: fadeUp 1s 1s ease forwards;
}
.hero-scroll::before {
  content: '';
  display: block;
  width: 40px; height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.hero-counter {
  position: absolute;
  bottom: 48px; right: 48px;
  z-index: 10;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: rgba(var(--cream-rgb),.4);
  writing-mode: vertical-rl;
  opacity: 0;
  animation: fadeUp 1s 1.2s ease forwards;
}

/* ─── SECTION HEADER ─── */
.section-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}
.section-intro-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.section-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--dim);
}
.section-heading {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
}

/* ─── THEMES GRID ─── */
.themes { padding: 80px 48px 96px; }

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  height: 80vh;
}
.card:nth-child(1) { grid-row: 1 / 3; }
.card:nth-child(4) { grid-column: 2 / 4; }

.card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: block;
  text-decoration: none;
}
.card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(30%) brightness(.65);
  transition: filter .8s var(--ease), transform .8s var(--ease);
}
.card:hover .card-img { filter: grayscale(0%) brightness(.9); transform: scale(1.04); }
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5,5,4,.95) 0%, rgba(5,5,4,.3) 45%, transparent 70%);
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}
.card-num   {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--gold);
  margin-bottom: 8px;
  opacity: .9;
}
.card-title {
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 42px);
  font-weight: 700;
  font-style: italic;
  color: #f0ece4;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.card-count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: rgba(240,236,228,.55);
  margin-top: 8px;
}
.card-arrow {
  position: absolute; top: 28px; right: 28px;
  width: 40px; height: 40px;
  border: 1px solid rgba(232,226,214,.2);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .3s, transform .3s;
  color: #e8e2d6; font-size: 16px;
  font-family: var(--mono);
}
.card:hover .card-arrow { opacity: 1; transform: translateY(0); }

/* ─── ABOUT ─── */
.about {
  padding: 120px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: center;
  border-top: 1px solid rgba(var(--cream-rgb),.07);
}
.about--no-photo {
  grid-template-columns: 1fr;
  max-width: 800px;
}
.about-image-wrap { position: relative; }
.about-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; filter: grayscale(15%); display: block; }
.about-image-wrap::before {
  content: '';
  position: absolute; top: -16px; left: -16px; right: 16px; bottom: 16px;
  border: 1px solid rgba(var(--cream-rgb),.12);
  z-index: -1;
}
.about-content { display: flex; flex-direction: column; gap: 0; }
.about-label { font-family: var(--mono); font-size: 10px; letter-spacing: .4em; color: var(--gold); text-transform: uppercase; margin-bottom: 20px; display: flex; align-items: center; gap: 14px; }
.about-label::before { content: ''; display: block; width: 24px; height: 1px; background: var(--gold); }
.about-title { font-family: var(--serif); font-size: clamp(32px, 3.5vw, 52px); font-weight: 400; font-style: italic; line-height: 1.15; margin-bottom: 28px; }
.about-body  { color: rgba(var(--cream-rgb),.8); font-size: 16px; line-height: 1.85; margin-bottom: 40px; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(var(--cream-rgb),.1);
  margin-bottom: 40px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  border-right: 1px solid rgba(var(--cream-rgb),.1);
  text-align: center;
}
.stat:last-child { border-right: none; }
.stat-num  {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 6px;
}
.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--dim);
}

.btn {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 16px 32px;
  border: 1px solid rgba(var(--cream-rgb),.2);
  color: var(--gold);
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none;
  transition: background .3s, color .3s, border-color .3s;
  cursor: pointer; background: transparent;
}
.btn:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }

/* ─── CONTACT ─── */
.contact {
  padding: 120px 48px;
  border-top: 1px solid rgba(var(--cream-rgb),.07);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: end;
}
.contact-left .section-label { margin-bottom: 32px; }
.contact-title {
  font-family: var(--serif);
  font-size: clamp(44px, 5.5vw, 80px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -.02em;
  margin-bottom: 0;
}
.contact-title em { font-style: italic; color: var(--gold); display: block; }

.contact-right {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 8px;
}
.contact-body {
  color: rgba(var(--cream-rgb),.75);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 40px;
}
.contact-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn--primary {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.btn--primary:hover {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

/* ─── CONTACT FORM ─── */
.contact-aside {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--dim);
}
.contact-aside a {
  color: var(--gold);
  text-decoration: none;
  transition: opacity .2s;
}
.contact-aside a:hover { opacity: .75; }

.contact-form { display: flex; flex-direction: column; gap: 20px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--dim);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(var(--cream-rgb),.04);
  border: 1px solid rgba(var(--cream-rgb),.12);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  transition: border-color .25s, background .25s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(var(--cream-rgb),.25);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(var(--cream-rgb),.35);
  background: rgba(var(--cream-rgb),.07);
}

.form-group select option {
  background: var(--bg2);
  color: var(--cream);
}

.form-group textarea { resize: vertical; min-height: 130px; line-height: 1.6; }

/* ─── FOOTER ─── */
footer {
  padding: 64px 48px;
  border-top: 1px solid rgba(var(--cream-rgb),.07);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 40px;
}
.footer-brand   { font-family: var(--serif); font-style: italic; font-size: 20px; }
.footer-tagline { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--dim); text-align: center; text-transform: uppercase; }
.footer-links   { display: flex; justify-content: flex-end; gap: 24px; list-style: none; }
.footer-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color .25s;
}
.footer-links a:hover { color: var(--gold); }
.footer-copy { grid-column: 1 / -1; text-align: center; font-family: var(--mono); font-size: 11px; color: rgba(var(--cream-rgb),.3); letter-spacing: .15em; padding-top: 32px; border-top: 1px solid rgba(var(--cream-rgb),.04); }

/* ─── GALLERY PAGE ─── */
.gallery-hero {
  padding: 140px 48px 80px;
  border-bottom: 1px solid rgba(var(--cream-rgb),.07);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
}
.gallery-hero-left {}
.back-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--dim);
  text-decoration: none;
  text-transform: uppercase;
  transition: color .25s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}
.back-link:hover { color: var(--gold); }
.gallery-title {
  font-family: var(--serif);
  font-size: clamp(52px, 7vw, 100px);
  font-weight: 900;
  line-height: .88;
  letter-spacing: -.02em;
}
.gallery-title em { font-style: italic; color: var(--gold); }
.gallery-hero-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 24px;
  padding-bottom: 4px;
}
.gallery-count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--dim);
  text-transform: uppercase;
}
.gallery-divider {
  width: 40px; height: 1px;
  background: var(--gold);
}
.gallery-desc {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(var(--cream-rgb),.65);
  max-width: 400px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  border: none;
  background: var(--bg2);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); transition: filter .6s var(--ease), transform .6s var(--ease); }
.gallery-item:hover img { filter: brightness(1); transform: scale(1.04); }
.gallery-item-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s;
  background: rgba(10,10,8,.25);
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-zoom { font-size: 26px; color: var(--cream); }

/* ─── LIGHTBOX ─── */
.lb-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,10,8,.97);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.lb-backdrop.active { opacity: 1; pointer-events: all; }

.lightbox {
  position: fixed; inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lb-stage {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity .3s;
}
.lb-img.loaded { opacity: 1; }

.lb-loader {
  position: absolute;
  width: 24px; height: 24px;
  border: 2px solid rgba(232,226,214,.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.lb-loader.hidden { display: none; }

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: none;
  border: 1px solid rgba(232,226,214,.12);
  color: var(--cream);
  cursor: pointer;
  transition: background .2s, border-color .2s;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(232,226,214,.08);
  border-color: rgba(232,226,214,.35);
}
.lb-close { top: 32px; right: 32px; width: 44px; height: 44px; font-size: 16px; }
.lb-prev  { left: 24px;  top: 50%; transform: translateY(-50%); width: 44px; height: 64px; font-size: 22px; }
.lb-next  { right: 24px; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; font-size: 22px; }
.lb-counter {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .3em;
  color: rgba(232,226,214,.5);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  .nav-links { display: none; flex-direction: column; position: fixed; top: 64px; left: 0; right: 0; background: rgba(var(--bg-rgb),.97); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(var(--cream-rgb),.08); padding: 24px; gap: 20px; }
  .nav-links.open { display: flex; }
  .nav-burger { display: flex; }

  .hero-left { padding: 100px 24px 64px; max-width: 100%; }
  .hero-right::after { background: linear-gradient(to top, rgba(var(--bg-rgb),.97) 0%, rgba(var(--bg-rgb),.6) 50%, rgba(var(--bg-rgb),.2) 100%); }

  .grid { grid-template-columns: 1fr 1fr; height: auto; }
  .grid .card { height: 260px; }
  .grid .card:nth-child(1) { grid-row: auto; grid-column: 1 / -1; height: 380px; }
  .grid .card:nth-child(4) { grid-column: auto; }

  .about { grid-template-columns: 1fr; padding: 80px 24px; gap: 48px; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }

  .contact { grid-template-columns: 1fr; padding: 80px 24px; gap: 48px; }
  .contact-actions { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .themes { padding: 80px 24px 60px; }

  .gallery-hero { grid-template-columns: 1fr; padding: 120px 24px 60px; gap: 32px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  footer { grid-template-columns: 1fr; text-align: center; padding: 48px 24px; }
  .footer-links { justify-content: center; }

  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }
}
