/* ==========================================================================
   KELLER & JULIA · 17–18.09.2027 · VILLA CATTANI STUART, PESARO
   Atelier: My Wedding Art (mywedding.art)
   Palette derived 1:1 from the couple's 6-swatch Italian garden moodboard:
     #AAB187 Olive Sage · #D7E1AD Meadow Green · #7DA4B3 Adriatic Blue
     #CFE3EE Powder Sky · #FDF6DC Buttercream  · #FCFDF7 Silk Ivory
   ========================================================================== */

:root {
  --ease-couture: cubic-bezier(0.22, 1, 0.36, 1);

  /* Remap template design tokens to Keller & Julia's Adriatic & Olive Garden Palette */
  --cream:            #FCFDF7;   /* Swatch 6 · Silk Ivory */
  --paper:            #F6F2E4;   /* Softened Swatch 5 · Buttercream Linen */
  --ink:              #1E2C33;   /* Deep Coastal Slate Charcoal */
  --muted-foreground: #596870;   /* Warm Coastal Stone */
  --burgundy:         #2C4C5C;   /* Deep Adriatic Slate Blue (rich sister of #7DA4B3) */
  --burgundy-deep:    #1E3745;   /* Deep Twilight Adriatic Velvet */
  --gold:             #9CA67A;   /* Refined Olive Sage (#AAB187) */
  --gold-deep:        #6D7850;   /* Deep Villa Olive (WCAG AA+ on Silk Ivory) */
  --gold-light:       #D7E1AD;   /* Swatch 2 · Meadow Green Highlight */
  --sky-mist:         #CFE3EE;   /* Swatch 4 · Powder Sky */
  --buttercream:      #FDF6DC;   /* Swatch 5 · Soft Buttercream */
  --adriatic-mid:     #7DA4B3;   /* Swatch 3 · Dusty Adriatic Blue */

  /* Feathered Center-Weighted Coastal Twilight Vignette (preserves golden hills at edges while anchoring hero text) */
  --scrim-warm-hero:
    radial-gradient(ellipse 68% 58% at 50% 49%, rgba(14, 27, 35, 0.72) 0%, rgba(14, 27, 35, 0.44) 48%, rgba(14, 27, 35, 0.20) 82%, rgba(14, 27, 35, 0.34) 100%),
    linear-gradient(180deg, rgba(14, 27, 35, 0.42) 0%, rgba(14, 27, 35, 0.14) 36%, rgba(14, 27, 35, 0.18) 64%, rgba(14, 27, 35, 0.58) 100%);

  --scrim-warm-gardens:
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(20, 36, 46, 0.62) 0%, rgba(20, 36, 46, 0.38) 72%, rgba(20, 36, 46, 0.48) 100%),
    linear-gradient(180deg, rgba(20, 36, 46, 0.22) 0%, rgba(20, 36, 46, 0.44) 50%, rgba(20, 36, 46, 0.56) 100%);

  --scrim-warm-closing:
    radial-gradient(ellipse 74% 60% at 50% 50%, rgba(18, 33, 42, 0.58) 0%, rgba(18, 33, 42, 0.28) 72%, rgba(18, 33, 42, 0.44) 100%),
    linear-gradient(180deg, rgba(18, 33, 42, 0.28) 0%, rgba(18, 33, 42, 0.24) 45%, rgba(18, 33, 42, 0.62) 100%);
}

/* Gentle 35mm Cinema Highlight Taming on Hero Drone Video */
#hero-video {
  filter: brightness(0.84) contrast(1.07) saturate(0.95);
}

.scrim-warm-hero {
  background-image: var(--scrim-warm-hero);
}

.scrim-warm-gardens {
  background-image: var(--scrim-warm-gardens);
}

.scrim-warm-closing {
  background-image: var(--scrim-warm-closing);
}

/* Sculptural Light Serif Structural Section Headings (Cormorant Garamond 300) */
.section-heading-couture {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2.35rem, 6.2vw, 3.45rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* Deep Coastal Adriatic Velvet Backdrop (for RSVP section & Replies password gate) */
.linen {
  position: relative;
  background-color: #213c4b !important;
  background-image:
    radial-gradient(ellipse 85% 65% at 50% 16%, rgba(62, 102, 120, 0.52) 0%, rgba(33, 60, 75, 0.28) 56%, rgba(20, 39, 50, 0.72) 100%) !important;
  background-size: cover !important;
}

.linen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='v'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23v)'/%3E%3C/svg%3E");
}

.linen > * {
  position: relative;
  z-index: 1;
}

/* Generous Ornate-Card Padding Around Double-Olive SVG Frame */
.ornate-card-pad {
  padding-inline: 2.25rem !important;
}

.ornate-card-pad--folio {
  padding-block: 3rem !important;
}

@media (min-width: 640px) {
  .ornate-card-pad {
    padding-inline: 3.35rem !important;
  }

  .ornate-card-pad--folio {
    padding-block: 3.25rem !important;
  }
}

/* Dual-Pass Atmospheric Text Halo (crisp separation without blunt drop-shadow look) */
.hero-text-shadow {
  text-shadow:
    0 4px 36px rgba(10, 22, 29, 0.78),
    0 1px 12px rgba(10, 22, 29, 0.65);
}

.hero-kicker-crisp {
  font-weight: 500;
  color: #FCFDF7;
}

.gardens-text-shadow {
  text-shadow: 0 2px 16px rgba(16, 30, 38, 0.50);
}

.title-amp {
  font-family: var(--font-serif);
  font-size: 0.84em;
  font-weight: 300;
  font-style: italic;
  padding-inline: 0.22em;
}

/* Full Separate Dates with Copperplate Italic Ampersand */
.dates-full-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.12em 0.45em;
}

.dates-full-line > span {
  white-space: nowrap;
}

.dates-full-line .date-amp {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 0.92em;
  opacity: 0.88;
}

/* Balanced Intro Verse (Zero Dangling Orphan Lines) */
.intro-verse {
  max-width: 31rem;
  margin-inline: auto;
}

.intro-verse p {
  text-wrap: balance;
}

.intro-verse p + p {
  margin-top: 1rem;
}

/* Single-Line Calligraphic Villa Caption */
.villa-caption-single {
  white-space: nowrap;
  font-size: clamp(2rem, 6.4vw, 2.55rem);
  line-height: 1.2;
}

/* Unified Haute-Couture Swipeable Atelier Gallery (All 7 Photos · Pool First) */
.villa-section {
  overflow-x: clip;
}

.villa-carousel-stage {
  position: relative;
  max-width: 72rem;
  margin-inline: auto;
  --slide-w: min(70vw, 290px);
  --slide-gap: 0.4rem;
}

.villa-track {
  display: flex;
  align-items: center;
  gap: var(--slide-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-block: 0.75rem 1.25rem;
  padding-inline: calc(50% - var(--slide-w) / 2);
  scrollbar-width: none;
  cursor: grab;
}

.villa-track:active {
  cursor: grabbing;
}

.villa-track::-webkit-scrollbar {
  display: none;
}

.villa-slide {
  flex: 0 0 var(--slide-w);
  scroll-snap-align: center;
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: scale(0.88);
  opacity: 0.45;
  filter: saturate(0.86);
  transition:
    transform 950ms var(--ease-couture),
    opacity 900ms var(--ease-couture),
    filter 900ms var(--ease-couture);
}

.villa-slide.is-active {
  transform: scale(1);
  opacity: 1;
  filter: saturate(1);
}

.villa-track.is-jumping .villa-slide,
.villa-track.is-jumping .villa-slide-mat {
  transition: none !important;
}

.villa-slide-mat {
  position: relative;
  display: block;
  background: var(--paper);
  padding: 10px;
  box-shadow: 0 22px 48px -24px rgba(30, 55, 69, 0.30);
  transition: box-shadow 900ms var(--ease-couture);
}

.villa-slide:not(.is-active) .villa-slide-mat {
  box-shadow: 0 12px 26px -18px rgba(30, 55, 69, 0.16);
}

.villa-slide-aperture {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper);
}

.villa-slide-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 700ms var(--ease-couture);
}

.villa-slide-img--pool {
  object-position: center 78%;
}

.villa-slide.is-active:hover .villa-slide-img {
  transform: scale(1.03);
}

/* Sculptural Hairline Desktop Arrows */
.villa-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  border: 1px solid rgba(109, 120, 80, 0.55);
  background: rgba(252, 253, 247, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--burgundy);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px -14px rgba(30, 55, 69, 0.28);
  transition: background-color 240ms ease, color 240ms ease, border-color 240ms ease, transform 240ms var(--ease-couture);
}

.villa-arrow:hover {
  background-color: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--cream);
  transform: translateY(-50%) scale(1.04);
}

.villa-arrow--prev {
  left: 1.25rem;
}

.villa-arrow--next {
  right: 1.25rem;
}

/* Museum Plaque Below the Active Plate */
.villa-plaque {
  margin-top: 1.35rem;
  text-align: center;
  padding-inline: 1.5rem;
}

.villa-plaque-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  font-family: var(--font-caps);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  min-height: 1.4em;
}

.villa-plaque-num {
  color: var(--gold-deep);
}

.villa-plaque-sep {
  width: 18px;
  height: 1px;
  background: rgba(156, 166, 122, 0.65);
}

.villa-plaque-title {
  color: var(--burgundy);
  transition: opacity 220ms ease;
}

/* Hairline Atelier Pagination Dashes */
.villa-dashes {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.villa-dash {
  appearance: none;
  border: 0;
  padding: 10px 2px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.villa-dash-bar {
  display: block;
  width: 14px;
  height: 1.5px;
  background: rgba(156, 166, 122, 0.45);
  transition: width 340ms var(--ease-couture), background-color 260ms ease;
}

.villa-dash[aria-current="true"] .villa-dash-bar {
  width: 34px;
  background: var(--burgundy);
}

.villa-dash:hover .villa-dash-bar {
  background: var(--gold-deep);
}

@media (min-width: 640px) {
  .villa-carousel-stage {
    --slide-w: min(44vw, 410px);
    --slide-gap: 1.5rem;
  }

  .villa-track {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
  }

  .villa-slide-mat {
    padding: 12px;
  }

  .villa-arrow {
    display: inline-flex;
  }
}

@media (min-width: 1024px) {
  .villa-arrow--prev {
    left: 2.5rem;
  }

  .villa-arrow--next {
    right: 2.5rem;
  }
}

/* Minimal Full-Screen Editorial Lightbox */
.villa-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1.25rem 3.5rem;
  background: rgba(18, 33, 41, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #FCFDF7;
}

.villa-lightbox[hidden] {
  display: none;
}

.lb-figure {
  position: relative;
  max-width: min(92vw, 760px);
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-img {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(252, 253, 247, 0.22);
  box-shadow: 0 28px 60px rgba(8, 16, 20, 0.55);
}

.lb-meta {
  margin-top: 1rem;
  text-align: center;
  font-family: var(--font-caps);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(252, 253, 247, 0.86);
}

.lb-counter {
  color: var(--gold-light);
  margin-right: 0.75rem;
}

.lb-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(252, 253, 247, 0.28);
  background: rgba(18, 33, 41, 0.5);
  color: #FCFDF7;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}

.lb-close:hover {
  background: rgba(252, 253, 247, 0.14);
  border-color: rgba(252, 253, 247, 0.55);
}

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(252, 253, 247, 0.25);
  background: rgba(18, 33, 41, 0.52);
  color: #FCFDF7;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}

.lb-nav:hover {
  background: rgba(252, 253, 247, 0.14);
  border-color: rgba(252, 253, 247, 0.55);
}

.lb-prev {
  left: 1rem;
}

.lb-next {
  right: 1rem;
}

@media (max-width: 639px) {
  .lb-nav {
    top: auto;
    bottom: 1.25rem;
    transform: none;
  }

  .lb-prev {
    left: calc(50% - 58px);
  }

  .lb-next {
    right: calc(50% - 58px);
  }
}

/* Haute-Couture Dress Code Atelier Folio (Pure Paper Canvas, Zero Competing Photo) */
.dress-band {
  background-color: var(--paper);
  border-top: 1px solid rgba(156, 166, 122, 0.34);
  border-bottom: 1px solid rgba(156, 166, 122, 0.34);
}

.ornate-card-pad--dress {
  padding-block: 3.1rem !important;
}

@media (min-width: 640px) {
  .ornate-card-pad--dress {
    padding-block: 3.75rem !important;
  }
}

.atelier-swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2.35rem;
}

@media (min-width: 640px) {
  .atelier-swatches {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.05rem;
  }
}

.atelier-swatch-card {
  background: #FCFDF7;
  border: 1px solid rgba(156, 166, 122, 0.38);
  padding: 8px 8px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 320ms var(--ease-couture), border-color 260ms ease;
}

.atelier-swatch-card:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 120, 80, 0.65);
}

/* Baroque Arched-Top Silk Sample Chip (Echoing Villa Cattani Stuart's Loggia Arches) */
.atelier-swatch-arch {
  display: block;
  width: 100%;
  height: 76px;
  border-radius: 999px 999px 3px 3px;
  border: 1px solid rgba(30, 44, 51, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -10px 22px rgba(20, 36, 46, 0.06);
}

@media (min-width: 640px) {
  .atelier-swatch-arch {
    height: 86px;
  }
}

.atelier-swatch-name {
  margin-top: 0.72rem;
  font-family: var(--font-caps);
  font-size: 0.63rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
}

.atelier-swatch-note {
  margin-top: 0.18rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--muted-foreground);
  line-height: 1.2;
}

/* Single Centered Venue Map Card + Whisper Keyline */
.map-aperture {
  position: relative;
}

.map-aperture::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(156, 166, 122, 0.42);
  pointer-events: none;
  z-index: 2;
}

.map-coastal-filter {
  filter: sepia(0.18) saturate(0.72) hue-rotate(155deg) contrast(0.95);
}

/* Two-Day Schedule Wide Time Column */
.weekend-line {
  left: 7.45rem;
}

.weekend-row {
  grid-template-columns: 6.7rem 1.5rem minmax(0, 1fr);
}

/* 3-Option Radio Stack on Mobile -> Row on Desktop */
.radio-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

@media (min-width: 520px) {
  .radio-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Silky Conditional RSVP Drawers */
.rsvp-drawer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0 !important;
  pointer-events: none;
  transition: grid-template-rows 380ms var(--ease-couture),
              opacity 280ms ease,
              margin-top 380ms var(--ease-couture);
}

.rsvp-drawer.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 2rem !important;
  pointer-events: auto;
}

.rsvp-drawer-inner {
  overflow: hidden;
}

/* Closing Twilight Breath + Tactile Ergonomics */
@keyframes closingBreath {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.055);
  }
}

.closing-twilight-img {
  filter: saturate(0.96) brightness(0.94) contrast(1.04);
  transform-origin: center 50%;
  animation: closingBreath 16s ease-in-out infinite alternate;
  will-change: transform;
}

.tap-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 0.5rem;
}

input,
textarea {
  transition: border-color 300ms var(--ease-couture);
}

@media (prefers-reduced-motion: reduce) {
  .rsvp-drawer,
  input,
  textarea {
    transition: none;
  }
  .closing-twilight-img {
    animation: none;
  }
}
