:root {
  --ivory: #f6f1e7;
  --paper: #fffdf8;
  --envelope: #e8dece;
  --envelope-light: #f0e7da;
  --envelope-dark: #d8cab7;
  --ink: #25231f;
  --gold: #b0965d;
  --deep-gold: #866c38;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
}

button {
  font: inherit;
}

/* OPENING SCREEN */

.opening-screen {
  min-height: 100vh;
  position: relative;

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

  overflow: hidden;
  padding: 40px 20px;

  background:
    radial-gradient(
      circle at center,
      rgba(255,255,255,0.8) 0%,
      rgba(246,241,231,0.9) 45%,
      rgba(239,231,217,1) 100%
    );
}

/* subtle paper texture */

.opening-screen::before {
  content: "";
  position: absolute;
  inset: 0;

  opacity: 0.18;
  pointer-events: none;

  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0.02) 0,
      rgba(0,0,0,0.02) 1px,
      transparent 1px,
      transparent 4px
    );
}

.opening-copy {
  text-align: center;
  margin-bottom: 34px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  font-size: 9px;
  letter-spacing: 5px;
  margin-bottom: 14px;
}

.opening-copy h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 400;
  letter-spacing: 3px;
}

.opening-copy h1 span {
  font-style: italic;
  color: var(--gold);
  margin: 0 6px;
}

.date {
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: 5px;
}

/* ENVELOPE */

.envelope-wrapper {
  width: min(520px, 90vw);
  perspective: 1600px;

  cursor: pointer;
  position: relative;
  z-index: 3;

  outline: none;
}

.envelope {
  width: 100%;
  aspect-ratio: 1.55 / 1;

  position: relative;

  overflow: hidden;

  filter:
    drop-shadow(0 26px 25px rgba(56, 43, 24, 0.14));
}

/* Once the envelope has opened, allow the invitation
   to physically slide outside the envelope */
.envelope-wrapper.reveal-card .envelope {
  overflow: visible;
}

.envelope-back {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      145deg,
      #ece3d5 0%,
      #ded1be 100%
    );

  border-radius: 4px;

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.45);
}

/* CARD */

.invitation-card {
  position: absolute;

  width: 84%;
  height: 138%;

  left: 8%;
  bottom: 5%;

  z-index: 2;

  background:
    linear-gradient(
      180deg,
      #fffefb,
      #faf6ed
    );

  box-shadow:
    0 12px 34px rgba(34, 25, 14, 0.11);

  transform:
    translateY(45%)
    scale(0.98);

  transition:
    transform 1.45s cubic-bezier(.22,.78,.25,1);

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

.card-inner {
  width: 100%;
  text-align: center;
  padding: 42px 30px;
}

.families {
  font-size: 8px;
  letter-spacing: 2.5px;
  margin-bottom: 30px;
}

.card-inner h2 {
  font-family: "Cormorant Garamond", serif;

  font-weight: 400;
  font-size: clamp(36px, 6vw, 52px);

  line-height: 0.95;
  letter-spacing: 3px;
}

.card-inner h2 span {
  display: block;

  font-style: italic;
  font-size: 32px;

  color: var(--gold);

  margin: 9px 0;
}

.gold-rule {
  width: 58px;
  height: 1px;

  margin: 27px auto;

  background: var(--gold);
}

.invite-line {
  font-size: 8px;
  line-height: 1.9;
  letter-spacing: 2.5px;
}

.card-date {
  margin-top: 24px;
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  letter-spacing: 4px;
}

/* ENVELOPE FOLDS */

.envelope-left,
.envelope-right,
.envelope-bottom {
  position: absolute;
  inset: 0;

  z-index: 4;

  pointer-events: none;
}

.envelope-left {
  background:
    linear-gradient(
      135deg,
      var(--envelope-dark),
      var(--envelope)
    );

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

.envelope-right {
  background:
    linear-gradient(
      220deg,
      var(--envelope-light),
      var(--envelope)
    );

  clip-path: polygon(
    100% 0,
    48% 52%,
    100% 100%
  );
}

.envelope-bottom {
  background:
    linear-gradient(
      180deg,
      #f1e8db,
      #ded1bf
    );

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

/* FLAP */

.envelope-flap {
  position: absolute;
  inset: 0;

  z-index: 6;

  background:
    linear-gradient(
      165deg,
      #efe6d9 0%,
      #d9cbb7 100%
    );

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

  transform-origin: top center;

  transform:
    rotateX(0deg);

  transition:
    transform 1.05s cubic-bezier(.3,.7,.2,1),
    z-index 0s linear 0.52s;

  backface-visibility: hidden;
}

/* WAX SEAL */

.wax-seal {
  position: absolute;

  width: 76px;
  height: 76px;

  left: 50%;
  top: 50%;

  transform:
    translate(-50%, -50%);

  z-index: 8;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;

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

  color: #f8efd7;

  background:
    radial-gradient(
      circle at 32% 28%,
      #d9bf78 0%,
      #b18e42 35%,
      #8b6c2e 72%,
      #654b1b 100%
    );

  box-shadow:
    0 7px 16px rgba(0,0,0,0.22),
    inset 0 2px 3px rgba(255,255,255,0.28),
    inset 0 -3px 6px rgba(79,50,6,0.25);

  transition:
    opacity 0.45s ease,
    transform 0.55s ease;
}

.wax-seal::before {
  content: "";
  position: absolute;
  inset: 7px;

  border-radius: 50%;

  border: 1px solid rgba(255,240,194,0.5);
}

.seal-amp {
  font-style: italic;
  font-size: 17px;
}

/* BUTTON */

#enterWebsite {
  margin-top: 30px;

  border: 1px solid var(--gold);
  background: transparent;

  padding: 13px 24px;

  color: var(--deep-gold);

  font-size: 8px;
  letter-spacing: 2.5px;

  cursor: pointer;

  opacity: 0;
  transform: translateY(12px);

  transition:
    opacity 0.8s ease 0.85s,
    transform 0.8s ease 0.85s,
    background 0.25s ease,
    color 0.25s ease;
}

#enterWebsite:hover {
  background: var(--gold);
  color: white;
}

/* TAP TEXT */

.tap-text {
  margin-top: 34px;

  font-size: 9px;
  letter-spacing: 4px;

  position: relative;
  z-index: 2;

  cursor: pointer;

  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.tap-text.hidden {
  opacity: 0;
  transform: translateY(8px);
}

/* OPEN STATE */

.envelope-wrapper.open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope-wrapper.open .wax-seal {
  opacity: 0;

  transform:
    translate(-50%, -50%)
    scale(0.3)
    rotate(-8deg);
}

.envelope-wrapper.open .invitation-card {
  transform:
    translateY(45%)
    scale(0.98);
}

.envelope-wrapper.reveal-card .invitation-card {
  transform:
    translateY(-58%)
    scale(1);
}

.envelope-wrapper.open #enterWebsite {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------- */
/* MAIN WEDDING WEBSITE */
/* -------------------------------- */

.wedding-home {
  min-height: 100vh;

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

  text-align: center;

  padding: 100px 20px 80px;

  background:
    linear-gradient(
      180deg,
      #fffdf8 0%,
      #f7f1e7 100%
    );

  position: relative;
  overflow: hidden;
}

/* subtle background texture */

.wedding-home::before {
  content: "";

  position: absolute;
  inset: 0;

  pointer-events: none;

  opacity: 0.12;

  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0.02) 0,
      rgba(0,0,0,0.02) 1px,
      transparent 1px,
      transparent 5px
    );
}

/* -------------------------------- */
/* HERO */
/* -------------------------------- */

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

  max-width: 900px;

  margin-bottom: 90px;
}

.hero-small {
  font-size: 9px;

  letter-spacing: 6px;

  margin-bottom: 28px;
}

.hero-names {
  font-family: "Cormorant Garamond", serif;

  font-size: clamp(58px, 10vw, 110px);

  font-weight: 400;

  line-height: 0.88;

  letter-spacing: 3px;
}

.hero-names span {
  display: block;

  color: var(--gold);

  font-style: italic;

  font-size: 0.58em;

  margin: 16px 0;
}

.hero-line {
  width: 75px;
  height: 1px;

  background: var(--gold);

  margin: 38px auto;
}

.hero-date {
  font-family: "Cormorant Garamond", serif;

  font-size: clamp(20px, 3vw, 28px);

  letter-spacing: 6px;
}

.hero-message {
  margin-top: 24px;

  font-size: 8px;

  letter-spacing: 3px;

  line-height: 1.8;
}

/* -------------------------------- */
/* COUNTDOWN */
/* -------------------------------- */

.countdown-section {
  position: relative;

  z-index: 2;

  width: 100%;
}

.countdown-heading {
  font-size: 8px;

  letter-spacing: 4px;

  margin-bottom: 35px;
}

.countdown {
  display: flex;

  justify-content: center;

  align-items: flex-start;

  gap: 26px;
}

.countdown-item {
  min-width: 80px;
}

.countdown-item span {
  display: block;

  font-family: "Cormorant Garamond", serif;

  font-size: clamp(38px, 6vw, 58px);

  font-weight: 400;

  line-height: 1;
}

.countdown-item p {
  margin-top: 12px;

  font-size: 7px;

  letter-spacing: 3px;
}

.countdown-divider {
  font-family: "Cormorant Garamond", serif;

  font-size: 32px;

  color: var(--gold);

  padding-top: 4px;
}

/* -------------------------------- */
/* MOBILE HOMEPAGE */
/* -------------------------------- */

@media (max-width: 600px) {

  .wedding-home {
    padding:
      80px 16px 60px;
  }

  .hero-content {
    margin-bottom: 70px;
  }

  .hero-names {
    font-size: 54px;
  }

  .hero-date {
    font-size: 18px;

    letter-spacing: 4px;
  }

  .countdown {
    gap: 10px;
  }

  .countdown-item {
    min-width: 55px;
  }

  .countdown-item span {
    font-size: 34px;
  }

  .countdown-item p {
    font-size: 6px;

    letter-spacing: 1.5px;
  }

  .countdown-divider {
    font-size: 24px;
  }
}

/* -------------------------------- */
/* EVENT DETAILS */
/* -------------------------------- */

.event-section {
  padding: 120px 20px;

  background: #fffdf8;

  text-align: center;
}

.event-intro {
  margin-bottom: 70px;
}

.section-eyebrow {
  font-size: 8px;
  letter-spacing: 5px;

  margin-bottom: 20px;
}

.event-intro h2 {
  font-family: "Cormorant Garamond", serif;

  font-size: clamp(42px, 6vw, 70px);

  font-weight: 400;

  letter-spacing: 3px;
}

.event-grid {
  width: min(1000px, 100%);

  margin: 0 auto;

  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 30px;
}

.event-card {
  min-height: 500px;

  padding: 55px 35px;

  border: 1px solid rgba(176, 150, 93, 0.45);

  display: flex;
  flex-direction: column;
  align-items: center;

  background:
    linear-gradient(
      180deg,
      #fffefa,
      #f8f2e8
    );
}

.event-number {
  font-family: "Cormorant Garamond", serif;

  font-size: 18px;

  color: var(--gold);

  margin-bottom: 30px;
}

.event-label {
  font-size: 8px;

  letter-spacing: 4px;

  margin-bottom: 26px;
}

.event-card h3 {
  font-family: "Cormorant Garamond", serif;

  font-size: clamp(30px, 4vw, 42px);

  font-weight: 400;

  line-height: 1.05;

  margin-bottom: 35px;
}

.event-time {
  font-family: "Cormorant Garamond", serif;

  font-size: 24px;

  letter-spacing: 3px;

  margin-bottom: 20px;
}

.event-address {
  font-size: 8px;

  line-height: 1.9;

  letter-spacing: 2.5px;

  margin-bottom: 35px;
}

.event-button {
  margin-top: auto;

  display: inline-block;

  padding: 14px 24px;

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

  color: var(--deep-gold);

  text-decoration: none;

  font-size: 8px;

  letter-spacing: 2.5px;

  transition:
    background 0.25s ease,
    color 0.25s ease;
}

.event-button:hover {
  background: var(--gold);

  color: white;
}

/* -------------------------------- */
/* MOBILE EVENTS */
/* -------------------------------- */

@media (max-width: 700px) {

  .event-section {
    padding: 90px 16px;
  }

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

  .event-card {
    min-height: 430px;

    padding: 45px 25px;
  }

}

/* -------------------------------- */
/* RSVP */
/* -------------------------------- */

.rsvp-section {
  padding: 120px 20px;

  background:
    linear-gradient(
      180deg,
      #f7f1e7,
      #fffdf8
    );
}

.rsvp-wrapper {
  width: min(720px, 100%);

  margin: 0 auto;
}

.rsvp-heading {
  text-align: center;

  margin-bottom: 60px;
}

.rsvp-heading h2 {
  font-family: "Cormorant Garamond", serif;

  font-size: clamp(56px, 8vw, 90px);

  font-weight: 400;

  letter-spacing: 4px;
}

.rsvp-intro {
  margin-top: 22px;

  font-size: 8px;

  line-height: 1.9;

  letter-spacing: 2.5px;
}

/* -------------------------------- */
/* RSVP FORM */
/* -------------------------------- */

.rsvp-form {
  display: flex;

  flex-direction: column;

  gap: 32px;
}

.form-group {
  display: flex;

  flex-direction: column;

  gap: 12px;
}

.form-group > label {
  font-size: 8px;

  letter-spacing: 3px;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;

  border: none;

  border-bottom:
    1px solid rgba(37, 35, 31, 0.35);

  background: transparent;

  padding: 13px 2px;

  color: var(--ink);

  font-family: "Montserrat", sans-serif;

  font-size: 11px;

  outline: none;

  border-radius: 0;
}

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

.rsvp-form textarea {
  resize: vertical;

  line-height: 1.7;
}

/* -------------------------------- */
/* ATTENDANCE OPTIONS */
/* -------------------------------- */

.attendance-options {
  display: flex;

  gap: 18px;

  flex-wrap: wrap;
}

.radio-option {
  flex: 1;

  min-width: 200px;

  position: relative;

  cursor: pointer;
}

.radio-option input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}

.radio-option span {
  display: block;

  padding: 16px 18px;

  border:
    1px solid rgba(176, 150, 93, 0.55);

  text-align: center;

  font-size: 8px;

  letter-spacing: 2px;

  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.radio-option input:checked + span {
  background: var(--gold);

  color: white;

  border-color: var(--gold);
}

/* -------------------------------- */
/* SUBMIT BUTTON */
/* -------------------------------- */

.rsvp-submit {
  margin-top: 12px;

  padding: 17px 24px;

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

  background: transparent;

  color: var(--deep-gold);

  font-size: 8px;

  letter-spacing: 3px;

  cursor: pointer;

  transition:
    background 0.25s ease,
    color 0.25s ease;
}

.rsvp-submit:hover {
  background: var(--gold);

  color: white;
}

/* -------------------------------- */
/* SUCCESS MESSAGE */
/* -------------------------------- */

.rsvp-success {
  display: none;

  text-align: center;

  margin-top: 16px;

  font-size: 8px;

  letter-spacing: 2px;

  color: var(--deep-gold);
}

/* -------------------------------- */
/* MOBILE RSVP */
/* -------------------------------- */

@media (max-width: 700px) {

  .rsvp-section {
    padding: 90px 16px;
  }

  .rsvp-heading {
    margin-bottom: 45px;
  }

  .attendance-options {
    flex-direction: column;
  }

  .radio-option {
    min-width: 100%;
  }

}

/* -------------------------------- */
/* FOOTER */
/* -------------------------------- */

.site-footer {
  padding: 100px 20px;

  background:
    linear-gradient(
      180deg,
      #fffdf8,
      #f1e8dc
    );

  text-align: center;
}

.footer-inner {
  width: min(700px, 100%);
  margin: 0 auto;
}

.footer-small {
  font-size: 8px;
  letter-spacing: 5px;
  margin-bottom: 24px;
}

.footer-names {
  font-family: "Cormorant Garamond", serif;

  font-size: clamp(42px, 7vw, 72px);

  font-weight: 400;

  line-height: 0.95;

  letter-spacing: 3px;
}

.footer-names span {
  display: block;

  margin: 10px 0;

  color: var(--gold);

  font-style: italic;

  font-size: 0.6em;
}

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

  margin: 30px auto;

  background: var(--gold);
}

.footer-date {
  font-family: "Cormorant Garamond", serif;

  font-size: 20px;

  letter-spacing: 5px;
}

.footer-message {
  margin-top: 20px;

  font-size: 8px;

  letter-spacing: 2.5px;

  line-height: 1.8;
}

/* -------------------------------- */
/* MOBILE FOOTER */
/* -------------------------------- */

@media (max-width: 700px) {

  .site-footer {
    padding: 80px 16px;
  }

  .footer-names {
    font-size: 46px;
  }

  .footer-date {
    font-size: 17px;

    letter-spacing: 4px;
  }

}

/* -------------------------------- */
/* FINAL MOBILE POLISH */
/* -------------------------------- */

@media (max-width: 700px) {

  body {
    overflow-x: hidden;
  }

  /* OPENING SCREEN */

  .opening-screen {
    min-height: 100svh;
    padding: 28px 14px;
  }

  .opening-copy {
    margin-bottom: 24px;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: 4px;
  }

  .opening-copy h1 {
    font-size: 34px;
    line-height: 1;
  }

  .date {
    font-size: 9px;
    letter-spacing: 4px;
  }

  .envelope-wrapper {
    width: min(92vw, 430px);
  }

  .tap-text {
    margin-top: 26px;
    font-size: 8px;
    letter-spacing: 3px;
  }

  .card-inner {
    padding: 28px 18px;
  }

  .families {
    font-size: 7px;
    letter-spacing: 2px;
    margin-bottom: 22px;
  }

  .card-inner h2 {
    font-size: 36px;
  }

  .card-inner h2 span {
    font-size: 26px;
    margin: 7px 0;
  }

  .invite-line {
    font-size: 7px;
    letter-spacing: 2px;
  }

  .card-date {
    font-size: 16px;
    letter-spacing: 3px;
  }

  #enterWebsite {
    padding: 12px 18px;
    font-size: 7px;
    letter-spacing: 2px;
  }

  /* HERO */

  .wedding-home {
    min-height: auto;
    padding: 80px 16px 70px;
  }

  .hero-content {
    margin-bottom: 65px;
  }

  .hero-small {
    font-size: 8px;
    letter-spacing: 4px;
    margin-bottom: 22px;
  }

  .hero-names {
    font-size: 52px;
    line-height: 0.92;
  }

  .hero-names span {
    margin: 12px 0;
  }

  .hero-line {
    margin: 30px auto;
  }

  .hero-date {
    font-size: 17px;
    letter-spacing: 3px;
  }

  .hero-message {
    font-size: 7px;
    letter-spacing: 2px;
    line-height: 1.7;
  }

  /* COUNTDOWN */

  .countdown-heading {
    font-size: 7px;
    letter-spacing: 3px;
    margin-bottom: 28px;
  }

  .countdown {
    width: 100%;
    gap: 6px;
    justify-content: space-between;
  }

  .countdown-item {
    min-width: 0;
    flex: 1;
  }

  .countdown-item span {
    font-size: 32px;
  }

  .countdown-item p {
    font-size: 6px;
    letter-spacing: 1px;
  }

  .countdown-divider {
    font-size: 20px;
    padding-top: 2px;
  }

  /* EVENT SECTION */

  .event-section {
    padding: 80px 14px;
  }

  .event-intro {
    margin-bottom: 45px;
  }

  .section-eyebrow {
    font-size: 7px;
    letter-spacing: 4px;
  }

  .event-intro h2 {
    font-size: 42px;
    line-height: 1;
  }

  .event-grid {
    gap: 20px;
  }

  .event-card {
    min-height: auto;
    padding: 38px 22px;
  }

  .event-number {
    margin-bottom: 22px;
  }

  .event-label {
    font-size: 7px;
    letter-spacing: 3px;
    margin-bottom: 20px;
  }

  .event-card h3 {
    font-size: 32px;
    margin-bottom: 28px;
  }

  .event-time {
    font-size: 21px;
    margin-bottom: 16px;
  }

  .event-address {
    font-size: 7px;
    letter-spacing: 2px;
    margin-bottom: 28px;
  }

  .event-button {
    width: 100%;
    padding: 15px 18px;
    font-size: 7px;
  }

  /* RSVP */

  .rsvp-section {
    padding: 80px 16px;
  }

  .rsvp-heading {
    margin-bottom: 42px;
  }

  .rsvp-heading h2 {
    font-size: 58px;
  }

  .rsvp-intro {
    font-size: 7px;
    letter-spacing: 2px;
  }

  .rsvp-form {
    gap: 26px;
  }

  .form-group > label {
    font-size: 7px;
    letter-spacing: 2px;
  }

  .rsvp-form input,
  .rsvp-form select,
  .rsvp-form textarea {
    font-size: 16px;
    padding: 14px 2px;
  }

  .radio-option {
    min-width: 100%;
  }

  .radio-option span {
    padding: 17px 14px;
    font-size: 7px;
    letter-spacing: 1.8px;
  }

  .rsvp-submit {
    min-height: 52px;
    font-size: 8px;
    letter-spacing: 2.5px;
  }

  /* FOOTER */

  .site-footer {
    padding: 70px 16px 80px;
  }

  .footer-small {
    font-size: 7px;
    letter-spacing: 4px;
  }

  .footer-names {
    font-size: 44px;
  }

  .footer-date {
    font-size: 16px;
    letter-spacing: 3px;
  }

  .footer-message {
    font-size: 7px;
    letter-spacing: 2px;
  }

}