:root {
  --color-bg: #faf8f5;
  --color-bg-alt: #f2ede6;
  --color-ink: #201e1c;
  --color-ink-soft: #55504a;
  --color-line: #e2dcd3;
  --color-accent: #a9714a;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Jost', 'Helvetica Neue', sans-serif;
  --header-h: 84px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
.preloader span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.35em;
  color: var(--color-ink);
}
.preloader.hidden { opacity: 0; visibility: hidden; }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background .4s ease, box-shadow .4s ease, height .4s ease;
}
.site-header.solid {
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--color-line);
  height: 68px;
}
.header-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: #fff;
  transition: color .4s ease;
}
.site-header.solid .logo { color: var(--color-ink); }

.main-nav { display: flex; gap: 36px; }
.nav-link {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.88;
  position: relative;
  padding-bottom: 4px;
  transition: color .4s ease, opacity .3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width .3s ease;
}
.nav-link:hover, .nav-link.active { opacity: 1; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.site-header.solid .nav-link { color: var(--color-ink-soft); }
.site-header.solid .nav-link.active,
.site-header.solid .nav-link:hover { color: var(--color-ink); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px; height: 22px;
  position: relative;
  z-index: 600;
}
.nav-toggle span {
  position: absolute; left: 0; right: 0;
  height: 1px; background: #fff;
  transition: all .3s ease;
}
.site-header.solid .nav-toggle span { background: var(--color-ink); }
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 10px; }
.nav-toggle span:nth-child(3) { top: 20px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }
.nav-open .nav-toggle span { background: var(--color-ink) !important; }

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: #111;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s ease, transform 8s ease;
}
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,12,10,.45) 0%, rgba(15,12,10,.15) 32%, rgba(15,12,10,.35) 68%, rgba(15,12,10,.72) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 24px;
}
.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 6.5rem);
  margin: 0;
  letter-spacing: 0.02em;
}
.hero-subtitle {
  margin: 22px 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}
.hero-scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: none;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
}
.hero-scroll span {
  display: block;
  width: 6px; height: 6px;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  transform: rotate(45deg);
  margin-top: -4px;
  animation: bounce 1.8s infinite;
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translate(0,0); }
  50% { transform: rotate(45deg) translate(4px,4px); }
}
.hero-dots {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  padding: 0;
  transition: background .3s ease, transform .3s ease;
}
.hero-dot.active { background: #fff; transform: scale(1.3); }

/* Sections */
.gallery-section {
  padding: 110px 40px;
  max-width: 1400px;
  margin: 0 auto;
}
.gallery-section.alt { background: var(--color-bg-alt); max-width: none; }
.gallery-section.alt > * { max-width: 1400px; margin-left: auto; margin-right: auto; }
.gallery-section.alt .masonry { max-width: 1400px; margin-left: auto; margin-right: auto; }

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}
.section-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: var(--color-accent);
  margin: 0 0 14px;
}
.section-heading h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin: 0 0 16px;
}
.section-desc {
  font-size: 0.95rem;
  color: var(--color-ink-soft);
  line-height: 1.7;
  margin: 0;
}

/* Masonry */
.masonry {
  column-count: 3;
  column-gap: 18px;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--color-line);
}
.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .7s ease, opacity .5s ease;
  opacity: 0;
}
.masonry-item img.loaded { opacity: 1; }
.masonry-item:hover img { transform: scale(1.045); }
.masonry-item::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(20,16,14,0);
  transition: background .4s ease;
  pointer-events: none;
}
.masonry-item:hover::after { background: rgba(20,16,14,0.12); }

/* Contact */
.contact {
  padding: 130px 40px;
  text-align: center;
  background: var(--color-ink);
  color: #f4efe9;
}
.contact .section-eyebrow { color: #c99a72; }
.contact h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 18px;
}
.contact-desc {
  max-width: 520px;
  margin: 0 auto 50px;
  color: #cfc7bd;
  line-height: 1.7;
  font-size: 0.95rem;
}
.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.contact-link {
  border: 1px solid rgba(244,239,233,0.25);
  padding: 20px 34px;
  min-width: 220px;
  transition: border-color .3s ease, background .3s ease;
}
.contact-link:hover { border-color: #c99a72; background: rgba(201,154,114,0.08); }
.contact-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #c99a72;
  margin-bottom: 8px;
}
.contact-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.site-footer {
  padding: 26px 40px;
  text-align: center;
  background: var(--color-ink);
  color: #8a8378;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-top: 1px solid rgba(244,239,233,0.08);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,8,7,0.96);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-content {
  max-width: 90vw;
  max-height: 88vh;
  text-align: center;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity .3s ease, transform .3s ease;
}
.lightbox-content img.show { opacity: 1; transform: scale(1); }
.lightbox-count {
  color: #cfc7bd;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  margin-top: 16px;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #f4efe9;
  font-size: 2rem;
  line-height: 1;
  opacity: 0.75;
  transition: opacity .2s ease;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }
.lightbox-close { top: 28px; right: 32px; font-size: 2.2rem; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); font-size: 3rem; }

/* Fade-in on scroll */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}
.fade-up.in-view { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 980px) {
  .masonry { column-count: 2; }
  .gallery-section { padding: 90px 24px; }
}

@media (max-width: 760px) {
  .header-inner { padding: 0 22px; }
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 0 44px;
    transform: translateX(100%);
    transition: transform .4s ease;
    z-index: 550;
  }
  .nav-open .main-nav { transform: translateX(0); box-shadow: -10px 0 30px rgba(0,0,0,0.15); }
  .main-nav .nav-link { color: var(--color-ink); font-size: 0.85rem; }
  .nav-toggle { display: block; }
  .masonry { column-count: 1; }
  .contact { padding: 90px 22px; }
  .contact-link { min-width: 0; width: 100%; max-width: 320px; }
  .hero-dots { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.6rem; }
}
