/* ==========================================================================
   Ethan & Kie Fialkow — Wedding Site
   Clean static rebuild
   ========================================================================== */

:root {
  --ink:        #4d504a;   /* headings + dark text            */
  --ink-soft:   #6f716b;   /* softer body text                */
  --muted:      #9b9b9b;   /* subtitles / captions            */
  --blush:      #f4f0ed;   /* love story background           */
  --cream:      #fffbf9;   /* contact overlay background      */
  --white:      #ffffff;
  --line:       #d8d3cd;   /* hairline dividers               */
  --accent:     #6ec1e4;   /* contact blue                    */
  --gold:       #a78556;

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans:  "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1240px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, p, blockquote, figure { margin: 0; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 820px; }

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.eyebrow--light { color: #fff; }

.ornament {
  width: 190px;
  margin: 22px auto 0;
  opacity: 0.9;
}
.section--story .ornament,
.section--gallery .ornament { opacity: 0.65; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(24px, 4vw, 56px);
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
}
.site-header__logo { display: block; line-height: 0; }
.logo { height: 46px; width: auto; transition: opacity .35s var(--ease); }
.logo--dark { display: none; }

.btn-contact {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 15px 34px;
  border-radius: 2px;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn-contact:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* Scrolled state */
.site-header.is-scrolled {
  background: rgba(255, 251, 249, 0.94);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  padding-top: 14px;
  padding-bottom: 14px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.site-header.is-scrolled .logo--light { display: none; }
.site-header.is-scrolled .logo--dark  { display: block; }
.site-header.is-scrolled .logo { height: 38px; }
.site-header.is-scrolled .btn-contact { color: var(--ink); border-color: rgba(77, 80, 74, 0.4); }
.site-header.is-scrolled .btn-contact:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero__slideshow { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s var(--ease);
}
.hero__slide.is-active { opacity: 1; animation: kenburns 8s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1.14); } }

.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,25,15,0.35) 0%, rgba(30,25,15,0.18) 40%, rgba(30,25,15,0.42) 100%);
}
.hero__inner { position: relative; z-index: 2; padding: 100px 24px; color: #fff; }
.hero__title {
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 9px;
  font-size: clamp(44px, 8vw, 82px);
  line-height: 1.05;
  margin: 18px 0 0;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}
.hero__subtitle {
  font-style: italic;
  font-size: clamp(18px, 2.4vw, 25px);
  max-width: 640px;
  margin: 26px auto 0;
  color: rgba(255, 255, 255, 0.95);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(70px, 10vw, 130px) 0; }
.section--story { background: var(--blush); text-align: center; }
.section--gallery { background: var(--white); text-align: center; }

.section__title {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: clamp(30px, 5vw, 50px);
  color: var(--ink);
  line-height: 1.1;
}
.section__subtitle {
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 23px);
  color: var(--muted);
  margin: 26px auto 0;
  max-width: 620px;
}

/* ---------- Love story ---------- */
.story { margin-top: 40px; }
.story p {
  font-style: italic;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.75;
  color: var(--ink-soft);
  margin: 0 auto 26px;
  max-width: 720px;
}
.story__signoff {
  font-style: italic;
  color: var(--ink);
  font-size: clamp(20px, 2.2vw, 24px);
  margin-top: 40px !important;
}

/* ---------- Gallery (masonry via columns) ---------- */
.gallery {
  margin-top: 48px;
  column-count: 3;
  column-gap: 18px;
}
.gallery__item {
  margin: 0 0 18px;
  break-inside: avoid;
  overflow: hidden;
  cursor: pointer;
  background: #eee;
}
.gallery__item img {
  width: 100%;
  transition: transform .6s var(--ease), filter .4s var(--ease);
}
.gallery__item:hover img { transform: scale(1.05); filter: brightness(1.03); }

/* ==========================================================================
   Quote
   ========================================================================== */
.section--quote {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: clamp(90px, 14vw, 180px) 24px;
  display: flex;
  justify-content: center;
}
.section--quote::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(38, 34, 24, 0.30);
}
.quote__card {
  position: relative;
  z-index: 2;
  background: rgba(255, 251, 249, 0.90);
  max-width: 760px;
  padding: clamp(40px, 6vw, 70px) clamp(28px, 5vw, 64px);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
}
.quote p {
  font-style: italic;
  font-size: clamp(21px, 2.6vw, 30px);
  line-height: 1.5;
  color: var(--ink);
}
.quote__cite {
  display: block;
  margin-top: 28px;
  font-family: var(--font-sans);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--white);
  text-align: center;
  padding: clamp(56px, 8vw, 90px) 24px;
}
.site-footer__logo { height: 58px; width: auto; margin: 0 auto 26px; }
.site-footer__copy {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--muted);
}

/* ==========================================================================
   Contact modal
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  visibility: hidden; opacity: 0;
  transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.modal.is-open { visibility: visible; opacity: 1; }
.modal__backdrop { position: absolute; inset: 0; background: var(--cream); }
.modal__dialog {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transform: translateY(16px);
  transition: transform .5s var(--ease);
}
.modal.is-open .modal__dialog { transform: translateY(0); }

.modal__close {
  position: absolute; top: 22px; right: 22px;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border: none; border-radius: 4px;
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.modal__close:hover { background: #55b0d8; transform: rotate(90deg); }

.modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(30px, 6vw, 80px);
  max-width: 1100px;
  width: 100%;
  padding: 40px;
}
.modal__side { text-align: center; }
.modal__logo { max-width: 440px; width: 100%; margin: 0 auto; }
.modal__heading {
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.08;
  letter-spacing: 1px;
  color: var(--accent);
}
.btn-email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  background: #fff;
  padding: 20px 36px;
  border-radius: 40px;
  margin: 40px 0 0;
  box-shadow: 0 18px 40px rgba(110, 193, 228, 0.25);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.btn-email:hover { transform: translateY(-2px); background: var(--accent); color: #fff; box-shadow: 0 22px 48px rgba(110, 193, 228, 0.4); }
.btn-email__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.btn-email:hover .btn-email__icon { background: #fff; color: var(--accent); }
.modal__copy {
  margin-top: 40px;
  font-size: 20px;
  font-style: italic;
  color: var(--ink-soft);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(20, 18, 14, 0.92);
  display: flex; align-items: center; justify-content: center;
  visibility: hidden; opacity: 0;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.lightbox.is-open { visibility: visible; opacity: 1; }
.lightbox__img {
  max-width: 88vw; max-height: 86vh;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  transform: scale(0.97);
  transition: transform .35s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute; top: 24px; right: 28px;
  background: none; border: none; color: #fff; opacity: .85;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.lightbox__close:hover { opacity: 1; transform: rotate(90deg); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; opacity: .7;
  padding: 20px;
  transition: opacity .3s var(--ease);
}
.lightbox__nav:hover { opacity: 1; }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
/* Elements are only hidden when JS is active (graceful degradation) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .gallery { column-count: 2; }
  .modal__grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .modal__logo { max-width: 320px; }
  .section--quote { background-attachment: scroll; }
}
@media (max-width: 560px) {
  .gallery { column-count: 1; }
  .site-header { padding: 16px 20px; }
  .logo { height: 38px; }
  .btn-contact { padding: 12px 22px; letter-spacing: 3px; font-size: 12px; }
  .ornament { width: 150px; }
  .modal__grid { padding: 24px; }
  .modal__side { display: none; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__slide.is-active { animation: none; }
}
