/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *


 */

:root {
  /* Wedding color, shifted off #6E3032 toward wine: that hex had green and blue
     nearly equal, which reads brown. Dropping green and lifting blue gives burgundy. */
  --wine: #6E1E38;
  --wine-deep: #4e1327;
  --wine-soft: #8c3a55;
  --gilt: #1c1917;
  --gilt-text: #1c1917;
  --rule: #1c1917; /* ampersands, dividers, marks */
  --ink: #2f2825;
  --muted: #7d716c;
  --paper: #fffdfa;
  --hairline: rgba(47, 40, 37, 0.16);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  font-family: "Lato", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background-color: #fbf6f1;
  background-image:
    radial-gradient(60rem 40rem at 50% -10%, #fffdfb 0%, rgba(255, 253, 251, 0) 70%),
    radial-gradient(45rem 35rem at 100% 10%, #f8eae6 0%, rgba(248, 234, 230, 0) 65%),
    radial-gradient(50rem 40rem at 0% 45%, #f3eae4 0%, rgba(243, 234, 228, 0) 60%),
    linear-gradient(180deg, #fdfaf7 0%, #f7ece9 55%, #efe1de 100%);
  background-repeat: no-repeat;
  background-attachment: scroll;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Linen weave over everything: two hairline grids at right angles, barely there. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9998;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(110, 30, 56, 0.02) 0, rgba(110, 30, 56, 0.02) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(110, 30, 56, 0.014) 0, rgba(110, 30, 56, 0.014) 1px, transparent 1px, transparent 4px);
}

/* Fine paper grain over everything. Purely decorative, never interactive. */
body::after {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(/%23n)'/%3E%3C/svg%3E");
}

/* ---------- Ambient light ---------- */

/* Two soft pools of warm light drifting behind the page. Negative z-index keeps
   them under all content while still above the body gradient. */
.ambient {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient span {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.ambient .glow-rose {
  width: 60vw;
  height: 60vw;
  top: -20vw;
  right: -18vw;
  background: radial-gradient(circle, rgba(232, 196, 190, 0.55) 0%, rgba(232, 196, 190, 0) 65%);
  animation: driftRose 34s ease-in-out infinite alternate;
}

.ambient .glow-gold {
  width: 55vw;
  height: 55vw;
  bottom: -22vw;
  left: -16vw;
  background: radial-gradient(circle, rgba(226, 205, 168, 0.5) 0%, rgba(226, 205, 168, 0) 65%);
  animation: driftGold 41s ease-in-out infinite alternate;
}

@keyframes driftRose {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(-9vw, 12vh, 0) scale(1.12);
  }
}

@keyframes driftGold {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(11vw, -10vh, 0) scale(1.08);
  }
}

/* ---------- Scroll progress ---------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10001;
  width: 100%;
  height: 2px;
  background-image: linear-gradient(90deg, var(--gilt), var(--wine));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

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

h1,
h2,
h3,
h4,
h5,
.font-display {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color: var(--ink);
  font-weight: 400;
}

::selection {
  background: rgba(110, 30, 56, 0.16);
}

/* ---------- Entrance + scroll motion ---------- */

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawLine {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.js .rise {
  opacity: 0;
  animation: riseIn 1.1s var(--ease) forwards;
}

.js .rise-1 {
  animation-delay: 0.10s;
}

.js .rise-2 {
  animation-delay: 0.26s;
}

.js .rise-3 {
  animation-delay: 0.42s;
}

.js .rise-4 {
  animation-delay: 0.58s;
}

/* Revealed on scroll; visible by default so no-JS never hides content. */
.js .reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .js .rise,
  .js .reveal {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 7.5rem 1.25rem 4rem;
  padding: clamp(4.5rem, 12vw, 9rem) 1.25rem clamp(3rem, 6vw, 5rem);
}

.eyebrow {
  font-family: "Lato", sans-serif;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--wine);
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  /* Trailing space balances the letter-spacing on the final glyph. */
  text-indent: 0.3em;
}

.hero .names {
  font-size: 3.25rem;
  font-size: clamp(3rem, 11vw, 7rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--wine);
  margin: 0;
}

/* Each word rises out from behind an invisible baseline, like letterpress lifting. */
.hero .names .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding: 0.08em 0.04em 0.02em;
  margin: -0.08em -0.04em -0.02em;
}

.hero .names .word>span {
  display: inline-block;
}

.js .hero .names .word>span {
  transform: translateY(110%);
  animation: wordUp 1.3s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.js .hero .names .word:nth-child(1)>span {
  animation-delay: 0.30s;
}

.js .hero .names .word:nth-child(2)>span {
  animation-delay: 0.42s;
}

.js .hero .names .word:nth-child(3)>span {
  animation-delay: 0.54s;
}

@keyframes wordUp {
  to {
    transform: translateY(0);
  }
}

.hero .names .amp {
  font-style: italic;
  font-weight: 300;
  color: var(--rule);
  padding: 0 0.12em;
}

/* Hero content drifts slower than the page and dissolves as the photo slides under it. */
.js .hero-inner {
  will-change: transform, opacity;
}

/* ---------- Countdown ---------- */

.countdown {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(1.25rem, 5vw, 3.5rem);
  margin: clamp(2.25rem, 5vw, 3.5rem) auto 0;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.2ch;
}

.countdown-num {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.4rem;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 300;
  line-height: 1;
  color: var(--wine);
  font-variant-numeric: tabular-nums;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.countdown-num.is-ticking {
  animation: numTick 0.45s var(--ease);
}

@keyframes numTick {
  0% {
    opacity: 0.35;
    transform: translateY(-0.18em);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.countdown-label {
  margin-top: 0.55rem;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  color: var(--gilt-text);
}

.countdown-sep {
  align-self: center;
  color: var(--rule);
  font-size: 1.1rem;
  opacity: 0.6;
  padding-bottom: 1.4rem;
}

@media (max-width: 575.98px) {
  .countdown-sep {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .hero .names .word>span {
    transform: none;
    animation: none;
  }

  .countdown-num.is-ticking {
    animation: none;
  }
}

.hero .welcome-copy {
  max-width: 38rem;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 300;
  line-height: 1.85;
  text-wrap: pretty;
}

/* ---------- Divider ---------- */

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: clamp(1.75rem, 4vw, 2.75rem) auto;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 4.5rem;
  width: clamp(2.5rem, 9vw, 5.5rem);
  background-image: linear-gradient(90deg, rgba(28, 25, 23, 0), var(--rule));
  transform-origin: right center;
}

.divider::after {
  background-image: linear-gradient(90deg, var(--rule), rgba(28, 25, 23, 0));
  transform-origin: left center;
}

.js .divider::before,
.js .divider::after {
  animation: drawLine 1.4s var(--ease) 0.5s backwards;
}

.divider .divider-mark {
  color: var(--rule);
  font-size: 1.35rem;
  line-height: 1;
}

/* ---------- Photo band ---------- */

/* Full-bleed on phones so the card never sits wider than the photograph. */
.photo-band {
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .photo-band {
    padding: 0 clamp(1rem, 4vw, 3rem);
  }
}

.photo-frame {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  max-width: 1240px;
  border-radius: 3px;
  height: 360px;
  /* fallback for browsers without aspect-ratio */
  height: auto;
  aspect-ratio: 16 / 10;
}

/* Letterbox opens as the photograph arrives. */
.js .photo-band .photo-frame {
  -webkit-clip-path: inset(14% 8% 14% 8% round 3px);
  clip-path: inset(14% 8% 14% 8% round 3px);
  transition: -webkit-clip-path 1.8s var(--ease), clip-path 1.8s var(--ease);
}

.js .photo-band.is-visible .photo-frame {
  -webkit-clip-path: inset(0 0 0 0 round 3px);
  clip-path: inset(0 0 0 0 round 3px);
}

/* The band itself only fades; the clip and scale carry the motion. */
.js .photo-band.reveal {
  transform: none;
}

/* Taller than the frame so the parallax shift never exposes an edge. */
.photo-parallax {
  position: absolute;
  top: -7%;
  left: 0;
  right: 0;
  height: 114%;
  will-change: transform;
}

/* Warm wash: pulls the greens and the cool truck toward the paper palette. */
.photo-frame::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  background-image: linear-gradient(170deg, #f7e4d8 0%, #e8cfc6 45%, #d9bfbc 100%);
  mix-blend-mode: soft-light;
  opacity: 0.42;
}

/* Feathers the photograph into the page instead of stopping at a hard edge. */
.photo-frame::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 44px 6px rgba(248, 238, 233, 0.45);
  background-image:

    /* soft cream fade — left and right edges bleed into page */
    linear-gradient(90deg, rgba(251, 246, 241, 0.18) 0%, transparent 18%, transparent 82%, rgba(251, 246, 241, 0.18) 100%),
    /* top dark fade */
    linear-gradient(180deg, rgba(78, 19, 39, 0.12) 0%, rgba(78, 19, 39, 0) 90%),
    /* bottom fade to page — bleeds photo into cream background */
    linear-gradient(0deg, rgba(251, 246, 241, 0.92) 0%, rgba(251, 246, 241, 0.4) 18%, rgba(251, 246, 241, 0) 100%);
}

.photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Deters drag-to-desktop and the long-press save sheet on iOS. */
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  /* Subjects sit low in the frame; bias upward so the card overlaps empty ground. */
  object-position: 58% 26%;
  /* Desaturated and warmed so the photograph sits in the palette, not on top of it. */
  filter: saturate(0.84) contrast(0.99) brightness(1.01) sepia(0.1);
  transform: scale(1.07);
  transition: transform 2.4s var(--ease);
}

.js .photo-band.is-visible .photo-img {
  transform: scale(1);
}

@media (max-width: 575.98px) {
  .photo-frame {
    aspect-ratio: 4 / 5;
  }

  .photo-img {
    object-position: 46% 24%;
  }
}

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

  .photo-parallax {
    transform: none !important;
  }
}

/* ---------- Registration card ---------- */

.registration-card {
  position: relative;
  /* Above the fixed linen and grain layers (9998/9999), so the card stays clean
     while the rest of the page keeps its texture. */
  z-index: 10000;
  max-width: 680px;
  /* Lifted onto the photograph so the two read as one composition. */
  margin: -2.5rem auto clamp(3rem, 8vw, 6rem);
  background: #fbf6ee;
  border: 1px solid rgba(169, 139, 98, 0.22);
  border-radius: 6px;
  padding: 2.5rem 1.5rem;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4.5vw, 3.5rem);
  box-shadow:
    0 1px 2px rgba(47, 40, 37, 0.04),
    0 8px 24px rgba(47, 40, 37, 0.05),
    0 32px 64px -24px rgba(110, 30, 56, 0.16);
}

@media (min-width: 768px) {
  .registration-card {
    margin-top: -5.5rem;
  }
}

@media (min-width: 1200px) {
  .registration-card {
    margin-top: -8rem;
  }
}


.registration-card h2 {
  font-size: 2rem;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 300;
  text-align: center;
  line-height: 1.1;
  margin: 0 0 0.6rem;
}

.registration-card .card-subtitle {
  text-align: center;
  color: var(--muted);
  font-weight: 300;
  font-size: 0.95rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* ---------- Form fields ---------- */

.form-label,
.field-legend {
  display: block;
  font-weight: 400;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 0.35rem;
  transition: color 0.4s var(--ease);
}

/* Text inputs get breathing room from their own top padding; the attending pills
   don't, so the legend above them needs its own. */
.field-legend {
  margin-bottom: 0.9rem;
}

@media (max-width: 575.98px) {
  .field-legend {
    margin-bottom: 1.1rem;
  }
}

.form-control {
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  padding: 0.7rem 0 0.6rem;
  font-size: 1.02rem;
  font-weight: 300;
  color: var(--ink);
  box-shadow: none;
  /* The accent underline wipes in from the left on focus. */
  background-image: linear-gradient(var(--wine), var(--wine));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: border-color 0.45s var(--ease), background-size 0.55s var(--ease);
}

.form-control::placeholder {
  color: #b8ada7;
  font-weight: 300;
}

.form-control:hover {
  border-bottom-color: rgba(110, 30, 56, 0.4);
}

.form-control:focus {
  background-color: transparent;
  color: var(--ink);
  border-bottom-color: var(--hairline);
  box-shadow: none;
  background-size: 100% 1px;
}

.field:focus-within .form-label {
  color: var(--wine);
}

.attending-only[hidden] {
  display: none !important;
}

.attending-only.just-shown {
  animation: riseIn 0.55s var(--ease) both;
}

@media (prefers-reduced-motion: reduce) {
  .attending-only.just-shown {
    animation: none;
  }
}

/* Fields settle in one after another once the card arrives. */
.js .registration-card form>.row>* {
  opacity: 0;
}

.js .registration-card.is-visible form .row>* {
  animation: riseIn 0.75s var(--ease) both;
}

.js .registration-card.is-visible form .row>*:nth-child(1) {
  animation-delay: 0.18s;
}

.js .registration-card.is-visible form .row>*:nth-child(2) {
  animation-delay: 0.26s;
}

.js .registration-card.is-visible form .row>*:nth-child(3) {
  animation-delay: 0.34s;
}

.js .registration-card.is-visible form .row>*:nth-child(4) {
  animation-delay: 0.42s;
}

.js .registration-card.is-visible form .row>*:nth-child(5) {
  animation-delay: 0.50s;
}

.js .registration-card.is-visible form .row>*:nth-child(6) {
  animation-delay: 0.58s;
}

.js .registration-card.is-visible form .row>*:nth-child(7) {
  animation-delay: 0.66s;
}

@media (prefers-reduced-motion: reduce) {
  .js .registration-card form>.row>* {
    opacity: 1;
    animation: none;
  }
}

/* Validation */

/* Our own gradient underline replaces Bootstrap's inline validation icon. */
.form-control.is-invalid,
.was-validated .form-control:invalid {
  border-bottom-color: #a4383c;
  background-image: linear-gradient(#a4383c, #a4383c);
  background-size: 100% 1px;
  box-shadow: none;
  padding-right: 0;
}

.invalid-feedback,
.field-error {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #a4383c;
  margin-top: 0.45rem;
}

.alert {
  border-radius: 4px;
  font-size: 0.92rem;
}

.alert-celebrate {
  background-color: #fbf3f0;
  border: 1px solid rgba(169, 139, 98, 0.35);
  color: var(--wine);
  font-weight: 400;
  letter-spacing: 0.01em;
  padding: 1rem 1.25rem;
}

.alert-danger {
  background-color: #fdf1f1;
  border: 1px solid rgba(164, 56, 60, 0.25);
  color: #8e3034;
}

/* ---------- Attending toggle ---------- */

.attending-toggle .btn-outline-attending {
  position: relative;
  width: 100%;
  background-color: transparent;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  color: var(--muted);
  font-family: "Lato", sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.95rem 0.5rem;
  --mx: 0px;
  --my: 0px;
  --lift: 0px;
  transform: translate3d(var(--mx), calc(var(--my) + var(--lift)), 0);
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease),
    background-color 0.45s var(--ease), transform 0.45s var(--ease);
}

.attending-toggle .btn-outline-attending:hover {
  border-color: var(--wine-soft);
  color: var(--wine);
  --lift: -2px;
}

.attending-toggle .btn-check:checked+.btn-outline-attending {
  background-color: var(--wine);
  border-color: var(--wine);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(110, 30, 56, 0.7);
}

.attending-toggle .btn-check:focus-visible+.btn-outline-attending {
  outline: 2px solid var(--wine-soft);
  outline-offset: 3px;
}

/* ---------- Submit ---------- */

.btn-rsvp {
  position: relative;
  overflow: hidden;
  width: 100%;
  background-color: var(--wine);
  border: 1px solid var(--wine);
  border-radius: 3px;
  color: #fff;
  font-family: "Lato", sans-serif;
  font-weight: 400;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  padding: 1.15rem 1rem;
  --mx: 0px;
  --my: 0px;
  --lift: 0px;
  transform: translate3d(var(--mx), calc(var(--my) + var(--lift)), 0);
  transition: background-color 0.5s var(--ease), transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

.btn-rsvp::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background-image: linear-gradient(100deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.28) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  transition: left 0.75s var(--ease);
}

.btn-rsvp:hover,
.btn-rsvp:focus {
  background-color: var(--wine-deep);
  border-color: var(--wine-deep);
  color: #fff;
  --lift: -3px;
  box-shadow: 0 18px 32px -14px rgba(110, 30, 56, 0.65);
}

.btn-rsvp:hover::after {
  left: 120%;
}

.btn-rsvp:active {
  --lift: -1px;
}

@media (prefers-reduced-motion: reduce) {

  .btn-rsvp,
  .btn-rsvp::after,
  .attending-toggle .btn-outline-attending {
    transition: none;
  }

  .btn-rsvp:hover,
  .attending-toggle .btn-outline-attending:hover {
    transform: none;
  }
}

/* ---------- Section furniture ---------- */

.section-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.section-eyebrow {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--gilt-text);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.4rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 300;
  line-height: 1;
  color: var(--wine);
  margin: 0;
}

/* ---------- Details ---------- */

.details {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.25rem clamp(4rem, 9vw, 7rem);
}

.details-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem 0;
}

.detail {
  flex: 1 1 260px;
  text-align: center;
  padding: 0 1.75rem;
  position: relative;
}

/* Hairline rules between columns, only when they sit side by side. */
@media (min-width: 768px) {
  .detail + .detail::before {
    content: "";
    position: absolute;
    top: 8%;
    bottom: 8%;
    left: 0;
    width: 1px;
    background-image: linear-gradient(180deg, rgba(28, 25, 23, 0), var(--rule), rgba(28, 25, 23, 0));
  }
}

.js .detail:nth-child(2) { transition-delay: 0.12s; }
.js .detail:nth-child(3) { transition-delay: 0.24s; }

.detail-label {
  display: block;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--gilt-text);
  margin-bottom: 1rem;
}

.detail-lead {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.9rem;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--wine);
  margin: 0 0 0.25rem;
  /* "Sunday, November / 8th" -> "Sunday, / November 8th" when it has to wrap. */
  text-wrap: balance;
}

.detail-body {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 1rem;
}

.detail-note {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

.detail-link {
  color: var(--wine);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-decoration: none;
  border-bottom: 1px solid var(--gilt);
  padding-bottom: 0.25rem;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.detail-link:hover {
  color: var(--wine-deep);
  border-color: var(--wine-deep);
}

/* ---------- Story ---------- */

.story {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem clamp(4rem, 9vw, 7rem);
}

.story-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.story-photo {
  flex: 1 1 320px;
  margin: 0;
}

.story-copy {
  flex: 1 1 320px;
}

.js .story-copy {
  transition-delay: 0.18s;
}

.story-frame {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  height: 420px; /* fallback for browsers without aspect-ratio */
  height: auto;
  aspect-ratio: 4 / 5;
}

/* Letterbox opens as the photograph arrives, same as the band above. */
.js .story-photo .story-frame {
  -webkit-clip-path: inset(14% 8% 14% 8% round 3px);
  clip-path: inset(14% 8% 14% 8% round 3px);
  transition: -webkit-clip-path 1.8s var(--ease), clip-path 1.8s var(--ease);
}

.js .story-photo.is-visible .story-frame {
  -webkit-clip-path: inset(0 0 0 0 round 3px);
  clip-path: inset(0 0 0 0 round 3px);
}

.js .story-photo.reveal {
  transform: none;
}

.story-parallax {
  position: absolute;
  top: -7%;
  left: 0;
  right: 0;
  height: 114%;
  will-change: transform;
}

/* Same warm wash as the main photograph so the two read as one series. */
.story-frame::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  background-image: linear-gradient(170deg, #f7e4d8 0%, #e8cfc6 45%, #d9bfbc 100%);
  mix-blend-mode: soft-light;
  opacity: 0.42;
}

/* Feathered edges and vignette, matching the band. */
.story-frame::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 44px 6px rgba(248, 238, 233, 0.45);
  background-image:
    linear-gradient(180deg, rgba(78, 19, 39, 0.1) 0%, rgba(78, 19, 39, 0) 26%),
    linear-gradient(0deg, rgba(78, 19, 39, 0.14) 0%, rgba(78, 19, 39, 0) 32%);
}

.story-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Faces sit a third of the way down; this keeps them there and holds the grass below. */
  object-position: 50% 30%;
  filter: saturate(0.84) contrast(0.99) brightness(1.01) sepia(0.1);
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  transform: scale(1.07);
  transition: transform 2.4s var(--ease);
}

.js .story-photo.is-visible .story-img {
  transform: scale(1);
}

.story-pull {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.9rem;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.25;
  color: var(--wine);
  margin: 0 0 1.5rem;
}

.story-text {
  font-size: 1rem;
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  font-weight: 300;
  line-height: 1.9;
  color: var(--muted);
  margin: 0 0 2rem;
  text-wrap: pretty;
}

.story-sign {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--wine);
  margin: 0;
}

.story-sign .amp {
  font-style: italic;
  color: var(--rule);
  padding: 0 0.1em;
}

/* ---------- Sticky RSVP pill ---------- */

.rsvp-pill {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.6rem;
  background-color: var(--wine);
  color: #fff;
  border-radius: 999px;
  font-family: "Lato", sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-decoration: none;
  box-shadow: 0 16px 34px -14px rgba(78, 19, 39, 0.7);
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), background-color 0.4s var(--ease);
}

.rsvp-pill.is-shown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.rsvp-pill:hover,
.rsvp-pill:focus {
  background-color: var(--wine-deep);
  color: #fff;
}

@media (max-width: 575.98px) {
  .rsvp-pill {
    right: 50%;
    transform: translate(50%, 14px) scale(0.96);
  }

  .rsvp-pill.is-shown {
    transform: translate(50%, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rsvp-pill {
    transition: opacity 0.2s;
  }

  .story-img {
    transform: none;
    transition: none;
  }

  .story-parallax {
    transform: none !important;
  }
}

/* ---------- Marquee ribbon ---------- */

.marquee {
  overflow: hidden;
  padding: 1.1rem 0;
  border-top: 1px solid rgba(169, 139, 98, 0.28);
  border-bottom: 1px solid rgba(169, 139, 98, 0.28);
  margin: 0 0 clamp(3rem, 7vw, 5rem);
  /* Fades the ends so the loop never shows a hard edge. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
}

/* Each group slides by exactly its own width, so the second lands where the first
   began — seamless regardless of subpixel rounding on the parent. */
.marquee-group {
  display: flex;
  flex: 0 0 auto;
  animation: marquee 48s linear infinite;
  will-change: transform;
}

.marquee-track span {
  flex: 0 0 auto;
  padding: 0 1.75rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--gilt-text);
  white-space: nowrap;
}

.marquee-track .marquee-mark {
  color: var(--rule);
  font-size: 0.9rem;
  letter-spacing: 0;
  padding: 0 0.5rem;
}

@keyframes marquee {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-100%, 0, 0);
  }
}

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

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 1rem 1.25rem clamp(3rem, 7vw, 5rem);
  color: var(--muted);
}

/* The sticky RSVP pill sits bottom-center on phones; leave room under the
   sign-off so it never covers the last line when scrolled to the end. */
@media (max-width: 575.98px) {
  .site-footer {
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  }
}

.footer-line {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 300;
  font-style: italic;
  color: var(--wine);
  margin: 1.5rem 0 0.6rem;
}




.divider-monogram {
  gap: clamp(1.25rem, 4vw, 2.25rem);
}

.divider-monogram .monogram {
  width: 150px;
  width: clamp(116px, 22vw, 168px);
  height: auto;
  /* The artwork is pure black; softening it seats it in the warm palette. */
  opacity: 0.82;
}

/* ---------- Admin sign-in ---------- */

.auth-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 3rem 1.25rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  border: 1px solid rgba(169, 139, 98, 0.22);
  border-radius: 6px;
  padding: clamp(2rem, 6vw, 3.25rem) clamp(1.5rem, 5vw, 2.75rem);
  box-shadow:
    0 1px 2px rgba(47, 40, 37, 0.04),
    0 8px 24px rgba(47, 40, 37, 0.05),
    0 32px 64px -24px rgba(110, 30, 56, 0.16);
}

.auth-eyebrow {
  display: block;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--gilt-text);
  margin-bottom: 0.75rem;
}

.auth-card h1 {
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 300;
  text-align: center;
  color: var(--wine);
  margin: 0 0 0.5rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--muted);
  font-weight: 300;
  font-size: 0.92rem;
  margin-bottom: 2.25rem;
}

.auth-back {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.35s var(--ease);
}

.auth-back span {
  display: inline-block;
  margin-right: 0.35rem;
  transition: transform 0.35s var(--ease);
}

.auth-back:hover {
  color: var(--wine);
}

.auth-back:hover span {
  transform: translateX(-3px);
}

/* ---------- Admin ---------- */

.admin-wrapper {
  padding: clamp(2rem, 5vw, 3.5rem) 1.25rem;
}

.admin-wrapper h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 300;
  color: var(--wine);
}

.btn-export {
  background-color: var(--wine);
  border: 1px solid var(--wine);
  border-radius: 3px;
  color: #fff;
  font-family: "Lato", sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  padding: 0.6rem 1.25rem;
  transition: background-color 0.4s var(--ease), transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.btn-export:hover,
.btn-export:focus {
  background-color: var(--wine-deep);
  border-color: var(--wine-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(110, 30, 56, 0.6);
}

.btn-signout {
  background-color: transparent;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  color: var(--muted);
  font-family: "Lato", sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  padding: 0.6rem 1.25rem;
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease);
}

.btn-signout:hover,
.btn-signout:focus {
  border-color: var(--wine-soft);
  color: var(--wine);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.25rem 2rem;
  background: var(--paper);
  border: 1px solid rgba(169, 139, 98, 0.22);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.filter-field {
  flex: 1 1 180px;
  max-width: 260px;
}

.filter-field .form-control {
  font-size: 0.92rem;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filter-note {
  color: var(--wine);
}

.sort-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.sort-link:hover,
.sort-link.is-active {
  color: var(--wine-deep);
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--gilt);
}

.admin-table-wrap {
  background: var(--paper);
  border: 1px solid rgba(169, 139, 98, 0.22);
  border-radius: 6px;
  box-shadow: 0 18px 40px -28px rgba(47, 40, 37, 0.35);
}

.table>thead th {
  color: var(--wine);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-bottom-color: rgba(169, 139, 98, 0.3);
  white-space: nowrap;
}

.table>tbody td {
  font-weight: 300;
  border-bottom-color: rgba(47, 40, 37, 0.07);
}

.table-hover tbody tr {
  transition: background-color 0.3s var(--ease);
}

.table-hover tbody tr:hover {
  background-color: #faf1ef;
}
