/* =========================================================================
   Aarav & Meera — Wedding site
   Palette + type tokens. Edit colours here to restyle the whole site.
   ========================================================================= */
:root {
  --bg:        #FAF6EF;  /* warm ivory (page background)      */
  --bg-alt:    #F1E9DC;  /* sand (alternating sections)       */
  --card:      #FFFDF9;  /* near-white card surface           */
  --ink:       #2E2A24;  /* warm charcoal (primary text)      */
  --muted:     #7A7064;  /* taupe (secondary text)            */
  --gold:      #B08D57;  /* antique gold (accent)             */
  --gold-deep: #91713E;  /* deeper gold (text on light)       */
  --line:      #DBD0BF;  /* hairline dividers / borders       */

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --container: 1120px;
  --narrow:    720px;
}

/* ----------------------------- Reset / base ----------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, iframe { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--gold); color: #fff; }

/* ----------------------------- Helpers --------------------------------- */
.container { width: min(var(--container), 90vw); margin-inline: auto; }
.container.narrow { width: min(var(--narrow), 90vw); }
.center { text-align: center; }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold-deep);
}

.section { padding: clamp(70px, 12vh, 130px) 0; }
section[id] { scroll-margin-top: 72px; }

.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  color: var(--ink);
  margin-top: 0.45rem;
}

/* Centered hairline divider with a small gold diamond */
.divider {
  position: relative;
  width: 130px;
  height: 10px;
  margin: 18px auto 34px;
}
.divider::before {
  content: ""; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--line);
}
.divider::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 7px; height: 7px; background: var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ----------------------------- Buttons --------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.74rem;
  font-weight: 400;
  padding: 14px 36px;
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn--primary { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn--primary:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.btn--ghost:hover { background: var(--gold); color: #fff; }
.btn--block { width: 100%; }
.btn:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }

/* ----------------------------- Header / nav ---------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 8px 0;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
.site-header--scrolled {
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(46, 42, 36, 0.08);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav__monogram {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 500; letter-spacing: 0.05em;
  color: var(--ink); text-decoration: none;
}
.nav__amp { color: var(--gold); font-style: italic; margin: 0 1px; }

.nav__links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav__links a {
  font-family: var(--font-body);
  text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.72rem; color: var(--ink); text-decoration: none;
  transition: color 0.25s ease;
}
.nav__links a:hover { color: var(--gold-deep); }
.nav__cta {
  border: 1px solid var(--gold); padding: 9px 20px;
  color: var(--gold-deep) !important;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.nav__cta:hover { background: var(--gold); color: #fff !important; }

.nav__toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; background: none; border: none; cursor: pointer; z-index: 110;
}
.nav__toggle span {
  display: block; width: 24px; height: 1.5px; background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ----------------------------- Hero ------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 110px 0 90px;
  background: radial-gradient(ellipse at 50% 28%, #FFFDF9 0%, var(--bg) 48%, var(--bg-alt) 120%);
}
.hero::before { /* thin inset frame — a timeless touch */
  content: ""; position: absolute; inset: 18px;
  border: 1px solid rgba(176, 141, 87, 0.35); pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero .eyebrow { display: block; margin-bottom: 22px; }
.hero__names {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.2rem, 11vw, 7rem);
  line-height: 1; letter-spacing: 0.01em; color: var(--ink);
}
.hero__names .amp { font-style: italic; font-weight: 400; color: var(--gold); }
.hero__tagline {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem); color: var(--muted); margin-top: 8px;
}
.hero__divider { display: flex; justify-content: center; margin: 24px 0; }
.hero__divider span { width: 72px; height: 1px; background: var(--gold); }
.hero__meta {
  font-family: var(--font-body); text-transform: uppercase;
  letter-spacing: 0.25em; font-size: 0.85rem; color: var(--ink);
}
.hero__place {
  font-family: var(--font-body); text-transform: uppercase;
  letter-spacing: 0.2em; font-size: 0.72rem; color: var(--muted); margin-top: 10px;
}

.countdown { display: flex; justify-content: center; gap: clamp(16px, 4vw, 44px); margin: 42px 0 38px; }
.countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
.countdown__num {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.9rem, 5vw, 2.9rem); line-height: 1; color: var(--ink);
}
.countdown__label {
  font-family: var(--font-body); text-transform: uppercase;
  letter-spacing: 0.2em; font-size: 0.6rem; color: var(--muted); margin-top: 8px;
}

.hero__scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); }
.hero__scroll-line {
  display: block; width: 1px; height: 48px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50%      { opacity: 1;   transform: scaleY(1);   transform-origin: top; }
}

/* ----------------------------- Section backgrounds --------------------- */
.section--story   { background: var(--bg); }
.section--events  { background: var(--bg-alt); }
.section--venue   { background: var(--bg); }
.section--gallery { background: var(--bg-alt); }
.section--rsvp    { background: var(--bg); }

/* ----------------------------- Story ----------------------------------- */
.section--story .lede {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.5;
  color: var(--ink); max-width: 30ch; margin: 0 auto 1.5rem;
}
.section--story p:not(.eyebrow):not(.lede) {
  color: var(--muted); line-height: 1.9; max-width: 56ch; margin: 0 auto;
}

/* ----------------------------- Events ---------------------------------- */
.events__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 52px;
}
.event-card {
  background: var(--card); border: 1px solid var(--line);
  padding: 40px 24px; text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.event-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px -26px rgba(46, 42, 36, 0.45); }
.event-card__date {
  font-family: var(--font-body); text-transform: uppercase;
  letter-spacing: 0.2em; font-size: 0.68rem; color: var(--gold-deep);
}
.event-card__name {
  font-family: var(--font-display); font-weight: 500; font-size: 1.9rem;
  color: var(--ink); margin: 0.5rem 0 0.4rem;
}
.event-card__time { font-family: var(--font-body); font-size: 0.95rem; color: var(--ink); }
.event-card__venue { font-family: var(--font-body); font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.event-card__desc { font-size: 0.9rem; color: var(--muted); line-height: 1.6; margin-top: 16px; }

/* Single reception detail (used in place of the multi-event grid) */
.reception { text-align: center; margin-top: 50px; }
.reception__date {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; color: var(--ink);
}
.reception__time {
  font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.25em;
  font-size: 0.9rem; color: var(--gold-deep); margin-top: 14px;
}
.reception__venue {
  font-family: var(--font-body); letter-spacing: 0.04em; font-size: 1.05rem;
  color: var(--ink); margin-top: 16px;
}
.reception__desc {
  font-family: var(--font-display); font-style: italic; font-size: 1.2rem;
  color: var(--muted); line-height: 1.8; max-width: 44ch; margin: 22px auto 0;
}

/* ----------------------------- Venue ----------------------------------- */
.venue__layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; margin-top: 52px;
}
.venue__name { font-family: var(--font-display); font-weight: 500; font-size: 2.1rem; color: var(--ink); }
.venue__address { color: var(--ink); line-height: 1.8; margin: 14px 0; }
.venue__notes { color: var(--muted); line-height: 1.8; max-width: 46ch; margin-bottom: 28px; }
.venue__map {
  aspect-ratio: 4 / 3; border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 24px 50px -30px rgba(46, 42, 36, 0.5);
}
.venue__map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.25) sepia(0.06); }

/* Venue exterior photo — framed banner above the info + map row */
.venue__photo {
  margin: 0;
  border: 1px solid var(--line);
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 24px 50px -30px rgba(46, 42, 36, 0.5);
}
.venue__photo img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.97) sepia(0.04);
}

/* ----------------------------- Gallery --------------------------------- */
/* Masonry photo gallery — mixed portrait/landscape, no forced crops */
.gallery__masonry { columns: 3; column-gap: 16px; margin-top: 52px; }
.gallery__masonry .g-item {
  break-inside: avoid; margin: 0 0 16px; overflow: hidden; line-height: 0;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -28px rgba(46, 42, 36, 0.45);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.gallery__masonry .g-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -26px rgba(46, 42, 36, 0.55);
}
.gallery__masonry .g-item img { width: 100%; height: auto; display: block; }
@media (max-width: 760px) { .gallery__masonry { columns: 2; } }
@media (max-width: 460px) { .gallery__masonry { columns: 1; } }
.gallery__note {
  text-align: center; margin-top: 32px;
  font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--muted);
}

/* ----------------------------- RSVP ------------------------------------ */
.rsvp__intro { color: var(--muted); margin-bottom: 32px; }
.rsvp-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px;
  margin-top: 12px; text-align: left;
}
.field { display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.66rem; color: var(--muted); margin-bottom: 9px;
}
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  padding: 9px 2px; transition: border-color 0.3s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--gold);
}
.field textarea { resize: vertical; }
.form-message {
  grid-column: 1 / -1; text-align: center; min-height: 1.3em;
  font-family: var(--font-body); font-size: 0.95rem;
}
.form-message.success { color: var(--gold-deep); }
.form-message.error { color: #a8443a; }
.rsvp-note {
  margin-top: 28px; font-family: var(--font-display); font-style: italic;
  font-size: 1.1rem; color: var(--muted);
}

/* ----------------------------- Footer ---------------------------------- */
.site-footer { background: var(--ink); color: #E8DECE; padding: 72px 0; text-align: center; }
.footer__monogram { font-family: var(--font-display); font-size: 2.4rem; letter-spacing: 0.1em; }
.footer__monogram span { color: var(--gold); font-style: italic; }
.footer__hashtag {
  font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.25em;
  font-size: 0.72rem; color: var(--gold); margin-top: 16px;
}
.footer__date {
  font-family: var(--font-body); letter-spacing: 0.1em; font-size: 0.85rem;
  color: #C9BCA6; margin-top: 10px;
}
.footer__made { font-family: var(--font-display); font-style: italic; font-size: 1rem; color: #9A8E78; margin-top: 24px; }

/* ----------------------------- Reveal on scroll ------------------------ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.events__grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.events__grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.events__grid .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ----------------------------- Responsive ------------------------------ */
@media (max-width: 900px) {
  .events__grid { grid-template-columns: repeat(2, 1fr); }
  .venue__layout { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; inset: 0 0 0 auto; height: 100vh; height: 100dvh;
    width: min(78vw, 320px); padding: 40px;
    flex-direction: column; justify-content: center; gap: 30px;
    background: var(--bg); box-shadow: -10px 0 40px rgba(46, 42, 36, 0.12);
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .nav__links--open { transform: translateX(0); }
  .nav__links a { font-size: 0.9rem; }
  .rsvp-form { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .events__grid { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .hero::before { inset: 12px; }
}

/* ----------------------------- Reduced motion -------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll-line { animation: none; }
  .event-card:hover { transform: none; }
}
