@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-500i-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-500i-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-500i-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-500-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-600-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Comforter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Comforter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Comforter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Comforter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #55463d;
  --ink-dark: #313230;
  --ink-gray: #525046;
  --cream: #eae6df;
  --pale: #e3e1dd;
  --bg: #e6e2dc;
  --bg-brown: #4a3e33;
  --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --script: 'Comforter', 'Snell Roundhand', cursive;
  --sans: Arial, Helvetica, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg) url('/assets/img/paper-ivory.webp') repeat-y top center / 100% auto;
  color: var(--ink);
  font-family: var(--serif);
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

.caps {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .138em;
  line-height: 1.6;
}

.caps-wide { letter-spacing: .382em; }

.script {
  font-family: var(--script);
  font-weight: 400;
  line-height: .9;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "clig" 0, "calt" 0;
}

.italic {
  font-style: italic;
  font-weight: 400;
  line-height: 1.26;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sec {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fade {
  transition: opacity .28s ease;
}
body.leaving .fade { opacity: 0; }

.page-index {
  justify-content: center;
  gap: clamp(26px, 3.2vw, 44px);
  text-align: center;
  padding: 24px 16px;
}

.hint { font-size: clamp(12px, 1.414vw, 19.3px); }

.env-hero {
  position: relative;
  display: block;
  width: clamp(300px, 46.1vw, 630px);
  aspect-ratio: 630 / 378;
  container-type: inline-size;
  transition: transform .3s ease;
}
.env-hero:hover { transform: scale(1.02); }
.env-hero img { width: 100%; height: 100%; object-fit: contain; }
.env-name {
  position: absolute;
  left: 4.8%;
  top: 33%;
  width: 91.6%;
  color: var(--cream);
  font-size: clamp(28px, 14vw, 92px);
  font-size: 16cqw;
  line-height: 1.1;
  text-align: center;
  transform: rotate(-10.2185deg);
  pointer-events: none;
}
body.leaving .env-hero { transform: scale(1.07); }

.std-title {
  margin-top: clamp(48px, 9vw, 124px);
  font-size: clamp(52px, 8vw, 110px);
  transform: rotate(-8deg);
  line-height: .9;
  text-align: center;
}

.std-date {
  margin-top: clamp(20px, 3.1vw, 43px);
  font-size: clamp(14px, 1.72vw, 23.6px);
}

.frame-media {
  position: relative;
  margin-top: clamp(20px, 2.8vw, 38px);
  width: clamp(240px, 24.5vw, 335px);
  aspect-ratio: 335 / 491;
}
.frame-media > img { width: 100%; height: 100%; }
.frame-video {
  position: absolute;
  left: 14.74%;
  top: 15.01%;
  width: 70.61%;
  height: 66.43%;
  clip-path: url(#clip-oval);
}
.frame-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.std-names {
  margin-top: clamp(14px, 1.6vw, 24px);
  font-size: clamp(46px, 7vw, 96px);
}

.std-place {
  margin-top: clamp(12px, 1.7vw, 24px);
  font-size: clamp(12.5px, 1.53vw, 20.9px);
}

.std-prompt {
  margin-top: clamp(12px, 1.5vw, 21px);
  font-size: clamp(15px, 1.89vw, 25.8px);
}

.invite-text {
  width: min(88vw, 640px);
  font-size: clamp(16px, 1.89vw, 25.8px);
}
.invite-text + .invite-text { margin-top: clamp(10px, 1.2vw, 16px); }
.invite-tasks {
  list-style: none;
  margin-top: clamp(10px, 1.2vw, 16px);
  font-size: clamp(16px, 1.89vw, 25.8px);
  line-height: 1.5;
}
.invite-tasks + .invite-text { margin-top: clamp(14px, 1.7vw, 24px); }
.invite-sign {
  margin-top: clamp(18px, 2.2vw, 30px);
  margin-bottom: clamp(56px, 9vw, 124px);
  font-size: clamp(28px, 3.3vw, 45px);
  color: var(--ink);
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(18px, 2.4vw, 34px);
}
.divider::before,
.divider::after {
  content: '';
  width: clamp(44px, 6vw, 84px);
  height: 1px;
  background: #ab9f91;
}
.divider i {
  width: 7px;
  height: 7px;
  background: #ab9f91;
  transform: rotate(45deg);
}
.divider + .std-place,
.divider + .invite-text { margin-top: clamp(18px, 2.4vw, 34px); }

.btn {
  display: inline-block;
  margin-top: clamp(22px, 2.6vw, 36px);
  border: 1px solid var(--ink-gray);
  padding: 1.2em 2.6em;
  font-family: var(--serif);
  font-size: clamp(11px, 1.414vw, 19.3px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .382em;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background .25s ease;
}
.btn:hover { background: rgba(85, 70, 61, .07); }
.sec > .btn { margin-bottom: clamp(56px, 9vw, 124px); }

.btn-sm {
  font-size: clamp(10.5px, .93vw, 12.65px);
  color: var(--ink-dark);
  border-color: #373737;
  padding: 1.55em 2em;
  min-width: clamp(220px, 21vw, 287px);
}

.std-note {
  margin-top: clamp(28px, 3.8vw, 52px);
  margin-bottom: clamp(56px, 10.5vw, 143px);
  font-size: clamp(12.5px, 1.53vw, 20.9px);
}

.sec-brown {
  background: var(--bg-brown) url('/assets/img/paper-brown.webp') repeat-y top center / 100% auto;
  padding: clamp(44px, 8.6vw, 118px) 0 clamp(16px, 2vw, 28px);
}

.count-env {
  position: relative;
  width: clamp(320px, 50.2vw, 686px);
  aspect-ratio: 686 / 412;
  container-type: inline-size;
}
.count-env > img { width: 100%; height: 100%; }

.count-script {
  position: absolute;
  left: 0;
  right: 0;
  top: 14%;
  font-size: clamp(24px, 7.2vw, 52px);
  font-size: 7.6cqw;
  line-height: 1.15;
  color: var(--ink);
  text-align: center;
}

.countdown {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  color: var(--ink-gray);
}
.countdown .unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(24px, 6.2vw, 45px);
  min-width: 6.5cqw;
}
.countdown .num {
  font-size: clamp(13px, 3.8vw, 28px);
  font-size: 4cqw;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.countdown .lbl {
  margin-top: 2px;
  margin-top: .4cqw;
  font-family: var(--sans);
  font-size: clamp(6px, 1.3vw, 9.5px);
  font-size: 1.35cqw;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.countdown .sep {
  font-size: clamp(13px, 3.8vw, 28px);
  font-size: 4cqw;
  font-weight: 600;
  line-height: 1.1;
  padding: 0 .9cqw;
}

.locket-blk {
  position: relative;
  width: clamp(200px, 22.5vw, 307px);
  aspect-ratio: 307 / 253;
}
.count-env .locket-blk {
  position: absolute;
  left: 59.5%;
  top: 50%;
  width: 44.8%;
}
.locket-img {
  position: absolute;
  left: 5.9%;
  top: 10.2%;
  width: 94.1%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  transform: rotate(-11.084deg);
}
.ribbon-img {
  position: absolute;
  left: 3.1%;
  top: 10.5%;
  width: 94.1%;
  aspect-ratio: 415.36 / 184.39;
  object-fit: cover;
  object-position: top;
  transform: rotate(-11.084deg);
}
.heart {
  position: absolute;
  transform: rotate(-11.084deg);
  overflow: hidden;
}
.heart img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}
.heart-l {
  left: 21.7%;
  top: 55%;
  width: 28%;
  aspect-ratio: 605.19 / 610.44;
  clip-path: url(#clip-heart-l);
}
.heart-r {
  left: 58.8%;
  top: 46.2%;
  width: 28.8%;
  aspect-ratio: 621.71 / 607.27;
  clip-path: url(#clip-heart-r);
}

.go-back {
  display: inline-block;
  margin-top: clamp(36px, 7vw, 95px);
  font-size: clamp(10px, 1.02vw, 14px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .382em;
  color: var(--ink);
}
.sec-brown .go-back { color: var(--pale); }

.dt-title {
  margin-top: clamp(48px, 9.7vw, 133px);
  font-size: clamp(46px, 7vw, 96px);
}

.dt-locket { margin-top: clamp(14px, 1.8vw, 25px); }

.dt-text {
  margin-top: clamp(14px, 1.7vw, 23px);
  width: min(88vw, 543px);
  font-size: clamp(14px, 1.6vw, 21.8px);
  color: var(--ink-dark);
}

.dt-reply {
  margin-top: clamp(12px, 1.6vw, 22px);
  font-size: clamp(13px, 1.63vw, 22.3px);
}

.form-panel {
  margin-top: clamp(14px, 1.7vw, 23px);
  width: min(92vw, 618px);
  background: rgba(236, 233, 227, .8);
  padding: clamp(24px, 3vw, 42px) clamp(20px, 3.4vw, 46px) clamp(28px, 3.4vw, 46px);
  text-align: left;
}
.form-panel label {
  display: block;
  margin: clamp(18px, 2.2vw, 30px) 0 10px;
  font-style: italic;
  font-size: clamp(15px, 1.55vw, 21px);
  color: #3b3a35;
}
.form-panel label:first-child { margin-top: 0; }
.form-panel input,
.form-panel textarea {
  width: 100%;
  background: #fbfaf8;
  border: 1px solid #b3aea6;
  border-radius: 5px;
  padding: 12px 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-dark);
}
.form-panel textarea { min-height: 104px; resize: vertical; }
.form-panel input:focus,
.form-panel textarea:focus {
  outline: none;
  border-color: var(--ink-gray);
}
.hp { position: absolute; left: -5000px; opacity: 0; }
.submit {
  width: 100%;
  margin-top: clamp(24px, 3vw, 42px);
  background: #d5cec6;
  border: none;
  border-radius: 9px;
  padding: 15px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 1.55vw, 21px);
  color: #3f3931;
  cursor: pointer;
  transition: background .25s ease;
}
.submit:hover { background: #cbc3ba; }
.submit[disabled] { opacity: .6; cursor: default; }
.form-thanks {
  margin: clamp(24px, 3vw, 42px) auto 0;
  width: min(88vw, 543px);
  font-style: italic;
  font-size: clamp(16px, 1.7vw, 23px);
  color: var(--ink-dark);
  text-align: center;
}
.form-error {
  margin-top: 14px;
  font-style: italic;
  font-size: 15px;
  color: #7a3b2e;
  display: none;
}

.page-rsvp {
  justify-content: center;
  padding: 40px 16px;
}
.rsvp-title { font-size: clamp(12px, 1.414vw, 19.3px); }
.rsvp-text {
  margin-top: clamp(14px, 1.6vw, 22px);
  width: min(88vw, 395px);
  font-size: clamp(14px, 1.6vw, 21.8px);
  color: var(--ink-dark);
}
.rsvp-btns {
  margin-top: clamp(20px, 2.7vw, 37px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.page-rsvp .go-back { margin-top: clamp(30px, 5vw, 68px); }

.dt-back { margin-bottom: clamp(20px, 3vw, 42px); }

@media (max-width: 600px) {
  .env-hero { width: min(88vw, 630px); }
  .frame-media { width: min(64vw, 335px); }
  .count-env { width: min(94vw, 686px); }
  .std-title { font-size: clamp(54px, 15.5vw, 110px); }
  .std-names { font-size: clamp(46px, 13.5vw, 96px); }
  .dt-title { font-size: clamp(46px, 13.5vw, 96px); }
  .dt-locket { width: min(58vw, 307px); }
}

@media (prefers-reduced-motion: reduce) {
  .fade, .env-hero, .btn, .submit { transition: none; }
}
