/* ==========================================================================
   Jennifer & Shashank — Wedding Site
   --------------------------------------------------------------------------
   To restyle the whole site, change the values in :root below.
   Everything else references these variables — no hunting through the file.
   ========================================================================== */

:root {
  /* ---- Brand palette --------------------------------------------------- */
  --cream:            #FCFBF7;  /* page background                         */
  --cream-light:      #FBF6EC;  /* text on dark / accent backgrounds       */
  --ink:              #45443D;  /* headings & primary dark text            */
  --body:             #6B6759;  /* paragraph / body copy                   */

  --gold:             #B08D4F;  /* primary accent                          */
  --gold-dark:        #9C7B3E;  /* accent on hover                         */
  --gold-muted:       #A88B57;  /* small uppercase eyebrows on light bg    */
  --gold-line:        #CBB082;  /* thin divider lines                      */

  --sage:             #9AA487;  /* sage captions & scroll hint             */
  --selection:        #E7D6BC;  /* text-selection highlight                */

  /* ---- Section background colors --------------------------------------- */
  --bg-invite:        #F3E8DC;  /* "you're invited" band                   */
  --bg-celebrate:     #8E9C80;  /* sage "save the date" band               */
  --bg-registry:      #EFE5D6;  /* registry band                           */
  --bg-footer:        #45443D;  /* footer                                  */

  /* ---- Accents used only on the sage "celebrate" band ------------------ */
  --on-sage-eyebrow:  #E6CF9C;
  --on-sage-line:     #C8B98E;
  --on-sage-label:    #E0D4B6;

  /* ---- Venue / misc muted tones ---------------------------------------- */
  --muted-caps:       #8C8576;  /* venue location uppercase                */
  --venue-time:       #5C5849;
  --venue-respond:    #9A9382;

  /* ---- Footer tones ---------------------------------------------------- */
  --footer-text:      #E9E3D5;
  --footer-gold:      #D6B574;
  --footer-tagline:   #AFA993;
  --footer-meta:      #8C876F;

  /* ---- Placeholder swatch (remove once real photos are dropped in) ----- */
  --placeholder-bg:   #ECE6DA;
  --placeholder-fg:   #B3A98F;

  /* ---- Typography ------------------------------------------------------ */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'EB Garamond', Georgia, serif;

  /* ---- Shared ---------------------------------------------------------- */
  --nav-height: 78px;
  --photo-mat:  #ffffff;        /* white "matte" border around photos      */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--selection); color: var(--ink); }

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

/* ==========================================================================
   Reusable pieces
   ========================================================================== */

/* Ampersand styling */
.amp { color: var(--gold); }
.amp--italic { font-style: italic; font-weight: 500; }

.italic-gold { font-style: italic; color: var(--gold); }

/* Small uppercase label above headings */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .42em;
  font-size: 13px;
  padding-left: .42em; /* compensates for trailing letter-spacing */
}
.eyebrow--gold    { color: var(--gold); }
.eyebrow--muted   { letter-spacing: .36em; padding-left: .36em; font-size: 12px; color: var(--gold-muted); }
.eyebrow--on-sage { color: var(--on-sage-eyebrow); }

/* Big serif section heading */
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(42px, 6vw, 92px);
  line-height: 1;
  color: var(--ink);
  margin: 0;
}

/* Line · diamond · line divider */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 40px 0;
}
.ornament__line    { width: 84px; height: 1px; background: var(--gold-line); }
.ornament__diamond { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.ornament--on-sage .ornament__line    { width: 70px; background: var(--on-sage-line); }
.ornament--on-sage .ornament__diamond { background: var(--on-sage-eyebrow); }

/* Gold button */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 13px;
  color: var(--cream-light);
  background: var(--gold);
  padding: 18px 48px;
  padding-left: calc(48px + .22em);
  border-radius: 2px;
  text-decoration: none;
  transition: background .4s ease, transform .4s ease;
}
.btn:hover { background: var(--gold-dark); }
.btn--lg {
  letter-spacing: .26em;
  font-size: 14px;
  padding: 20px 56px;
  padding-left: calc(56px + .26em);
  margin-top: 46px;
}
.btn--lg:hover { transform: translateY(-2px); }

/* Photo "frame": white matte + soft shadow.  Wraps a .photo-placeholder
   (or, later, an <img>). */
.photo {
  background: var(--photo-mat);
  padding: 10px;
  border-radius: 3px;
  box-shadow: 0 34px 70px -34px rgba(86, 74, 48, .45);
}

/* Placeholder fill — swap for a real <img> when photos are ready */
.photo-placeholder {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    repeating-linear-gradient(45deg,
      transparent 0 18px,
      rgba(176, 141, 79, .05) 18px 19px),
    var(--placeholder-bg);
  color: var(--placeholder-fg);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-radius: 2px;
}

/* ==========================================================================
   Nav (revealed by JS once past the hero)
   ========================================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 4vw, 52px);
  background: rgba(252, 251, 247, .86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(176, 141, 79, .22);
  transform: translateY(-105%);
  opacity: 0;
  transition: transform .55s var(--ease), opacity .55s ease;
}
.nav__brand {
  font-family: var(--font-display);
  font-size: 23px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .01em;
}
.nav__links { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.nav__link {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12.5px;
  color: var(--body);
  text-decoration: none;
  padding-left: .18em;
  transition: color .3s ease;
}
.nav__link:hover { color: var(--gold); }
.nav__link--cta {
  font-size: 12px;
  color: var(--cream-light);
  background: var(--gold);
  padding: 11px 24px;
  padding-left: calc(24px + .18em);
  border-radius: 2px;
  transition: background .3s ease;
}
.nav__link--cta:hover { color: var(--cream-light); background: var(--gold-dark); }

/* ==========================================================================
   Hero — scroll-driven photo cluster (positions set by js/main.js)
   ========================================================================== */

.hero {
  position: relative;
  height: 280vh;          /* scroll runway for the animation */
  background: var(--cream);
}
.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.hero__photo {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;             /* faded in by JS */
  will-change: transform, opacity;
  background: var(--photo-mat);
  padding: 7px;
  border-radius: 3px;
  box-shadow: 0 26px 60px -28px rgba(86, 74, 48, .55);
}
.hero__photo--ln,
.hero__photo--rn { padding: 8px; box-shadow: 0 30px 70px -30px rgba(86, 74, 48, .6); }
.hero__photo--main {
  z-index: 3;
  padding: 10px;
  box-shadow: 0 40px 90px -34px rgba(86, 74, 48, .62);
}
.hero__photo .photo-placeholder { min-height: 0; }

.hero__names {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 96vw;
  text-align: center;
  pointer-events: none;
  padding: 60px 0;
  background: radial-gradient(ellipse 60% 55% at center,
    rgba(252, 251, 247, .86) 0%,
    rgba(252, 251, 247, .5) 50%,
    rgba(252, 251, 247, 0) 75%);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 9.1vw, 132px);
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
  margin: 0;
}

.hero__hint {
  position: absolute;
  left: 50%; bottom: 38px;
  transform: translateX(-50%);
  z-index: 6;
  text-align: center;
  color: var(--sage);
}
.hero__hint-label {
  text-transform: uppercase;
  letter-spacing: .34em;
  font-size: 11px;
  margin-bottom: 11px;
  padding-left: .34em;
}
.hero__hint-line {
  width: 1px;
  height: 48px;
  margin: 0 auto;
  background: linear-gradient(var(--gold), rgba(176, 141, 79, 0));
}

/* ==========================================================================
   Invite band
   ========================================================================== */

.invite {
  background: var(--bg-invite);
  padding: clamp(120px, 19vh, 220px) 24px;
  text-align: center;
}
.invite__inner { max-width: 980px; margin: 0 auto; }
.invite__inner .eyebrow { display: block; margin-bottom: 30px; }
.invite__heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 5.6vw, 82px);
  line-height: 1.12;
  color: var(--ink);
  margin: 0;
}
.invite .ornament { margin-top: 42px; margin-bottom: 0; }

/* ==========================================================================
   Our Story
   ========================================================================== */

.story {
  background: var(--cream);
  padding: clamp(110px, 16vh, 190px) 24px;
  scroll-margin-top: var(--nav-height);
}
.story__inner { max-width: 1120px; margin: 0 auto; }
.story__header { text-align: center; margin-bottom: clamp(60px, 9vh, 110px); }
.story__header .eyebrow { display: block; margin-bottom: 20px; }

.chapter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 84px);
  align-items: center;
  margin-bottom: clamp(80px, 11vh, 140px);
}
.chapter:last-child { margin-bottom: 0; }
.chapter .photo { height: clamp(360px, 52vh, 540px); }

/* Chapter 2 image sits on the right, text on the left */
.chapter--reverse .photo { order: 2; }
.chapter--reverse .chapter__text { order: 1; }

/* Chapter 2: 2×2 photo grid */
.chapter__photo-grid {
  order: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.chapter__photo-grid .photo {
  height: clamp(200px, 26vh, 300px);
}
.photo--grid-offset {
  margin-top: 32px;
}

.chapter__text .eyebrow { display: block; margin-bottom: 18px; }
.chapter__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 24px;
}
.chapter__body {
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.85;
  color: var(--body);
  margin: 0;
  max-width: 46ch;
}
.chapter__caption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--sage);
  margin-top: 26px;
}
.chapter__text--right { text-align: right; }
.chapter__text--right .chapter__body { margin-left: auto; }

/* ==========================================================================
   Celebrate / Countdown (sage band)
   ========================================================================== */

.celebrate {
  background: var(--bg-celebrate);
  padding: clamp(120px, 19vh, 230px) 24px;
  text-align: center;
  color: var(--cream-light);
  scroll-margin-top: var(--nav-height);
}
.celebrate__inner { max-width: 1000px; margin: 0 auto; }
.celebrate__inner .eyebrow { display: block; margin-bottom: 28px; }
.celebrate__lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.2;
  color: var(--cream-light);
  margin: 0 0 10px;
}
.celebrate__date {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(54px, 9vw, 128px);
  line-height: 1;
  color: var(--cream-light);
}
.celebrate .ornament { margin: 46px 0 4px; }

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(26px, 6vw, 82px);
  margin-top: 54px;
  flex-wrap: wrap;
}
.countdown__unit { min-width: 74px; }
.countdown__value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 5.4vw, 76px);
  line-height: 1;
  color: var(--cream-light);
}
.countdown__label {
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: 12px;
  color: var(--on-sage-label);
  margin-top: 12px;
  padding-left: .3em;
}

/* ==========================================================================
   Venue + RSVP
   ========================================================================== */

.venue {
  background: var(--cream);
  padding: clamp(110px, 16vh, 190px) 24px;
  scroll-margin-top: var(--nav-height);
}
.venue__inner { max-width: 1060px; margin: 0 auto; text-align: center; }
.venue__title { margin-bottom: 50px; }
.venue__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(26px, 3vw, 40px);
  color: var(--ink);
  line-height: 1.3;
}
.venue__location {
  font-size: clamp(16px, 1.4vw, 19px);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-caps);
  margin-top: 14px;
}
.venue__time {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.3vw, 30px);
  color: var(--venue-time);
  line-height: 1.6;
}
.venue__respond {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--venue-respond);
  margin-top: 24px;
}

/* ==========================================================================
   Registry
   ========================================================================== */

.registry {
  background: var(--bg-registry);
  padding: clamp(100px, 15vh, 180px) 24px;
  text-align: center;
  scroll-margin-top: var(--nav-height);
}
.registry__inner { max-width: 760px; margin: 0 auto; }
.registry__inner .eyebrow { display: block; margin-bottom: 22px; }
.registry__inner .section-title { margin-bottom: 28px; }
.registry__body {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.85;
  color: var(--body);
  margin: 0 auto 46px;
  max-width: 48ch;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--bg-footer);
  padding: clamp(90px, 13vh, 150px) 24px;
  text-align: center;
  color: var(--footer-text);
}
.footer__names {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
  color: var(--footer-text);
}
.footer__amp { color: var(--footer-gold); }
.footer__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--footer-tagline);
  margin-top: 22px;
}
.footer__meta {
  text-transform: uppercase;
  letter-spacing: .34em;
  font-size: 12px;
  color: var(--footer-meta);
  margin-top: 34px;
  padding-left: .34em;
}

/* ==========================================================================
   Reveal-on-scroll (toggled by js/main.js)
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.05s var(--ease), transform 1.05s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Responsive — stack the story chapters on narrow screens
   ========================================================================== */

@media (max-width: 760px) {
  .nav__brand { font-size: 19px; }
  .nav__links { gap: 16px; }
  .nav__link:not(.nav__link--cta) { display: none; }

  /* Hero: on phones the fan-out cluster would hang off both edges, so we
     show just the centered engagement photo + names and shorten the runway. */
  .hero { height: 180vh; }
  .hero__photo--lf,
  .hero__photo--rf,
  .hero__photo--ln,
  .hero__photo--rn { display: none; }
  .hero__title { font-size: clamp(26px, 8.4vw, 132px); }

  /* Story chapters stack into a single column */
  .chapter { grid-template-columns: 1fr; gap: 32px; }
  .chapter .photo { height: clamp(300px, 60vw, 460px); }
  .chapter--reverse .photo { order: 0; }
  .chapter--reverse .chapter__text { order: 0; }
  .chapter__photo-grid { order: 0; grid-template-columns: 1fr 1fr; gap: 10px; }
  .chapter__photo-grid .photo { height: clamp(130px, 30vw, 200px); }
  .photo--grid-offset { margin-top: 20px; }
  .chapter__text--right { text-align: left; }
  .chapter__text--right .chapter__body { margin-left: 0; }

  /* Countdown: 2×2 grid keeps the numbers comfortably spaced */
  .countdown { gap: 30px 18px; }
  .countdown__unit { min-width: 40%; }

  /* Ease the generous vertical rhythm so phones aren't endless scrolling */
  .invite,
  .celebrate,
  .registry { padding-left: 22px; padding-right: 22px; }
  .btn--lg { padding: 18px 40px; padding-left: calc(40px + .26em); }
}

/* Very small phones (iPhone SE etc.) — keep the brand from crowding RSVP */
@media (max-width: 360px) {
  .nav { padding: 14px 18px; }
  .nav__brand { font-size: 17px; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
}
