@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500&display=swap');

:root {
  --paper: #FAF8F3;
  --ink: #201F1B;
  --ink-soft: #56534A;
  --forest: #5C8762;
  --forest-deep: #3F5E46;
  --sand: #DAD2BE;
  --sand-line: #E7E1D2;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; }

.display {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.site-nav .wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-nav .wordmark img {
  height: 108px;
  width: auto;
  display: block;
  position: relative;
  z-index: 1;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.site-nav a.nav-link {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a.nav-link.active,
.site-nav a.nav-link:hover {
  color: var(--ink);
  border-bottom-color: var(--forest);
}

.nav-overlay .wordmark,
.nav-overlay a.nav-link { color: #fff; }
.nav-overlay a.nav-link.active,
.nav-overlay a.nav-link:hover { color: #fff; border-bottom-color: var(--forest); }

.nav-overlay .wordmark img {
  filter:
    drop-shadow(0 0 4px rgba(255,255,255,0.9))
    drop-shadow(0 0 10px rgba(255,255,255,0.6))
    drop-shadow(0 0 18px rgba(255,255,255,0.35));
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.lang-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--ink-soft);
  cursor: pointer;
}

.lang-btn.active { color: var(--ink); font-weight: 600; }
.lang-btn:hover { color: var(--ink); }
.lang-sep { color: var(--sand-line); }

.nav-overlay .lang-btn { color: rgba(255,255,255,0.75); }
.nav-overlay .lang-btn.active,
.nav-overlay .lang-btn:hover { color: #fff; }
.nav-overlay .lang-sep { color: rgba(255,255,255,0.4); }

/* Hero */
.hero {
  position: relative;
  height: 34vh;
  min-height: 290px;
  margin: 0 0 3rem;
  overflow: hidden;
}

.hero .site-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }

@media (max-width: 780px) {
  .hero { min-height: 340px; }

  .site-nav {
    flex-wrap: wrap;
    row-gap: 0.75rem;
    padding: 1.25rem 1.25rem;
  }

  .site-nav .wordmark img {
    height: 56px;
  }

  .nav-right {
    width: 100%;
    justify-content: space-between;
    gap: 1rem;
  }

  .site-nav ul {
    gap: 1.1rem;
  }

  .site-nav a.nav-link {
    font-size: 0.85rem;
  }
}

.hero-photo {
  position: absolute;
  inset: 0;
  background: var(--forest-deep);
}

.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 55%);
}

.hero-caption {
  position: absolute;
  left: 2rem;
  bottom: 2rem;
  right: 2rem;
  color: #fff;
  z-index: 1;
}

.hero-caption h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 500;
  margin: 0 0 0.35rem;
}

.hero-caption p {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  max-width: 40ch;
}

/* Portfolio grid */
/* Portfolio grid — real masonry via CSS Grid, with row-span computed in
   JS from each photo's actual rendered height. Nothing is guessed, so
   there's no scenario that leaves a gap. */
.portfolio-grid {
  max-width: 1280px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 8px;
  grid-auto-flow: dense;
  gap: 10px;
}

.portfolio-grid a {
  display: block;
  overflow: hidden;
}

.portfolio-grid a.tile-wide { grid-column: span 2; }

.portfolio-grid img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Same deterrents for PhotoSwipe's dynamically-created slide images */
.pswp img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

@media (max-width: 780px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Page header for interior pages */
.page-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 2rem 2rem;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  margin: 0;
}

/* About */
.about-layout {
  max-width: 1280px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.about-photo {
  aspect-ratio: 4/5;
  background: var(--sand);
}

.about-text p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 58ch;
}

.about-text p:first-of-type {
  color: var(--ink);
  font-size: 1.15rem;
}

.about-tagline {
  font-style: italic;
  color: var(--ink) !important;
  margin-top: 1.5rem;
}

@media (max-width: 780px) {
  .about-layout { grid-template-columns: 1fr; }
}

/* Contact */
.contact-block {
  max-width: 640px;
  margin: 0 auto 6rem;
  padding: 0 2rem;
}

.contact-email {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--forest-deep);
  text-decoration: none;
  display: inline-block;
  margin: 1rem 0 2rem;
  border-bottom: 1px solid var(--sand-line);
  padding-bottom: 0.5rem;
}

.contact-email:hover { color: var(--forest); }

.inquiries-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.inquiries-list li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--sand-line);
  color: var(--ink-soft);
}

.inquiries-list li:last-child { border-bottom: 1px solid var(--sand-line); }

.inquiries-list strong { color: var(--ink); }

.contact-location {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: -1rem;
}

.copyright-notice {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sand-line);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.copyright-notice h3 {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.copyright-notice p { margin: 0.5rem 0; }

.social-row { display: flex; gap: 1rem; margin-top: 1rem; }

.social-row a,
.site-footer .icon-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--sand-line);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.social-row a:hover,
.site-footer .icon-links a:hover {
  color: var(--forest-deep);
  border-color: var(--forest);
}

.social-row a svg,
.site-footer .icon-links a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

.site-footer .icon-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--sand-line);
  padding: 2rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--forest-deep); }

/* Thumbnail strip — independent fixed element, not nested inside
   PhotoSwipe's own DOM, shown/hidden via lightbox open/close events */
.pswp-thumbs-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  overflow-x: auto;
  z-index: 200000;
}

.pswp-thumbs-strip[hidden] { display: none; }

.pswp__img {
  -webkit-user-drag: none;
  user-select: none;
}

.pswp-thumbs-strip__item {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.pswp-thumbs-strip__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pswp-thumbs-strip__item:hover { opacity: 0.85; }

.pswp-thumbs-strip__item.is-active {
  opacity: 1;
  border-color: var(--forest);
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
