/* ============================================================
   Apoorva & Sridutt — Wedding Site
   Warm gold & cream palette
   ============================================================ */

/* --- Reset & base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  background: #faf8f5;
  color: #2d1f0e;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Custom properties ------------------------------------ */
:root {
  --cream:    #faf8f5;
  --cream-2:  #f2ede4;
  --gold:     #c9a96e;
  --gold-dk:  #9a7040;
  --gold-lt:  #e8d5b0;
  --text:     #2d1f0e;
  --text-md:  #5c4030;
  --text-lt:  #9a8070;
  --dark:     #1a1008;
  --veil:     rgba(10, 5, 2, 0.44);
  --pad-x:    clamp(24px, 5vw, 80px);
}

/* --- Shared layout ---------------------------------------- */
.wrap {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* --- Section headings ------------------------------------- */
.sec-head {
  text-align: center;
  margin-bottom: 64px;
}
.sec-head h2 {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  color: var(--text);
  line-height: 1;
  margin-bottom: 14px;
}
.ornament {
  display: block;
  color: var(--gold);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
}

/* ============================================================
   Navigation
   ============================================================ */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad-x);
  transition: background 0.4s ease, padding 0.35s ease, box-shadow 0.4s ease;
}
#nav.solid {
  background: rgba(250, 248, 245, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-block: 14px;
  box-shadow: 0 1px 0 var(--gold-lt);
}
.nav-logo {
  font-family: 'Great Vibes', cursive;
  font-size: 2.1rem;
  color: #fff;
  text-decoration: none;
  line-height: 1;
  transition: color 0.4s;
}
#nav.solid .nav-logo { color: var(--gold-dk); }
#nav ul {
  list-style: none;
  display: flex;
  gap: 44px;
}
#nav ul a {
  font-family: 'Raleway', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.25s;
}
#nav ul a:hover           { color: var(--gold-lt); }
#nav.solid ul a           { color: var(--text-md); }
#nav.solid ul a:hover     { color: var(--gold-dk); }

/* ============================================================
   Hero
   ============================================================ */
#hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* Slideshow */
.hero-slides { position: absolute; inset: 0; }
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
  will-change: opacity;
}
.slide.active { opacity: 1; }

/* Dark veil — gradient so only the bottom is darkened */
.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 5, 2, 0.08) 0%,
    rgba(10, 5, 2, 0.08) 50%,
    rgba(10, 5, 2, 0.65) 100%
  );
}

/* Copy */
.hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding-inline: var(--pad-x);
  padding-bottom: 100px;
  animation: rise 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.2s;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-bottom: 22px;
}
.hero-copy h1 {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: clamp(4.5rem, 11vw, 9rem);
  line-height: 1;
  color: #fff;
  margin-bottom: 30px;
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--gold-lt);
  font-size: 0.68em;
}
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 22px;
}
.rule span:not(.gem) {
  display: block;
  width: 72px;
  height: 1px;
  background: rgba(255, 255, 255, 0.38);
}
.rule .gem {
  color: var(--gold);
  font-size: 0.48rem;
  display: block;
}
.year {
  font-family: 'Raleway', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(255, 255, 255, 0.44);
  border-radius: 13px;
  display: block;
  text-decoration: none;
}
.scroll-hint span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  margin: 8px auto 0;
  animation: drop 2s ease-in-out infinite;
}
@keyframes drop {
  0%, 100% { opacity: 1; transform: translateY(0); }
  70%       { opacity: 0; transform: translateY(16px); }
}

/* ============================================================
   Our Story — Timeline
   ============================================================ */
#story {
  background: var(--cream-2);
  padding-block: 96px;
}

.timeline {
  position: relative;
  max-width: 780px;
  margin-inline: auto;
}
.timeline::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: var(--gold-lt);
  transform: translateX(-50%);
}
.tl-item {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 52px);
  padding-bottom: 52px;
  position: relative;
}
.tl-item.flip {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 52px);
}
.tl-dot {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-size: 0.5rem;
  background: var(--cream-2);
  padding: 6px 2px;
  z-index: 1;
}
.tl-card {
  background: #fff;
  border: 1px solid var(--gold-lt);
  padding: 28px 30px;
  max-width: 320px;
  box-shadow: 0 4px 24px rgba(160, 112, 64, 0.08);
}
.tl-label {
  display: block;
  font-family: 'Raleway', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-dk);
  margin-bottom: 12px;
}
.tl-card p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-md);
  font-style: italic;
}

/* ============================================================
   Gallery
   ============================================================ */
#gallery {
  background: var(--cream);
  padding-block: 96px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 300px 300px 380px;
  gap: 8px;
}
/*
  Layout:
    img1 = col 1, rows 1–2  (tall)
    img2 = col 2, row 1
    img3 = col 3, row 1
    img4 = cols 2–3, row 2  (wide)
    img5 = cols 1–3, row 3  (full-width)
*/
.ph            { position: relative; overflow: hidden; }
.ph-tall       { grid-row: 1 / 3; }
.ph-wide       { grid-column: 2 / 4; }
.ph-full       { grid-column: 1 / 4; }

.ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}
.ph:hover img { transform: scale(1.05); }

.ph figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 5, 2, 0);
  transition: background 0.4s ease;
  pointer-events: none;
}
.ph figcaption span {
  font-size: 2.2rem;
  color: #fff;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ph:hover figcaption             { background: rgba(10, 5, 2, 0.28); }
.ph:hover figcaption span        { opacity: 1; transform: scale(1); }

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 5, 2, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
#lb-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border: 1px solid rgba(201, 169, 110, 0.2);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
#lightbox.open #lb-img { transform: scale(1); }
#lb-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  font-family: sans-serif;
  transition: color 0.2s;
}
#lb-close:hover { color: #fff; }

/* ============================================================
   Details
   ============================================================ */
#details {
  background: var(--cream-2);
  padding-block: 96px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: #fff;
  border: 1px solid var(--gold-lt);
  padding: 48px 28px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(160, 112, 64, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(160, 112, 64, 0.14);
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 20px;
}
.card h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-dk);
  margin-bottom: 16px;
}
.card p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-md);
  font-style: italic;
}
.card-date {
  margin-top: 18px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.62rem !important;
  letter-spacing: 0.22em;
  color: var(--text-lt) !important;
  font-style: normal !important;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  background: var(--dark);
  padding: 60px var(--pad-x);
  text-align: center;
}
.ft-names {
  font-family: 'Great Vibes', cursive;
  font-size: 2.8rem;
  color: var(--gold-lt);
  margin-bottom: 16px;
}
footer .ornament { margin-bottom: 18px; }
.ft-copy {
  font-family: 'Raleway', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .timeline::before { left: 20px; transform: none; }
  .tl-item,
  .tl-item.flip {
    padding: 0 0 44px 56px;
    justify-content: flex-start;
  }
  .tl-dot { left: 20px; transform: translateX(-50%); }
  .tl-card { max-width: 100%; }

  .photo-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 220px 220px;
  }
  .ph-tall { grid-row: 1 / 3; }
  .ph-wide { grid-column: 2 / 3; }
  .ph-full { grid-column: 1 / 3; }

  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  #nav ul { display: none; }

  .photo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 280px;
    grid-auto-rows: 280px;
  }
  .ph-tall, .ph-wide, .ph-full {
    grid-row: auto;
    grid-column: auto;
  }
}
