:root {
  --ink: #07192f;
  --ink-soft: #102b4d;
  --ivory: #fffaf0;
  --paper: #f6f0e5;
  --gold: #d8b879;
  --gold-deep: #aa8241;
  --white: #ffffff;
  --shadow: 0 30px 90px rgba(2, 12, 25, 0.34);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

body.is-locked { overflow: hidden; }

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.11;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.eyebrow {
  margin: 0;
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.opening {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(74, 114, 155, 0.48), transparent 30%),
    radial-gradient(circle at 10% 100%, rgba(216, 184, 121, 0.18), transparent 28%),
    linear-gradient(145deg, #04101f 0%, #092443 58%, #06182f 100%);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.opening::before,
.opening::after {
  content: "";
  position: absolute;
  width: min(64vw, 720px);
  aspect-ratio: 1;
  border: 1px solid rgba(216, 184, 121, 0.17);
  border-radius: 50%;
}

.opening::before { top: -42vw; left: -22vw; }
.opening::after { right: -32vw; bottom: -48vw; }

.opening.is-open { opacity: 0; visibility: hidden; }

.opening__ornament {
  position: absolute;
  top: clamp(28px, 6vh, 70px);
  color: var(--gold);
  font-size: 1.25rem;
}

.opening__ornament::before,
.opening__ornament::after {
  content: "";
  position: absolute;
  top: 50%;
  width: min(22vw, 190px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.opening__ornament::before { right: 32px; }
.opening__ornament::after { left: 32px; transform: rotate(180deg); }

.opening__card {
  position: relative;
  width: min(92vw, 620px);
  min-height: min(72vh, 620px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(42px, 8vw, 88px) clamp(24px, 6vw, 70px);
  text-align: center;
  background:
    linear-gradient(rgba(255, 250, 240, 0.96), rgba(255, 250, 240, 0.96)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(170, 130, 65, 0.05) 12px 13px);
  border: 1px solid rgba(216, 184, 121, 0.58);
  border-radius: 220px 220px 18px 18px;
  box-shadow: var(--shadow);
}

.opening__card::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(170, 130, 65, 0.23);
  border-radius: inherit;
  pointer-events: none;
}

.opening__monogram {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 7px;
  width: 124px;
  height: 124px;
  margin-bottom: 34px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 2.55rem;
  line-height: 1;
}

.opening__monogram span { color: var(--gold-deep); font-size: 1.2rem; }

.opening h1 {
  margin: 12px 0 6px;
  font-family: var(--serif);
  font-size: clamp(3.3rem, 10vw, 6.2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.opening__date {
  margin: 18px 0 34px;
  color: #6f634f;
  font-size: 0.76rem;
  letter-spacing: 0.35em;
}

.opening__hint {
  position: absolute;
  bottom: clamp(24px, 5vh, 55px);
  margin: 0;
  color: rgba(255, 250, 240, 0.62);
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}

.button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 54px;
  padding: 0 26px;
  font-size: 0.86rem;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.button:hover { transform: translateY(-2px); }
.button:focus-visible, .sound-button:focus-visible, .date-seal:focus-visible, .brand:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

.button--gold {
  color: #07192f;
  background: linear-gradient(120deg, #c69a4e, #f0d89b, #bd8e41);
  box-shadow: 0 12px 30px rgba(170, 130, 65, 0.28);
}

main { min-height: 100vh; }

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--ivory);
  background:
    linear-gradient(180deg, rgba(2, 12, 25, 0.12), rgba(2, 12, 25, 0.48)),
    url("./assets/hero-bg.webp") center / cover no-repeat,
    #07192f;
}

.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 43%, transparent 10%, rgba(2, 12, 25, 0.28) 82%); }

.hero__nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 40px, 1180px);
  margin: 0 auto;
  padding: 24px 0;
}

.brand {
  color: var(--ivory);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.8rem;
  letter-spacing: 0.03em;
}

.brand span { margin: 0 2px; color: var(--gold); font-size: 0.8em; }

.sound-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  color: var(--ivory);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.sound-button__bars { display: flex; align-items: center; gap: 2px; height: 16px; }
.sound-button__bars i { display: block; width: 2px; height: 5px; background: var(--gold); }
.sound-button__bars i:nth-child(2) { height: 10px; }
.sound-button__label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 36px, 960px);
  min-height: calc(100svh - 112px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 0 96px;
  text-align: center;
}

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

.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: clamp(24px, 5vh, 52px) 0 24px;
  font-family: var(--serif);
  font-size: clamp(4rem, 12vw, 9.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.69;
  text-wrap: balance;
}

.hero__names b {
  margin: 20px 0 15px;
  color: var(--gold);
  font-size: 0.3em;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  line-height: 1;
}

.hero__invitation {
  max-width: 540px;
  margin: 18px 0 34px;
  color: rgba(255, 250, 240, 0.72);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.7vw, 1.5rem);
  line-height: 1.45;
}

.date-seal {
  display: grid;
  grid-template-columns: 90px 64px 110px;
  align-items: center;
  gap: 10px;
  color: var(--ivory);
  text-decoration: none;
  text-transform: uppercase;
}

.date-seal span { font-size: 0.63rem; letter-spacing: 0.13em; }
.date-seal span:first-child { text-align: right; }
.date-seal span:last-child { text-align: left; }
.date-seal strong {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.hero__scroll {
  position: absolute;
  z-index: 2;
  left: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.48);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero__scroll span { width: 42px; height: 1px; background: currentColor; }

.section { position: relative; padding: clamp(88px, 12vw, 160px) max(20px, calc((100vw - 1180px) / 2)); }

.section h2 {
  margin: 14px 0 26px;
  font-family: var(--serif);
  font-size: clamp(3.25rem, 8vw, 7.2rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.welcome {
  overflow: hidden;
  color: var(--ink);
  text-align: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(216, 184, 121, 0.14), transparent 24%),
    var(--ivory);
}

.welcome::before,
.welcome::after {
  content: "";
  position: absolute;
  width: clamp(160px, 25vw, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(170, 130, 65, 0.22);
  border-radius: 50%;
}

.welcome::before { top: 12%; left: -13%; }
.welcome::after { right: -13%; bottom: 8%; }

.welcome__ornament { margin-bottom: 24px; color: var(--gold-deep); font-size: 2rem; }
.welcome h2 { position: relative; z-index: 1; }

.welcome__copy {
  position: relative;
  z-index: 1;
  max-width: 670px;
  margin: 0 auto;
  color: #4f5965;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.55;
}

.couple-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: clamp(50px, 7vw, 82px);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 2rem;
}

.couple-mark i { width: min(12vw, 110px); height: 1px; background: rgba(170, 130, 65, 0.5); }
.couple-mark b { color: var(--gold-deep); font-size: 1.25rem; font-weight: 400; font-style: italic; }

.date-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(430px, 1.2fr);
  align-items: center;
  gap: clamp(60px, 10vw, 150px);
  color: var(--ivory);
  background: var(--ink);
}

.date-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background: linear-gradient(125deg, transparent 12%, rgba(216, 184, 121, .2), transparent 52%);
  pointer-events: none;
}

.date-section__intro,
.calendar-card { position: relative; z-index: 1; }
.date-section__intro h2 em { color: var(--gold); font-weight: 400; }
.date-section__intro > p:last-child { max-width: 410px; color: rgba(255,250,240,.62); font-family: var(--serif); font-size: 1.35rem; line-height: 1.5; }

.calendar-card {
  padding: clamp(28px, 5vw, 58px);
  color: var(--ink);
  background: var(--ivory);
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.calendar-card::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(170,130,65,.26);
  pointer-events: none;
}

.calendar-card__head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 26px; border-bottom: 1px solid rgba(7,25,47,.13); }
.calendar-card__head span { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.6rem); }
.calendar-card__head strong { color: var(--gold-deep); font-size: 0.75rem; letter-spacing: .22em; }

.calendar-card__weekdays,
.calendar-card__days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.calendar-card__weekdays { padding: 25px 0 12px; color: #84909c; font-size: .67rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.calendar-card__days { row-gap: 10px; }
.calendar-card__days span { display: grid; place-items: center; aspect-ratio: 1; min-height: 42px; font-size: .85rem; }
.calendar-card__days .is-empty { visibility: hidden; }
.calendar-card__days .is-wedding-day { position: relative; z-index: 1; color: var(--ivory); font-weight: 600; }
.calendar-card__days .is-wedding-day::before { content: ""; position: absolute; z-index: -1; width: 80%; aspect-ratio: 1; border-radius: 50%; background: var(--ink-soft); box-shadow: 0 0 0 6px rgba(216,184,121,.22); }

.calendar-card__actions { display: flex; align-items: center; gap: 22px; margin-top: 34px; }
.button--ink { flex: 1; color: var(--ivory); text-decoration: none; background: var(--ink); }
.text-button { color: var(--gold-deep); background: none; border: 0; border-bottom: 1px solid currentColor; cursor: pointer; font-size: .75rem; padding: 8px 0; }

.countdown {
  overflow: hidden;
  color: var(--ivory);
  text-align: center;
  background:
    linear-gradient(rgba(5,19,37,.85), rgba(5,19,37,.94)),
    url("./assets/hero-bg.webp") center 68% / cover no-repeat;
  border-top: 1px solid rgba(216,184,121,.18);
}

.countdown__glow { position: absolute; width: 480px; height: 480px; top: -290px; left: 50%; transform: translateX(-50%); border-radius: 50%; background: rgba(216,184,121,.13); filter: blur(60px); }
.countdown h2 { margin-bottom: clamp(44px, 7vw, 82px); }
.countdown__grid { width: min(100%, 900px); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.countdown__grid div { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 6px 18px; }
.countdown__grid div:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 12%; height: 76%; width: 1px; background: rgba(216,184,121,.28); }
.countdown__grid strong { color: var(--ivory); font-family: var(--serif); font-size: clamp(3.5rem, 8vw, 7rem); font-weight: 400; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown__grid span { color: var(--gold); font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }

.venue {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 10vw, 150px);
  overflow: hidden;
  background: var(--paper);
}

.venue__number { color: transparent; font-family: var(--serif); font-size: clamp(15rem, 32vw, 31rem); line-height: .7; letter-spacing: -.13em; -webkit-text-stroke: 1px rgba(170,130,65,.4); transform: translateX(-3vw); }
.venue__content { position: relative; z-index: 1; }
.venue__content h2 { font-size: clamp(3.4rem, 7vw, 6.4rem); }
.venue__content > p:not(.eyebrow) { max-width: 540px; color: #5c6570; font-family: var(--serif); font-size: clamp(1.2rem, 2.5vw, 1.55rem); }
.venue__meta { display: flex; gap: clamp(28px, 6vw, 70px); margin-top: 44px; padding-top: 26px; border-top: 1px solid rgba(7,25,47,.12); }
.venue__meta span { display: flex; flex-direction: column; color: var(--ink); font-family: var(--serif); font-size: 1.35rem; }
.venue__meta small { color: var(--gold-deep); font-family: var(--sans); font-size: .64rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }

.closing {
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--ivory);
  text-align: center;
  background:
    linear-gradient(rgba(4,16,31,.44), rgba(4,16,31,.93)),
    url("./assets/hero-bg.webp") center / cover no-repeat;
}

.closing::before { content: ""; position: absolute; inset: 22px; border: 1px solid rgba(216,184,121,.3); pointer-events: none; }
.closing__mark { display: grid; place-items: center; grid-template-columns: 1fr auto 1fr; gap: 8px; width: 128px; height: 128px; margin-bottom: 40px; border: 1px solid rgba(216,184,121,.72); border-radius: 50%; font-family: var(--serif); font-size: 2.45rem; }
.closing__mark span { color: var(--gold); font-size: 1.1rem; }
.closing h2 { margin: 12px 0 22px; }
.closing > p:not(.eyebrow):not(.closing__date) { max-width: 520px; margin: 0 auto 38px; color: rgba(255,250,240,.67); font-family: var(--serif); font-size: 1.35rem; }
.button--outline { color: var(--ivory); background: rgba(255,255,255,.03); border: 1px solid rgba(216,184,121,.65); backdrop-filter: blur(10px); }
.closing__date { margin: 48px 0 0; color: var(--gold); font-size: .68rem; letter-spacing: .32em; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid rgba(216,184,121,.7);
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0,0,0,.24);
  opacity: 0;
  visibility: hidden;
  transition: .25s ease;
  font-size: .78rem;
}

.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.75,.25,1); }
.reveal.is-visible { opacity: 1; transform: none; }

.sound-button.is-playing .sound-button__bars i { animation: soundbar .9s ease-in-out infinite alternate; }
.sound-button.is-playing .sound-button__bars i:nth-child(2) { animation-delay: .2s; }
.sound-button.is-playing .sound-button__bars i:nth-child(3) { animation-delay: .4s; }

@keyframes soundbar { from { height: 4px; } to { height: 15px; } }

@media (max-width: 640px) {
  .opening { padding: 14px; }
  .opening__card { width: 100%; min-height: 76vh; border-radius: 180px 180px 16px 16px; }
  .opening__monogram { width: 104px; height: 104px; font-size: 2.2rem; }
  .opening__hint { font-size: 0.9rem; }
  .hero__nav { width: min(100% - 30px, 1180px); }
  .sound-button__label { display: none; }
  .sound-button { width: 44px; padding: 0; justify-content: center; }
  .hero__content { padding-bottom: 80px; }
  .hero__names { font-size: clamp(3.8rem, 20vw, 6.5rem); line-height: 0.75; }
  .date-seal { grid-template-columns: 74px 58px 92px; }
  .date-seal strong { width: 58px; height: 58px; }
  .hero__scroll { display: none; }
  .section { padding-top: 84px; padding-bottom: 84px; }
  .date-section { grid-template-columns: 1fr; gap: 46px; }
  .date-section__intro { text-align: center; }
  .date-section__intro > p:last-child { margin-inline: auto; }
  .calendar-card { margin-inline: -4px; padding: 28px 22px 30px; }
  .calendar-card__actions { flex-direction: column; align-items: stretch; }
  .text-button { align-self: center; }
  .countdown__grid { grid-template-columns: repeat(2, 1fr); row-gap: 42px; }
  .countdown__grid div:nth-child(2)::after { display: none; }
  .countdown__grid strong { font-size: 4.2rem; }
  .venue { grid-template-columns: 1fr; gap: 34px; }
  .venue__number { position: absolute; top: 110px; right: -24px; font-size: 18rem; opacity: .54; }
  .venue__content { padding-top: 160px; }
  .venue__meta { flex-direction: column; gap: 22px; }
  .closing::before { inset: 12px; }
  .closing__mark { width: 108px; height: 108px; font-size: 2.1rem; }
}

@media (min-width: 641px) and (max-width: 960px) {
  .date-section { grid-template-columns: 1fr 1.2fr; gap: 42px; }
  .calendar-card { padding: 34px; }
  .venue { grid-template-columns: .65fr 1fr; gap: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
