/* =========================================================
   Wedding Website — Elegant & Classic
   Palette: warm browns, olive green, bronze/copper
   Works on mobile + desktop (responsive, mobile-first)
   ========================================================= */

:root {
  --brown-dark: #3f3228;     /* deep espresso for text          */
  --brown:      #5b4636;     /* primary brown                   */
  --olive:      #6b7045;     /* olive green accent              */
  --olive-soft: #8a8f63;     /* lighter olive                   */
  --bronze:     #a97142;     /* bronze / copper accent          */
  --bronze-lt:  #c89b6a;     /* light bronze for hovers         */
  --ivory:      #f7f3ec;     /* page background                 */
  --cream:      #efe7da;     /* card / section background       */
  --white:      #fffdf9;
  --shadow:     0 6px 24px rgba(63, 50, 40, 0.12);
  --serif: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Mulish", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1100px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;            /* clip any stray horizontal overflow (doesn't break the sticky header) */
  overscroll-behavior-x: none; /* stop the sideways two-finger swipe / rubber-band that showed the white edge */
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--brown-dark);
  background: var(--ivory);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--brown);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.7rem); }

p { margin: 0 0 1.1em; }

a { color: var(--bronze); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--olive); }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.section { padding: 70px 0; }
.section--cream { background: var(--cream); }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--olive);
  margin-bottom: 0.6em;
}

.center { text-align: center; }

.divider {
  width: 60px;
  height: 2px;
  background: var(--bronze);
  border: none;
  margin: 1.4em auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 14px 34px;
  border-radius: 2px;
  border: 1.5px solid var(--bronze);
  background: var(--bronze);
  color: var(--white);
  cursor: pointer;
  transition: all .25s ease;
}
.btn:hover { background: var(--brown); border-color: var(--brown); color: var(--white); }

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

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 243, 236, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(169, 113, 66, 0.25);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 22px;
}

.nav__brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--brown);
  letter-spacing: 0.04em;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--brown);
  margin: 5px 0;
  transition: all .3s ease;
}

.nav__links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brown-dark);
}
.nav__links a:hover,
.nav__links a.active { color: var(--bronze); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  background:
    linear-gradient(rgba(63,50,40,0.45), rgba(63,50,40,0.5)),
    url('../images/hero.jpg') center / cover no-repeat;
  /* Replace the brown above with: url('../images/hero.jpg') once a photo is added */
}
.hero__inner { padding: 30px 20px; }
.hero h1 { color: var(--white); margin-bottom: 0.2em; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero__amp { color: var(--bronze-lt); font-style: italic; }
.hero__date {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.95rem;
  margin-top: 0.6em;
  color: var(--white);
}
.hero__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  margin-top: 0.4em;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 2em;
}
.countdown__box { min-width: 70px; }
.countdown__num {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--white);
  line-height: 1;
}
.countdown__label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--bronze-lt);
  margin-top: 6px;
}

/* ---------- Cards / grid ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.card {
  background: var(--white);
  border: 1px solid rgba(169,113,66,0.2);
  border-radius: 4px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.card h3 { color: var(--olive); }

/* ---------- Story layout ---------- */
.story-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 60px;
}
.story-block:nth-child(even) .story-block__img { order: 2; }
.story-block__img {
  background: var(--cream);
  border: 1px solid rgba(169,113,66,0.25);
  border-radius: 4px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--olive-soft);
  font-style: italic;
  overflow: hidden;
}
.story-block__img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Photo gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 36px;
}
.gallery figure {
  margin: 0;
  aspect-ratio: 1 / 1;
  background: var(--cream);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--olive-soft);
  font-size: 0.8rem;
  font-style: italic;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Info / detail list ---------- */
.detail-list { list-style: none; padding: 0; margin: 0; }
.detail-list li {
  padding: 18px 0;
  border-bottom: 1px solid rgba(169,113,66,0.2);
}
.detail-list strong { color: var(--olive); }

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--white);
  border: 1px solid rgba(169,113,66,0.2);
  border-radius: 4px;
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 20px 24px;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--brown);
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 24px;
  color: var(--bronze);
  font-size: 1.4rem;
}
.faq-item[open] summary::after { content: "\2013"; }
.faq-item__body { padding: 0 24px 22px; }

/* ---------- Embed (form/map) ---------- */
.embed-frame {
  width: 100%;
  min-height: 760px;
  border: 1px solid rgba(169,113,66,0.3);
  border-radius: 4px;
  background: var(--cream);
}
.placeholder-box {
  background: var(--cream);
  border: 2px dashed var(--bronze-lt);
  border-radius: 6px;
  padding: 48px 28px;
  text-align: center;
  color: var(--brown);
}
.placeholder-box code {
  background: var(--white);
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--bronze);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brown);
  color: var(--cream);
  text-align: center;
  padding: 48px 22px;
}
.site-footer h3 { color: var(--white); }
.site-footer a { color: var(--bronze-lt); }
.site-footer .amp { color: var(--bronze-lt); font-style: italic; }
.site-footer__small {
  margin-top: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

/* ---------- Page banner (interior pages) ---------- */
.page-banner {
  background:
    linear-gradient(rgba(63,50,40,0.5), rgba(63,50,40,0.5)),
    url('../images/banner.jpg') center / cover no-repeat;
  /* Swap --olive for url('../images/banner.jpg') to use a photo */
  color: var(--white);
  text-align: center;
  padding: 90px 22px;
}
.page-banner h1 { color: var(--white); }
.page-banner p { margin: 0; font-style: italic; font-family: var(--serif); font-size: 1.1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid rgba(169,113,66,0.25);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .nav__links.open { max-height: 460px; }
  .nav__links li { width: 100%; text-align: center; }
  .nav__links a { display: block; padding: 16px; border-top: 1px solid rgba(169,113,66,0.15); }

  .story-block { grid-template-columns: 1fr; gap: 24px; }
  .story-block:nth-child(even) .story-block__img { order: 0; }

  .section { padding: 50px 0; }
  .countdown { gap: 16px; }
}

/* =========================================================
   ANIMATIONS  (self-hosted, no dependencies)
   - Scroll-reveal fades/slide-ups via [data-reveal] + .is-in
   - Hero entrance on load
   - Subtle hover motion
   Progressive enhancement: if JS is off, .no-js fallback keeps
   everything visible (see <html class="no-js"> swap in main.js).
   ========================================================= */

/* Elements start hidden ONLY when JS is running and will reveal them. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Reveal variants */
.js [data-reveal="left"]  { transform: translateX(-32px); }
.js [data-reveal="right"] { transform: translateX(32px); }
.js [data-reveal="zoom"]  { transform: scale(.94); }
.js [data-reveal="fade"]  { transform: none; }
.js [data-reveal].is-in   { transform: none; }

/* Stagger: children of a [data-reveal-group] cascade in */
.js [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.js [data-reveal-group].is-in > * {
  opacity: 1;
  transform: none;
}
.js [data-reveal-group].is-in > *:nth-child(1) { transition-delay: .00s; }
.js [data-reveal-group].is-in > *:nth-child(2) { transition-delay: .10s; }
.js [data-reveal-group].is-in > *:nth-child(3) { transition-delay: .20s; }
.js [data-reveal-group].is-in > *:nth-child(4) { transition-delay: .30s; }
.js [data-reveal-group].is-in > *:nth-child(5) { transition-delay: .40s; }
.js [data-reveal-group].is-in > *:nth-child(6) { transition-delay: .50s; }
.js [data-reveal-group].is-in > *:nth-child(n+7) { transition-delay: .55s; }

/* ---------- Hero entrance ---------- */
@keyframes heroUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.js .hero__inner > * {
  opacity: 0;
  animation: heroUp .9s cubic-bezier(.2, .7, .2, 1) forwards;
}
.js .hero__inner > *:nth-child(1) { animation-delay: .15s; }
.js .hero__inner > *:nth-child(2) { animation-delay: .35s; }
.js .hero__inner > *:nth-child(3) { animation-delay: .55s; }
.js .hero__inner > *:nth-child(4) { animation-delay: .75s; }
.js .hero__inner > *:nth-child(5) { animation-delay: .95s; }

/* Slow ambient zoom on the hero photo for a touch of life */
@keyframes heroKenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
.hero { overflow: hidden; }
.js .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  z-index: -1;
  animation: heroKenBurns 18s ease-out forwards;
}

/* ---------- Subtle hover motion ---------- */
.card,
.faq-item,
.gallery figure,
.story-block__img {
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 34px rgba(63, 50, 40, 0.18);
}
.gallery figure:hover { transform: scale(1.03); }
.gallery img { transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.06); }
.story-block__img:hover { transform: translateY(-4px); }
.btn { transition: transform .25s ease, background .25s ease, border-color .25s ease, color .25s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Divider draws in when revealed */
.js .divider[data-reveal] { transition: opacity .8s ease, transform .8s ease, width .9s ease; width: 0; }
.js .divider[data-reveal].is-in { width: 60px; }

/* ---------- Accessibility: respect reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js [data-reveal-group] > *,
  .js .hero__inner > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .js .hero::before { animation: none !important; }
  .card:hover,
  .gallery figure:hover,
  .gallery figure:hover img,
  .story-block__img:hover,
  .btn:hover { transform: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   PHOTO LIGHTBOX  (gallery pop-up viewer)
   Built dynamically by main.js; only appears when opened.
   ========================================================= */
.gallery img { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(63, 50, 40, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  transform: scale(.96);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.lightbox.open img { transform: scale(1); }

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  color: var(--white);
  background: rgba(0, 0, 0, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.lightbox__close:hover {
  background: var(--bronze);
  border-color: var(--bronze);
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox img,
  .lightbox__close { transition: none !important; }
  .lightbox img { transform: none !important; }
  .lightbox__close:hover { transform: none !important; }
}
