:root {
  --red-950: #310308;
  --red-900: #4b0710;
  --red-800: #68101a;
  --red-700: #7b0f19;
  --red-600: #941a26;
  --gold-700: #9b6b19;
  --gold-500: #c79a3b;
  --gold-300: #e4c77a;
  --cream: #fbf6ec;
  --paper: #fffdf8;
  --ink: #2f2020;
  --muted: #776565;
  --shadow: 0 24px 60px rgba(57, 5, 12, .17);
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Great Vibes", cursive;
  --sans: "Montserrat", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { display: block; width: 100%; }

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.container { width: min(92%, 880px); margin: 0 auto; position: relative; z-index: 2; }
.container.narrow { width: min(88%, 680px); }
.container.wide { width: min(94%, 1040px); }
section { position: relative; padding: 96px 0; overflow: hidden; }
.section-full { min-height: 100svh; }
.section-light { background: var(--cream); }
.section-white { background: var(--paper); }
.section-red { color: #fffaf0; background: linear-gradient(155deg, var(--red-950), var(--red-700) 55%, var(--red-900)); }
.section-dark { color: #fffaf0; background: var(--red-950); }

.cover {
  position: fixed;
  inset: 0;
  z-index: 90;
  min-height: 100svh;
  display: grid;
  place-items: end center;
  padding: 52px 24px max(56px, env(safe-area-inset-bottom));
  color: white;
  background: var(--red-950);
  isolation: isolate;
  transition: transform 1.05s cubic-bezier(.77,0,.18,1), opacity .8s ease;
}
.cover.opened { transform: translateY(-105%); opacity: 0; pointer-events: none; }
.cover-photo, .hero-photo {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
}
.cover-photo { background-image: url("assets/images/cover.jpg"); }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(34,0,5,.12), rgba(34,0,5,.28) 40%, rgba(34,0,5,.92)); }
.gold-frame { position: absolute; pointer-events: none; border: 1px solid rgba(228,199,122,.8); }
.gold-frame::before, .gold-frame::after {
  content: ""; position: absolute; width: 24px; height: 24px; border-color: var(--gold-300); border-style: solid;
}
.gold-frame::before { left: -5px; top: -5px; border-width: 2px 0 0 2px; }
.gold-frame::after { right: -5px; bottom: -5px; border-width: 0 2px 2px 0; }
.cover-frame { inset: 18px; }
.cover-content { width: min(100%, 440px); text-align: center; position: relative; z-index: 3; }
.eyebrow { margin: 0 0 5px; text-transform: uppercase; letter-spacing: .28em; font-size: .7rem; font-weight: 500; }
.cover h1 { margin: 0; font-family: var(--script); font-weight: 400; font-size: clamp(3.7rem, 17vw, 6rem); line-height: .9; text-shadow: 0 5px 20px rgba(0,0,0,.28); }
.cover h1 span { display: inline-block; }
.cover h1 b { display: inline-block; margin: 0 .12em; color: var(--gold-300); font-family: var(--serif); font-size: .45em; font-weight: 500; }
.cover-date { margin: 18px 0 22px; color: var(--gold-300); font-family: var(--serif); font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; }
.guest-card { padding: 15px 18px; margin: 0 auto 18px; border: 1px solid rgba(228,199,122,.52); background: rgba(49,3,8,.5); backdrop-filter: blur(12px); }
.guest-card small, .guest-card span { display: block; font-size: .67rem; opacity: .84; }
.guest-card strong { display: block; margin: 2px 0; color: var(--gold-300); font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }

.btn { min-height: 46px; padding: 11px 22px; border: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; font-weight: 600; font-size: .78rem; letter-spacing: .02em; transition: transform .25s, box-shadow .25s, background .25s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gold { color: var(--red-950); background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); box-shadow: 0 10px 30px rgba(199,154,59,.28); }
.btn-red { color: white; background: var(--red-700); box-shadow: 0 10px 24px rgba(104,16,26,.2); }
.btn-outline { color: var(--gold-300); border: 1px solid rgba(228,199,122,.75); background: transparent; }

.hero { display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.hero-photo { background-image: url("assets/images/hero.jpg"); background-position: center 30%; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(49,3,8,.45), rgba(49,3,8,.7)); }
.inset-frame { inset: 22px; z-index: 2; }
.hero-content { position: relative; z-index: 3; }
.names-script { margin: 12px 0; color: white; font-family: var(--script); font-size: clamp(4rem, 18vw, 7.2rem); font-weight: 400; line-height: 1; }
.names-script span { color: var(--gold-300); }
.hero-date { margin: 18px 0 30px; color: var(--gold-300); font-family: var(--serif); font-size: 1.2rem; letter-spacing: .35em; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(65px, 90px)); gap: 8px; justify-content: center; }
.countdown div { padding: 14px 5px 10px; border: 1px solid rgba(228,199,122,.55); background: rgba(49,3,8,.48); backdrop-filter: blur(8px); }
.countdown strong { display: block; color: var(--gold-300); font-family: var(--serif); font-size: 1.65rem; line-height: 1; }
.countdown span { font-size: .58rem; text-transform: uppercase; letter-spacing: .12em; }

.ornamental-section::before, .ornamental-section::after {
  content: ""; position: absolute; width: 210px; height: 210px; opacity: .16; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23c79a3b' stroke-width='1.2'%3E%3Ccircle cx='100' cy='100' r='72'/%3E%3Cpath d='M100 14c15 32 25 42 57 57-32 15-42 25-57 57-15-32-25-42-57-57 32-15 42-25 57-57Z'/%3E%3Cpath d='M24 100c30-10 46-26 56-56M176 100c-30-10-46-26-56-56M24 100c30 10 46 26 56 56M176 100c-30 10-46 26-56 56'/%3E%3C/g%3E%3C/svg%3E"); background-size: contain;
}
.ornamental-section::before { left: -100px; top: -85px; }
.ornamental-section::after { right: -100px; bottom: -85px; transform: rotate(180deg); }
.verse { min-height: 560px; display: grid; place-items: center; text-align: center; }
.section-mark { display: block; margin-bottom: 22px; color: var(--gold-700); font-size: 2.3rem; }
.verse-text { margin: 0; font-family: var(--serif); font-size: clamp(1.25rem, 4.2vw, 1.75rem); font-style: italic; line-height: 1.7; }
.verse-source { margin-top: 20px; color: var(--red-700); font-weight: 600; letter-spacing: .1em; }

.section-heading { max-width: 650px; margin: 0 auto 50px; text-align: center; }
.section-heading .mini-title { display: block; color: var(--red-700); font-family: var(--serif); font-size: 1rem; font-style: italic; }
.section-heading h2 { margin: 4px 0 12px; color: var(--red-800); font-family: var(--script); font-size: clamp(3.3rem, 12vw, 5rem); font-weight: 400; line-height: 1; }
.section-heading p { margin: 0; color: var(--muted); }
.section-heading.light .mini-title, .section-heading.light h2 { color: var(--gold-300); }
.section-heading.light p { color: rgba(255,250,240,.78); }

.person-card { display: grid; grid-template-columns: minmax(220px, .8fr) 1.2fr; gap: clamp(30px, 7vw, 80px); align-items: center; max-width: 780px; margin: 0 auto; }
.person-card.reverse { grid-template-columns: 1.2fr minmax(220px, .8fr); }
.person-card.reverse .portrait-wrap { order: 2; }
.person-card.reverse .person-copy { text-align: right; }
.portrait-wrap { position: relative; aspect-ratio: 4 / 5; padding: 12px; }
.portrait-wrap::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--gold-500); transform: rotate(-3deg); }
.person-card.reverse .portrait-wrap::before { transform: rotate(3deg); }
.portrait-wrap img { height: 100%; object-fit: cover; position: relative; filter: saturate(.95) contrast(1.02); }
.person-copy .role { margin: 0; color: var(--gold-700); font-size: .68rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 600; }
.person-copy h3 { margin: 3px 0 10px; color: var(--red-700); font-family: var(--script); font-size: clamp(3.1rem, 9vw, 4.6rem); font-weight: 400; line-height: 1; }
.person-copy p { margin: 0 0 5px; color: var(--muted); }
.person-copy strong, .person-copy span { display: block; font-family: var(--serif); font-size: 1.08rem; }
.ampersand { margin: 35px auto; text-align: center; color: var(--gold-500); font-family: var(--script); font-size: 4rem; }

.event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.event-card { padding: 38px 28px; text-align: center; border: 1px solid rgba(228,199,122,.52); background: rgba(255,255,255,.045); box-shadow: 0 18px 50px rgba(20,0,3,.2); }
.event-icon { color: var(--gold-300); font-size: 2rem; }
.event-label { margin: 3px 0 4px; color: var(--gold-300); font-family: var(--script); font-size: 2.7rem; line-height: 1; }
.event-card h3 { margin: 0; font-family: var(--serif); font-size: 1rem; text-transform: uppercase; letter-spacing: .2em; }
.date-lockup { width: max-content; margin: 17px auto; display: flex; gap: 12px; align-items: center; }
.date-lockup strong { color: var(--gold-300); font-family: var(--serif); font-size: 4rem; line-height: .8; }
.date-lockup span { padding-left: 12px; border-left: 1px solid rgba(228,199,122,.5); text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; line-height: 1.45; }
.event-meta { min-height: 128px; }
.event-meta p { margin: 6px 0; font-size: .82rem; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; gap: 10px; }
.gallery-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 320px; gap: 14px; }
.gallery-item { border: 0; padding: 0; overflow: hidden; cursor: zoom-in; background: #ddd; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }
.gallery-item img { height: 100%; object-fit: cover; transition: transform .7s ease, filter .5s; }
.gallery-item:hover img { transform: scale(1.045); filter: brightness(.9); }

.map-card { background: white; box-shadow: var(--shadow); border: 1px solid rgba(199,154,59,.28); }
.map-card iframe { display: block; width: 100%; height: 360px; border: 0; filter: saturate(.7) contrast(1.06); }
.map-copy { padding: 28px; text-align: center; }
.map-copy h3 { margin: 0; color: var(--red-700); font-family: var(--serif); font-size: 1.55rem; }
.map-copy p { margin: 5px auto 18px; max-width: 560px; color: var(--muted); }

.gift-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.gift-card { padding: 30px; color: var(--ink); text-align: center; background: linear-gradient(145deg, #fff, #f8ecda); border: 1px solid var(--gold-300); box-shadow: 0 18px 44px rgba(24,0,4,.2); }
.wallet-logo { width: max-content; margin: 0 auto 16px; padding: 10px 18px; border-radius: 16px; background: #ffffff; box-shadow: 0 10px 24px rgba(17,142,234,.12); border: 1px solid rgba(17,142,234,.14); }
.wallet-logo img { display: block; width: 140px; max-width: 100%; height: auto; }
.gift-card p { margin: 0; color: var(--muted); }
.gift-card strong { display: block; margin: 3px 0 16px; color: var(--red-800); font-family: var(--serif); font-size: 1.45rem; letter-spacing: .05em; }
.copy-btn { padding: 8px 15px; color: var(--red-700); border: 1px solid rgba(123,15,25,.35); border-radius: 999px; background: transparent; cursor: pointer; font-weight: 600; font-size: .72rem; }

.rsvp-form { padding: 28px; background: white; border: 1px solid rgba(199,154,59,.3); box-shadow: var(--shadow); }
.rsvp-form label { display: block; margin-bottom: 16px; color: var(--red-900); font-size: .73rem; font-weight: 600; }
.rsvp-form input, .rsvp-form select, .rsvp-form textarea {
  width: 100%; margin-top: 6px; padding: 12px 13px; color: var(--ink); border: 1px solid #ddcfbf; border-radius: 0; outline: none; background: #fffdf9; font-size: .85rem;
}
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(199,154,59,.12); }
.rsvp-form textarea { min-height: 125px; resize: vertical; }
.rsvp-form .btn { width: 100%; }
.form-status { min-height: 20px; margin: 12px 0 0; text-align: center; font-size: .75rem; }
.form-status.success { color: #26733c; }
.form-status.error { color: #a20d1c; }
.wishes { margin-top: 42px; }
.wishes-title { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid rgba(199,154,59,.4); }
.wishes-title h3 { margin: 0; color: var(--red-700); font-family: var(--serif); font-size: 1.65rem; }
.wishes-title span { color: var(--muted); font-size: .7rem; }
.wishes-list { display: grid; gap: 10px; margin-top: 16px; }
.wish-card { padding: 17px 18px; background: white; border-left: 3px solid var(--gold-500); box-shadow: 0 8px 25px rgba(56,23,20,.07); }
.wish-card header { display: flex; justify-content: space-between; gap: 10px; }
.wish-card h4 { margin: 0; color: var(--red-800); font-family: var(--serif); font-size: 1.08rem; }
.wish-card time { color: var(--muted); font-size: .61rem; }
.wish-card p { margin: 6px 0 0; color: #5e4c4c; font-size: .78rem; white-space: pre-wrap; }
.wish-card .badge { display: inline-block; margin-top: 8px; padding: 2px 8px; color: var(--red-700); border: 1px solid rgba(123,15,25,.2); border-radius: 999px; font-size: .58rem; }
.empty-state { text-align: center; color: var(--muted); font-size: .8rem; }

.footer { min-height: 620px; display: grid; place-items: center; text-align: center; background-image: linear-gradient(rgba(49,3,8,.86), rgba(49,3,8,.94)), url("assets/images/footer.jpg"); background-position: center; background-size: cover; }
.footer-frame { inset: 22px; }
.footer p { max-width: 540px; margin-inline: auto; color: rgba(255,250,240,.8); }
.footer .names-script { color: white; }
.footer-date { color: var(--gold-300) !important; letter-spacing: .17em; text-transform: uppercase; }
.footer small { display: block; margin-top: 34px; opacity: .6; }

.bottom-nav { position: fixed; z-index: 50; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 30px), 420px); display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px; border: 1px solid rgba(228,199,122,.45); border-radius: 18px; color: #fff; background: rgba(49,3,8,.88); box-shadow: 0 14px 40px rgba(49,3,8,.25); backdrop-filter: blur(16px); }
.bottom-nav[hidden] { display: none; }
.bottom-nav a { display: grid; place-items: center; text-decoration: none; color: var(--gold-300); font-family: var(--serif); font-size: 1rem; line-height: 1; }
.bottom-nav span { margin-top: 4px; color: white; font-family: var(--sans); font-size: .52rem; }
.music-button { position: fixed; z-index: 55; right: 16px; top: max(16px, env(safe-area-inset-top)); width: 44px; height: 44px; border: 1px solid rgba(228,199,122,.65); border-radius: 50%; color: var(--gold-300); background: rgba(49,3,8,.85); box-shadow: 0 8px 24px rgba(49,3,8,.25); cursor: pointer; }
.music-button[hidden] { display: none; }
.music-button.playing span { display: block; animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.lightbox { width: min(94vw, 900px); max-width: none; height: min(90svh, 760px); max-height: none; padding: 0; border: 0; background: #160206; overflow: hidden; }
.lightbox::backdrop { background: rgba(18,1,4,.9); backdrop-filter: blur(5px); }
.lightbox img { width: 100%; height: 100%; object-fit: contain; }
.lightbox-close { position: absolute; top: 8px; right: 10px; z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%; color: white; background: rgba(0,0,0,.6); font-size: 1.7rem; cursor: pointer; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 95px; transform: translate(-50%, 20px); padding: 10px 16px; color: white; border-radius: 999px; background: var(--red-950); opacity: 0; pointer-events: none; transition: .3s; font-size: .72rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 0; transform: translateY(30px) scale(.985); transition: opacity .8s ease, transform .8s ease; will-change: opacity, transform; }
.reveal.active { opacity: 1; transform: translateY(0) scale(1); }

@media (max-width: 720px) {
  section { padding: 78px 0; }
  .person-card, .person-card.reverse { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .person-card.reverse .portrait-wrap { order: 0; }
  .person-card.reverse .person-copy { text-align: center; }
  .portrait-wrap { width: min(78vw, 330px); margin: auto; }
  .event-grid, .gift-grid { grid-template-columns: 1fr; }
  .event-meta { min-height: auto; margin-bottom: 24px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery-grid-four { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 240px; }
  .gallery-item.wide { grid-column: span 2; }
  .map-card iframe { height: 300px; }
}

@media (max-width: 420px) {
  body { font-size: 14px; }
  .cover { padding-inline: 20px; }
  .cover-frame, .inset-frame, .footer-frame { inset: 12px; }
  .countdown { width: 100%; grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .countdown div { padding-inline: 2px; }
  .countdown strong { font-size: 1.35rem; }
  .gallery-grid { grid-auto-rows: 150px; gap: 6px; }
  .gallery-grid-four { grid-auto-rows: 180px; gap: 8px; }
  .rsvp-form { padding: 21px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Penyesuaian foto asli Efiana & Egi */
.cover-photo {
  background-position: center 31%;
  filter: saturate(1.04) contrast(1.02);
}
.cover-shade {
  background:
    linear-gradient(180deg, rgba(38, 0, 6, .08) 0%, rgba(38, 0, 6, .18) 38%, rgba(38, 0, 6, .93) 100%),
    linear-gradient(90deg, rgba(38, 0, 6, .12), transparent 45%, rgba(38, 0, 6, .12));
}
.hero-photo {
  background-position: center 28%;
  filter: saturate(1.05) contrast(1.03);
}
.hero-overlay {
  background: linear-gradient(180deg, rgba(49,3,8,.34), rgba(49,3,8,.76));
}
.portrait-wrap img {
  object-position: center 18%;
}
.footer {
  background-position: center 45%;
}
.gallery-item {
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(65, 9, 16, .10);
}
.gallery-item img {
  filter: saturate(1.01) contrast(1.015);
}
.gallery-item:hover img {
  filter: brightness(.91) saturate(1.04);
}

@media (max-width: 720px) {
  .cover-photo { background-position: center 28%; }
  .hero-photo { background-position: center 26%; }
  .gallery-grid { grid-auto-flow: dense; }
}
