/* ============ VARIABEL WARNA (hitam-putih ala kain poleng) ============ */
:root {
  --black: #111111;
  --charcoal: #1c1c1c;
  --white: #ffffff;
  --paper: #f4f2ec;
  --grey: #8a8a8a;
  --gold: #b99a5b;
  --gold-light: #e9d6a4;
  --gold-dark: #8c7036;
  --ink: #232323;
  --muted: #6e6e6e;

  --font-names: "Abril Fatface", serif;
  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "Montserrat", sans-serif;

  --gold-grad: linear-gradient(135deg, var(--gold-dark), var(--gold-light) 45%, var(--gold) 70%, var(--gold-dark));
  --kori: polygon(46% 0, 54% 0, 54% 8%, 64% 8%, 64% 16%, 74% 16%, 74% 26%, 86% 26%, 86% 38%, 100% 38%, 100% 100%, 0 100%, 0 38%, 14% 38%, 14% 26%, 26% 26%, 26% 16%, 36% 16%, 36% 8%, 46% 8%);

  --poleng: conic-gradient(#111 25%, #fff 0 50%, #111 0 75%, #fff 0);

  /* Latar kisi berlian halus */
  --lattice-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 4 L44 24 L24 44 L4 24Z' fill='none' stroke='%23ffffff' stroke-width='1' opacity='.09'/%3E%3Ccircle cx='24' cy='24' r='2' fill='%23ffffff' opacity='.1'/%3E%3C/svg%3E");
  --lattice-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 4 L44 24 L24 44 L4 24Z' fill='none' stroke='%23111111' stroke-width='1' opacity='.07'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  font-size: 1.14rem;
  color: var(--ink);
  background: var(--white);
  line-height: 1.85;
  overflow-x: hidden;
}

/* ============ LAYOUT UMUM ============ */
.section { padding: 100px 20px; position: relative; overflow: hidden; }
.white { background: var(--lattice-light), var(--white); }
.paper { background: var(--lattice-light), var(--paper); }
.black { background: var(--lattice-dark), linear-gradient(180deg, #171717, var(--black)); color: #ececec; }
.center { text-align: center; }
.container { max-width: 1000px; margin: 0 auto; position: relative; z-index: 2; }
.narrow { max-width: 640px; }

.kicker { font-family: var(--font-sans); font-size: .68rem; font-weight: 500; letter-spacing: .45em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 8px; }
.black .kicker { color: var(--gold); }
.title {
  font-family: var(--font-names);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 2.9rem);
  color: var(--black);
  text-align: center;
  line-height: 1.25;
  margin-bottom: 50px;
}
.black .title { color: var(--white); }

.btn {
  display: inline-block;
  padding: 13px 38px;
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--black);
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: .3s;
  box-shadow: 5px 5px 0 var(--gold);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--gold); }
.btn.light { background: var(--white); color: var(--black); border-color: var(--white); }
.btn.small { padding: 8px 22px; font-size: .62rem; margin-top: 12px; box-shadow: 3px 3px 0 var(--gold); }

/* Animasi scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s ease, transform 1.1s ease; }
.reveal.show { opacity: 1; transform: none; }

/* ============ ORNAMEN ============ */
.mini { width: 54px; margin: 0 auto 14px; display: block; overflow: visible; filter: drop-shadow(0 3px 4px rgba(0,0,0,.2)); }
.ukir { width: 190px; height: auto; margin: 12px auto; display: block; overflow: visible; }
.ukir.light { filter: invert(1) brightness(1.4); }

/* Pita kain poleng */
.poleng {
  position: absolute; top: 0; left: 0; right: 0; height: 24px; z-index: 4;
  background: var(--poleng) 0 0 / 24px 24px;
  border-bottom: 3px solid var(--gold);
}
.poleng.bottom { top: auto; bottom: 0; border-bottom: 0; border-top: 3px solid var(--gold); }

.corner { position: absolute; width: clamp(130px, 22vw, 230px); pointer-events: none; z-index: 1; filter: drop-shadow(0 6px 8px rgba(0,0,0,.2)); }
.corner svg { display: block; width: 100%; height: auto; overflow: visible; transform-origin: 0 0; animation: sway 9s ease-in-out infinite alternate; }
.corner.tl { top: 24px; left: 0; }
.corner.tr { top: 24px; right: 0; transform: scaleX(-1); }
@keyframes sway { from { transform: rotate(-1.5deg); } to { transform: rotate(2deg); } }

.meru { position: absolute; bottom: 30px; width: clamp(80px, 14vw, 150px); color: #111; opacity: .12; overflow: visible; pointer-events: none; }
.meru.ml { left: 2%; }
.meru.mr { right: 2%; }

/* Bingkai foto berundak (kori) */
.kori { background: var(--gold-grad); clip-path: var(--kori); padding: 4px; }
.kori-in {
  position: relative; width: 100%; height: 100%;
  clip-path: var(--kori);
  background: linear-gradient(160deg, #2a2a2a, #0d0d0d);
  display: grid; place-items: center; padding-top: 20%;
  color: var(--gold-light); font-family: var(--font-sans); font-size: .66rem; letter-spacing: .24em; text-transform: uppercase;
  overflow: hidden;
}
.kori-in img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ============ COVER ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid; place-items: center;
  text-align: center;
  padding: 100px 20px 110px;
  overflow: hidden;
  background:
    var(--lattice-light),
    radial-gradient(circle at 50% 36%, #fff 0%, #f1efe8 100%);
}
.hero-inner { position: relative; z-index: 3; width: 100%; }
.salam { font-family: var(--font-names); font-size: 1.9rem; color: var(--black); line-height: 1.2; }
.salam-dark { font-family: var(--font-names); font-size: 1.6rem; color: var(--black); margin-bottom: 18px; }
.eyebrow { font-family: var(--font-sans); letter-spacing: .5em; text-transform: uppercase; font-size: .72rem; margin: 4px 0 26px; color: var(--gold-dark); }

.gate { position: relative; width: min(560px, 100%); aspect-ratio: 100 / 66; margin: 0 auto 26px; }
.gate .half { position: absolute; bottom: 0; width: 28%; height: auto; overflow: visible; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); }
.gate .left  { left: 0; }
.gate .right { right: 0; transform: scaleX(-1); }
.cover-photo { position: absolute; left: 50%; bottom: 0; width: 46%; aspect-ratio: 4 / 5; transform: translateX(-50%); filter: drop-shadow(0 12px 16px rgba(0,0,0,.35)); }

.names { font-family: var(--font-names); font-weight: 400; font-size: clamp(2.8rem, 10.5vw, 5rem); line-height: 1.15; color: var(--black); }
.names i { font-style: normal; font-size: .55em; padding: 0 .12em; color: var(--gold); }
.names.small { font-size: clamp(2.3rem, 7.5vw, 3.6rem); color: var(--white); }
.date { font-family: var(--font-sans); font-weight: 400; font-size: .95rem; letter-spacing: .3em; text-transform: uppercase; margin: 4px 0 16px; color: var(--ink); }
.guest { font-size: 1rem; color: var(--muted); margin-bottom: 26px; }
.guest b { font-family: var(--font-names); font-weight: 400; font-size: 1.25rem; color: var(--black); letter-spacing: .02em; }

/* ============ COUNTDOWN ============ */
.countdown { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.countdown div {
  position: relative; isolation: isolate;
  width: 108px; height: 130px;
  display: grid; place-content: center; padding-top: 22px;
  background: #fff;
  clip-path: var(--kori);
}
.countdown div::before { content: ""; position: absolute; inset: 3px; background: var(--black); clip-path: var(--kori); z-index: -1; }
.countdown b { display: block; font-family: var(--font-names); font-weight: 400; font-size: 2.3rem; line-height: 1.1; color: #fff; }
.countdown span { font-family: var(--font-sans); font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }

/* ============ AYAT ============ */
.quote { font-size: 1.35rem; font-style: italic; line-height: 1.95; }
.source { margin-top: 14px; font-family: var(--font-sans); font-size: .74rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-dark); }
.pepatah { font-family: var(--font-names); font-size: 1.5rem; color: var(--black); }
.arti { color: var(--muted); font-size: 1rem; }

/* ============ MEMPELAI ============ */
.couple { display: flex; align-items: flex-start; justify-content: center; gap: 30px; flex-wrap: wrap; text-align: center; }
.person { flex: 1 1 270px; max-width: 330px; }
.photo { width: 210px; aspect-ratio: 4 / 5; margin: 0 auto 26px; filter: drop-shadow(0 12px 16px rgba(0,0,0,.3)); }
.person h3 { font-family: var(--font-names); font-weight: 400; font-size: 1.35rem; color: var(--black); line-height: 1.5; }
.role { font-family: var(--font-sans); font-weight: 500; letter-spacing: .3em; text-transform: uppercase; font-size: .66rem; color: var(--gold-dark); margin: 4px 0 10px; }
.person p { color: var(--muted); }
.and { font-family: var(--font-names); font-size: 3.4rem; align-self: center; line-height: 1; color: var(--gold); }

/* ============ JADWAL ============ */
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 34px; }
.card {
  position: relative;
  background: #fff;
  color: var(--ink);
  border: 2px solid #fff;
  padding: 130px 30px 40px;
  text-align: center;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--gold);
}
.card-band { position: absolute; top: 0; left: 0; right: 0; height: 16px; background: var(--poleng) 0 0 / 16px 16px; border-bottom: 2px solid var(--black); }
.card-icon { position: absolute; top: 34px; left: 50%; width: 62px; transform: translateX(-50%); overflow: visible; color: var(--black); }
.card-icon.flower { width: 84px; top: 32px; }
.card h3 { font-family: var(--font-names); font-weight: 400; font-size: 1.5rem; color: var(--black); margin-bottom: 8px; line-height: 1.3; }
.card .when { font-weight: 600; font-size: 1.15rem; }
.card .time { font-family: var(--font-sans); letter-spacing: .18em; font-size: .8rem; color: var(--gold-dark); margin-bottom: 12px; }
.card .where { color: var(--muted); }
.adat { text-align: center; margin-top: 38px; font-style: italic; color: #cfcfcf; }
.adat + .center { margin-top: 30px; }

/* ============ TIMELINE KISAH CINTA ============ */
.timeline { position: relative; margin-top: 10px; }
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 12px; margin-left: -6px;
  background: var(--poleng) 0 0 / 12px 12px;
  border: 1px solid var(--black);
}
.t-item { position: relative; width: 50%; padding: 0 48px 42px 0; }
.t-item:nth-child(even) { margin-left: 50%; padding: 0 0 42px 48px; }
.t-dot { position: absolute; top: -4px; right: -22px; width: 44px; height: 44px; background: #fff; border: 2px solid var(--black); border-radius: 50%; display: grid; place-items: center; }
.t-dot svg { width: 34px; height: 34px; overflow: visible; }
.t-item:nth-child(even) .t-dot { right: auto; left: -22px; }
.t-box { background: #fff; border: 2px solid var(--black); padding: 20px 24px; box-shadow: 6px 6px 0 var(--black); }
.t-year { font-family: var(--font-sans); font-size: .74rem; font-weight: 500; letter-spacing: .3em; color: var(--gold-dark); }
.t-box h3 { font-family: var(--font-names); font-weight: 400; font-size: 1.2rem; color: var(--black); margin: 2px 0 6px; line-height: 1.4; }
.t-box p { color: var(--muted); line-height: 1.75; font-size: 1.05rem; }

/* ============ GALERI ============ */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); grid-auto-rows: 210px; gap: 14px; }
.g {
  background: linear-gradient(135deg, #2a2a2a, #0d0d0d);
  border: 3px solid var(--black);
  outline: 1px solid var(--gold);
  outline-offset: -9px;
  display: grid; place-items: center;
  color: var(--gold-light); font-family: var(--font-sans); font-size: .7rem; letter-spacing: .24em; text-transform: uppercase;
  overflow: hidden; transition: transform .5s;
}
.g:nth-child(even) { background: linear-gradient(135deg, #fff, #dcdcdc); color: #444; }
.g:hover { transform: translateY(-4px); }
.g img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.g.tall { grid-row: span 2; }
.g.wide { grid-column: span 2; }
.hint { text-align: center; margin-top: 18px; font-size: .85rem; color: var(--muted); }

.lightbox { position: fixed; inset: 0; z-index: 99; background: rgba(8,8,8,.95); display: none; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: 92vh; border: 3px solid #fff; }

/* ============ TANDA KASIH ============ */
.gifts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 34px; }
.gift { position: relative; overflow: hidden; display: grid; gap: 2px; justify-items: center; background: #fff; color: var(--ink); border: 2px solid #fff; padding: 40px 16px 28px; box-shadow: 6px 6px 0 var(--gold); }
.gift::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 16px; background: var(--poleng) 0 0 / 16px 16px; border-bottom: 2px solid var(--black); }
.gift strong { font-family: var(--font-sans); font-weight: 500; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-dark); }
.gift span { font-family: var(--font-names); font-weight: 400; font-size: 1.4rem; letter-spacing: .05em; color: var(--black); }
.gift em { color: var(--muted); }

/* ============ RSVP ============ */
.rsvp { display: grid; gap: 22px; }
.rsvp label { display: grid; gap: 6px; font-family: var(--font-sans); font-size: .68rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-dark); }
.rsvp input, .rsvp select, .rsvp textarea {
  width: 100%; padding: 12px 14px;
  font-family: var(--font-serif); font-size: 1.12rem; letter-spacing: 0; text-transform: none; color: var(--ink);
  background: #fff;
  border: 2px solid var(--black);
  border-radius: 0; outline: none; transition: .3s;
}
.rsvp textarea { resize: vertical; }
.rsvp input:focus, .rsvp select:focus, .rsvp textarea:focus { box-shadow: 5px 5px 0 var(--gold); }
.rsvp .btn { justify-self: center; margin-top: 8px; }

.wishes { margin-top: 40px; display: grid; gap: 14px; max-height: 380px; overflow-y: auto; padding-right: 4px; }
.wish { background: #fff; border: 2px solid var(--black); border-left: 8px solid var(--black); padding: 16px 20px; }
.wish strong { font-family: var(--font-names); font-weight: 400; font-size: 1.05rem; color: var(--black); }
.wish small { margin-left: 8px; font-family: var(--font-sans); font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-dark); }
.wish p { color: var(--muted); line-height: 1.7; }

/* ============ FOOTER ============ */
.footer {
  position: relative;
  text-align: center;
  padding: 120px 20px 150px;
  overflow: hidden;
  color: #ececec;
  background: var(--lattice-dark), linear-gradient(180deg, #171717, var(--black));
}
.footer-in { position: relative; z-index: 2; max-width: 600px; margin: 0 auto; }
.padma { width: 90px; margin: 0 auto 18px; display: block; color: #fff; overflow: visible; opacity: .92; }
.footer .meru { color: #fff; opacity: .12; bottom: 32px; }
.footer .meru.fl { left: 3%; }
.footer .meru.fr { right: 3%; }
.copy { font-style: italic; color: #bdbdbd; }
.thanks { margin-top: 14px; font-family: var(--font-names); letter-spacing: .3em; text-transform: uppercase; font-size: 1rem; color: var(--gold); }

/* ============ RESPONSIF ============ */
@media (max-width: 700px) {
  .section { padding: 80px 18px; }
  .hero { padding-top: 100px; }
  .and { width: 100%; font-size: 2.6rem; }
  .countdown div { width: 76px; height: 96px; padding-top: 14px; }
  .countdown b { font-size: 1.6rem; }
  .countdown span { font-size: .5rem; letter-spacing: .12em; }
  .gallery .g.wide { grid-column: span 1; }
  .meru { opacity: .08; }

  /* timeline satu sisi di HP */
  .timeline::before { left: 22px; margin-left: 0; }
  .t-item, .t-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 34px 62px; }
  .t-dot, .t-item:nth-child(even) .t-dot { left: 0; right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
