/* =========================================================
   Durga & Aravinth — Wedding Invitation
   Inspired by elegant, minimal serif-led wedding sites
   ========================================================= */

:root {
  --cream: #f4ede4;
  --cream-2: #efe6d9;
  --ink: #1f1d1a;
  --ink-soft: #4a463f;
  /* Single primary dark green used across the entire site.
     Sampled directly from the line-art icons (icon-suit.png /
     icon-bouquet.png background) so the icons sit flush in the
     cards with no visible seam, and all green sections flow as
     one continuous color when scrolling. */
  --green-deep: #2f3c2a;
  --green: #2f3c2a;
  --gold: #b08a4a;
  --line: rgba(31, 29, 26, 0.14);

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --serif-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Reveal animations ----------
   Two flavors, both opacity + transform:
   .reveal          → scroll-triggered via IntersectionObserver
   .hero-load       → triggers on page load (above-the-fold)

   Modifiers:
   .reveal--scale   → also scales 0.96 → 1
   .reveal--down    → slides from above instead of below
   .hero-load--rise → larger 60px rise (used for the photo strip)
   .hero-load--scale→ pop-in scale (used for the ampersand)

   Easing matches Framer Motion's default: cubic-bezier(.22,.61,.36,1)
*/

.reveal,
.hero-load {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition:
    opacity 1.1s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

.reveal--down { transform: translate3d(0, -40px, 0); }

.reveal--scale {
  transform: translate3d(0, 40px, 0) scale(0.96);
}

.hero-load--rise { transform: translate3d(0, 64px, 0); }

.hero-load--scale {
  transform: translate3d(0, 0, 0) scale(0.8);
  transition:
    opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1.1s cubic-bezier(0.34, 1.56, 0.64, 1); /* gentle overshoot */
}

.reveal.is-visible,
.hero-load.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* ---------- Shared typography ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 28px;
  font-weight: 400;
}
.eyebrow.light { color: rgba(255, 255, 255, 0.7); }

.section-title {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 84px);
  margin: 0 0 64px;
  text-align: center;
  letter-spacing: 0.01em;
}
.section-title em { font-style: italic; }

/* ============== NAV ============== */
.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px clamp(24px, 5vw, 64px);
  z-index: 5;
}
.monogram {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 26px;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.monogram span { font-size: 0.85em; margin: 0 2px; opacity: 0.85; }

.rsvp-link {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s ease;
}
.rsvp-link:hover { border-color: var(--ink); }

/* ============== HERO ============== */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--cream);
  padding: 140px clamp(20px, 5vw, 64px) 80px;
}
.hero-inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.couple {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(64px, 13vw, 156px);
  line-height: 1;
  margin: 0 0 36px;
  letter-spacing: 0;
  color: var(--green-deep);
}
.couple .name,
.couple .amp {
  display: block;
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  color: var(--green-deep);
}
.couple .amp {
  /* Slightly smaller and a touch softer than the names */
  font-size: 0.78em;
  margin: 0.02em 0;
  opacity: 0.95;
}

.hero-date {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 64px;
  font-weight: 400;
}

.hero-strip {
  margin: 0 auto 64px;
  max-width: 1100px;
  height: clamp(240px, 38vw, 420px);
  overflow: hidden;
  border-radius: 2px;
  position: relative;
}
.hero-strip img {
  width: 100%;
  height: 115%;     /* extra height to allow parallax translation */
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(0.98);
  will-change: transform;
}

/* ============== FAMILY ==============
   Traditional Tamil invitation block: the bride's family formally
   extends their invitation.  Names use the same italic Playfair
   Display as the hero couple text so the typography reads as one
   family of voices; titles use a small uppercase sans-serif so the
   hierarchy of name vs. role is unmistakable. */
.family {
  background: var(--green-deep);
  color: #f1ece3;
  padding: clamp(80px, 12vw, 140px) clamp(20px, 5vw, 64px);
  text-align: center;
}

.family-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 54px);
}

.family__eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(241, 236, 227, 0.65);
  margin: 0;
  font-weight: 400;
}

.family__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1vw, 14px);
}

.family__name {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  margin: 0;
  color: #f4ede4;
  letter-spacing: 0.005em;
}
.family__name--small {
  font-size: clamp(22px, 2.6vw, 30px);
}

.family__title {
  font-family: var(--sans);
  font-size: clamp(11px, 0.95vw, 13px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 4px 0 0;
  color: rgba(241, 236, 227, 0.7);
  font-weight: 400;
  max-width: 48ch;
  line-height: 1.5;
}

/* When a parent has multiple credential lines, group them together
   so the rotary creds read as a tight stack under the main title,
   rather than being spaced the same as the gap to the next person. */
.family__credentials {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.family__credentials .family__title { margin-top: 0; }

.family__amp {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 3vw, 36px);
  color: rgba(241, 236, 227, 0.55);
  margin: clamp(6px, 1vw, 14px) 0;
  line-height: 1;
}

.family__connector {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(15px, 1.3vw, 17px);
  color: rgba(241, 236, 227, 0.68);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

.family__solicit {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(19px, 1.9vw, 24px);
  line-height: 1.6;
  color: rgba(241, 236, 227, 0.94);
  margin: 0;
  letter-spacing: 0.005em;
}

/* ============== ANNOUNCEMENT (a note from the couple) ==============
   Structurally parallels the family section above it: small uppercase
   eyebrow names the perspective ("A note from"), then a signature
   block names the speakers, then the three italic stanzas read as
   the actual note.

   COLOUR FLIP: while the surrounding Family/Events sections live on
   the dark green, this section flips to the cream background so the
   page reads as alternating dark ↔ light "voices" — the parents'
   formal invitation on dark green, the couple's warmer letter on
   cream.  A thin hairline at the top echoes the divider above the
   Events title for visual rhythm. */
.announcement {
  background: var(--cream);
  color: var(--ink-soft);
  padding: clamp(100px, 14vw, 160px) clamp(20px, 5vw, 64px);
  text-align: center;
}
.announcement-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 3.2vw, 44px);
}

.announcement__rule {
  display: block;
  width: clamp(56px, 6vw, 88px);
  height: 1px;
  margin: 0 auto clamp(28px, 3.5vw, 48px);
  background: rgba(31, 29, 26, 0.25);
}

.announcement__eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.75;
  margin: 0;
  font-weight: 400;
}

.announcement__signature {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.1;
  margin: 0 0 clamp(8px, 1.4vw, 18px);
  color: var(--green-deep);
  letter-spacing: 0.005em;
}
.announcement__line {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.55;
  margin: 0;
  color: var(--ink-soft);
  letter-spacing: 0.005em;
}
.announcement__line sup { font-size: 0.6em; vertical-align: super; }

/* Drop the manual line breaks on small viewports so the text reflows naturally */
@media (max-width: 640px) {
  .announcement__line br { display: none; }
}

/* ============== EVENTS INTRO ============== */
/* Same background as the announcement above and the event-feature
   sections below — the dark green still flows continuously.  But a
   thin centred hairline above the title gives the section a clear
   "chapter break" feel so it doesn't read as part of the
   announcement container above it. */
.events-intro {
  background: var(--green-deep);
  color: #f4ede4;
  padding: clamp(90px, 12vw, 140px) 24px clamp(70px, 9vw, 110px);
  text-align: center;
}
.events-intro__rule {
  display: block;
  width: clamp(56px, 6vw, 88px);
  height: 1px;
  margin: 0 auto clamp(36px, 4vw, 56px);
  background: rgba(244, 237, 228, 0.38);
  /* play nicely with the .reveal transform/opacity transition */
  transform-origin: center;
}
.events-intro .section-title {
  color: #f4ede4;
  margin: 0;
}

/* ============== EVENT FEATURE (full-bleed bg + centered card) ============== */
.event-feature {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 60px);
  overflow: hidden;
  background: var(--green-deep);
  isolation: isolate; /* keep box-shadow under the card from bleeding */
}

.event-feature__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.event-feature__bg img {
  width: 100%;
  height: 118%;  /* extra height to allow parallax translateY */
  object-fit: cover;
  object-position: center;
  filter: saturate(0.95) contrast(1.02);
  will-change: transform;
}
/* Soft darkening so the card always reads clearly */
.event-feature__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.15) 0%,
      rgba(0, 0, 0, 0.35) 65%,
      rgba(0, 0, 0, 0.5) 100%
    );
  pointer-events: none;
}

.event-feature__card {
  position: relative;
  z-index: 1;
  background: var(--green-deep); /* matches icon background exactly */
  color: #f1ece3;
  width: min(500px, 100%);
  padding: clamp(40px, 5vw, 60px) clamp(28px, 4vw, 52px);
  text-align: center;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.event-feature__date {
  font-family: var(--serif-display);
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 400;
  margin: 0;
  color: #f1ece3;
  letter-spacing: 0.005em;
  white-space: nowrap; /* keep the date on a single line */
}
.event-feature__date em { font-style: italic; }
.event-feature__date sup { font-size: 0.6em; vertical-align: super; }

.event-feature__rule {
  height: 1px;
  background: rgba(241, 236, 227, 0.32);
  margin: 18px auto 30px;
  width: 78%;
}

.event-feature__icon {
  display: flex;
  justify-content: center;
  margin: 0 auto 22px;
  color: rgba(241, 236, 227, 0.85);
}
.event-feature__icon svg { display: block; }
.event-feature__icon img {
  display: block;
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.event-feature__name {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: 0.005em;
  margin: 0 0 20px;
  color: #f4ede4;
}

.event-feature__desc {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  color: rgba(241, 236, 227, 0.82);
  margin: 0 auto;
  max-width: 34ch;
  font-weight: 300;
}

/* Generic parallax: just translateY based on --ty (set by JS).
   Used by hero strip img, banner img, event-feature bg img. */
[data-parallax] {
  transform: translate3d(0, var(--ty, 0), 0);
}

/* ============== VENUE ============== */
.venue {
  background: var(--green-deep);
  color: #f1ece3;
  padding: clamp(80px, 12vw, 140px) clamp(20px, 5vw, 64px);
}
.venue-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.venue-title {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(56px, 8vw, 96px);
  margin: 0 0 12px;
  color: #f4ede4;
  letter-spacing: 0.01em;
}
.venue-address {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  margin: 0 0 36px;
  color: rgba(244, 237, 228, 0.85);
  letter-spacing: 0.04em;
}
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #f4ede4;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid rgba(244, 237, 228, 0.5);
  border-radius: 999px;
  margin-bottom: 56px;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.map-link:hover {
  background: #f4ede4;
  color: var(--green-deep);
  border-color: #f4ede4;
}

.map-frame {
  height: clamp(280px, 42vw, 460px);
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.map-frame iframe { display: block; filter: grayscale(0.1); }

/* ============== FOOTER ============== */
.footer {
  background: var(--cream);
  text-align: center;
  padding: 80px 24px 64px;
  color: var(--ink-soft);
}
.foot-mono {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 34px;
  margin: 0 0 14px;
  color: var(--ink);
  letter-spacing: 0.08em;
}
.foot-mono span { color: var(--ink-soft); margin: 0 4px; }
.foot-text {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 0;
}

/* ============== RESPONSIVE ============== */

/* Tablet & narrower laptops */
@media (max-width: 900px) {
  .hero { padding-top: 120px; }
  .event-feature { min-height: 80vh; }
  .map-frame { height: clamp(260px, 50vw, 380px); }
}

/* Phones */
@media (max-width: 640px) {
  .nav { padding: 20px 22px; }

  .hero {
    padding: 100px 22px 60px;
  }
  .hero-strip { margin-bottom: 0; }

  .couple {
    /* keep names large but rein in the line-height on mobile */
    line-height: 1.04;
    margin-bottom: 24px;
  }
  .hero-date { letter-spacing: 0.25em; }

  .announcement { padding: 64px 22px; }
  .announcement-inner { gap: 24px; }
  .announcement__line br { display: none; }

  .family { padding: 64px 22px; }
  .family-inner { gap: 36px; }
  .family__solicit br { display: none; }

  .events-intro {
    padding: 64px 22px 60px;
  }

  .event-feature {
    min-height: 78vh;
    padding: 60px 18px;
  }
  .event-feature__card {
    padding: 38px 28px;
  }
  .event-feature__icon img {
    width: 72px;
    height: 72px;
  }

  .venue {
    padding: 80px 22px;
  }
  .venue-title { font-size: clamp(48px, 12vw, 72px); }
  .map-link { padding: 12px 22px; }
  .map-frame { height: clamp(240px, 60vw, 340px); }

  .footer { padding: 56px 22px 48px; }
}

/* Small phones: allow the event date to wrap so it never overflows
   when the screen is narrow or the user has bumped up text size. */
@media (max-width: 420px) {
  .event-feature__date { white-space: normal; }
  .couple {
    /* Pull the min size down a hair so even "Aravinth" comfortably fits */
    font-size: clamp(54px, 16vw, 110px);
  }
  .hero-date { letter-spacing: 0.22em; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-load { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
