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

:root {
  --ink:        #0d0d0d;
  --ink-light:  #3a3a3a;
  --mist:       #8a8a8a;
  --paper:      #f8f6f2;
  --paper-warm: #f0ede8;
  --cream:      #faf9f7;
  --accent:     #c8a96e;
  --accent-dim: rgba(200,169,110,0.15);
  --white:      #ffffff;
  --nav-h:      72px;
  --ease-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io:    cubic-bezier(0.65, 0, 0.35, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

::selection { background: var(--accent-dim); color: var(--ink); }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* subtle grain overlay */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.028;
  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)'/%3E%3C/svg%3E");
}

/* ─── PAGE LOADER ─── */
#page-loader {
  position: fixed; inset: 0; z-index: 10000; background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 22px;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo {
  height: 80px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  animation: lPulse 1.6s ease infinite;
}
.loader-bar {
  width: 96px; height: 1px; background: rgba(255,255,255,0.1);
  position: relative; overflow: hidden;
}
.loader-bar::after {
  content: ''; position: absolute; left: -100%; top: 0;
  width: 100%; height: 100%; background: var(--accent);
  animation: lSlide 1.4s var(--ease-io) infinite;
}
@keyframes lPulse { 0%,100%{opacity:.25} 50%{opacity:1} }
@keyframes lSlide { to { left: 100%; } }

/* ─── NAVBAR ─── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h); display: flex; align-items: center; padding: 0 52px;
  transition: background 0.55s var(--ease-expo), box-shadow 0.55s var(--ease-expo);
}
#navbar.scrolled {
  background: rgba(250,249,247,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.055);
}
.nav-inner {
  width: 100%; max-width: 1440px; margin: auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img { height: 36px; transition: opacity 0.25s ease; }
.nav-logo img:hover { opacity: 0.6; }
.nav-links { display: flex; align-items: center; gap: 38px; list-style: none; }
.nav-links a {
  font-size: 10px; font-weight: 500; letter-spacing: 2.5px;
  text-transform: uppercase; color: rgba(255,255,255,0.65);
  position: relative; padding-bottom: 3px; transition: color 0.25s ease;
}
#navbar.scrolled .nav-links a { color: var(--ink-light); }
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width 0.5s var(--ease-expo);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
#navbar.scrolled .nav-links a:hover,
#navbar.scrolled .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-burger {
  display: none; flex-direction: column; gap: 5.5px;
  width: 24px; cursor: pointer;
}
.nav-burger span {
  display: block; height: 1.5px; background: var(--white);
  transition: all 0.5s var(--ease-expo); transform-origin: center;
}
#navbar.scrolled .nav-burger span { background: var(--ink); }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: var(--ink); flex-direction: column;
  align-items: center; justify-content: center; gap: 46px;
  opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease-expo);
}
.mobile-nav.open { opacity: 1; pointer-events: all; }
.mobile-nav a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 46px; font-weight: 300; letter-spacing: 2px;
  color: rgba(255,255,255,0.65); transition: color 0.25s ease;
}
.mobile-nav a:hover { color: var(--accent); }

/* ─── HERO ─── */
#home {
  min-height: 100vh; position: relative;
  display: flex; align-items: flex-end; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../images/home/home-bg-2.webp');
  background-size: cover; background-position: center;
  transform: scale(1.08);
  transition: transform 10s var(--ease-expo);
  will-change: transform;
}
.hero-bg.loaded { transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(5,5,5,0.9) 0%,
    rgba(5,5,5,0.28) 55%,
    rgba(5,5,5,0.05) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  width: 100%; max-width: 1440px; margin: 0 auto;
  padding: 0 100px 96px 52px;
  display: flex; flex-direction: column; align-items: flex-end; text-align: right;
}
.hero-eyebrow {
  font-size: 10px; font-weight: 500; letter-spacing: 5px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 24px;
  opacity: 0; transform: translateY(16px);
  animation: hUp 0.9s 0.45s var(--ease-expo) forwards;
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(56px, 9.5vw, 120px);
  font-weight: 300; line-height: 0.91;
  color: var(--white); letter-spacing: -1px;
}
.hero-line { display: block; overflow: hidden; }
.hero-line span {
  display: block; opacity: 0; transform: translateY(108%); filter: none;
}
.hero-line:nth-child(1) span { animation: hSlide 1.1s 0.5s var(--ease-expo) forwards; }
.hero-line:nth-child(2) span { animation: hSlide 1.1s 0.65s var(--ease-expo) forwards; }
.hero-sub {
  margin-top: 32px; font-size: 15px; font-weight: 300;
  color: rgba(255,255,255,0.48); max-width: 370px; line-height: 1.78;
  opacity: 0; transform: translateY(16px);
  animation: hUp 1s 0.95s var(--ease-expo) forwards;
}
.hero-ctas {
  margin-top: 50px; display: flex; align-items: center; justify-content: flex-end; gap: 34px;
  opacity: 0; transform: translateY(16px);
  animation: hUp 1s 1.15s var(--ease-expo) forwards;
}
.btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 500; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--white); border: 1px solid rgba(255,255,255,0.32);
  padding: 15px 30px;
  transition: background 0.5s var(--ease-expo), border-color 0.5s, color 0.25s;
}
.btn-outline:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-outline svg { transition: transform 0.5s var(--ease-expo); }
.btn-outline:hover svg { transform: translateX(4px); }
.btn-ghost {
  font-size: 10px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.4); display: flex; align-items: center; gap: 8px;
  transition: color 0.25s ease;
}
.btn-ghost:hover { color: var(--white); }
.btn-ghost svg { transition: transform 0.5s var(--ease-expo); }
.btn-ghost:hover svg { transform: translateX(4px); }

.hero-scroll {
  position: absolute; bottom: 44px; left: 52px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  opacity: 0; animation: hUp 1s 1.65s var(--ease-expo) forwards;
}
.scroll-line {
  width: 1px; height: 58px; background: rgba(255,255,255,0.12);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 100%; height: 100%; background: var(--accent);
  animation: sDrop 2.2s 2.4s ease infinite;
}
@keyframes sDrop { to { top: 100%; } }
.scroll-label {
  font-size: 9px; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(255,255,255,0.3); writing-mode: vertical-rl;
  font-weight: 400; opacity: 1; filter: none;
}
@keyframes hUp  { to { opacity: 1; transform: translateY(0); } }
@keyframes hSlide { to { opacity: 1; transform: translateY(0); } }

/* ─── SHARED SECTION LAYOUT ─── */
.section { padding: 120px 52px; max-width: 1440px; margin: 0 auto; }
.sec-label { display: flex; align-items: center; gap: 16px; margin-bottom: 58px; }
.sec-label-line { width: 28px; height: 1px; background: var(--accent); flex-shrink: 0; }
.sec-label-text { font-size: 9.5px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--mist); }
.sec-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 5vw, 66px); font-weight: 300;
  line-height: 1.07; letter-spacing: -0.5px; color: var(--ink);
}
.sec-sub { font-size: 14px; font-weight: 300; color: var(--mist); line-height: 1.85; max-width: 460px; margin-top: 18px; }

/* reveal animation */
.reveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity 0.9s var(--ease-expo), transform 0.9s var(--ease-expo);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }

/* ─── GALLERY ─── */
#portfolio { background: var(--paper); }
.gal-top { padding: 100px 52px 0; max-width: 1440px; margin: 0 auto; }
.gal-top-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 32px;
}
.filter-group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.filter-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 9.5px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--mist); padding: 9px 20px; border: 1px solid transparent;
  border-radius: 40px; cursor: pointer; background: none;
  transition: all 0.4s var(--ease-expo);
}
.filter-btn:hover { color: var(--ink); border-color: rgba(0,0,0,0.1); }
.filter-btn.active {
  color: var(--ink); background: var(--white);
  border-color: rgba(0,0,0,0.07);
  box-shadow: 0 2px 14px rgba(0,0,0,0.065);
}
.gal-wrap { padding: 44px 52px 108px; max-width: 1440px; margin: 0 auto; }

.img-max-width { width: 33.333%; padding: 6px; }
.item-box { position: relative; overflow: hidden; display: block; background: var(--paper-warm); }
.item-box a { display: block; }
.item-container {
  width: 100%; display: block;
  transform: scale(1); transition: transform 1s var(--ease-expo);
}
.item-box:hover .item-container { transform: scale(1.065); }
.item-mask {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,6,6,0.8) 0%, transparent 62%);
  opacity: 0; transition: opacity 0.5s var(--ease-expo);
}
.item-box:hover .item-mask { opacity: 1; }
.item-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 18px 20px 22px;
  transform: translateY(10px); transition: transform 0.5s var(--ease-expo);
}
.item-box:hover .item-caption { transform: translateY(0); }
.item-caption h5 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px; font-weight: 400; color: var(--white);
  margin: 0 0 2px; letter-spacing: 0.3px;
}
.item-caption p {
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.48); margin: 0;
}
#album-loader {
  padding: 88px 0; display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.spinner {
  width: 28px; height: 28px;
  border: 1.5px solid rgba(0,0,0,0.07); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#album-loader p { font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--mist); }

/* ─── ABOUT ─── */
#about { background: var(--cream); }
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 72px; align-items: start; }
.portrait-wrap { position: relative; max-width: 300px; width: 100%; }
.portrait-img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  filter: grayscale(18%); transition: filter 0.8s var(--ease-expo);
}
.portrait-img:hover { filter: grayscale(0%); }
.portrait-accent {
  position: absolute; bottom: -18px; right: -18px;
  width: 74%; aspect-ratio: 1; border: 1px solid var(--accent);
  z-index: -1; transition: transform 0.8s var(--ease-expo);
}
.portrait-wrap:hover .portrait-accent { transform: translate(8px, 8px); }
.portrait-name { margin-top: 18px; font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--mist); }
.about-txt { padding-top: 12px; }
.about-body { font-size: 15.5px; font-weight: 300; line-height: 1.92; color: var(--ink-light); margin-top: 28px; }
.about-body p + p { margin-top: 18px; }

/* ─── CTA ─── */
#cta { background: var(--ink); }
.cta-inner {
  padding: 118px 52px; max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 52px; flex-wrap: wrap;
}
.cta-txt .sec-heading { color: var(--white); }
.cta-txt .sec-sub { color: rgba(255,255,255,0.36); }
.btn-cta {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; font-weight: 500; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--ink); background: var(--accent); padding: 18px 36px; white-space: nowrap;
  transition: background 0.5s var(--ease-expo), transform 0.5s var(--ease-expo), box-shadow 0.5s;
}
.btn-cta:hover { background: #d4b47e; transform: translateY(-4px); box-shadow: 0 22px 52px rgba(200,169,110,0.3); }
.btn-cta svg { transition: transform 0.5s var(--ease-expo); }
.btn-cta:hover svg { transform: translateY(3px); }

/* ─── CONTACT ─── */
#contact { background: var(--paper); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 80px; align-items: start; }
.contact-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.contact-row:first-of-type { border-top: 1px solid rgba(0,0,0,0.05); margin-top: 44px; }
.contact-icon {
  width: 36px; height: 36px; border: 1px solid rgba(0,0,0,0.08); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent);
}
.c-label { font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--mist); margin-bottom: 4px; }
.c-value { font-size: 14px; color: var(--ink); }

.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mist); }
.form-input {
  font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 300; color: var(--ink);
  background: var(--white); border: 1px solid rgba(0,0,0,0.08);
  padding: 13px 16px; outline: none; border-radius: 0; -webkit-appearance: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-input::placeholder { color: rgba(0,0,0,0.22); }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
textarea.form-input { min-height: 128px; resize: vertical; }
.btn-submit {
  display: inline-flex; align-items: center; gap: 12px; align-self: flex-start;
  font-family: 'Montserrat', sans-serif; font-size: 10px; font-weight: 500;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--white); background: var(--ink); padding: 15px 30px;
  border: none; cursor: pointer;
  transition: background 0.4s var(--ease-expo), transform 0.4s var(--ease-expo);
}
.btn-submit:hover { background: var(--ink-light); transform: translateY(-2px); }
.btn-submit svg { transition: transform 0.4s var(--ease-expo); }
.btn-submit:hover svg { transform: translateX(4px); }
#message { font-size: 12px; color: var(--mist); }

/* ─── FOOTER ─── */
footer { background: var(--ink); padding: 56px 52px; }
.footer-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
}
.footer-brand {
  font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 300;
  letter-spacing: 3px; color: var(--white); text-transform: uppercase;
}
.footer-nav { display: flex; gap: 28px; list-style: none; }
.footer-nav a {
  font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.28); transition: color 0.25s ease;
}
.footer-nav a:hover { color: var(--accent); }
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.22); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 52px; }
  .contact-grid { grid-template-columns: 1fr; gap: 52px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  #navbar { padding: 0 20px; height: 64px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .mobile-nav { display: flex; }

  .section { padding: 70px 20px; }
  .gal-top { padding: 70px 20px 0; }
  .gal-wrap { padding: 24px 20px 70px; }

  .hero-bg { background-position: 35% center; }
  .hero-content { padding: 0 20px 70px; align-items: flex-end; text-align: right; }
  .hero-eyebrow { font-size: 9px; letter-spacing: 3px; margin-bottom: 16px; }
  .hero-title { font-size: clamp(38px, 10vw, 68px); line-height: 0.96; }
  .hero-sub { margin-top: 20px; font-size: 14px; line-height: 1.65; max-width: 90%; }

  .hero-ctas {
    margin-top: 36px;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
  }
  .btn-outline, .btn-ghost { width: auto; }

  .hero-scroll {
    left: 20px;
    right: auto;
    bottom: 24px;
    gap: 8px;
  }
  .scroll-line { height: 40px; }
  .scroll-label { font-size: 8px; letter-spacing: 2px; }

  footer { padding: 40px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .cta-inner { padding: 70px 20px; gap: 32px; }
  .img-max-width { width: 50%; padding: 4px; }
  .form-row { grid-template-columns: 1fr; }
  .gal-top-row { flex-direction: column; align-items: flex-start; gap: 20px; }
  .filter-group { margin-top: 8px; gap: 6px; }
  .filter-btn { padding: 7px 16px; font-size: 9px; }
  .portrait-wrap { max-width: 240px; margin: 0 auto; }
  .portrait-accent { display: none; }
}

@media (max-width: 480px) {
  .img-max-width { width: 100%; }
  .hero-title { font-size: clamp(34px, 11vw, 52px); }
  .hero-scroll { display: none; }
  .section { padding: 60px 18px; }
  .hero-content { padding: 0 18px 50px; }
}
