:root {
  --black: #111111;
  --off-black: #1a1a1a;
  --white: #ffffff;
  --gray: #8a8a8a;
  --light-gray: #e4e4e4;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--off-black);
  background: var(--white);
  font-weight: 300;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

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

/* Real photos (once placeholders are replaced with <img> tags) */
.hero-media img,
.about-portrait img,
.gallery-item img,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Placeholder media (stand-in for real photos) */
.placeholder-media {
  position: relative;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    #ececec,
    #ececec 12px,
    #e0e0e0 12px,
    #e0e0e0 24px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.placeholder-media::after {
  content: attr(data-placeholder-label);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  background: rgba(255,255,255,0.75);
  padding: 0.5em 1em;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--light-gray);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.logo-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.logo {
  font-family: 'Mrs Saint Delafield', cursive;
  font-size: 2.6rem;
  letter-spacing: 0.02em;
}

.logo-tagline {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
}

.main-nav {
  display: flex;
  gap: 2.2rem;
  align-items: center;
}

.main-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--off-black);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  border-bottom-color: var(--off-black);
}

.nav-social {
  color: var(--gray) !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--off-black);
  transition: background 0.3s ease;
}

/* Header overlaid transparently on the homepage hero, until scrolled past it */
.site-header.on-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
}

.site-header.on-hero .logo,
.site-header.on-hero .main-nav a {
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0,0,0,0.45);
}

.site-header.on-hero .logo-tagline {
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 4px rgba(0,0,0,0.45);
}

.site-header.on-hero .menu-toggle span {
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.45);
}

.site-header.on-hero.scrolled {
  position: sticky;
  background: var(--white);
  border-bottom-color: var(--light-gray);
}

.site-header.on-hero.scrolled .logo,
.site-header.on-hero.scrolled .main-nav a {
  color: var(--off-black);
  text-shadow: none;
}

.site-header.on-hero.scrolled .logo-tagline {
  color: var(--gray);
  text-shadow: none;
}

.site-header.on-hero.scrolled .menu-toggle span {
  background: var(--off-black);
  box-shadow: none;
}

/* The open mobile nav panel always has a solid white background,
   so its links stay dark regardless of the header's transparent state */
.site-header.on-hero .main-nav.open a {
  color: var(--off-black);
  text-shadow: none;
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

/* Subtle gradient at the top only, just enough to keep the nav legible —
   the photo itself stays bright rather than being tinted overall */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0));
  z-index: 1;
  pointer-events: none;
}

/* Gallery */
.gallery-section {
  padding: 5rem 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.gallery-item {
  aspect-ratio: 4 / 5;
  cursor: pointer;
}

.gallery-item .placeholder-media {
  transition: transform 0.4s ease;
}

.gallery-item:hover .placeholder-media {
  transform: scale(1.04);
}

.back-link {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 2rem;
}
.back-link:hover { color: var(--off-black); }

/* Category cards (galleries.html) */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem 6rem;
}

.category-card {
  display: block;
}

.category-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.category-card .placeholder-media,
.category-card img {
  transition: transform 0.4s ease;
}

.category-card:hover .placeholder-media,
.category-card:hover img {
  transform: scale(1.04);
}

.category-name {
  display: block;
  margin-top: 1rem;
  color: var(--off-black);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.page-content .section-title {
  margin-top: 5rem;
}

/* Page content (about / contact) */
.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2.5rem 6rem;
}

.about-page {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.about-portrait {
  aspect-ratio: 4 / 5;
}

.about-text h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
}

.about-text p {
  margin-bottom: 1.2rem;
  color: #333;
}

.about-facts {
  list-style: none;
  margin-top: 2rem;
  border-top: 1px solid var(--light-gray);
  padding-top: 1.5rem;
}

.about-facts li {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}

/* Contact */
.contact-page {
  max-width: 640px;
  text-align: center;
}

.contact-page h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2.4rem;
  margin-bottom: 1.2rem;
}

.contact-intro {
  color: #444;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.contact-link {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  border-bottom: 1px solid transparent;
  display: inline-block;
  align-self: center;
}
.contact-link:hover { border-bottom-color: var(--off-black); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  text-align: left;
}

.contact-form label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.4rem;
  display: block;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--light-gray);
  padding: 0.6rem 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  background: transparent;
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--off-black);
}

.contact-form button {
  margin-top: 1rem;
  align-self: flex-start;
  padding: 0.9rem 2.2rem;
  background: var(--off-black);
  color: var(--white);
  border: none;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}
.contact-form button:hover { background: #000; }

/* Footer */
.site-footer {
  padding: 3rem 2.5rem;
  text-align: center;
  border-top: 1px solid var(--light-gray);
  font-size: 0.8rem;
  color: var(--gray);
}

.footer-social {
  margin-top: 0.8rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.footer-social a {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.footer-social a:hover { color: var(--off-black); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 1000;
  background: rgba(10,10,10,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  touch-action: pan-y;
}
.lightbox.open { display: flex; }

.lightbox-media {
  width: 100%;
  height: 100%;
  max-width: 1100px;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--white);
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem 0.8rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

@media (max-width: 640px) {
  .lightbox-prev,
  .lightbox-next { font-size: 2.2rem; padding: 0.4rem 0.6rem; }
}

/* Responsive */
@media (max-width: 860px) {
  .about-page { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .site-header { padding: 1.2rem 1.5rem; }
  .menu-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  }
  .main-nav.open { transform: translateX(0); }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-section, .page-content { padding-left: 1.5rem; padding-right: 1.5rem; }
}
