/* ═══════════════════════════════════════════
   BASE
═══════════════════════════════════════════ */

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

:root {
  --white:        #ffffff;
  --cream:        #f8f5f0;
  --text:         #2a2420;
  --text-muted:   #6b5e52;
  --line:         #cfc0b0;
  --green:        #4a5e3a;
  --green-dark:   #3a4d2c;
  --rsvp-bg:      #3d4a30;
  --rsvp-bg-deep: #2e3822;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-hero:    'Oranienbaum', 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Lato', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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


/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */

.hero {
  position: relative;
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/first.jpg');
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.03); /* slight scale prevents edge bleed during tear */
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30, 20, 10, 0.20) 0%,
    rgba(30, 20, 10, 0.30) 40%,
    rgba(30, 20, 10, 0.55) 100%
  );
}

@media (max-width: 767px) {
  .hero__bg {
    background-position: 46% 30%;
  }
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--white);
  padding: 40px 0 120px;
  transform: translateY(clamp(105px, 15svh, 210px));
}

.hero__title {
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: clamp(50px, 13vw, 132px);
  line-height: 0.92;
  letter-spacing: 0.015em;
  text-shadow: 0 2px 32px rgba(0,0,0,0.35);
  margin-bottom: 18px;
  text-align: center;
  width: 100%;
  padding: 0 8px;
}

.hero__title-line {
  display: block;
}

.hero__title-line--second {
  font-size: 0.82em;
}

.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 4.5vw, 34px);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 12px rgba(0,0,0,0.35);
  margin-bottom: 14px;
}

.hero__date {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(20px, 5vw, 38px);
  letter-spacing: 0.18em;
  text-shadow: 0 1px 12px rgba(0,0,0,0.35);
}

/* ═══════════════════════════════════════════
   TORN PAPER DIVIDERS
═══════════════════════════════════════════ */

.tear-img {
  display: block;
  width: 100%;
  height: 80px;
  /* stretch image to fill width exactly */
  object-fit: fill;
  position: relative;
  z-index: 20;
  margin-top: -90px;
  pointer-events: none;
  user-select: none;
}

@media (min-width: 768px) {
  .tear-img {
    height: 100px;
    margin-top: -100px;
  }
}

@media (min-width: 1280px) {
  .tear-img {
    height: 130px;
    margin-top: -100px;
  }
}


/* ═══════════════════════════════════════════
   INVITATION + COUNTDOWN
═══════════════════════════════════════════ */

.invitation {
  --invitation-tear-height: 72px;
  --invitation-bottom-tear-height: 72px;
  position: relative;
  background: var(--white);
  padding: calc(72px + var(--invitation-tear-height)) 24px calc(64px + 8px);
  text-align: center;
  margin-top: calc(-1 * var(--invitation-tear-height));
  z-index: 21;
}

.invitation::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: calc(100% - 4px);
  width: 100%;
  height: var(--invitation-tear-height);
  background-image: url('../images/tears/tear-hero-paint-stains-white.png');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  pointer-events: none;
}

.invitation::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(100% - 4px);
  width: 100%;
  height: var(--invitation-bottom-tear-height);
  background-image: url('../images/tears/tear-hero-paint-stains-white.png');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  transform: scaleY(-1);
  transform-origin: center;
  pointer-events: none;
  z-index: 2;
}

.invitation__inner {
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .invitation {
    --invitation-tear-height: 92px;
    --invitation-bottom-tear-height: 92px;
  }
}

@media (min-width: 1280px) {
  .invitation {
    --invitation-tear-height: 112px;
    --invitation-bottom-tear-height: 112px;
  }
}

.invitation__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 5.5vw, 38px);
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 24px;
  overflow-wrap: break-word;
}

.invitation__text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(16px, 3.5vw, 19px);
  line-height: 1.75;
  color: var(--text-muted);
  text-align: center;
  overflow-wrap: break-word;
}

/* Ornament divider */
.ornament {
  display: flex;
  justify-content: center;
  margin: 44px auto 36px;
  width: 100%;
  max-width: 240px;
}

.ornament__icon {
  display: block;
  width: min(170px, 100%);
  height: auto;
}

/* Countdown */
.countdown__label {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(15px, 3.5vw, 18px);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 clamp(10px, 3vw, 32px);
}

.countdown__sep {
  width: 1px;
  height: 52px;
  background: var(--line);
  flex-shrink: 0;
}

.countdown__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 9.5vw, 64px);
  line-height: 1;
  color: var(--text);
  letter-spacing: 0.01em;
  display: block;
  text-align: center;
  tabular-nums: ;
  font-variant-numeric: tabular-nums;
}

.countdown__name {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(11px, 2.5vw, 13px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}


/* ═══════════════════════════════════════════
   LOCATION
═══════════════════════════════════════════ */

.location {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 48px 24px;
}

.location__bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/second.png');
  background-size: cover;
  background-position: center 56%;
  transform: scale(1.02);
  filter: saturate(0.92) contrast(0.95) brightness(0.92);
}

.location__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(31, 30, 24, 0.12) 0%,
    rgba(31, 30, 24, 0.18) 52%,
    rgba(31, 30, 24, 0.48) 100%
  );
}

.location__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  min-height: 420px;
  padding-bottom: 0;
  color: var(--white);
  text-align: center;
  text-shadow: 0 2px 22px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.location__title {
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: clamp(38px, 11vw, 108px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--white);
  max-width: 8em;
  margin-left: auto;
  margin-right: auto;
  margin-top: 8px;
}

.location__address {
  margin: 0 auto 18px;
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: 53px;
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
}

.location__note {
  max-width: 28rem;
  margin: 14px auto 0;
  font-family: var(--font-body);
  font-size: clamp(13px, 3vw, 16px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.location__spacer {
  flex: 1;
}

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(15px, 3.5vw, 17px);
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.22s, color 0.22s, border-color 0.22s;
}

.btn--map {
  background: rgba(73, 93, 56, 0.9);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 13px 28px;
  min-width: 220px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(18, 24, 15, 0.2);
}

.btn--map:hover {
  background: rgba(58, 77, 44, 0.96);
  color: var(--white);
  border-color: rgba(255,255,255,0.28);
}

.btn--rsvp {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.60);
  padding: 14px 48px;
  min-width: 220px;
  text-align: center;
}

.btn--rsvp:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.9);
}


/* ═══════════════════════════════════════════
   DRESS CODE
═══════════════════════════════════════════ */

.dress-code {
  position: relative;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.68), transparent 58%),
    linear-gradient(180deg, #f2ece4 0%, var(--cream) 100%);
  padding: 88px 24px 84px;
  text-align: center;
}

.dress-code__inner {
  max-width: 560px;
  margin: 0 auto;
}

.dress-code__eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(107, 94, 82, 0.82);
  margin-bottom: 18px;
}

.dress-code__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 6vw, 36px);
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 28px;
}

.dress-code__text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 3.5vw, 19px);
  line-height: 1.75;
  color: var(--text-muted);
}


.ornament-divider {
  display: flex;
  justify-content: center;
  background: var(--cream);
  padding: 0 24px;
}

.ornament-divider--between {
  padding-top: 4px;
  padding-bottom: 10px;
}

.ornament-divider__image {
  width: min(320px, 100%);
  height: auto;
}


/* ═══════════════════════════════════════════
   GIFTS
═══════════════════════════════════════════ */

.gifts {
  position: relative;
  background: var(--cream);
  padding: 80px 24px;
  text-align: center;
  z-index: 21;
}

.gifts__inner {
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.gifts__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 6vw, 36px);
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 28px;
}

.gifts__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 3.5vw, 19px);
  line-height: 1.75;
  color: var(--text-muted);
  border: none;
  overflow-wrap: break-word;
}

/* ═══════════════════════════════════════════
   RSVP
═══════════════════════════════════════════ */

.rsvp {
  position: relative;
  background: var(--rsvp-bg);
  padding: 100px 24px;
  text-align: center;
  overflow: hidden;
}

.rsvp__botanical {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 110px;
  height: 100%;
  pointer-events: none;
}

.rsvp__botanical--left {
  left: 0;
}

.rsvp__botanical--right {
  right: 0;
  transform: scaleX(-1);
}

.rsvp__inner {
  position: relative;
  z-index: 2;
  max-width: 400px;
  margin: 0 auto;
}

.rsvp__deadline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(14px, 3vw, 16px);
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.60);
  margin-bottom: 28px;
}

.rsvp__text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(20px, 5vw, 26px);
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.92);
  margin-bottom: 40px;
}

.rsvp__form-wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 20px 60px rgba(36, 30, 24, 0.18);
}

.rsvp__form {
  display: block;
  width: 100%;
  min-height: 1450px;
  border: 0;
  background: #fff;
}

.rsvp__fallback {
  margin-top: 18px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.72);
}

.rsvp__fallback a {
  color: rgba(255,255,255,0.92);
}


/* ═══════════════════════════════════════════
   CONTACTS
═══════════════════════════════════════════ */

.contacts {
  background: var(--white);
  padding: 80px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.contacts__inner {
  max-width: 480px;
  margin: 0 auto;
}

.contacts__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 5vw, 30px);
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 20px;
}

.contacts__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 4vw, 22px);
  color: var(--text);
  margin-bottom: 8px;
}

.contacts__text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(15px, 3.5vw, 17px);
  color: var(--text-muted);
  margin-bottom: 16px;
}

.contacts__link {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(15px, 3.5vw, 17px);
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.contacts__link:hover {
  opacity: 0.7;
}


/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */

.footer {
  background: var(--text);
  padding: 36px 24px;
  text-align: center;
}

.footer__brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.70);
  margin-bottom: 8px;
}

.footer__copy {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.40);
}


/* ═══════════════════════════════════════════
   DESKTOP ADAPTATIONS
═══════════════════════════════════════════ */

@media (min-width: 768px) {
  .hero__content {
    padding-bottom: 120px;
    transform: translateY(clamp(120px, 16svh, 240px));
  }

  .hero__title {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.18em;
    font-size: clamp(58px, 8vw, 118px);
  }

  .hero__title-line {
    display: inline;
  }

  .hero__title-line--second {
    font-size: 1em;
  }

  .rsvp__botanical {
    width: 140px;
  }

  .rsvp__form {
    min-height: 1450px;
  }

  .location {
    min-height: 620px;
  }
}

@media (min-width: 768px) and (max-height: 900px) {
  .hero__content {
    padding-bottom: 96px;
    transform: translateY(clamp(84px, 11svh, 160px));
  }

  .hero__title {
    margin-bottom: 12px;
  }

  .hero__tagline {
    margin-bottom: 10px;
  }
}

@media (min-width: 1280px) {
  .invitation__inner,
  .gifts__inner,
  .contacts__inner {
    max-width: 640px;
  }

  .rsvp__botanical {
    width: 180px;
  }

  .location {
    min-height: 700px;
  }
}
