@import url("../../shared/tokens.css?v=7");
@import url("assets/reference.css");

[hidden] {
  display: none !important;
}

body.opening-is-open {
  overflow: hidden;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: #30412d;
  background: #fffef8;
  border-radius: 999px;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

audio[data-music] {
  display: none;
}

.hero__controls {
  position: absolute;
  z-index: 4;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  left: max(1rem, env(safe-area-inset-left));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  pointer-events: none;
}

.hero__controls > * {
  pointer-events: auto;
}

.media-toggle,
.language-switcher button {
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  border: 1px solid rgba(48, 65, 45, 0.3);
  border-radius: 999px;
  color: var(--ink, #30412d);
  background: rgba(242, 239, 225, 0.9);
  box-shadow: 0 0.5rem 1.25rem rgba(48, 65, 45, 0.16);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.media-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  font-family: var(--font-sans);
  font-size: var(--text-label-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.media-toggle__icon {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  line-height: 1;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid rgba(48, 65, 45, 0.24);
  border-radius: 999px;
  background: rgba(242, 239, 225, 0.84);
  box-shadow: 0 0.5rem 1.25rem rgba(48, 65, 45, 0.14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.language-switcher button {
  min-width: 2.75rem;
  min-height: 2.25rem;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  padding: 0.45rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media-toggle:hover,
.language-switcher button:hover,
.language-switcher button[aria-pressed="true"] {
  border-color: rgba(48, 65, 45, 0.58);
  color: #fff;
  background: var(--ink, #30412d);
  box-shadow: 0 0.65rem 1.35rem rgba(48, 65, 45, 0.2);
  transform: translateY(-1px);
}

.language-switcher button[aria-pressed="true"] {
  border-color: transparent;
  box-shadow: 0 0.35rem 0.8rem rgba(48, 65, 45, 0.18);
}

.media-toggle:active,
.language-switcher button:active {
  transform: translateY(0) scale(0.97);
}

.opening__seal,
.gallery__arrow,
.gallery__dot,
.block--rsvp form button {
  touch-action: manipulation;
}

.block a:focus-visible,
.block button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.venue-showcase__image {
  height: auto;
}

.hero__signature-edge {
  fill: none;
  stroke: #e8c47d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.6;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}

.hero__signature-path {
  mask: none !important;
  -webkit-mask: none !important;
}

.hero__signature-part {
  filter: none !important;
}

.block h2,
.opening h1 {
  text-wrap: balance;
}

.hero__signature-edge {
  display: none;
}

.hero__signature-part--first {
  transform: none;
}

.hero__signature-fallback {
  font-family: "Wedding Great Vibes", Great Vibes, cursive !important;
  font-size: clamp(76px, 22vw, 108px);
  font-weight: 400;
  line-height: 0.76;
  display: grid;
  grid-template-rows: auto auto auto;
  grid-template-columns: 1fr;
  place-items: center;
  width: 100%;
  margin: 0 auto;
}

.hero__signature-fallback-part {
  color: currentColor;
  width: min(100%, 58vw, 320px);
  max-width: 100%;
  display: block;
  overflow: visible;
  white-space: nowrap;
}

.hero__signature-fallback-part--first {
  grid-area: 1 / 1;
  justify-self: start;
}

.hero__signature-fallback-part--ampersand {
  grid-area: 2 / 1;
  font-size: 0.52em;
  line-height: 0.7;
}

.hero__signature-fallback-part--second {
  grid-area: 3 / 1;
  justify-self: end;
}

.block--rsvp form {
  gap: 17px;
}

.block--rsvp form label {
  display: grid;
}

.block--rsvp form button {
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.block--rsvp form button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.block--rsvp .success {
  z-index: 1;
  margin: 0;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  text-align: center;
}

.noscript-message {
  max-width: 32rem;
  margin: 2rem auto;
  padding: 1rem;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__signature-part {
    clip-path: inset(0 100% 0 0);
    animation: wedding-02-signature-draw var(--draw-duration, 850ms) cubic-bezier(0.22, 0.68, 0.28, 1) var(--draw-delay, 100ms) 1 forwards;
  }

  body.opening-is-open .hero__signature-part {
    animation-play-state: paused;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-simple,
  .rise,
  .palette,
  .schedule,
  .calendar-focus,
  .footer__text,
  .hero__divider,
  .hero__flower-half,
  .gallery__divider-half,
  .schedule__flower-half,
  .rsvp__flower-half {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .hero__divider {
    clip-path: none !important;
  }

  .hero__signature-part {
    clip-path: none;
    animation: none;
  }

  .hero__particle,
  .hero__glint,
  .hero__celebration-light {
    animation: none !important;
    opacity: 0 !important;
  }
}

@keyframes wedding-02-signature-draw {
  to {
    clip-path: inset(0);
  }
}

@media (max-width: 420px) {
  .hero__controls {
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    left: max(0.75rem, env(safe-area-inset-left));
  }

  .media-toggle {
    width: var(--touch-target);
    padding: 0.5rem;
  }

  .media-toggle [data-music-label] {
    display: none;
  }
}
