/* ── Variables ─────────────────────────────────────────────────────── */
:root {
  --ivory:      #faf8f3;
  --charcoal:   #2c2825;
  --accent:     #b5713a;
  --muted:      #8a7d70;
  --light-rule: #e8e2d9;
  --nav-h:      64px;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'EB Garamond', Georgia, serif;

  --section-px: clamp(1.5rem, 5vw, 5rem);
  --section-py: clamp(4rem, 8vw, 7rem);
  --max-w:      1160px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 1.3vw + 0.6rem, 1.45rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ── Nav ───────────────────────────────────────────────────────────── */
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--section-px);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#site-nav.scrolled {
  background: rgba(250, 248, 243, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--light-rule);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ivory);
  transition: color 0.4s;
}

#site-nav.scrolled .nav-logo { color: var(--charcoal); }

#site-nav ul {
  display: flex;
  gap: 2.5rem;
}

#site-nav ul a {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 248, 243, 0.85);
  transition: color 0.3s;
}

#site-nav.scrolled ul a { color: var(--muted); }
#site-nav ul a:hover    { color: var(--accent); }

/* ── Hero ──────────────────────────────────────────────────────────── */
#hero {
  position: relative;
  height: 100svh;
  min-height: 520px;
  background: url('hero.jpg') center center / cover no-repeat;
  display: flex;
  flex-direction: column;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--section-px);
  padding-bottom: clamp(3rem, 6vw, 6rem);
  background: linear-gradient(
    to top,
    rgba(28, 24, 22, 0.72) 0%,
    rgba(28, 24, 22, 0.15) 45%,
    transparent 70%
  );
  color: var(--ivory);
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250, 248, 243, 0.65);
  margin-bottom: 0.5rem;
}

.hero-overlay h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw + 1rem, 6.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}

.subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.9vw + 0.6rem, 1.875rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(250, 248, 243, 0.8);
}

/* Scroll hint dot */
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.hero-scroll-hint span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(250,248,243,0.7), transparent);
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0%   { opacity: 0; transform: scaleY(0); transform-origin: top; }
  40%  { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* ── Section shared ────────────────────────────────────────────────── */
section {
  padding: var(--section-py) var(--section-px);
}

.section-header {
  max-width: var(--max-w);
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw + 0.5rem, 3rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  display: inline-block;
  position: relative;
  padding-bottom: 0.6rem;
}

.section-header h2::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--accent);
}

.section-sub {
  margin-top: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Gallery ───────────────────────────────────────────────────────── */
#gallery {
  background: var(--ivory);
}

#gallery-container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.gallery-row {
  display: flex;
  margin-bottom: 6px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--light-rule);
}

.gallery-item + .gallery-item {
  margin-left: 6px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

/* Fade in gallery images as they load */
.img-fade        { opacity: 0; }
.img-fade.img-loaded { opacity: 1; }

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

.gallery-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem 1rem;
  background: linear-gradient(to top, rgba(28, 24, 22, 0.72) 0%, transparent 55%);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption {
  opacity: 1;
}

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

/* ── About ─────────────────────────────────────────────────────────── */
#about {
  background: var(--ivory);
}

.about-inner {
  display: flex;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: flex-start;
  max-width: var(--max-w);
  margin: 0 auto;
}

.about-photo-wrap {
  flex-shrink: 0;
  width: clamp(220px, 28vw, 340px);
}

.about-photo {
  width: 100%;
  box-shadow:
    4px 4px 0 var(--light-rule),
    8px 8px 0 rgba(181, 113, 58, 0.12);
}

.about-bio {
  font-size: clamp(1.6rem, 1.9vw + 0.9rem, 2.1rem);
  line-height: 1.65;
}

.about-bio p + p {
  margin-top: 1.2em;
}

@media (max-width: 680px) {
  .about-inner {
    flex-direction: column;
  }
  .about-photo-wrap {
    width: 100%;
    max-width: 320px;
  }
}

/* ── Contact ───────────────────────────────────────────────────────── */
#contact {
  background: #f4f0e8;
}

#contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

input, textarea {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--charcoal);
  background: var(--ivory);
  border: 1px solid var(--light-rule);
  border-radius: 0;
  padding: 0.7rem 0.9rem;
  width: 100%;
  transition: border-color 0.2s;
  appearance: none;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

button[type="submit"] {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory);
  background: var(--charcoal);
  border: none;
  padding: 0.85rem 2.5rem;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s;
  position: relative;
}

button[type="submit"]:hover:not(:disabled) {
  background: var(--accent);
}

button[type="submit"]:active {
  transform: scale(0.98);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-sending { display: none; }
button[type="submit"].sending .btn-text    { display: none; }
button[type="submit"].sending .btn-sending { display: inline; }

#form-status {
  margin-top: 1rem;
  font-style: italic;
  min-height: 1.5em;
}

#form-status.success { color: #5a7a4a; }
#form-status.error   { color: #9b3a2e; }

/* ── Footer ────────────────────────────────────────────────────────── */
#site-footer {
  padding: 2.5rem var(--section-px);
  border-top: 1px solid var(--light-rule);
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ── Lightbox ──────────────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(22, 18, 16, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#lightbox[hidden] { display: none; }

#lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(90vw, 1000px);
}

/* Wrapper dimensions are set explicitly in JS from manifest width/height.
   Both images fill it absolutely at the same size. */
#lb-img-wrap {
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.7);
}

#lb-thumb,
#lb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#lb-img {
  opacity: 0;
  transition: opacity 0.5s ease;
}

#lb-img.lb-loaded { opacity: 1; }

#lb-caption {
  margin-top: 1rem;
  color: rgba(250, 248, 243, 0.8);
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-style: italic;
  text-align: center;
}

#lb-date {
  margin-top: 0.3rem;
  color: rgba(250, 248, 243, 0.45);
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-align: center;
}

#lb-close,
#lb-prev,
#lb-next {
  position: fixed;
  background: none;
  border: none;
  color: var(--ivory);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s, transform 0.2s;
  line-height: 1;
}

#lb-close:hover,
#lb-prev:hover,
#lb-next:hover {
  opacity: 1;
}

#lb-close {
  top: 1.25rem;
  right: 1.75rem;
  font-size: 1.5rem;
}

#lb-prev,
#lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.5rem;
  font-family: var(--font-display);
  font-weight: 300;
  padding: 0 0.5rem;
}

#lb-prev { left: 1rem; }
#lb-next { right: 1rem; }

#lb-prev:hover { transform: translateY(-50%) translateX(-2px); }
#lb-next:hover { transform: translateY(-50%) translateX(2px); }

/* ── Utilities ─────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  #site-nav ul { gap: 1.25rem; }
  #site-nav ul a { font-size: 0.8rem; }
}
