/* ============================================================
   MAYA PAUL PHOTOGRAPHY — design system v2
   Restyled to: warm paper ground, terracotta accent, Fraunces +
   Inter type, plate-numbered sequential galleries, and a nav
   that self-inverts via mix-blend-mode rather than scroll state.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@400;500;600&display=swap');

:root {
  --paper: #F7F6F2;
  --paper-deep: #EFEDE6;
  --ink: #16150F;
  --muted: #8A8578;
  --line: #DDD9CF;
  --accent: #A9695B;
  --dark: #16150F;
  --dark-text: #C9C6BC;
  --white: #FFFFFF;

  --f-display: 'Fraunces', serif;
  --f-safe: 'Cormorant Garamond', serif;
  --f-body: 'Inter', sans-serif;

  --gap: clamp(1.25rem, 2.2vw, 2.5rem);
  --edge: clamp(1.25rem, 5vw, 4rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--white); }

h1, h2, h3 { font-family: var(--f-display); font-weight: 300; margin: 0; color: var(--ink); }

/* ---------- utility type ---------- */

.eyebrow {
  font-family: var(--f-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.coords {
  font-family: var(--f-body);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ---------- nav (self-inverting via blend mode) ---------- */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem var(--edge);
  mix-blend-mode: difference;
  pointer-events: none;
}
.site-nav * { pointer-events: auto; }

.nav-mark {
  font-family: var(--f-safe);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.2rem);
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px; height: 20px;
  position: relative;
  padding: 0;
  color: #fff;
}
.nav-toggle span {
  position: absolute; left: 0; right: 0; height: 1px;
  background: currentColor; transition: all 0.3s ease;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

@media (max-width: 760px) {
  .site-nav { mix-blend-mode: normal; }
  .nav-mark { color: var(--ink); mix-blend-mode: difference; }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background: var(--paper);
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(.6,0,.2,1);
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-links a { color: var(--ink) !important; font-size: 0.85rem; opacity: 1; }
  .nav-toggle { display: block; z-index: 101; color: var(--ink); mix-blend-mode: difference; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  width: 100%;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; will-change: transform; }
.hero-media img {
  width: 100%; height: 118%;
  object-fit: cover;
  display: block;
  filter: saturate(0.94);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.48) 100%);
  pointer-events: none;
}
.hero-caption {
  position: absolute;
  bottom: clamp(1.5rem, 4vw, 3rem);
  left: clamp(1.2rem, 4vw, 3rem);
  color: #fff;
  max-width: 70vw;
}
.hero-caption .kicker {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.7rem;
}
.hero-caption h1 {
  font-size: clamp(1.8rem, 5.4vw, 3.6rem);
  font-weight: 300;
  line-height: 1.05;
  max-width: 16ch;
  color: #fff;
  margin-bottom: 0.2rem;
}
.hero-sub {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  letter-spacing: 0.01em;
  line-height: 1.5;
  max-width: 36ch;
  color: #fff;
  opacity: 0.88;
}
.hero-plate {
  position: absolute;
  bottom: clamp(1.5rem, 4vw, 3rem);
  right: clamp(1.2rem, 4vw, 3rem);
  color: #fff;
  text-align: right;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.hero-plate .loc {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 0.95rem;
  display: block;
  margin-top: 0.2rem;
}

@media (max-width: 640px) {
  .hero-caption { max-width: 56vw; }
  .hero-plate { max-width: 32vw; }
}
.scroll-cue {
  position: absolute;
  bottom: clamp(1.5rem, 4vw, 3rem);
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.scroll-cue::after {
  content: '';
  width: 1px; height: 34px;
  background: rgba(255,255,255,0.6);
  animation: scrollpulse 2.2s ease-in-out infinite;
}
@keyframes scrollpulse {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ---------- intro ---------- */

.intro {
  max-width: 660px;
  margin: clamp(5rem, 12vh, 9rem) auto clamp(3rem, 8vh, 5rem);
  padding: 0 1.5rem;
  text-align: center;
}
.intro .eyebrow { display: block; margin-bottom: 1.2rem; }
.intro p.lead {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.3vw, 1.5rem);
  line-height: 1.6;
  color: var(--ink);
}
.intro p.body-note {
  font-family: var(--f-body);
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--muted);
  margin-top: 1.2rem;
  font-style: normal;
}

/* ---------- specialties ---------- */

.specialties {
  display: flex;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.specialty {
  flex: 1 1 220px;
  padding: 2rem clamp(1rem, 2vw, 2rem);
  border-right: 1px solid var(--line);
}
.specialty:last-child { border-right: none; }
.specialty .num {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--accent);
}
.specialty h3 { font-size: 1.3rem; margin-top: 0.6rem; font-weight: 400; }
.specialty p {
  font-family: var(--f-body);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.6rem;
}
.specialty .status {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- location rooms (index) ---------- */

.rooms {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) var(--edge) 0;
  display: grid;
  gap: var(--gap);
}
.room {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  overflow: hidden;
  background: var(--ink);
}
.room:nth-child(even) { direction: rtl; }
.room:nth-child(even) > * { direction: ltr; }
.room-media { position: relative; overflow: hidden; }
.room-media img {
  width: 100%; height: 100%; object-fit: cover;
  min-height: 420px;
  transition: transform 1.2s cubic-bezier(.2,.6,.2,1);
}
.room:hover .room-media img { transform: scale(1.045); }
.room-text {
  padding: clamp(2rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper);
}
.room-text .eyebrow { margin-bottom: 0.5rem; }
.room-text h3 { font-family: var(--f-safe); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 500; letter-spacing: 0.01em; }
.room-text .coords { display: block; margin-top: 0.6rem; }
.room-text p {
  font-family: var(--f-body);
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
  margin-top: 1.1rem;
  max-width: 40ch;
}
.room-link {
  margin-top: 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  width: fit-content;
}
.room-link .arrow { transition: transform 0.3s ease; }
.room:hover .room-link .arrow { transform: translateX(5px); }

@media (max-width: 820px) {
  .room, .room:nth-child(even) { grid-template-columns: 1fr; direction: ltr; }
  .room-media img { min-height: 320px; }
}

/* ---------- gallery hero variant ---------- */

.gallery-hero .hero-caption h1 { max-width: 20ch; }

.gallery-intro {
  max-width: 640px;
  margin: clamp(4rem, 10vh, 7rem) auto clamp(2rem, 5vh, 3rem);
  padding: 0 1.5rem;
  text-align: center;
}
.gallery-intro p {
  font-family: var(--f-body);
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--muted);
}
.gallery-intro .meta {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

/* ---------- sections + plates (sequential, genre-grouped) ---------- */

.section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--edge) clamp(3rem, 8vh, 6rem);
  scroll-margin-top: 5.5rem;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  margin-top: clamp(3rem, 9vh, 6rem);
  margin-bottom: clamp(3rem, 8vh, 6rem);
  scroll-margin-top: 6rem;
}
.section-head h2 {
  font-family: var(--f-safe);
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.section-count {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto clamp(4rem, 10vh, 7rem);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  cursor: zoom-in;
}
.plate.in-view { opacity: 1; transform: translateY(0); }
.plate:last-child { margin-bottom: 0; }
.plate[hidden] { display: none; }

.plate-frame {
  width: 100%;
  max-width: 980px;
  overflow: hidden;
  position: relative;
}
.plate-frame img {
  width: 100%;
  height: auto;
  display: block;
  will-change: transform;
}
.plate-frame::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(22,21,15,0);
  transition: background 0.3s ease;
  pointer-events: none;
}
.plate:hover .plate-frame::after { background: rgba(22,21,15,0.05); }

.plate figcaption {
  width: 100%;
  max-width: 980px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.plate-no {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.plate-cap {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

/* ---------- portrait feature (single plate, larger) ---------- */

.portrait-feature {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 var(--edge) clamp(3rem, 8vh, 6rem);
}
.portrait-feature .plate-frame { max-width: 620px; }
.portrait-feature figcaption { max-width: 620px; }
.portrait-feature .body-note {
  font-family: var(--f-body);
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.98rem;
  margin-top: clamp(2rem, 5vh, 3rem);
}
.portrait-feature .body-note p { margin: 0 0 1.2rem; }

/* ---------- about / contact (dark) ---------- */

.about {
  background: var(--dark);
  color: var(--paper);
  padding: clamp(5rem, 14vh, 9rem) var(--edge);
  margin-top: clamp(3rem, 8vh, 6rem);
}
.about-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.about .eyebrow { display: block; margin-bottom: 1.6rem; }
.about h2 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 300;
  line-height: 1.35;
  margin-bottom: 1.6rem;
  color: var(--paper);
}
.about p.bio {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--dark-text);
  margin-bottom: 2.4rem;
  max-width: 52ch;
  margin-left: auto; margin-right: auto;
}
.contact-link {
  display: inline-block;
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--paper);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.3rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.contact-link:hover { color: var(--accent); }

.about-links {
  margin-top: 2.6rem;
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}
.about-links a {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-text);
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.about-links a:hover { color: var(--paper); border-color: var(--accent); }

.site-footer {
  text-align: center;
  padding: 1.8rem 1.2rem 2.2rem;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--dark);
  color: rgba(201,198,188,0.6);
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(22, 21, 15, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
  padding: clamp(1.2rem, 5vw, 4rem);
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox-figure {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 78vh;
  width: auto; height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.lightbox.is-open .lightbox-img-wrap img { opacity: 1; transform: scale(1); }

.lightbox-cap {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(247,246,242,0.9);
  text-align: center;
}
.lightbox-cap .cap-index { font-family: var(--f-body); font-style: normal; color: rgba(247,246,242,0.4); margin-left: 0.6rem; }

.lightbox-close, .lightbox-nav {
  position: fixed;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
  opacity: 0.75;
}
.lightbox-close:hover, .lightbox-nav:hover { opacity: 1; }
.lightbox-close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); width: 42px; height: 42px; }
.lightbox-close svg { width: 20px; height: 20px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; }
.lightbox-nav svg { width: 22px; height: 22px; }
.lightbox-prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox-next { right: clamp(0.5rem, 2vw, 1.5rem); }

@media (max-width: 640px) {
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
}

/* ---------- misc ---------- */

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--white);
  padding: 0.6rem 1rem; z-index: 200;
}
.skip-link:focus { left: var(--edge); top: 1rem; }

@media (max-width: 640px) {
  .nav-links { gap: 0.9rem; }
}
