@import url("https://fonts.googleapis.com/css2?family=Dancing+Script&display=swap");
/* ============================================
   DUSTY RELATIVES — A Family History
   Warm vintage genealogy aesthetic
   ============================================ */

@font-face {
  font-family: 'BlackChancery';
  src: url('/fonts/blackchancery.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --wood-dark: #2a1810;
  --wood-mid: #3a2412;
  --wood-light: #5c3a24;
  --brown-warm: #653e1d;
  --brown-accent: #8b5e3c;
  --parchment: #f4e8d1;
  --parchment-light: #f9f1e3;
  --parchment-dark: #e6d5b8;
  --cream: #f5f0e8;
  --cream-light: #faf7f2;
  --cream-dark: #e8dfd3;
  --gold: #c9a84c;
  --gold-light: #d4b96a;
  --navy: #000080;
  --navy-hover: #000069;
  --text-dark: #2c2013;
  --text-mid: #5a4a3a;
  --text-light: #8a7a6a;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.15);
  --shadow-heavy: rgba(0, 0, 0, 0.3);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  color: var(--text-dark);
  background: #ede0c8;
  background-image: none;
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 50px,
      rgba(139, 119, 90, 0.03) 50px,
      rgba(139, 119, 90, 0.03) 51px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 50px,
      rgba(139, 119, 90, 0.02) 50px,
      rgba(139, 119, 90, 0.02) 51px
    );
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   DEDICATION BANNER
   ============================================ */
.dedication-banner {
  background: var(--wood-dark);
  position: relative;
  z-index: 2;
  color: var(--gold-light);
  font-size: 16px;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'BlackChancery', 'Raleway', sans-serif;
  letter-spacing: 0.3px;
  font-style: italic;
}

.dedication-banner p { margin: 0; opacity: 0.9; }

.dedication-links a {
  color: var(--gold);
  transition: color 0.3s;
}

.dedication-links a:hover { color: var(--white); }

@media (max-width: 768px) {
  .dedication-banner {
    flex-direction: column;
    text-align: center;
    gap: 4px;
    font-size: 11px;
    padding: 6px 16px;
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
  background: var(--wood-mid);
  position: relative;
  z-index: 1000;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px var(--shadow-heavy);
}

.nav-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0;
}

.nav-links > li > a {
  display: block;
  padding: 16px 22px;
  color: var(--cream);
  font-family: 'BlackChancery', 'Raleway', sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 1.2px;
  transition: color 0.3s, background 0.3s;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
  color: var(--gold);
  background: rgba(0,0,0,0.15);
}

/* Dropdowns */
.has-dropdown { position: relative; }

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--wood-dark);
  min-width: 300px;
  list-style: none;
  box-shadow: 0 8px 24px var(--shadow-heavy);
  z-index: 100;
  border-top: 2px solid var(--gold);
}

.has-dropdown:hover > .dropdown {
  display: block;
}

.dropdown li a {
  display: block;
  padding: 10px 20px;
  color: var(--cream-dark);
  font-family: 'BlackChancery', 'Raleway', sans-serif;
  font-size: 16px;
  font-weight: 400;
  transition: background 0.2s, color 0.2s, padding-left 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dropdown li a:hover {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  padding-left: 26px;
}

.sub-dropdown {
  position: absolute;
  top: 0;
  left: 100%;
}

/* Enquire button */
.nav-enquire {
  display: inline-block;
  padding: 9px 22px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'BlackChancery', 'Raleway', sans-serif;
  font-size: 15px;
  text-transform: none;
  letter-spacing: 1px;
  transition: all 0.3s;
  white-space: nowrap;
}

.nav-enquire:hover {
  background: var(--gold);
  color: var(--wood-dark);
}

/* Mobile nav */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: transparent;
  transition: all 0.3s;
}

@media (max-width: 1024px) {
  .mobile-toggle { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--wood-dark);
    box-shadow: 0 8px 24px var(--shadow-heavy);
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-links.open { display: flex; }

  .nav-links > li > a {
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .dropdown {
    position: static;
    box-shadow: none;
    border-top: none;
    background: rgba(0,0,0,0.2);
  }

  .sub-dropdown {
    position: static;
    background: rgba(0,0,0,0.15);
  }

  .dropdown li a { padding-left: 40px; }
  .sub-dropdown li a { padding-left: 60px; }

  .has-dropdown:hover > .dropdown { display: none; }
  .has-dropdown.open > .dropdown { display: block; }

  .nav-enquire { display: none; }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  z-index: 2;
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(rgba(42, 24, 16, 0.55), rgba(42, 24, 16, 0.7)),
    url("/uploads/hero-collage.jpg") center/cover no-repeat;
  color: var(--white);
  padding: 60px 24px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("/uploads/hero-collage.jpg") center/cover no-repeat;
  opacity: 0.15;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-family: 'BlackChancery', 'Playfair Display', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: normal;
  margin-bottom: 8px;
  letter-spacing: 2px;
  text-shadow: 2px 3px 8px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-family: 'BlackChancery', 'Playfair Display', Georgia, serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: normal;
  opacity: 0.9;
  margin-bottom: 40px;
  letter-spacing: 1px;
}

.hero-quote {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 32px;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--gold);
  border-right: 3px solid var(--gold);
  backdrop-filter: blur(4px);
}

.hero-quote p {
  font-family: 'BlackChancery', 'Playfair Display', Georgia, serif;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: normal;
  line-height: 1.8;
  color: var(--cream-dark);
}

.hero-quote cite {
  display: block;
  margin-top: 16px;
  font-family: 'BlackChancery', 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-style: normal;
  font-weight: normal;
  color: var(--gold);
}

.hero-quote cite span {
  display: block;
  font-family: 'BlackChancery', 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: normal;
  color: var(--cream-dark);
  margin-top: 2px;
}

/* ============================================
   WELCOME SECTION
   ============================================ */
.welcome-section {
  position: relative;
  z-index: 2;
  padding: 70px 0;
  background: transparent;
  text-align: center;
}

.section-title {
  font-family: 'BlackChancery', 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: normal;
  color: var(--text-dark);
  margin-bottom: 36px;
  letter-spacing: 1px;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--brown-warm);
  margin: 14px auto 0;
}

.welcome-image {
  max-width: 800px;
  margin: 0 auto 36px;
  box-shadow: 0 4px 20px var(--shadow);
  border: none;
}

/* ============================================
   EXPLORE / BLOODLINE CARDS
   ============================================ */
.explore-section {
  position: relative;
  z-index: 2;
  padding: 70px 0;
  background: #ede0c8;
}

.bloodline-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 10px;
}

.bloodline-card {
  display: block;
  background: var(--wood-mid);
  padding: 48px 36px;
  text-align: center;
  border: 1px solid var(--wood-dark);
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.bloodline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px var(--shadow);
}

.card-icon { color: var(--gold); margin-bottom: 20px; }

.bloodline-card h3 {
  font-family: 'BlackChancery', 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: normal;
  color: var(--gold);
  margin-bottom: 12px;
}

.bloodline-card p {
  font-size: 1rem;
  color: var(--cream-dark);
  line-height: 1.6;
}

/* ============================================
   CONTACT BAR
   ============================================ */
.contact-bar {
  background: var(--brown-warm);
  position: relative;
  z-index: 2;
  position: relative;
  z-index: 2;
  padding: 24px 0;
  color: var(--white);
}

.contact-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-bar p {
  font-size: 1rem;
  font-family: 'BlackChancery', 'Raleway', sans-serif;
  font-weight: 400;
}

.contact-bar a:not(.btn) {
  color: var(--white);
  border-bottom: 1px dashed rgba(255,255,255,0.6);
  transition: border-color 0.3s;
}

.contact-bar a:not(.btn):hover { border-bottom-color: var(--white); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 13px 36px;
  font-family: 'BlackChancery', 'Raleway', sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 1.5px;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  transition: all 0.3s;
}

.btn:hover {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
}

.btn-dark {
  background: var(--navy);
  border-color: var(--navy);
}

.btn-dark:hover {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--brown-warm);
  color: var(--brown-warm);
}

.btn-outline:hover {
  background: var(--brown-warm);
  color: var(--white);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--wood-dark);
  position: relative;
  z-index: 2;
  position: relative;
  z-index: 2;
  color: var(--cream-dark);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr;
  gap: 48px;
}

.footer-col h4 {
  font-family: 'BlackChancery', 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: normal;
  color: var(--cream);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.footer-quote {
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
  opacity: 0.8;
}

.footer-cite {
  font-size: 1.05rem;
  margin-top: 12px;
  color: var(--gold);
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 8px; }

.footer-links a {
  font-family: 'BlackChancery', 'Raleway', sans-serif;
  font-size: 1.1rem;
  color: var(--cream-dark);
  transition: color 0.3s, padding-left 0.3s;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--gold);
  padding-left: 6px;
}

.footer-bottom {
  margin-top: 48px;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-family: 'BlackChancery', 'Raleway', sans-serif;
  font-size: 1rem;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-bar-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}

.lightbox.active { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: default;
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 36px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  z-index: 10;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--white);
  font-size: 28px;
  padding: 16px 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s, background 0.3s;
  z-index: 10;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
  background: rgba(255,255,255,0.2);
}

/* ============================================
   PAGE TEMPLATE
   ============================================ */
.page-header {
  z-index: 2;
  position: relative;
  background:
    linear-gradient(rgba(42, 24, 16, 0.7), rgba(42, 24, 16, 0.8)),
    url("/uploads/hero-collage.jpg") center/cover no-repeat;
  padding: 80px 24px;
  text-align: center;
  color: var(--white);
}

.page-header h1 {
  font-family: 'BlackChancery', 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: normal;
  letter-spacing: 1px;
}

.page-header .breadcrumb {
  margin-top: 12px;
  font-family: 'BlackChancery', 'Raleway', sans-serif;
  font-size: 1.05rem;
  color: var(--cream-dark);
  opacity: 0.7;
}

.page-header .breadcrumb a {
  color: var(--gold);
  transition: color 0.3s;
}

.page-header .breadcrumb a:hover { color: var(--white); }

.page-content {
  position: relative;
  z-index: 2;
  padding: 60px 0;
  background: transparent;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.gallery-heading {
  font-family: 'BlackChancery', 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: normal;
  color: var(--wood-mid);
  text-align: center;
  margin-top: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--parchment-dark);
}

.gallery-item {
  cursor: zoom-in;
  border: none;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.gallery-item:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 24px var(--shadow);
}

.gallery-item img { width: 100%; display: block; }

/* Coming soon placeholder */
.coming-soon {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-mid);
  font-style: italic;
  font-size: 1.2rem;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-section {
  position: relative;
  z-index: 2;
  padding: 60px 0;
  background: transparent;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-info h3 {
  font-family: 'BlackChancery', 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.contact-info p { margin-bottom: 12px; }

.contact-info a {
  color: var(--navy);
  border-bottom: 1px solid var(--navy);
}

.contact-form label {
  display: block;
  font-family: 'BlackChancery', 'Raleway', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  color: var(--text-mid);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--wood-dark);
  background: var(--white);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brown-warm);
}

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

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* Hero smooth crossfade */
.hero::after {
  z-index: 0;
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(42, 24, 16, 0.55), rgba(42, 24, 16, 0.7)),
    url('/uploads/hero-family.jpg') center/cover no-repeat;
  animation: heroFade 12s ease-in-out infinite;
  z-index: 0;
}

.hero-content {
  z-index: 1;
}

@keyframes heroFade {
  0%, 40% { opacity: 0; }
  50%, 90% { opacity: 1; }
  100% { opacity: 0; }
}

/* Parchment script background */



/* Parchment script overlay */
.parchment-script {
  
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  font-family: 'Dancing Script', cursive;
  font-size: 22px;
  line-height: 2.4;
  color: rgba(120, 85, 50, 0.08);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  pointer-events: none;
  word-spacing: 4px;
  padding: 60px;
  z-index: -1;
}

/* Page counter in lightbox */
.page-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-family: 'BlackChancery', 'Raleway', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 2px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 20px;
}






/* Mobile fix - ensure all sections cover parchment script */
@media (max-width: 1024px) {
  .hero,
  .welcome-section,
  .explore-section,
  .page-content,
  .contact-section,
  .contact-bar,
  .site-footer,
  .dedication-banner,
  .main-nav,
  .page-header {
    position: relative;
    z-index: 2;
  }

  .bloodline-card {
    background: var(--wood-mid) !important;
  }

  .parchment-script {
    z-index: -1;
  }
}

/* Hide parchment script on mobile/tablet */
@media (max-width: 1024px) {
  .parchment-script {
    display: none !important;
  }
}
