/* =========================================
   RESET
========================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  background: #8E174A;
  color: #f2eadc;
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
}

button,
input,
select,
textarea {
  font: inherit;
}


/* =========================================
   COLOUR VARIABLES
========================================= */

:root {
  --green: #8E174A;
  --green-light: #A91D5A;
  --cream: #FBF4EC;
  --gold: #B08D57;
  --dark: #4A102C;
  --text-dark: #3B2430;
}


/* =========================================
   OPENING SCREEN
========================================= */

.opening-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  background: var(--green);

  transition:
    opacity 1.2s ease,
    visibility 1.2s ease;
}

.opening-screen.closed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-background {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at center,
      rgba(255,255,255,.04),
      transparent 55%
    );
}

.opening-content {
  position: relative;
  z-index: 2;

  text-align: center;

  animation: fadeUp 1.5s ease both;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: .32em;
  margin-bottom: 25px;
  opacity: .75;
}

.crest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;

  margin-bottom: 25px;

  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
}

.crest-divider {
  font-size: 12px;
}

.opening-content h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(55px, 9vw, 105px);
  font-weight: 300;
  line-height: .8;
  letter-spacing: -.03em;
}

.opening-content h1 span {
  display: block;
  font-size: .35em;
  font-style: italic;
  margin: 16px 0;
  color: var(--gold);
}

.opening-date {
  margin-top: 30px;
  font-size: 11px;
  letter-spacing: .25em;
}

.open-button {
  margin-top: 50px;

  border: 1px solid rgba(201,173,114,.7);
  background: transparent;
  color: var(--cream);

  padding: 16px 32px;

  cursor: pointer;

  font-size: 9px;
  letter-spacing: .3em;

  transition: .4s ease;
}

.open-button:hover {
  background: var(--gold);
  color: var(--dark);
}

.floral {
  position: absolute;
  color: rgba(201,173,114,.25);
  font-size: 200px;
}

.floral-left {
  left: -70px;
  bottom: -70px;
}

.floral-right {
  right: -70px;
  top: -70px;
}


/* =========================================
   MAIN INVITATION
========================================= */

.invitation {
  overflow: hidden;
}


/* =========================================
   HERO
========================================= */

.hero {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;

  background:
    linear-gradient(
      rgba(10,23,18,.65),
      rgba(10,23,18,.65)
    ),
    url("images/hero.jpg")
    center / cover no-repeat;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;

  animation: fadeUp 1.8s ease both;
}

.hero-crest {
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  margin-bottom: 30px;
}

.hero-crest span {
  font-size: 11px;
  margin: 0 15px;
}

.hero h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(65px, 10vw, 140px);
  line-height: .75;
}

.hero h2 small {
  display: block;

  font-size: .32em;
  font-style: italic;

  color: var(--gold);

  margin: 25px 0;
}

.ornament {
  margin: 35px 0;
  color: var(--gold);
  letter-spacing: .3em;
}

.hero-date {
  font-size: 11px;
  line-height: 2;
  letter-spacing: .25em;
}

.scroll-indicator {
  position: absolute;
  bottom: 35px;
  left: 50%;

  transform: translateX(-50%);

  text-align: center;

  font-size: 8px;
  letter-spacing: .3em;
}

.scroll-indicator div {
  width: 1px;
  height: 45px;
  background: var(--gold);
  margin: 12px auto 0;
}


/* =========================================
   GENERIC SECTIONS
========================================= */

.section {
  padding: 130px 30px;
  background: var(--cream);
  color: var(--text-dark);
}

.section-inner {
  max-width: 1100px;
  margin: auto;
}

.section-inner.narrow {
  max-width: 700px;
  text-align: center;
}

.section .eyebrow {
  color: #66736b;
}

.section h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .95;
}

.body-copy {
  max-width: 600px;
  margin: 35px auto 0;

  font-size: 13px;
  line-height: 2;

  color: #59645d;
}

.ornament.dark {
  margin-top: 45px;
  color: var(--gold);
}


/* =========================================
   COUNTDOWN
========================================= */

.countdown-section {
  padding: 100px 30px;
  background: var(--green-light);
  text-align: center;
}

.countdown-inner {
  max-width: 900px;
  margin: auto;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 50px;

  margin-top: 50px;
}

.count-box {
  min-width: 100px;
}

.count-box strong {
  display: block;

  font-family: "Cormorant Garamond", serif;
  font-size: 55px;
  font-weight: 300;

  color: var(--gold);
}

.count-box span {
  font-size: 8px;
  letter-spacing: .3em;
}


/* =========================================
   EVENTS
========================================= */

.events {
  background: #eee5d6;
}

.events h3 {
  max-width: 700px;
  margin-bottom: 70px;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.event-card {
  padding: 45px 35px;

  min-height: 360px;

  border: 1px solid rgba(24,38,31,.15);

  display: flex;
  flex-direction: column;

  transition: transform .5s ease;
}

.event-card:hover {
  transform: translateY(-8px);
}

.event-card.featured {
  background: var(--green);
  color: var(--cream);
}

.event-number {
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  color: var(--gold);
}

.event-type {
  margin-top: 40px;

  font-size: 9px;
  letter-spacing: .3em;
}

.event-card h4 {
  margin-top: 15px;

  font-family: "Cormorant Garamond", serif;
  font-size: 40px;
  font-weight: 400;
}

.event-date {
  margin-top: 20px;

  font-size: 10px;
  letter-spacing: .12em;
}

.event-location {
  margin-top: 25px;

  font-size: 11px;
  line-height: 1.8;
}

.text-button {
  margin-top: auto;

  color: inherit;
  text-decoration: none;

  font-size: 8px;
  letter-spacing: .25em;

  border-bottom: 1px solid currentColor;

  padding-bottom: 7px;

  width: fit-content;
}


/* =========================================
   IMAGE BREAK
========================================= */

.image-break {
  min-height: 70vh;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      rgba(10,23,18,.4),
      rgba(10,23,18,.4)
    ),
    url("images/quote.jpg")
    center / cover no-repeat;
}

.image-break-content {
  text-align: center;

  max-width: 650px;
  padding: 30px;

  font-family: "Cormorant Garamond", serif;
  font-size: clamp(35px, 5vw, 65px);
  font-style: italic;
}


/* =========================================
   DRESS CODE
========================================= */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

.dress-copy h3 {
  margin-bottom: 30px;
}

.dress-copy .body-copy {
  margin-left: 0;
}

.dress-art {
  display: flex;
  justify-content: center;
}

.art-circle {
  width: min(400px, 70vw);
  aspect-ratio: 1;

  border-radius: 50%;

  background: var(--green);

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--gold);

  font-family: "Cormorant Garamond", serif;
  font-size: 25px;
}


/* =========================================
   STORY
========================================= */

.story {
  background: var(--green);
  color: var(--cream);
}

.story .eyebrow {
  color: var(--gold);
}

.story .body-copy {
  color: rgba(242,234,220,.7);
}


/* =========================================
   GALLERY
========================================= */

.gallery {
  background: var(--cream);
}

.gallery-grid {
  margin-top: 60px;

  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 15px;
}

.gallery-image {
  min-height: 400px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      135deg,
      #24382f,
      #53665b
    );

  font-size: 9px;
  letter-spacing: .25em;

  color: rgba(255,255,255,.7);

  background-size: cover;
  background-position: center;
}

.image-1 {
  background-image: url("images/photo-1.jpg");
}

.image-2 {
  background-image: url("images/photo-2.jpg");
}

.image-3 {
  background-image: url("images/photo-3.jpg");
}

.image-4 {
  background-image: url("images/photo-4.jpg");
}


/* =========================================
   RSVP
========================================= */

.rsvp {
  background: #eee5d6;
}

form {
  margin-top: 60px;
  text-align: left;
}

.form-group {
  margin-bottom: 35px;
}

.form-group > label {
  display: block;

  margin-bottom: 12px;

  font-size: 8px;
  letter-spacing: .25em;
}

input,
select,
textarea {
  width: 100%;

  border: none;
  border-bottom: 1px solid rgba(24,38,31,.3);

  background: transparent;

  padding: 14px 0;

  outline: none;

  color: var(--text-dark);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 10px;
}

.radio-group input {
  width: auto;
}

.submit-button {
  width: 100%;

  padding: 18px;

  border: 1px solid var(--green);

  background: var(--green);
  color: var(--cream);

  cursor: pointer;

  font-size: 9px;
  letter-spacing: .3em;

  transition: .3s ease;
}

.submit-button:hover {
  background: transparent;
  color: var(--green);
}

.form-success {
  display: none;

  margin-top: 30px;

  padding: 20px;

  border: 1px solid rgba(24,38,31,.2);

  text-align: center;

  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
}


/* =========================================
   FOOTER
========================================= */

.footer {
  padding: 100px 30px;

  text-align: center;

  background: var(--dark);
}

.footer-crest {
  color: var(--gold);

  font-family: "Cormorant Garamond", serif;
  font-size: 25px;

  margin-bottom: 30px;
}

.footer h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 45px;
  font-weight: 300;
}

.footer > p {
  margin-top: 20px;

  font-size: 9px;
  letter-spacing: .25em;
}

.footer-line {
  width: 50px;
  height: 1px;

  margin: 40px auto;

  background: var(--gold);
}

.footer-small {
  opacity: .5;
}


/* =========================================
   MUSIC BUTTON
========================================= */

.music-button {
  position: fixed;

  right: 25px;
  bottom: 25px;

  width: 50px;
  height: 50px;

  z-index: 50;

  border: 1px solid var(--gold);
  border-radius: 50%;

  background: var(--green);
  color: var(--gold);

  cursor: pointer;

  font-size: 18px;
}


/* =========================================
   ANIMATIONS
========================================= */

@keyframes fadeUp {

  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

  .section {
    padding: 90px 22px;
  }

  .countdown {
    gap: 15px;
  }

  .count-box {
    min-width: 65px;
  }

  .count-box strong {
    font-size: 38px;
  }

  .count-box span {
    font-size: 7px;
    letter-spacing: .15em;
  }

  .event-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    min-height: 330px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-image {
    min-height: 350px;
  }

  .hero h2 {
    font-size: 65px;
  }

  .opening-content h1 {
    font-size: 65px;
  }

}.countdown-section .eyebrow {
  font-family: "Cormorant Garamond", serif;
  font-size: 56px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: 20px;
}
/* Venue photo + map */
.event-card .venue-photo,
.event-card .map-preview {
  display: inline-block;
  vertical-align: top;
  width: 48%;
  margin-top: 25px;
}

.event-card .venue-photo img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.event-card .map-preview iframe {
  display: block;
  width: 100%;
  height: 320px;
}

@media (max-width: 700px) {
  .event-card .venue-photo,
  .event-card .map-preview {
    display: block;
    width: 100%;
  }

  .event-card .map-preview {
    margin-top: 20px;
  }
}.event-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.event-card > p,
.event-card > h3,
.event-card > a {
  width: 100%;
}

.event-card .venue-photo,
.event-card .map-preview {
  width: calc(50% - 12px);
  margin-top: 25px;
}

.event-card .venue-photo img,
.event-card .map-preview iframe {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

@media (max-width: 700px) {
  .event-card .venue-photo,
  .event-card .map-preview {
    width: 100%;
  }
}
.venue-map-row {
  display: flex;
  gap: 24px;
  width: 100%;
  margin-top: 25px;
}

.venue-map-row .venue-photo,
.venue-map-row .map-preview {
  flex: 1;
  width: auto;
  margin-top: 0;
}

.venue-map-row .venue-photo img,
.venue-map-row .map-preview iframe {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
}

@media (max-width: 700px) {
  .venue-map-row {
    flex-direction: column;
  }

  .venue-map-row .venue-photo,
  .venue-map-row .map-preview {
    width: 100%;
  }
}

.reception-time-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
}

.reception-time-row .reception-time {
  font-family: "Cormorant Garamond", serif;
  font-size: 32px;
  font-weight: 500;
  margin: 0;
}

.calendar-button {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  font-size: 9px;
  letter-spacing: .15em;
  transition: all .3s ease;
}

.calendar-button:hover {
  background: var(--gold);
  color: var(--dark);
}

@media (max-width: 700px) {
  .reception-time-row {
    flex-wrap: wrap;
  }
}

/* Refined Reception spacing */
.event-card .event-label {
  margin-bottom: 8px;
}

.event-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.event-card .reception-time-row {
  margin-top: 0;
  margin-bottom: 16px;
}

.event-card .reception-time {
  margin: 0;
}

.event-card > p:not(.event-label) {
  margin-top: 6px;
  margin-bottom: 6px;
}

.event-card .venue-map-row {
  margin-top: 18px;
}


/* Final Reception typography + spacing */
.event-card {
  display: block !important;
  padding-top: 38px !important;
}

.event-card .event-label {
  margin: 0 0 6px !important;
  line-height: 1.2 !important;
}

.event-card h3 {
  margin: 0 0 10px !important;
  line-height: 1.05 !important;
}

.event-card .reception-time-row {
  margin: 0 0 12px !important;
  line-height: 1 !important;
}

.event-card .reception-time-row .reception-time {
  margin: 0 !important;
  line-height: 1 !important;
}

.event-card > p:not(.event-label) {
  margin: 4px 0 !important;
  line-height: 1.3 !important;
}

.event-card .venue-map-row {
  margin-top: 18px !important;
}


/* Countdown digits */
.countdown-section .count-box strong,
.countdown-section .countdown-item strong {
  color: #F3B6CC !important;
}

.countdown-section .count-box span,
.countdown-section .countdown-item span {
  color: var(--gold) !important;
}


/* Scratch-to-reveal date */
.date-reveal-section {
  padding: 85px 30px 70px;
  background: var(--cream);
  text-align: center;
}

.date-reveal-section .eyebrow {
  color: var(--gold);
  margin-bottom: 25px;
}

.scratch-card {
  position: relative;
  width: min(680px, 100%);
  height: 180px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--gold);
  background: var(--cream);
}

.revealed-date {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(42px, 7vw, 68px);
  font-weight: 500;
  color: var(--gold);
  letter-spacing: .02em;
}

#scratch-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.scratch-hint {
  margin: 16px 0 0;
  color: var(--dark);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .scratch-card {
    height: 150px;
  }

  .revealed-date {
    font-size: 40px;
  }
}


/* Three-circle date reveal */
.revealed-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  height: 100%;
}

.date-circle {
  width: 105px;
  height: 105px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.date-circle strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 48px;
  font-weight: 500;
  line-height: 1;
}

.date-circle span {
  margin-top: 7px;
  font-family: Montserrat, sans-serif;
  font-size: 7px;
  letter-spacing: .2em;
  color: var(--gold);
}

@media (max-width: 700px) {
  .revealed-date {
    gap: 12px;
  }

  .date-circle {
    width: 82px;
    height: 82px;
  }

  .date-circle strong {
    font-size: 38px;
  }

  .date-circle span {
    font-size: 6px;
  }
}


/* Individual circle scratch layer */
.scratch-card {
  position: relative;
}

.scratch-card .revealed-date {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#scratch-canvas {
  z-index: 3;
}

.date-circle {
  position: relative;
  transition: transform .35s ease, opacity .35s ease;
}

.date-circle.revealed {
  transform: scale(1.04);
}

.confetti-piece {
  position: absolute;
  top: 35%;
  width: 7px;
  height: 13px;
  z-index: 10;
  pointer-events: none;
  animation: confetti-fall 2.5s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translateY(260px) rotate(720deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .confetti-piece {
    animation: none;
    opacity: 0;
  }
}


/* Final individual scratch circles */
.date-reveal-section {
  position: relative;
  overflow: hidden;
}

.scratch-dates {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: 30px auto 0;
}

.scratch-date {
  position: relative;
  width: 105px;
  height: 105px;
  flex: 0 0 105px;
}

.scratch-date .date-circle {
  position: absolute;
  inset: 0;
  width: 105px;
  height: 105px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.scratch-date .circle-scratch {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  touch-action: none;
  cursor: crosshair;
}

.scratch-date.revealed .date-circle {
  transform: scale(1.04);
  transition: transform .3s ease;
}

.scratch-dates + .scratch-hint {
  margin-top: 20px;
}

.confetti-piece {
  position: absolute;
  width: 7px;
  height: 13px;
  z-index: 10;
  pointer-events: none;
  animation: confetti-fall 2.5s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translateY(300px) rotate(720deg);
  }
}

@media (max-width: 700px) {
  .scratch-dates {
    gap: 12px;
  }

  .scratch-date,
  .scratch-date .date-circle,
  .scratch-date .circle-scratch {
    width: 82px;
    height: 82px;
  }
}


/* Our Moments — moving photo stack */
.moments-stack {
  position: relative;
  width: min(360px, 82vw);
  height: 480px;
  margin: 55px auto 20px;
}

.moment-card {
  position: absolute;
  inset: 0;
  padding: 8px;
  background: var(--cream);
  border: 1px solid rgba(176, 141, 87, .65);
  box-shadow: 0 14px 35px rgba(59, 36, 48, .18);
  transition:
    transform .9s cubic-bezier(.22,.61,.36,1),
    opacity .9s ease;
}

.moment-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moment-card:nth-child(1) {
  z-index: 8;
  transform: rotate(-2deg);
}

.moment-card:nth-child(2) {
  z-index: 7;
  transform: rotate(2deg) translate(8px, 5px);
}

.moment-card:nth-child(3) {
  z-index: 6;
  transform: rotate(-3deg) translate(-7px, 10px);
}

.moment-card:nth-child(4) {
  z-index: 5;
  transform: rotate(3deg) translate(10px, 15px);
}

.moment-card:nth-child(5) {
  z-index: 4;
  transform: rotate(-4deg) translate(-10px, 20px);
}

.moment-card:nth-child(6) {
  z-index: 3;
  transform: rotate(4deg) translate(12px, 25px);
}

.moment-card:nth-child(7) {
  z-index: 2;
  transform: rotate(-5deg) translate(-12px, 30px);
}

.moment-card:nth-child(8) {
  z-index: 1;
  transform: rotate(5deg) translate(14px, 35px);
}

@media (max-width: 700px) {
  .moments-stack {
    width: min(310px, 82vw);
    height: 410px;
  }
}


/* Our Moments navigation */
.moments-arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--cream);
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .3s ease, color .3s ease;
}

.moments-arrow:hover {
  background: var(--gold);
  color: var(--cream);
}

.moments-prev {
  left: -58px;
}

.moments-next {
  right: -58px;
}

@media (max-width: 700px) {
  .moments-prev {
    left: -4px;
  }

  .moments-next {
    right: -4px;
  }
}


/* Preserve the full photo in Our Moments */
.moment-card {
  display: flex;
  align-items: center;
  justify-content: center;
}

.moment-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--cream);
}


/* Adaptive photo cards — portrait and landscape */
.moments-stack {
  width: min(390px, 86vw);
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.moment-card {
  width: 100%;
  height: 100%;
}

.moment-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.moment-card img[src*="moment 2"],
.moment-card img[src*="moment 3"],
.moment-card img[src*="moment 4"] {
  object-fit: contain;
}

@media (max-width: 700px) {
  .moments-stack {
    width: 88vw;
    height: 430px;
  }
}


/* Landscape moments use landscape cards */
.moment-card:has(img[src*="moment 2"]),
.moment-card:has(img[src*="moment 3"]),
.moment-card:has(img[src*="moment 4"]) {
  width: 100%;
  height: 300px;
  top: 90px;
}

@media (max-width: 700px) {
  .moment-card:has(img[src*="moment 2"]),
  .moment-card:has(img[src*="moment 3"]),
  .moment-card:has(img[src*="moment 4"]) {
    height: 230px;
    top: 100px;
  }
}


/* =========================================
   LUXURY LETTER OPENING
========================================= */

.letter-opening {
  position: relative;
  z-index: 5;
  width: min(520px, 90vw);
  text-align: center;
}

.envelope {
  position: relative;
  width: min(430px, 82vw);
  height: 285px;
  margin: 0 auto;
  background: #FBF4EC;
  border: 1px solid rgba(176, 141, 87, .75);
  box-shadow: 0 25px 70px rgba(59, 36, 48, .35);
  overflow: visible;
}

.envelope-paper {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 14%;
  height: 72%;
  background: #FBF4EC;
  border: 1px solid rgba(176, 141, 87, .35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.envelope-paper .eyebrow {
  color: #8E174A;
  margin-bottom: 20px;
}

.letter-names {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #4A102C;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(42px, 8vw, 62px);
  font-weight: 400;
}

.letter-names i {
  color: #B08D57;
  font-size: .55em;
  font-weight: 300;
}

.envelope-flap {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  border-left: calc(min(430px, 82vw) / 2) solid transparent;
  border-right: calc(min(430px, 82vw) / 2) solid transparent;
  border-top: 145px solid #A91D5A;
  z-index: 4;
  filter: drop-shadow(0 5px 5px rgba(59,36,48,.12));
}

.wax-seal {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 10;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid #B08D57;
  background: #8E174A;
  color: #F3B6CC;
  box-shadow:
    0 5px 12px rgba(59,36,48,.35),
    inset 0 0 0 3px rgba(243,182,204,.25);
  cursor: pointer;
  font-family: "Cormorant Garamond", serif;
  font-size: 34px;
  transition: transform .35s ease, box-shadow .35s ease;
}

.wax-seal:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow:
    0 8px 18px rgba(59,36,48,.4),
    inset 0 0 0 3px rgba(243,182,204,.35);
}

.tap-to-open {
  margin-top: 48px;
  color: #B08D57;
  font-size: 10px;
  letter-spacing: .35em;
  animation: gentlePulse 2s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

@media (max-width: 700px) {
  .envelope {
    height: 230px;
  }

  .envelope-flap {
    border-top-width: 115px;
  }

  .wax-seal {
    width: 66px;
    height: 66px;
    font-size: 29px;
  }

  .tap-to-open {
    margin-top: 38px;
  }
}


.opening-screen.opening-active .envelope-flap {
  transform: rotateX(180deg);
  transform-origin: top center;
  transition: transform .9s cubic-bezier(.77,0,.18,1);
}

.opening-screen.opening-active .wax-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.7);
  transition: opacity .35s ease, transform .5s ease;
}

.opening-screen.opening-active .tap-to-open {
  opacity: 0;
  transition: opacity .3s ease;
}


/* =========================================
   ENVELOPE — PORTRAIT LUXURY VERSION
========================================= */

.letter-opening {
  width: 100%;
  text-align: center;
}

.envelope {
  width: min(340px, 78vw);
  height: min(460px, 72vh);
  min-height: 390px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: #8E174A;
  border: 1px solid #B08D57;
  box-shadow:
    0 30px 70px rgba(59, 36, 48, .38),
    0 8px 20px rgba(59, 36, 48, .22);
}

/* inner ivory letter */
.envelope-paper {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 12%;
  height: 76%;
  background: #FBF4EC;
  border: 1px solid rgba(176, 141, 87, .55);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.envelope-paper .eyebrow {
  color: #8E174A;
  font-size: 8px;
  letter-spacing: .28em;
  margin-bottom: 18px;
}

.letter-names {
  color: #4A102C;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(38px, 8vw, 58px);
  line-height: 1;
}

/* pink envelope flap */
.envelope-flap {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 52%;
  z-index: 4;

  background: #A91D5A;

  clip-path: polygon(
    0 0,
    100% 0,
    50% 100%
  );

  border: none;
  filter: drop-shadow(0 8px 8px rgba(59,36,48,.18));
  transition: transform .9s cubic-bezier(.77,0,.18,1);
}

/* subtle envelope folds */
.envelope::before,
.envelope::after {
  content: "";
  position: absolute;
  z-index: 5;
  bottom: 0;
  width: 72%;
  height: 48%;
  background: #7F1242;
  opacity: .7;
}

.envelope::before {
  left: -35%;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.envelope::after {
  right: -35%;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

/* GOLD WAX SEAL */
.wax-seal {
  width: 82px;
  height: 82px;
  left: 50%;
  top: 52%;
  z-index: 20;

  border: 3px solid #B08D57;
  border-radius: 50%;

  background:
    radial-gradient(
      circle at 35% 30%,
      #E0C58F 0%,
      #B08D57 48%,
      #8D6A3D 100%
    );

  color: #FBF4EC;

  box-shadow:
    0 7px 15px rgba(40,20,25,.4),
    inset 0 0 0 3px rgba(255,255,255,.18);

  font-size: 32px;
}

.wax-seal span {
  display: block;
  transform: translateY(-1px);
}

.tap-to-open {
  color: #F3B6CC;
  margin-top: 34px;
  font-size: 10px;
  letter-spacing: .38em;
}

/* mobile */
@media (max-width: 700px) {
  .envelope {
    width: 270px;
    height: 390px;
    min-height: 0;
  }

  .wax-seal {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }

  .tap-to-open {
    margin-top: 28px;
  }
}


/* FINAL LUXURY ENVELOPE OVERRIDES */

.letter-opening {
  width: 100%;
}

.envelope {
  width: 310px;
  height: 455px;
  min-height: 0;
  background: #8E174A;
  border: 1px solid rgba(176,141,87,.9);
  overflow: hidden;
  box-shadow:
    0 30px 60px rgba(40,15,25,.38),
    inset 0 0 0 8px rgba(176,141,87,.08);
}

/* subtle luxury inner border */
.envelope::after {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 2;
  width: auto;
  height: auto;
  right: 14px;
  bottom: 14px;
  background: transparent;
  border: 1px solid rgba(251,244,236,.18);
  clip-path: none;
  opacity: 1;
}

/* hide the letter text from the closed envelope */
.envelope-paper {
  left: 18px;
  right: 18px;
  top: 28px;
  height: 370px;
  background: #FBF4EC;
  border: 1px solid rgba(176,141,87,.35);
  z-index: 1;
}

.envelope-paper .eyebrow,
.letter-names {
  opacity: 0;
}

/* proper envelope flap */
.envelope-flap {
  left: 0;
  top: 0;
  width: 100%;
  height: 56%;
  background: #A91D5A;
  clip-path: polygon(0 0, 100% 0, 50% 72%);
  z-index: 8;
  filter: none;
  border-bottom: 1px solid rgba(176,141,87,.5);
}

/* bottom envelope folds */
.envelope::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 48%;
  z-index: 6;
  background: #7F1242;
  opacity: 1;
  clip-path: polygon(0 100%, 0 35%, 50% 100%, 100% 35%, 100% 100%);
}

/* gold wax seal */
.wax-seal {
  width: 88px;
  height: 88px;
  top: 50%;
  background:
    radial-gradient(
      circle at 32% 28%,
      #E7D09B 0%,
      #C5A665 28%,
      #B08D57 58%,
      #8A693B 100%
    );
  border: 3px solid #B08D57;
  color: #FBF4EC;
  box-shadow:
    0 8px 18px rgba(35,15,20,.42),
    inset 0 0 0 2px rgba(255,255,255,.28),
    inset 0 -5px 8px rgba(80,50,20,.2);
}

/* tiny gold ornamental ring */
.wax-seal::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(251,244,236,.45);
  border-radius: 50%;
}

.tap-to-open {
  color: #F3B6CC;
  margin-top: 30px;
  font-size: 10px;
  letter-spacing: .42em;
}

@media (max-width: 700px) {
  .envelope {
    width: 275px;
    height: 405px;
  }

  .wax-seal {
    width: 78px;
    height: 78px;
  }
}


/* =========================================
   CLEAN SEALED ENVELOPE — FINAL DIRECTION
========================================= */

.envelope {
  width: 320px;
  height: 455px;
  background: #8E174A !important;
  border: 1px solid #B08D57;
  overflow: hidden;
  box-shadow: 0 25px 55px rgba(45,12,28,.38);
}

/* no white letter showing */
.envelope-paper {
  position: absolute;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: #8E174A !important;
  border: none !important;
  z-index: 1;
}

.envelope-paper .eyebrow,
.envelope-paper .letter-names {
  display: none !important;
}

/* large clean pink flap */
.envelope-flap {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 57% !important;
  background: #A91D5A !important;
  clip-path: polygon(0 0, 100% 0, 50% 72%) !important;
  z-index: 8 !important;
  border: none !important;
}

/* elegant lower envelope folds */
.envelope::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 48%;
  background: #7F1242;
  opacity: .55;
  z-index: 5;
  clip-path: polygon(
    0 100%,
    0 35%,
    50% 100%,
    100% 35%,
    100% 100%
  );
}

/* remove previous decorative border */
.envelope::after {
  content: "";
  position: absolute;
  inset: 12px;
  width: auto;
  height: auto;
  background: transparent;
  border: 1px solid rgba(251,244,236,.13);
  clip-path: none;
  z-index: 9;
  opacity: 1;
}

/* antique GOLD wax seal */
.wax-seal {
  width: 88px !important;
  height: 88px !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 30 !important;

  background:
    radial-gradient(
      circle at 32% 28%,
      #E6D09B 0%,
      #C9AD72 30%,
      #B08D57 62%,
      #8A6737 100%
    ) !important;

  border: 3px solid #B08D57 !important;
  color: #FBF4EC !important;

  box-shadow:
    0 8px 18px rgba(35,15,20,.45),
    inset 0 0 0 2px rgba(255,255,255,.3),
    inset 0 -5px 8px rgba(75,45,15,.2) !important;
}

/* seal detail */
.wax-seal::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(251,244,236,.5);
  border-radius: 50%;
}

/* instruction */
.tap-to-open {
  color: #F3B6CC !important;
  margin-top: 28px !important;
  font-size: 10px !important;
  letter-spacing: .4em !important;
}

@media (max-width: 700px) {
  .envelope {
    width: 275px;
    height: 405px;
  }

  .wax-seal {
    width: 78px !important;
    height: 78px !important;
  }
}


/* =========================================
   SEALED ENVELOPE — CLEAN REALISTIC LOOK
========================================= */

.letter-opening {
  position: relative;
  width: 100%;
  text-align: center;
}

.envelope {
  position: relative;
  width: 350px !important;
  height: 500px !important;
  margin: 0 auto;
  overflow: hidden !important;

  background: #8E174A !important;
  border: 1px solid rgba(176,141,87,.85) !important;

  box-shadow:
    0 28px 65px rgba(45,10,28,.42),
    0 4px 12px rgba(45,10,28,.22) !important;
}

/* Completely blank inner letter layer */
.envelope-paper {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  border: 0 !important;
  z-index: 1 !important;
}

.envelope-paper > * {
  display: none !important;
}

/* Bottom-left folded flap */
.envelope::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 52%;
  z-index: 4;

  background: #7F1242;

  clip-path: polygon(
    0 0,
    50% 62%,
    100% 0,
    100% 100%,
    0 100%
  );

  opacity: .62;
}

/* Subtle inner edge */
.envelope::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 7;
  pointer-events: none;

  background: transparent;
  border: 1px solid rgba(251,244,236,.12);
}

/* TOP FLAP */
.envelope-flap {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;

  width: 100% !important;
  height: 62% !important;

  background: #A91D5A !important;

  clip-path: polygon(
    0 0,
    100% 0,
    50% 76%
  ) !important;

  border: 0 !important;
  z-index: 10 !important;

  filter:
    drop-shadow(0 5px 5px rgba(45,10,28,.18));

  transform-origin: top center;
  transition:
    transform .9s cubic-bezier(.77,0,.18,1),
    filter .5s ease;
}

/* GOLD WAX SEAL */
.wax-seal {
  position: absolute !important;
  left: 50% !important;
  top: 48% !important;
  transform: translate(-50%, -50%) !important;

  width: 92px !important;
  height: 92px !important;

  border-radius: 50% !important;
  border: 3px solid #B08D57 !important;

  background:
    radial-gradient(
      circle at 34% 27%,
      #E7D29E 0%,
      #D0B474 25%,
      #B08D57 58%,
      #8B6738 100%
    ) !important;

  color: #FBF4EC !important;

  box-shadow:
    0 9px 18px rgba(35,12,22,.45),
    inset 0 0 0 3px rgba(255,255,255,.22),
    inset 0 -6px 10px rgba(70,40,10,.22) !important;

  z-index: 30 !important;
  cursor: pointer;
}

/* seal inner ring */
.wax-seal::before {
  content: "";
  position: absolute;
  inset: 8px;

  border: 1px solid rgba(251,244,236,.55);
  border-radius: 50%;
}

/* seal symbol */
.wax-seal span {
  position: relative;
  z-index: 2;
  font-size: 34px;
  color: #FBF4EC;
}

/* instruction */
.tap-to-open {
  margin-top: 32px !important;
  color: #F3B6CC !important;
  font-size: 10px !important;
  letter-spacing: .42em !important;
  opacity: .9;
}

@media (max-width: 700px) {

  .envelope {
    width: 285px !important;
    height: 415px !important;
  }

  .wax-seal {
    width: 80px !important;
    height: 80px !important;
  }

  .wax-seal span {
    font-size: 29px;
  }

}


/* =========================================
   HANDMADE PAPER TEXTURE
========================================= */

.envelope {
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.09) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 68%, rgba(50,0,25,.08) 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 82%, rgba(255,255,255,.07) 0 1px, transparent 1.5px),
    repeating-linear-gradient(
      7deg,
      rgba(255,255,255,.025) 0px,
      rgba(255,255,255,.025) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      97deg,
      rgba(45,0,20,.025) 0px,
      rgba(45,0,20,.025) 1px,
      transparent 1px,
      transparent 5px
    ),
    #8E174A !important;
}

/* fine paper fibres across the envelope */
.envelope-paper {
  background:
    repeating-linear-gradient(
      12deg,
      rgba(255,255,255,.035) 0px,
      rgba(255,255,255,.035) 1px,
      transparent 1px,
      transparent 6px
    ),
    repeating-linear-gradient(
      102deg,
      rgba(40,0,20,.035) 0px,
      rgba(40,0,20,.035) 1px,
      transparent 1px,
      transparent 8px
    ) !important;
}

/* handmade texture on the flap */
.envelope-flap {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0 1px, transparent 1.5px),
    radial-gradient(circle at 75% 55%, rgba(40,0,20,.07) 0 1px, transparent 1.5px),
    repeating-linear-gradient(
      9deg,
      rgba(255,255,255,.035) 0px,
      rgba(255,255,255,.035) 1px,
      transparent 1px,
      transparent 5px
    ),
    repeating-linear-gradient(
      91deg,
      rgba(40,0,20,.03) 0px,
      rgba(40,0,20,.03) 1px,
      transparent 1px,
      transparent 7px
    ),
    #A91D5A !important;
}


/* =========================================
   NATURAL HANDMADE PAPER — SOFT FIBRES
========================================= */

.envelope,
.envelope-flap {
  background-color: #A51B56 !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.045' numOctaves='4' seed='17' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 .16'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)' opacity='.65'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 20% 15%, rgba(255,255,255,.055), transparent 35%),
    radial-gradient(ellipse at 80% 80%, rgba(50,0,25,.055), transparent 40%),
    #A51B56 !important;

  background-blend-mode: soft-light, normal, normal, normal;
}

/* very subtle paper fibres */
.envelope::after {
  inset: 10px !important;
  border: 1px solid rgba(251,244,236,.16) !important;
  box-shadow:
    inset 0 0 35px rgba(255,255,255,.025);
}

/* softer flap — same handmade stock, slightly lighter */
.envelope-flap {
  background-color: #B1225E !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.05' numOctaves='4' seed='29' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 .13'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)' opacity='.7'/%3E%3C/svg%3E"),
    #B1225E !important;
}

/* remove the artificial lined-paper effect */
.envelope-paper {
  background-image: none !important;
}


/* REMOVE ARTIFICIAL TEXTURE */
.envelope,
.envelope-flap {
  background-image: none !important;
}

/* restore a rich, quiet Rani pink */
.envelope {
  background-color: #94184D !important;
}

.envelope-flap {
  background-color: #A91D5A !important;
}


/* =========================================
   NATURAL HANDMADE PAPER GRAIN
========================================= */

.envelope {
  background-color: #94184D !important;

  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' seed='31' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 0.18'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E") !important;

  background-size: 160px 160px !important;
  background-blend-mode: soft-light !important;
}

.envelope-flap {
  background-color: #A91D5A !important;

  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='grain2'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' seed='47' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 0.15'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain2)'/%3E%3C/svg%3E") !important;

  background-size: 160px 160px !important;
  background-blend-mode: soft-light !important;
}


/* =========================================
   REAL HANDMADE PAPER TEXTURE
========================================= */

.envelope {
  background-color: #94184D !important;
  background-image: url("images/handmade_rani_pink_paper.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.envelope-flap {
  background-color: transparent !important;
  background-image: url("images/handmade_rani_pink_paper.jpg") !important;
  background-size: cover !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
}


.envelope {
  background-image: url("images/handmade paper .jpg") !important;
  background-size: cover !important;
  background-position: center !important;
}

.envelope-flap {
  background-image: url("images/handmade paper .jpg") !important;
  background-size: cover !important;
  background-position: center !important;
}


/* Rebuild envelope as a real folded paper piece */
.envelope {
  width: 380px !important;
  height: 270px !important;
  position: relative !important;
  overflow: visible !important;
  border: 1px solid rgba(176,141,87,.7) !important;
  background-image: url("images/handmade paper .jpg") !important;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 22px 45px rgba(40,0,20,.28) !important;
}

/* Hide the old paper/text layer */
.envelope-paper {
  display: none !important;
}

/* Bottom pocket of the envelope */
.envelope::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  background:
    linear-gradient(135deg, transparent 49.5%, rgba(72,8,40,.20) 50%, transparent 50.5%),
    linear-gradient(225deg, transparent 49.5%, rgba(72,8,40,.20) 50%, transparent 50.5%),
    url("images/handmade paper .jpg") !important;
  background-size: auto, auto, cover !important;
  background-position: center !important;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%) !important;
}

/* Real triangular closing flap */
.envelope-flap {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 72% !important;
  z-index: 5 !important;
  background-image: url("images/handmade paper .jpg") !important;
  background-size: cover !important;
  background-position: center !important;
  clip-path: polygon(0 0, 100% 0, 50% 100%) !important;
  transform-origin: 50% 0 !important;
  border: none !important;
  box-shadow: 0 4px 8px rgba(60,0,30,.12) !important;
}

/* Paper fold lines */
.envelope::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 4 !important;
  pointer-events: none !important;
  border: 1px solid rgba(176,141,87,.38) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.10),
    inset 0 -35px 55px rgba(70,0,35,.10) !important;
}

/* Keep the seal above everything */
.wax-seal {
  z-index: 10 !important;
}


/* MONOCHROME RANI-PINK HANDMADE PAPER */
.envelope,
.envelope-flap,
.envelope::before {
  background-color: #8E174A !important;
  background-image:
    linear-gradient(rgba(142,23,74,.92), rgba(142,23,74,.92)),
    url("images/handmade paper .jpg") !important;
  background-blend-mode: color, normal !important;
  background-size: cover !important;
  background-position: center !important;
}

/* MOBILE-FRIENDLY ENVELOPE */
.envelope {
  width: min(86vw, 380px) !important;
  height: min(61vw, 270px) !important;
  max-width: 380px !important;
  max-height: 270px !important;
}

.letter-opening {
  width: 100% !important;
  padding: 20px !important;
  box-sizing: border-box !important;
}

@media (max-width: 600px) {
  .opening-screen {
    min-height: 100svh !important;
    height: 100svh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .letter-opening {
    transform: translateY(-2vh) !important;
  }

  .envelope {
    width: 86vw !important;
    height: calc(86vw * .71) !important;
    max-width: none !important;
    max-height: none !important;
  }

  .wax-seal {
    width: 76px !important;
    height: 76px !important;
  }

  .tap-to-open {
    margin-top: 22px !important;
    font-size: 10px !important;
    letter-spacing: .28em !important;
  }
}


/* FINAL RANI-PINK HANDMADE PAPER TREATMENT */
.envelope {
  background-color: #8E174A !important;
  background-image: url("images/handmade paper .jpg") !important;
  background-blend-mode: multiply !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Lower envelope pocket */
.envelope::before {
  background-color: #8E174A !important;
  background-image: url("images/handmade paper .jpg") !important;
  background-blend-mode: multiply !important;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: inset 0 10px 20px rgba(50,0,25,.08) !important;
}

/* Top closing flap — visibly darker than the pocket */
.envelope-flap {
  background-color: #8E174A !important;
  background-image:
    linear-gradient(rgba(55,5,30,.18), rgba(55,5,30,.18)),
    url("images/handmade paper .jpg") !important;
  background-blend-mode: multiply, multiply !important;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 7px 14px rgba(45,0,25,.22) !important;
}

/* Subtle fold definition */
.envelope-flap::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  clip-path: polygon(0 0, 100% 0, 50% 100%) !important;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,.10),
    transparent 45%,
    rgba(45,0,25,.10)
  ) !important;
}

/* Keep the envelope fully visible on phones */
@media (max-width: 600px) {
  .letter-opening {
    width: 100vw !important;
    padding: 16px !important;
  }

  .envelope {
    width: 88vw !important;
    height: calc(88vw * .71) !important;
    max-width: 420px !important;
  }

  .wax-seal {
    width: 74px !important;
    height: 74px !important;
  }
}


/* =========================================================
   REALISTIC HANDMADE-PAPER ENVELOPE — MASTER OVERRIDE
   ========================================================= */

.opening-screen {
  perspective: 1400px !important;
}

.letter-opening {
  width: 100% !important;
  padding: 24px !important;
  box-sizing: border-box !important;
}

/* THE ENVELOPE */
.envelope {
  position: relative !important;
  width: min(440px, 88vw) !important;
  height: min(300px, 60vw) !important;
  aspect-ratio: 440 / 300 !important;
  margin: 0 auto !important;
  overflow: visible !important;
  border: none !important;
  border-radius: 2px !important;
  background-color: #8E174A !important;
  background-image:
    linear-gradient(rgba(142,23,74,.72), rgba(142,23,74,.72)),
    url("images/handmade paper .jpg") !important;
  background-size: cover !important;
  background-position: center !important;
  box-shadow:
    0 32px 55px rgba(35,5,22,.30),
    0 10px 20px rgba(35,5,22,.18) !important;
  transform-style: preserve-3d !important;
}

/* HANDMADE PAPER GRAIN */
.envelope::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  pointer-events: none !important;
  background-image:
    url("images/handmade paper .jpg"),
    repeating-linear-gradient(
      7deg,
      rgba(255,255,255,.035) 0px,
      rgba(255,255,255,.035) 1px,
      transparent 1px,
      transparent 5px
    ) !important;
  background-size: cover, auto !important;
  background-position: center, center !important;
  mix-blend-mode: soft-light !important;
  opacity: .72 !important;
}

/* INNER EDGE — very subtle, like thick stationery */
.envelope::after {
  content: "" !important;
  position: absolute !important;
  inset: 8px !important;
  z-index: 7 !important;
  pointer-events: none !important;
  border: 1px solid rgba(248,224,220,.18) !important;
  box-shadow:
    inset 0 0 24px rgba(45,0,25,.12) !important;
}

/* Remove hidden letter completely */
.envelope-paper {
  display: none !important;
}

/* =========================================================
   LOWER ENVELOPE POCKET
   ========================================================= */

.envelope {
  isolation: isolate !important;
}

.envelope > .envelope-flap {
  box-sizing: border-box !important;
}

/* =========================================================
   TOP CLOSING FLAP
   ========================================================= */

.envelope-flap {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 10 !important;
  border: none !important;
  background-color: #9B174F !important;
  background-image:
    linear-gradient(
      rgba(70,5,35,.10),
      rgba(70,5,35,.10)
    ),
    url("images/handmade paper .jpg") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;

  /* Real triangular envelope flap */
  clip-path: polygon(
    0 0,
    100% 0,
    50% 70%,
    0 0
  ) !important;

  transform-origin: 50% 0% !important;
  transform-style: preserve-3d !important;

  filter:
    drop-shadow(0 7px 7px rgba(42,0,23,.20)) !important;

  transition:
    transform 1s cubic-bezier(.77,0,.18,1),
    filter .6s ease !important;
}

/* Fold shading on the flap */
.envelope-flap::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  clip-path: polygon(0 0, 100% 0, 50% 70%) !important;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.11) 0%,
      transparent 32%,
      transparent 58%,
      rgba(55,0,28,.13) 100%
    ) !important;
}

/* =========================================================
   WAX SEAL — BRASS COLOURED, IRREGULAR, WAX-LIKE
   ========================================================= */

.wax-seal {
  position: absolute !important;
  left: 50% !important;
  top: 69% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 30 !important;

  width: 88px !important;
  height: 88px !important;
  padding: 0 !important;

  border: none !important;
  border-radius: 50% !important;

  background:
    radial-gradient(
      circle at 30% 25%,
      rgba(255,245,210,.95) 0%,
      rgba(218,185,118,.96) 17%,
      rgba(177,137,73,1) 48%,
      rgba(132,94,43,1) 78%,
      rgba(102,68,29,1) 100%
    ) !important;

  color: #FFF8E8 !important;

  box-shadow:
    0 9px 16px rgba(35,12,20,.42),
    0 2px 3px rgba(35,12,20,.25),
    inset 4px 5px 8px rgba(255,247,215,.25),
    inset -6px -8px 12px rgba(67,39,10,.30) !important;

  cursor: pointer !important;

  font-family: "Cormorant Garamond", serif !important;
  font-size: 32px !important;

  transition:
    transform .35s ease,
    box-shadow .35s ease !important;
}

/* Organic wax edge */
.wax-seal::before {
  content: "" !important;
  position: absolute !important;
  inset: 4px !important;
  border-radius: 48% 52% 50% 47% / 51% 48% 53% 49% !important;
  border: 1px solid rgba(255,244,210,.48) !important;
  box-shadow:
    inset 0 0 7px rgba(77,48,14,.28) !important;
}

/* Fine wax texture */
.wax-seal::after {
  content: "" !important;
  position: absolute !important;
  inset: 10px !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  opacity: .38 !important;
  background:
    repeating-radial-gradient(
      circle at 35% 35%,
      rgba(255,255,255,.18) 0 1px,
      transparent 1px 4px
    ) !important;
  mix-blend-mode: soft-light !important;
}

/* Seal emblem */
.wax-seal span {
  position: relative !important;
  z-index: 5 !important;
  color: #FFF9E9 !important;
  text-shadow:
    0 1px 1px rgba(82,54,20,.45) !important;
}

/* subtle press/depth */
.wax-seal:hover {
  transform: translate(-50%, -50%) scale(1.06) rotate(-1deg) !important;
  box-shadow:
    0 12px 22px rgba(35,12,20,.45),
    0 2px 3px rgba(35,12,20,.25),
    inset 4px 5px 8px rgba(255,247,215,.28),
    inset -6px -8px 12px rgba(67,39,10,.32) !important;
}

/* =========================================================
   OPENING ANIMATION
   ========================================================= */

.opening-screen.opening-active .envelope-flap {
  transform: rotateX(180deg) !important;
  filter: drop-shadow(0 1px 2px rgba(45,0,25,.08)) !important;
}

.opening-screen.opening-active .wax-seal {
  opacity: 0 !important;
  transform: translate(-50%, -50%) scale(.72) rotate(4deg) !important;
  transition:
    opacity .35s ease,
    transform .55s ease !important;
}

.opening-screen.opening-active .tap-to-open {
  opacity: 0 !important;
}

/* =========================================================
   TAP TO OPEN
   ========================================================= */

.tap-to-open {
  margin-top: 30px !important;
  color: #F3B6CC !important;
  font-family: "Montserrat", sans-serif !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  letter-spacing: .42em !important;
  opacity: .9 !important;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

  .letter-opening {
    padding: 18px !important;
  }

  .envelope {
    width: 88vw !important;
    height: calc(88vw * .682) !important;
    max-width: 440px !important;
    max-height: none !important;
  }

  .wax-seal {
    width: 72px !important;
    height: 72px !important;
    font-size: 27px !important;
  }

  .tap-to-open {
    margin-top: 24px !important;
    font-size: 8px !important;
    letter-spacing: .30em !important;
  }
}


/* =========================================================
   SOFT NATURAL HANDMADE PAPER — FINAL TEXTURE
   ========================================================= */

.envelope {
  background-color: #8E174A !important;
  background-image: none !important;
}

/* Real paper texture, lightly blended over the Rani pink */
.envelope::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  pointer-events: none !important;

  background-image: url("images/handmade paper .jpg") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;

  opacity: .20 !important;
  mix-blend-mode: screen !important;

  clip-path: none !important;
}

/* Keep the envelope's natural depth */
.envelope::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 7 !important;
  pointer-events: none !important;

  border: 1px solid rgba(235,190,205,.16) !important;

  box-shadow:
    inset 0 0 35px rgba(45,0,25,.10),
    inset 0 -18px 35px rgba(45,0,25,.08) !important;
}

/* Flap uses the same handmade paper stock */
.envelope-flap {
  background-color: #94184D !important;
  background-image: none !important;
}

/* Paper texture laid gently over the flap */
.envelope-flap::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;

  background-image: url("images/handmade paper .jpg") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;

  opacity: .18 !important;
  mix-blend-mode: screen !important;

  clip-path: polygon(0 0, 100% 0, 50% 70%) !important;
}

/* Very subtle darker fold underneath the flap */
.envelope-flap {
  box-shadow:
    inset 0 -1px 0 rgba(55,0,30,.16),
    0 7px 12px rgba(45,0,25,.18) !important;
}


/* Refined handmade-paper texture */
.envelope::before {
  opacity: .34 !important;
  mix-blend-mode: soft-light !important;
  filter: contrast(1.08) saturate(.65) !important;
}

.envelope-flap::after {
  opacity: .30 !important;
  mix-blend-mode: soft-light !important;
  filter: contrast(1.08) saturate(.65) !important;
}

.envelope-flap {
  background-color: #861447 !important;
}


/* =========================================================
   TACTILE PAPER + PRESSED BRASS-WAX SEAL
   ========================================================= */

/* Natural fibre layer — visible, but not photographic */
.envelope::before {
  opacity: .28 !important;
  mix-blend-mode: soft-light !important;
  filter: grayscale(.9) contrast(1.35) brightness(.72) !important;
}

/* Give the paper a very subtle physical variation */
.envelope {
  box-shadow:
    0 32px 55px rgba(35,5,22,.30),
    0 10px 20px rgba(35,5,22,.18),
    inset 0 0 45px rgba(255,230,235,.035),
    inset 0 -12px 24px rgba(45,0,25,.10) !important;
}

/* Make flap feel like a separate folded sheet */
.envelope-flap {
  background-color: #861447 !important;
  box-shadow:
    inset 0 -2px 4px rgba(50,0,25,.10),
    0 8px 13px rgba(45,0,25,.20) !important;
}

/* =========================================================
   PRESSED WAX — ANTIQUE BRASS
   ========================================================= */

.wax-seal {
  width: 90px !important;
  height: 90px !important;

  border-radius:
    48% 52% 47% 53% /
    52% 46% 54% 48% !important;

  background:
    radial-gradient(
      circle at 31% 25%,
      #F0DCA8 0%,
      #D6B875 18%,
      #B89452 43%,
      #9B7439 68%,
      #765126 100%
    ) !important;

  border: 1px solid rgba(108,75,29,.85) !important;

  box-shadow:
    0 10px 18px rgba(35,12,20,.38),
    0 3px 5px rgba(35,12,20,.20),
    inset 3px 4px 7px rgba(255,246,211,.34),
    inset -5px -7px 10px rgba(76,45,12,.32) !important;
}

/* Irregular wax surface */
.wax-seal::after {
  inset: 7px !important;
  border-radius:
    51% 47% 54% 48% /
    46% 53% 47% 54% !important;

  background:
    radial-gradient(
      circle at 27% 30%,
      rgba(255,248,220,.18) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 67% 62%,
      rgba(70,42,10,.13) 0 1px,
      transparent 3px
    ),
    repeating-radial-gradient(
      circle at 42% 44%,
      rgba(255,255,255,.075) 0 1px,
      transparent 1px 4px
    ) !important;

  opacity: .62 !important;
  mix-blend-mode: soft-light !important;
}

/* Slightly imperfect inner pressed rim */
.wax-seal::before {
  inset: 8px !important;
  border:
    1px solid rgba(255,244,207,.42) !important;
  border-radius:
    49% 52% 47% 54% /
    53% 47% 52% 48% !important;
  box-shadow:
    inset 0 0 5px rgba(72,42,10,.22) !important;
}

/* Mobile seal */
@media (max-width: 600px) {
  .wax-seal {
    width: 74px !important;
    height: 74px !important;
  }
}


/* =========================================================
   HAND-PRESSED WAX SEAL — IRREGULAR BRASS WAX
   ========================================================= */

.wax-seal {
  width: 92px !important;
  height: 92px !important;

  /* intentionally imperfect wax silhouette */
  border-radius:
    47% 53% 49% 51% /
    52% 46% 54% 48% !important;

  background:
    radial-gradient(
      ellipse at 29% 24%,
      rgba(255,239,190,.72) 0%,
      transparent 18%
    ),
    radial-gradient(
      ellipse at 66% 72%,
      rgba(82,52,17,.22) 0%,
      transparent 38%
    ),
    repeating-radial-gradient(
      ellipse at 43% 41%,
      rgba(255,245,207,.055) 0px,
      rgba(255,245,207,.055) 1px,
      rgba(100,70,25,.035) 2px,
      transparent 4px
    ),
    radial-gradient(
      circle at 34% 27%,
      #E6CE91 0%,
      #C9A760 27%,
      #AF8847 55%,
      #92703A 78%,
      #725027 100%
    ) !important;

  border: none !important;

  box-shadow:
    0 10px 20px rgba(35,12,20,.40),
    0 3px 5px rgba(35,12,20,.22),
    inset 4px 5px 8px rgba(255,247,214,.30),
    inset -6px -8px 12px rgba(67,39,10,.30) !important;
}

/* irregular raised wax rim */
.wax-seal::before {
  inset: 5px !important;

  border: 1px solid rgba(255,239,194,.34) !important;

  border-radius:
    51% 47% 53% 48% /
    46% 54% 48% 52% !important;

  box-shadow:
    inset 0 1px 3px rgba(255,248,218,.18),
    inset 0 -2px 5px rgba(75,45,12,.22) !important;
}

/* subtle wax imperfections */
.wax-seal::after {
  inset: 11px !important;

  border-radius:
    48% 53% 46% 52% /
    53% 47% 54% 46% !important;

  background:
    radial-gradient(circle at 18% 32%, rgba(255,255,255,.16) 0 1px, transparent 2px),
    radial-gradient(circle at 73% 24%, rgba(70,42,10,.13) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 67%, rgba(255,255,255,.10) 0 1px, transparent 2px),
    radial-gradient(circle at 30% 78%, rgba(70,42,10,.10) 0 1px, transparent 2px),
    repeating-radial-gradient(
      circle at 45% 45%,
      rgba(255,255,255,.06) 0 1px,
      transparent 1px 4px
    ) !important;

  opacity: .85 !important;
  mix-blend-mode: soft-light !important;
}

@media (max-width: 600px) {
  .wax-seal {
    width: 76px !important;
    height: 76px !important;
  }
}


/* =========================================================
   VISIBLE HAND-PRESSED WAX SILHOUETTE
   ========================================================= */

.wax-seal {
  border-radius: 50% !important;

  clip-path: polygon(
    50% 0%,
    61% 3%,
    70% 1%,
    78% 7%,
    87% 8%,
    91% 17%,
    98% 24%,
    96% 35%,
    100% 45%,
    96% 55%,
    98% 65%,
    91% 73%,
    88% 84%,
    78% 88%,
    70% 97%,
    59% 94%,
    49% 100%,
    39% 96%,
    29% 99%,
    22% 91%,
    12% 88%,
    9% 78%,
    2% 70%,
    5% 59%,
    0% 49%,
    4% 39%,
    1% 29%,
    9% 21%,
    11% 12%,
    21% 9%,
    30% 3%,
    40% 5%
  ) !important;
}

/* Remove the perfectly circular inner ring */
.wax-seal::before {
  clip-path: polygon(
    50% 0%,
    61% 3%,
    72% 2%,
    81% 8%,
    90% 12%,
    95% 23%,
    98% 34%,
    95% 46%,
    98% 57%,
    92% 68%,
    88% 80%,
    77% 86%,
    68% 96%,
    56% 94%,
    47% 99%,
    37% 94%,
    27% 97%,
    20% 87%,
    11% 82%,
    9% 70%,
    2% 61%,
    6% 49%,
    2% 38%,
    8% 28%,
    10% 18%,
    21% 12%,
    31% 5%,
    42% 7%
  ) !important;
}


/* =========================================================
   SOFT PRESSED WAX — REMOVE THE MEDALLION LOOK
   ========================================================= */

.wax-seal {
  width: 92px !important;
  height: 92px !important;

  /* soft, gently imperfect wax edge */
  clip-path: none !important;

  border-radius:
    51% 48% 53% 47% /
    48% 53% 47% 52% !important;

  background:
    radial-gradient(
      ellipse at 30% 23%,
      rgba(255,244,205,.42) 0%,
      rgba(255,244,205,0) 24%
    ),
    radial-gradient(
      ellipse at 72% 75%,
      rgba(76,48,15,.20) 0%,
      rgba(76,48,15,0) 43%
    ),
    linear-gradient(
      145deg,
      #E1C487 0%,
      #C5A05B 38%,
      #AE8442 68%,
      #89632F 100%
    ) !important;

  box-shadow:
    0 10px 18px rgba(35,12,20,.40),
    inset 3px 4px 7px rgba(255,247,214,.32),
    inset -5px -7px 10px rgba(72,42,12,.28) !important;
}

/* irregular pressed rim — NOT a perfect circle */
.wax-seal::before {
  inset: 6px !important;

  clip-path: none !important;

  border: 1px solid rgba(255,242,201,.30) !important;

  border-radius:
    48% 52% 46% 54% /
    53% 47% 52% 48% !important;

  box-shadow:
    inset 0 1px 3px rgba(255,248,220,.16),
    inset 0 -2px 4px rgba(75,45,12,.18) !important;
}

/* subtle wax grain — no concentric rings */
.wax-seal::after {
  inset: 9px !important;

  clip-path: none !important;

  border-radius:
    52% 47% 53% 48% /
    47% 54% 46% 53% !important;

  background:
    radial-gradient(circle at 22% 29%, rgba(255,255,255,.10) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 31%, rgba(65,38,10,.10) 0 1px, transparent 2px),
    radial-gradient(circle at 67% 76%, rgba(255,255,255,.08) 0 1px, transparent 2px),
    radial-gradient(circle at 31% 73%, rgba(65,38,10,.08) 0 1px, transparent 2px),
    radial-gradient(circle at 48% 47%, rgba(255,255,255,.045) 0 1px, transparent 2px) !important;

  opacity: .8 !important;
  mix-blend-mode: soft-light !important;
}

