:root {
  --ink: #342a25;
  --muted: #766a62;
  --soft-ink: #554741;
  --paper: #fffaf4;
  --cream: #f7efe5;
  --blush: #ead8cf;
  --linen: #efe2d4;
  --sage: #9aa68f;
  --gold: #b18a55;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(80, 56, 40, 0.14);
  --soft-shadow: 0 12px 30px rgba(80, 56, 40, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(234, 216, 207, 0.55), transparent 32rem),
    linear-gradient(180deg, var(--paper), #fbf6ef 48%, var(--cream));
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

body.lightbox-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.site-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(52, 42, 37, 0.74), rgba(52, 42, 37, 0.22), rgba(255, 250, 244, 0.32)),
    var(--hero-image, linear-gradient(135deg, #e9d6c8, #fff8ee));
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.site-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 38%;
  background: linear-gradient(180deg, transparent, var(--paper));
}

.topbar {
  width: min(1160px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--white);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  text-decoration: none;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.download-button,
.hero-cta,
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 650;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.download-button,
.hero-cta {
  padding: 0 20px;
  color: #fffaf4;
  background: #8b6440;
  box-shadow: var(--soft-shadow);
}

.download-button:hover,
.hero-cta:hover,
.nav-link:hover {
  transform: translateY(-2px);
}

.download-button.secondary {
  color: var(--paper);
  background: var(--soft-ink);
}

.nav-link {
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-inner {
  width: min(1160px, calc(100% - 32px));
  margin: auto auto 9vh;
  padding: 72px 0 96px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-hero .eyebrow {
  color: #f2d7b4;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.96;
  text-wrap: balance;
}

h2 {
  color: var(--ink);
  font-size: clamp(2rem, 4.3vw, 4rem);
  line-height: 1.05;
}

.hero-subtitle {
  max-width: 640px;
  margin: 28px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.7vw, 2rem);
  line-height: 1.35;
}

.hero-copy {
  max-width: 560px;
  margin: 20px 0 34px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.06rem;
}

.section-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.intro-section {
  padding: 38px 0 28px;
}

.intro-section p {
  max-width: 760px;
  margin: 0;
  color: var(--soft-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  line-height: 1.45;
}

.gallery-section {
  padding: 72px 0 34px;
}

.gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.gallery-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  column-count: 3;
  column-gap: 18px;
}

.gallery-item {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  break-inside: avoid;
  cursor: zoom-in;
  background: var(--linen);
  box-shadow: var(--soft-shadow);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease, box-shadow 220ms ease;
}

.gallery-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item:hover {
  box-shadow: var(--shadow);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 420ms ease, filter 420ms ease;
}

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

.gallery-loader {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 180px;
  color: var(--muted);
}

.gallery-loader[hidden] {
  display: none;
}

.gallery-loader span {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(177, 138, 85, 0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.empty-state {
  width: min(1080px, calc(100% - 32px));
  margin: 30px auto;
  color: var(--muted);
}

.thanks-section {
  padding: 80px 0 120px;
}

.thanks-section .section-shell {
  max-width: 760px;
}

.thanks-section p:last-child {
  margin: 18px 0 0;
  color: var(--soft-ink);
  font-size: 1.08rem;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(52, 42, 37, 0.13);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 250, 244, 0.92);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(12px);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  place-items: center;
  padding: 28px;
  background: rgba(28, 22, 19, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-frame {
  grid-column: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 104px);
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.lightbox figcaption {
  min-height: 24px;
  margin-top: 14px;
  color: rgba(255, 250, 244, 0.78);
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-nav {
  border: 1px solid rgba(255, 250, 244, 0.18);
  color: var(--paper);
  background: rgba(255, 250, 244, 0.08);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 180ms ease, transform 180ms ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 250, 244, 0.18);
  transform: scale(1.04);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-nav {
  width: 52px;
  height: 76px;
  border-radius: 999px;
  font-size: 3rem;
  line-height: 1;
}

.lightbox-nav.previous {
  grid-column: 1;
}

.lightbox-nav.next {
  grid-column: 3;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .gallery-grid {
    column-count: 2;
  }

  .gallery-heading {
    align-items: start;
    flex-direction: column;
  }

  .lightbox {
    grid-template-columns: 54px 1fr 54px;
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .site-hero {
    min-height: 92vh;
  }

  .site-hero::before {
    background:
      linear-gradient(180deg, rgba(52, 42, 37, 0.68), rgba(52, 42, 37, 0.24), rgba(255, 250, 244, 0.1)),
      var(--hero-image, linear-gradient(135deg, #e9d6c8, #fff8ee));
    background-size: cover;
    background-position: center;
  }

  .topbar {
    min-height: 68px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar .download-button {
    display: none;
  }

  .nav-link {
    min-height: 38px;
  }

  .hero-inner {
    padding: 54px 0 86px;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .intro-section {
    padding-top: 26px;
  }

  .gallery-section {
    padding-top: 54px;
  }

  .gallery-grid {
    column-count: 1;
    column-gap: 0;
  }

  .gallery-item {
    margin-bottom: 14px;
  }

  .download-button.secondary {
    width: 100%;
  }

  .thanks-section {
    padding: 64px 0 104px;
  }

  .back-to-top {
    right: 12px;
    bottom: 12px;
    min-height: 40px;
    padding: 0 13px;
    font-size: 0.9rem;
  }

  .lightbox {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    gap: 12px;
    padding: 70px 12px 18px;
  }

  .lightbox-frame {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .lightbox img {
    max-height: calc(100vh - 170px);
  }

  .lightbox-nav {
    grid-row: 2;
    width: 100%;
    height: 48px;
    border-radius: 999px;
    font-size: 2.2rem;
  }

  .lightbox-nav.previous {
    grid-column: 1;
  }

  .lightbox-nav.next {
    grid-column: 2;
  }
}

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