@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/cormorant.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/cormorant-italic.woff2") format("woff2");
}

@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit.woff2") format("woff2");
}

:root {
  --ivory: #f6f1e8;
  --paper: #fbf8f3;
  --wine: #6e2a38;
  --wine-deep: #3c1822;
  --ink: #3a271c;
  --gold: #a68558;
  --gold-deep: #6f5134;
  --line: rgba(166, 133, 88, 0.55);
  --serif: "Cormorant Garamond", Palatino, "Palatino Linotype", "Times New Roman", serif;
  --sans: Outfit, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: clip;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

::selection {
  background: #ead9c6;
  color: var(--wine-deep);
}

.sheet {
  width: min(100%, 460px);
  margin-inline: auto;
  min-height: 100dvh;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(255, 252, 247, 0.95), transparent 58%),
    radial-gradient(380px 220px at 100% 18%, rgba(166, 133, 88, 0.09), transparent 70%),
    radial-gradient(320px 200px at 0% 78%, rgba(110, 42, 56, 0.045), transparent 72%),
    var(--ivory);
}

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

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 16px;
  color: var(--gold);
}

.ornament span {
  width: 58px;
  height: 1px;
  background: currentColor;
}

.ornament svg {
  display: block;
  fill: currentColor;
}

.cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:
    max(64px, calc(env(safe-area-inset-top) + 36px))
    22px
    12px;
  text-align: center;
}

.cross {
  width: 28px;
  height: 46px;
  margin-bottom: 18px;
  color: var(--gold);
}

.cross path,
.scroll path,
.btn path,
.btn rect,
.btn circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cover .kicker {
  margin-bottom: 18px;
}

h1 {
  max-width: 100%;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(4rem, 18vw, 5.6rem);
  line-height: 0.92;
  color: var(--wine);
}

.name {
  display: block;
}

.amp {
  display: block;
  margin: 0.08em 0 0.04em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 0.36em;
  line-height: 1;
  color: var(--gold-deep);
}

.cover .ornament {
  margin-top: 22px;
  margin-bottom: 0;
}

.when {
  margin-top: 20px;
}

.when-date {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
}

.when-time {
  display: block;
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.where {
  margin-top: 14px;
  max-width: 18em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.12rem, 4.8vw, 1.28rem);
  line-height: 1.35;
}

.scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  text-decoration: none;
  color: var(--gold-deep);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.scroll svg {
  animation: bob 1.7s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.section {
  padding: 56px 22px 8px;
  text-align: center;
}

.letter {
  position: relative;
  margin-top: 8px;
  padding: 36px 16px 32px;
  background: rgba(251, 248, 243, 0.72);
  border: 1px solid var(--gold);
}

.letter::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(166, 133, 88, 0.45);
  pointer-events: none;
}

.person {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.48rem, 6.6vw, 1.72rem);
  line-height: 1.12;
  color: var(--ink);
}

.amp-small {
  margin: 2px 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--gold-deep);
}

.place {
  margin-top: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  letter-spacing: 0.03em;
  color: var(--gold-deep);
}

.prose {
  margin: 28px auto;
  max-width: 22em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.42rem;
  line-height: 1.35;
  text-wrap: balance;
}

.union {
  margin-bottom: 28px;
}

.union-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.7rem, 11vw, 3.2rem);
  line-height: 0.95;
  color: var(--wine);
}

.with {
  margin: 2px 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--gold-deep);
}

.kin-label {
  margin-bottom: 12px;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.datemark {
  margin: 8px 0 26px;
}

.dow,
.month {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.day {
  width: 108px;
  height: 108px;
  margin: 12px auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  outline: 1px solid rgba(166, 133, 88, 0.5);
  outline-offset: 5px;
  background: transparent;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 3.3rem;
  line-height: 1;
  color: var(--wine);
}

.events {
  display: grid;
  gap: 12px;
}

.event {
  padding: 20px 14px 18px;
  background: rgba(251, 248, 243, 0.66);
  border: 1px solid var(--line);
}

.event h3 {
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.event time {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.15rem;
  line-height: 1.1;
  color: var(--wine);
}

.venue {
  margin-top: 6px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.08rem, 4.6vw, 1.2rem);
  line-height: 1.3;
}

.tz {
  margin-top: 12px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.countdown-block {
  margin-top: 36px;
}

.count-fallback,
.count-note {
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
}

.count {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.count div {
  padding: 10px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.count strong {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.85rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--wine);
}

.count span {
  display: block;
  margin-top: 5px;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.btn svg {
  flex: none;
}

.btn-fill {
  background: var(--wine);
  color: #f7f3ec;
  border: 1px solid var(--wine);
}

.btn-line {
  background: transparent;
  color: var(--wine);
  border: 1px solid var(--gold);
}

.text-btn {
  justify-self: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--gold-deep);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.card-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--gold-deep);
}

.sharing-title {
  margin-bottom: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1.2;
  color: var(--wine);
}

#contact .actions {
  margin-top: 26px;
}

.footer {
  padding: 48px 22px calc(36px + env(safe-area-inset-bottom));
  text-align: center;
}

.footer p {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--wine);
}

.footer em {
  font-style: italic;
  color: var(--gold-deep);
}

.footer span {
  display: block;
  margin-top: 8px;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--wine-deep);
  color: #f6f1e8;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 5;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (hover: hover) {
  .btn-fill:hover {
    background: #581f2c;
  }

  .btn-line:hover {
    background: rgba(110, 42, 56, 0.05);
  }
}

.btn:active,
.text-btn:active {
  transform: translateY(1px);
}

@media (min-width: 760px) and (min-height: 700px) {
  body {
    background:
      radial-gradient(ellipse at 50% -10%, rgba(196, 165, 116, 0.22), transparent 42%),
      var(--wine-deep);
  }

  .sheet {
    width: 460px;
    margin: 28px auto;
    min-height: calc(100dvh - 56px);
    box-shadow:
      0 0 0 1px rgba(196, 165, 116, 0.38),
      0 28px 80px rgba(0, 0, 0, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll svg {
    animation: none;
  }

  .js .reveal,
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:active,
  .text-btn:active {
    transform: none;
  }
}

body.is-intro {
  overflow: hidden;
  background: var(--ivory);
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  text-align: center;
  background:
    radial-gradient(880px 460px at 50% 40%, rgba(255, 252, 247, 0.96), transparent 64%),
    var(--ivory);
  transition: opacity 0.55s ease;
}

.gate.is-leaving {
  opacity: 0;
}

.gate-names {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(4.4rem, 20vw, 6.5rem);
  line-height: 0.9;
  color: var(--wine);
}

.enter {
  width: min(220px, 74vw);
  margin-top: 36px;
}

.film {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #14090d;
}

.film video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  text-align: center;
  color: #f7f3ec;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
}

.film-caption p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 2rem;
}

.film-caption span {
  display: block;
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.skip {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  min-height: 44px;
  padding: 8px 22px;
  border: 1px solid rgba(247, 243, 236, 0.75);
  border-radius: 999px;
  background: rgba(20, 9, 13, 0.38);
  color: #f7f3ec;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sound {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 45;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--wine);
  color: #f7f3ec;
  cursor: pointer;
}

.sound path,
.sound circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  .gate {
    transition: none;
  }
}

@media print {
  body {
    background: white;
  }

  .sheet {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .cover {
    min-height: auto;
    padding-top: 12px;
  }

  #gate,
  #film,
  #sound,
  .scroll,
  .actions,
  .countdown-block,
  .toast {
    display: none !important;
  }

  #details[hidden] {
    display: block !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
