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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════
   NAVBAR
═══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  background: transparent;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}

.navbar.scrolled {
  background: rgba(200, 177, 160, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.nav-logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #2d2218;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d2218;
  text-decoration: none;
  letter-spacing: 0.06em;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 1;
}

/* ═══════════════════════════════════════
   SECTION 1 — HERO
═══════════════════════════════════════ */
.hero {
  background-color: #c8b1a0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 60px 80px;
  position: relative;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 72px;
  max-width: 980px;
  width: 100%;
}

.hero-book img {
  width: 310px;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  transition: transform 0.3s ease;
}

.hero-book img:hover {
  transform: translateY(-6px);
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.13em;
  color: #2d2218;
  line-height: 1.25;
  margin-bottom: 32px;
}

.tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.75rem, 1.6vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #2d2218;
  line-height: 2;
  margin-bottom: 52px;
}

.copyright {
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  color: #6b5040;
  line-height: 1.7;
  font-family: 'Nunito', sans-serif;
}

/* ─── SCROLL INDICATOR ─── */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(45, 34, 24, 0.45);
  animation: bounce 2.2s ease-in-out infinite;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-indicator:hover {
  color: rgba(45, 34, 24, 0.75);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(10px); }
}

/* ═══════════════════════════════════════
   SECTION 2 — DESCRIPTION
═══════════════════════════════════════ */
.about {
  background-color: #efefdb;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 52px 0;
  position: relative;
  overflow: visible;
}

.about > .watermark {
  position: absolute;
  top: 48px;
  left: 52px;
}

.watermark {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.85rem, 1.8vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1.45;
  color: rgba(45, 34, 24, 0.16);
  pointer-events: none;
  user-select: none;
}

.about-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  max-width: 1040px;
  gap: 24px;
}

.about-text {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 600;
  line-height: 2;
  color: #2d2218;
  text-align: center;
  flex: 1;
  padding-bottom: 56px;
}

.char {
  flex-shrink: 0;
  mix-blend-mode: multiply;
  margin-bottom: -40px;
  object-fit: cover;
  object-position: left center;
}

.char-left {
  width: 280px;
  height: 370px;
}

.char-right {
  width: 400px;
  height: 370px;
}

/* ═══════════════════════════════════════
   SECTION 3 — RESOURCES
═══════════════════════════════════════ */
.resources {
  background-color: #c8b1a0;
  min-height: 100vh;
  padding: 52px 52px 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.resources .watermark {
  margin-bottom: 44px;
}

/* ─── TABS ─── */
.tabs {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 52px;
}

.tab {
  background-color: #d8d8b6;
  border: none;
  border-radius: 40px;
  padding: 11px 32px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.15s ease;
  text-align: center;
  line-height: 1.4;
}

.tab:hover {
  background-color: #c8c8a4;
  transform: translateY(-2px);
}

.tab.active {
  background-color: #b0b08a;
}

/* ─── GALLERY ─── */
.gallery {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1100px;
  align-self: center;
}

.gallery.active {
  display: grid;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: zoom-in;
  position: relative;
}

/* ─── DOWNLOAD BUTTON ON CARD ─── */
.download-btn {
  position: absolute;
  bottom: 42px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #c8b1a0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 2;
}

.gallery-item:hover .download-btn {
  opacity: 1;
  transform: translateY(0);
}

.download-btn:hover {
  background: #a8917e;
}

/* Always visible on touch devices */
@media (hover: none) {
  .download-btn {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  background-color: #fff;
  object-fit: cover;
}

.gallery-item:hover img {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

figcaption {
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2d2218;
  text-align: center;
  opacity: 0.7;
  letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  cursor: zoom-out;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.lightbox-actions {
  position: absolute;
  top: -14px;
  right: -14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-download {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  border-radius: 20px;
  background: #c8b1a0;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: background 0.2s;
  white-space: nowrap;
}

.lightbox-download:hover {
  background: #a8917e;
}

.lightbox-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  color: #333;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: #f0f0f0;
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar {
    padding: 14px 24px;
  }

  .nav-logo {
    font-size: 0.72rem;
  }

  .nav-links {
    gap: 20px;
  }

  /* Hero */
  .hero {
    padding: 90px 28px 70px;
  }

  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 36px;
  }

  .hero-book img {
    width: 220px;
  }

  /* About */
  .about {
    padding: 40px 28px 0;
  }

  .about-inner {
    flex-direction: column;
    align-items: center;
  }

  .char-left {
    width: 160px;
    height: 210px;
    margin-bottom: -20px;
  }

  .char-right {
    width: 220px;
    height: 210px;
    margin-bottom: -20px;
  }

  .char-left { order: 1; }
  .about-text { order: 2; padding-bottom: 20px; }
  .char-right { order: 3; }

  /* Resources */
  .resources {
    padding: 40px 24px 60px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }

  .tab {
    font-size: 0.74rem;
    padding: 9px 22px;
  }
}

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

  .tabs {
    gap: 10px;
  }

  .nav-links {
    display: none;
  }
}
