:root {
  --gold: #f5cb5c;
  --gold-soft: rgba(245, 203, 92, 0.34);
  --ink: #050507;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--ink);
  overscroll-behavior-y: none;
}

body.is-locked {
  overflow: hidden;
  touch-action: none;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

main > :first-child {
  margin-top: 0 !important;
}

main > :last-child {
  margin-bottom: 0 !important;
}

.scroll-slim {
  scrollbar-width: thin;
  scrollbar-color: var(--gold-soft) transparent;
}

.scroll-slim::-webkit-scrollbar {
  width: 6px;
}

.scroll-slim::-webkit-scrollbar-thumb {
  background: var(--gold-soft);
  border-radius: 999px;
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../fonts/material-symbols-subset.woff2') format('woff2');
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  font-feature-settings: 'liga' 1;
  -webkit-font-feature-settings: 'liga' 1;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
}

html.icons-pending .material-symbols-outlined {
  visibility: hidden;
}

.focus-ring:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 0.5rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  transition: top 0.2s var(--ease-out);
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#ambience {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0;
  pointer-events: none;
  will-change: transform;
}

html.has-aurora .aurora {
  opacity: var(--aurora-opacity, 0.5);
  animation: aurora-drift var(--aurora-duration, 22s) ease-in-out infinite alternate;
  animation-delay: var(--aurora-delay, 0s);
}

@keyframes aurora-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(var(--aurora-x, 40px), var(--aurora-y, -30px), 0) scale(1.18);
  }
}

html.has-spotlight body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    380px circle at var(--spot-x, 50%) var(--spot-y, 30%),
    rgba(245, 203, 92, 0.1),
    transparent 70%
  );
  transition: opacity 0.4s var(--ease-out);
}

.shimmer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 255, 255, 0.42),
    transparent
  );
  transform: skewX(-18deg);
  animation: shimmer-sweep 4.5s ease-in-out infinite;
}

@keyframes shimmer-sweep {
  0%,
  55% {
    left: -60%;
  }
  90%,
  100% {
    left: 130%;
  }
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #e0b23f, #ffe1a3, #f5cb5c);
  box-shadow: 0 0 12px rgba(245, 203, 92, 0.6);
  pointer-events: none;
}

.band {
  background-image: linear-gradient(
    to bottom,
    rgb(4 4 5 / 0) 0%,
    rgb(4 4 5 / var(--band-alpha, 0.5)) 18%,
    rgb(4 4 5 / var(--band-alpha, 0.5)) 82%,
    rgb(4 4 5 / 0) 100%
  );
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.band-footer {
  background-image: linear-gradient(
    to bottom,
    rgb(4 4 5 / 0) 0%,
    rgb(4 4 5 / 0.6) 30%,
    rgb(4 4 5 / 0.85) 100%
  );
}

.divider-glow {
  position: relative;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(245, 203, 92, 0.55), transparent);
  animation: divider-pulse 5s ease-in-out infinite;
}

.divider-glow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160%;
  height: 34px;
  pointer-events: none;
  background: radial-gradient(60% 85% at 50% 0%, rgba(245, 203, 92, 0.4), rgba(245, 203, 92, 0) 72%);
  -webkit-filter: blur(3px);
  filter: blur(3px);
}

@keyframes divider-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

#ornaments {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ornament-kawung {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='none' stroke='%23f5cb5c'%3E%3Ccircle cx='80' cy='0' r='80'/%3E%3Ccircle cx='0' cy='80' r='80'/%3E%3Ccircle cx='160' cy='80' r='80'/%3E%3Ccircle cx='80' cy='160' r='80'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.ornament-tumpal {
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  opacity: 0.14;
  background-repeat: repeat-x;
  background-size: 28px 14px;
}

.ornament-tumpal--top {
  top: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14'%3E%3Cpath d='M0 0 L14 14 L28 0' fill='none' stroke='%23f5cb5c' stroke-width='1'/%3E%3C/svg%3E");
}

.ornament-tumpal--bottom {
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14'%3E%3Cpath d='M0 14 L14 0 L28 14' fill='none' stroke='%23f5cb5c' stroke-width='1'/%3E%3C/svg%3E");
}

.ornament-corner {
  position: absolute;
  width: min(46vw, 460px);
  height: min(46vw, 460px);
  color: var(--gold);
  opacity: 0.16;
}

.ornament-corner .ornament-wing path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.ornament-corner .ornament-dots circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.ornament-corner .ornament-dots circle:last-child {
  fill: currentColor;
  stroke: none;
}

.ornament-corner--tl {
  top: -64px;
  left: -64px;
}

.ornament-corner--tr {
  top: -64px;
  right: -64px;
  transform: scaleX(-1);
}

.ornament-corner--bl {
  bottom: -64px;
  left: -64px;
  transform: scaleY(-1);
}

.ornament-corner--br {
  bottom: -64px;
  right: -64px;
  transform: scale(-1, -1);
}

#site-header {
  transition: height 0.3s var(--ease-out), background-color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

/*
 * Tepi bawah header diberi ekor gradasi, bukan potongan lurus, supaya bilah
 * yang menempel di atas tidak terbaca sebagai garis pemisah.
 */
#site-header::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 28px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgb(8 8 10 / 0.55), rgb(8 8 10 / 0));
}

#site-header.is-scrolled {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.38);
}

#cover {
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out),
    visibility 0.9s step-end;
}

#cover.cover--open {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

#mobile-drawer {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out), visibility 0.25s;
}

#mobile-drawer .drawer__panel {
  transform: translateY(-12px);
  transition: transform 0.3s var(--ease-out);
}

#mobile-drawer.drawer--open {
  visibility: visible;
  opacity: 1;
}

#mobile-drawer.drawer--open .drawer__panel {
  transform: translateY(0);
}

#lightbox {
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
}

#lightbox.lightbox--open {
  opacity: 1;
}

.is-playing [data-audio-icon] {
  animation: pulse-soft 1.8s ease-in-out infinite;
}

.toast {
  animation: toast-in 0.28s var(--ease-out) both;
}

.toast--out {
  animation: toast-out 0.22s ease-in forwards;
}

.ring-error {
  box-shadow: inset 0 0 0 1px #ffb4ab;
}

[data-error]:empty {
  display: none;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-revealed {
  opacity: 1;
  transform: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes float-slow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-float {
  animation: float-slow 6s ease-in-out infinite;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .aurora {
    animation: none !important;
    opacity: 0.35;
  }

  .shimmer::after,
  .divider-glow {
    animation: none !important;
  }

  .shimmer::after {
    display: none;
  }
}

@media print {
  #site-header,
  #cover,
  #lightbox,
  #toast-region,
  #ornaments,
  #rsvp form,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
