/* Comfort & Toby — save the date.
   An ivory linen envelope opens into a soft off-white world written in
   burgundy ink: quiet, classic Italian wedding stationery. */

:root {
  --room: #ede6da;         /* the soft paper world the envelope lives in */
  --page: #f7f1e6;         /* warm off-white, the lace-reference ivory */
  --page-deep: #efe7d8;
  --card: #fffdf9;         /* the calendar card, a breath whiter than the page */
  --ink: #45333a;          /* warm plum-ink for reading text */
  --ink-soft: #7d6a70;
  --wine: #6b2f3a;         /* the burgundy everything gold used to be */
  --wine-deep: #512129;
  --wine-soft: rgba(107, 47, 58, 0.38);
  --serif: "EB Garamond", Georgia, serif;
  --display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --script: "Pinyon Script", cursive;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--page); }
body {
  font-family: var(--serif);
  background: var(--grain), var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; }

/* ==================== the opening: one continuous film ====================
   The idle screen IS frame 0 of the footage (the poster is extracted from it):
   the phone is the envelope — paper past every edge, nothing else. */

.film {
  position: fixed; inset: 0; z-index: 30;
  background: var(--room);
  overflow: hidden;
}
.film__movie {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--room);
}
/* the whole screen is the button */
.film__tap {
  position: absolute; inset: 0;
  -webkit-tap-highlight-color: transparent;
}
.film__tap:focus-visible { outline: 2px solid var(--wine); outline-offset: -6px; }
/* the handover: paper-toned, not light — the world changes under it quietly */
.film__wash {
  position: absolute; inset: 0;
  background: var(--page);
  opacity: 0;
  pointer-events: none;
}

.film__hint {
  position: absolute; left: 0; right: 0; bottom: max(7dvh, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  text-transform: uppercase;
  color: var(--wine);
  opacity: 0.85;
  animation: hintBreathe 2.8s ease-in-out infinite;
}
@keyframes hintBreathe { 0%, 100% { opacity: 0.6; } 50% { opacity: 0.95; } }

.film__skip {
  position: absolute;
  right: 18px;
  top: calc(14px + env(safe-area-inset-top));
  padding: 9px 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: var(--wine);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--wine-soft);
  background: rgba(247, 241, 230, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  -webkit-tap-highlight-color: transparent;
}

/* ==================== the page ==================== */

.page { position: relative; min-height: 100dvh; }

/* ---------- the living hero ---------- */

.hero {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  background: var(--page-deep);
}
.hero__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(30, 18, 14, 0.30) 0%, transparent 30%),
    linear-gradient(0deg, rgba(30, 18, 14, 0.58) 0%, transparent 44%);
}
.hero__content {
  position: absolute; left: 20px; right: 20px; bottom: 15dvh;
  text-align: center;
  color: #fbf5ea;
}
.hero__kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.52em;
  text-indent: 0.52em;
  text-transform: uppercase;
  color: rgba(251, 245, 234, 0.9);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}
.hero__names {
  margin-top: 14px;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(52px, 15vw, 86px);
  line-height: 1.05;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}
.hero__date {
  margin-top: 12px;
  font-size: 17px;
  font-variant: small-caps;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}
.hero__chev {
  position: absolute; left: 50%; bottom: calc(4dvh + 10px);
  width: 26px; height: 26px;
  transform: translateX(-50%);
  color: rgba(251, 245, 234, 0.85);
  animation: chevDrift 2.4s ease-in-out infinite;
}
@keyframes chevDrift { 0%, 100% { transform: translate(-50%, 0); opacity: 0.7; } 50% { transform: translate(-50%, 7px); opacity: 1; } }
.hero__torn {
  position: absolute; left: -1%; right: -1%; bottom: -2px;
  width: 102%; height: 26px;
  fill: var(--page);
  filter: drop-shadow(0 -4px 8px rgba(0, 0, 0, 0.25));
}
@media (prefers-reduced-motion: reduce) { .hero__chev { animation: none; } }
.page__backdrop {
  position: fixed; inset: 0; z-index: -1;
  background: var(--grain), var(--page);
}

/* ==================== the movements ==================== */

.sect {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(52px, 8.5dvh, 86px) 22px;
  text-align: center;
  overflow: hidden;
}
.sect__kicker {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  text-transform: uppercase;
  color: var(--wine);
}

/* II · the location — the venue in burgundy ink, drawn into the paper */
.sect--venue {
  background:
    var(--grain),
    radial-gradient(120% 90% at 50% 0%, #fbf6ec 0%, var(--page) 58%, var(--page-deep) 100%);
}
.venue {
  width: min(92vw, 460px);
  margin-top: 3dvh;
  mix-blend-mode: multiply;      /* ink on the paper, not a picture on the page */
  -webkit-mask-image: radial-gradient(130% 110% at 50% 50%, #000 62%, transparent 92%);
  mask-image: radial-gradient(130% 110% at 50% 50%, #000 62%, transparent 92%);
}
.venue__name {
  margin-top: 18px;
  font-family: var(--script);
  font-size: clamp(38px, 10.5vw, 52px);
  line-height: 1.12;
  color: var(--wine);
}
.venue__place {
  margin-top: 12px;
  font-size: 14.5px;
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--ink-soft);
}

/* the ampersand inherits the script — the clients love it as it is */
.amp { font: inherit; }

/* III · the letter */
.sect--letter {
  background:
    var(--grain),
    linear-gradient(180deg, var(--page-deep) 0%, var(--page) 24%, var(--page) 76%, var(--page-deep) 100%);
}
.letter { max-width: 36ch; margin-top: 30px; }
.letter__text {
  font-size: 17.5px;
  line-height: 1.85;
  color: #574850;
}
.letter__text .w { display: inline-block; }

/* IV · the date */
.sect--date {
  background:
    var(--grain),
    radial-gradient(120% 90% at 50% 100%, #fbf6ec 0%, var(--page) 55%, var(--page-deep) 100%);
}
.date-big__kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.52em;
  text-indent: 0.52em;
  text-transform: uppercase;
  color: var(--wine);
}

/* the month, as a keepsake calendar card — the heart rings their day */
.cal {
  width: min(100%, 360px);
  margin-top: 26px;
  padding: 26px 22px 22px;
  border-radius: 18px;
  background: var(--card);
  box-shadow:
    0 24px 48px rgba(81, 33, 41, 0.14),
    0 3px 12px rgba(81, 33, 41, 0.08),
    inset 0 0 0 1px rgba(107, 47, 58, 0.12);
}
.cal__head {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: #1e1713;
}
.cal__head small {
  font-size: 17px;
  letter-spacing: 0.22em;
  color: #6f655c;
}
.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
  margin-top: 18px;
}
.cal__dow {
  padding: 6px 0 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a0968c;
}
.cal__day {
  position: relative;
  padding: 7px 0;
  font-family: var(--display);
  font-size: 17.5px;
  font-variant-numeric: tabular-nums;
  color: #1e1713;
}
.cal__day--the {
  color: var(--wine-deep);
  font-weight: 600;
}
.cal__heart {
  position: absolute;
  left: 50%; top: 50%;
  width: 40px; height: 38px;
  transform: translate(-50%, -52%);
  pointer-events: none;
}
.cal__heart path {
  fill: none;
  stroke: var(--wine);
  stroke-width: 2;
  stroke-linecap: round;
}

.date-big__label {
  margin-top: 22px;
  font-size: 17px;
  font-variant: small-caps;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--ink);
}
.date-place {
  margin-top: 10px;
  font-size: 14.5px;
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--wine);
}

.count {
  display: flex; align-items: stretch; justify-content: center;
  width: min(100%, 420px);
  margin-top: 34px; padding: 22px 0;
  border-top: 1px solid var(--wine-soft);
  border-bottom: 1px solid var(--wine-soft);
}
.count__cell { display: grid; gap: 6px; flex: 1; max-width: 118px; }
.count__cell b {
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.count__cell small { font-size: 10.5px; letter-spacing: 0.34em; text-indent: 0.34em; text-transform: uppercase; color: var(--wine); }
.count__dot { align-self: center; width: 1px; height: 36px; background: var(--wine-soft); }

.sect--date .btn { min-width: min(100%, 320px); }
.sect--date .btn--primary { margin-top: 30px; }
.sect--date .btn--ghost { margin-top: 12px; }

/* the close, on the same breath as the date */
.sign-line { margin-top: 44px; font-style: italic; font-size: 16.5px; color: var(--ink-soft); }
.sign-off {
  margin-top: 14px;
  font-family: var(--script);
  font-size: clamp(34px, 9.5vw, 44px);
  color: var(--wine);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 18px;
  border-radius: 999px;
  font-size: 13.5px;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  text-transform: uppercase;
  transition: transform 0.12s ease, filter 0.2s ease, background-color 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn--primary {
  color: #f6e8dc;
  background: linear-gradient(180deg, var(--wine), var(--wine-deep) 75%);
  box-shadow: 0 12px 28px rgba(81, 33, 41, 0.35), inset 0 1px 0 rgba(255, 240, 228, 0.18);
}
.btn--primary:hover { filter: brightness(1.1); }
.btn--ghost { color: var(--wine); box-shadow: inset 0 0 0 1px var(--wine-soft); }
.btn--ghost:hover { background: rgba(107, 47, 58, 0.07); }
.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* the music — a quiet floating control */
.music {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 45;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(81, 33, 41, 0.86);
  box-shadow: 0 10px 26px rgba(81, 33, 41, 0.35), inset 0 0 0 1px rgba(246, 232, 220, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
}
.music svg { width: 21px; height: 21px; }
.music__note { stroke: #f6e8dc; stroke-width: 1.6; fill: none; }
.music circle.music__note { fill: #f6e8dc; stroke: none; }
.music__slash { stroke: #f6e8dc; stroke-width: 1.8; stroke-linecap: round; opacity: 0; }
.music.is-off .music__slash { opacity: 1; }
.music.is-off .music__note { opacity: 0.55; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 40;
  transform: translate(-50%, 16px);
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--wine-deep); color: #f6e8dc;
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 16px 40px rgba(81, 33, 41, 0.4);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .film__hint { animation: none; }
}
