:root {
  --paper: #efe4cd;
  --paper-2: #e8dcc5;
  --ink: #2e2118;
  --line: #cdb89b;
}

/* DARK MODE COLORS */
body.dark {
  --paper: #2a2a2a;
  --paper-2: #1f1f1f;
  --ink: #e6e6e6;
  --line: #555;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Lora, serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 20%, #f4ecd9 0%, var(--paper) 46%, #e4d6be 100%);
  transition: background 0.4s ease, color 0.4s ease;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

/* ---------------- HEADER ---------------- */

.site-header {
  position: relative;
  min-height: 470px;
  color: #fff;
  border-bottom: 6px solid rgba(92, 69, 50, 0.24);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("images/hero-header.png");
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.05) brightness(0.86);
  transform: translateY(0);
  transition: transform 0.1s linear;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(22, 14, 10, 0.52), rgba(24, 15, 11, 0.16)),
    radial-gradient(circle at 48% 45%, rgba(238, 160, 88, 0.18), transparent 54%);
}

.header-content {
  position: relative;
  z-index: 1;
  min-height: 470px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.8rem;
}

.logo {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.8rem, 5.8vw, 4.2rem);
  color: #fff;
  text-decoration: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  font-weight: 400;
}

.nav a {
  color: #fff;
  margin-left: 20px;
  text-decoration: none;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-content {
  text-align: center;
  max-width: 460px;
  margin: 90px auto 0;
}

.hero-content h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  opacity: 0;
  animation: heroFade 1.6s ease forwards;
}

@keyframes heroFade {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---------------- SECTIONS ---------------- */

.section {
  padding: 46px 0;
}

.section-paper {
  background: url("https://www.transparenttextures.com/patterns/paper-fibers.png"), var(--paper);
  transition: background 0.4s ease;
}

.section-paper.alt {
  background-color: var(--paper-2);
}

.section-dark {
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
    url("https://images.unsplash.com/photo-1493244040629-496f6d136cc3?auto=format&fit=crop&w=2000&q=80");
  color: #fff;
}

/* ---------------- GALLERY ---------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.card {
  background: #fff;
  border: 1px solid #d2c0a7;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.dark .card {
  background: #333;
  border-color: #555;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.image-open {
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
  cursor: zoom-in;
  background: transparent;
}

.card img {
  width: 100%;
  height: 142px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.card:hover img {
  transform: scale(1.06);
}

.card-body {
  text-align: center;
  padding: 6px;
  font-size: 0.88rem;
}

/* ---------------- ABOUT ---------------- */

.about-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 26px;
  align-items: center;
}

.about-image {
  width: 100%;
  border: 1px solid #d3bea2;
  box-shadow: 0 6px 15px rgba(43, 29, 20, 0.2);
}

/* ---------------- CONTACT ---------------- */

.contact-form {
  display: grid;
  gap: 10px;
}

input,
textarea {
  padding: 10px;
  border: 1px solid #c2a98b;
  font-family: inherit;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
  align-items: start;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}

/* ---------------- LIGHTBOX ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  width: min(1100px, 96vw);
}

#lightboxImage {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
  background: #161616;
}

/* LOADER */
.lightbox-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.lightbox-loader::after {
  content: "";
  width: 42px;
  height: 42px;
  border: 4px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.lightbox-loader.show {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.lightbox-nav.prev {
  left: 10px;
}

.lightbox-nav.next {
  right: 10px;
}

.lightbox-meta {
  color: #f6e8d5;
  margin-top: 0.65rem;
}

.lightbox-meta h3 {
  margin: 0;
}

.lightbox-meta p {
  margin: 0.2rem 0 0;
}

/* ---------------- TITLES ---------------- */

.deco-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
  position: relative;
}

.deco-title::before,
.deco-title::after {
  content: "";
  display: inline-block;
  width: 80px;
  height: 1px;
  background: var(--line);
  vertical-align: middle;
  margin: 0 14px;
}

.deco-title.left::before,
.deco-title.left::after {
  display: none;
}

.deco-title.light {
  color: #f4e8d6;
}

.section-subtitle {
  text-align: center;
  margin: 4px 0 22px;
  color: #6f5a47;
}

.section-subtitle.left {
  text-align: left;
  margin-bottom: 12px;
}

.section-subtitle.light {
  color: #d8c4ac;
}

/* ---------------- FOOTER ---------------- */

.site-footer {
  background: #2f261f;
  color: #f0e3ce;
  padding: 1.2rem 0;
  text-align: center;
  position: relative;
}

.footer-line {
  width: 120px;
  height: 2px;
  background: #d8c4ac;
  margin: 0 auto 10px;
  opacity: 0.6;
}

/* ---------------- BACK TO TOP ---------------- */

#backToTop {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #a63f17;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.25s ease;
  z-index: 999;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  transform: translateY(-4px);
}

/* ---------------- DARK MODE BUTTON ---------------- */

.btn-darkmode {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 12px;
  backdrop-filter: blur(4px);
}

/* ---------------- ANIMATIONS ---------------- */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 900px) {
  .hero-content {
    margin-top: 70px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-wrap,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .deco-title::before,
  .deco-title::after {
    display: none;
  }
}
