/* ============ VARIABEL WARNA (dominan putih, biru soft, emas lembut) ============ */
:root {
  --white: #ffffff;
  --mist: #f3f8fd;
  --blue: #8fb4de;
  --blue-soft: #cfe0f5;
  --blue-deep: #5b84b5;
  --blue-dark: #3d5f8c;
  --gold: #c8a85c;
  --gold-light: #ecd9a2;
  --gold-dark: #97793a;
  --sage: #9db8a8;
  --ink: #40536b;
  --muted: #7f8da0;

  --font-script: "Parisienne", cursive;
  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "Quicksand", sans-serif;
  --font-arab: "Amiri", serif;

  --gold-grad: linear-gradient(135deg, var(--gold-dark), var(--gold-light) 40%, var(--gold) 60%, var(--gold-dark));

  /* Pola geometris bintang segi delapan (arabesque) */
  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%238fb4de' stroke-width='1' opacity='.2'%3E%3Crect x='14' y='14' width='32' height='32'/%3E%3Crect x='14' y='14' width='32' height='32' transform='rotate(45 30 30)'/%3E%3Ccircle cx='30' cy='30' r='6'/%3E%3C/g%3E%3Ccircle cx='0' cy='0' r='2' fill='%238fb4de' opacity='.25'/%3E%3Ccircle cx='60' cy='0' r='2' fill='%238fb4de' opacity='.25'/%3E%3Ccircle cx='0' cy='60' r='2' fill='%238fb4de' opacity='.25'/%3E%3Ccircle cx='60' cy='60' r='2' fill='%238fb4de' opacity='.25'/%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(--white); }
.mist  { background: var(--girih), linear-gradient(180deg, #fff, var(--mist)); }
.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: .7rem; font-weight: 500; letter-spacing: .42em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.8rem, 8.5vw, 4rem);
  color: var(--blue-deep);
  text-align: center;
  line-height: 1.25;
  margin-bottom: 46px;
}

.btn {
  display: inline-block;
  padding: 13px 38px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
  border: 1px solid transparent;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: .35s;
  box-shadow: 0 8px 22px rgba(91,132,181,.3);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(91,132,181,.45); }
.btn.outline { background: transparent; color: var(--blue-deep); border-color: var(--blue); box-shadow: none; margin-top: 44px; }
.btn.outline:hover { background: var(--blue-deep); color: #fff; }
.btn.small { padding: 8px 22px; font-size: .62rem; margin-top: 12px; }

/* 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: 40px; margin: 0 auto 14px; display: block; overflow: visible; filter: drop-shadow(0 2px 3px rgba(151,121,58,.3)); }
.orn { width: 200px; height: auto; margin: 10px auto; display: block; overflow: visible; }

.corner { position: absolute; width: clamp(190px, 36vw, 340px); pointer-events: none; z-index: 1; filter: drop-shadow(0 8px 12px rgba(91,132,181,.22)); }
.corner svg { display: block; width: 100%; height: auto; overflow: visible; transform-origin: 0 0; animation: sway 9s ease-in-out infinite alternate; }
.corner.big { width: clamp(280px, 54vw, 540px); }
.corner.sm  { width: clamp(150px, 26vw, 250px); }
.corner.tl { top: 0; left: 0; }
.corner.br { bottom: 0; right: 0; transform: rotate(180deg); }
.corner.tr { top: 0; right: 0; transform: scaleX(-1); }
.corner.bl { bottom: 0; left: 0; transform: scaleY(-1); }
@keyframes sway { from { transform: rotate(-1.4deg); } to { transform: rotate(1.8deg); } }

/* Bingkai mihrab */
.mihrab { background: var(--gold-grad); clip-path: url(#mihrab); padding: 4px; }
.mihrab-in {
  position: relative; width: 100%; height: 100%;
  clip-path: url(#mihrab);
  background: linear-gradient(160deg, #eaf2fb, #ffffff 70%);
  display: grid; place-items: center; padding-top: 18%;
  color: var(--blue-deep); font-family: var(--font-sans); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  overflow: hidden;
}
.mihrab-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: 90px 20px 160px;
  overflow: hidden;
  background:
    var(--girih),
    radial-gradient(circle at 50% 10%, rgba(207,224,245,.55), transparent 55%),
    radial-gradient(circle at 50% 110%, rgba(143,180,222,.25), transparent 55%),
    linear-gradient(180deg, #fff, #f8fbfe);
}
.hero-inner { position: relative; z-index: 3; width: 100%; }
.arab { font-family: var(--font-arab); font-size: 1.9rem; color: var(--blue-dark); line-height: 1.8; }
.arab.ayah { font-size: 1.6rem; direction: rtl; margin-bottom: 18px; }
.eyebrow { font-family: var(--font-sans); font-weight: 500; letter-spacing: .5em; text-transform: uppercase; font-size: .7rem; color: var(--gold); margin: 2px 0 40px; }
.salam-dark { font-family: var(--font-serif); font-style: italic; font-size: 1.3rem; color: var(--blue-deep); margin-bottom: 18px; }

.mosque-bg { position: absolute; left: 50%; bottom: 0; width: min(560px, 96vw); transform: translateX(-50%); opacity: .55; pointer-events: none; overflow: visible; z-index: 1; }

.cover-wrap { position: relative; width: min(250px, 62vw); margin: 0 auto 30px; }
.crescent { position: absolute; left: 50%; top: -34px; width: 30px; transform: translateX(-50%) rotate(-90deg); overflow: visible; z-index: 2; }
.cover-photo { width: 100%; aspect-ratio: 3 / 4; filter: drop-shadow(0 16px 26px rgba(91,132,181,.35)); }

.names { font-family: var(--font-script); font-weight: 400; font-size: clamp(3.6rem, 13vw, 6rem); line-height: 1.1; color: var(--blue-deep); }
.names i { font-style: normal; font-size: .6em; color: var(--gold); padding: 0 .1em; }
.names.small { font-size: clamp(3rem, 10vw, 4.4rem); }
.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-size: 1.3rem; color: var(--ink); font-weight: 600; }

/* ============ COUNTDOWN ============ */
.countdown { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.countdown div {
  position: relative; isolation: isolate;
  width: 104px; height: 136px;
  display: grid; place-content: center; padding-top: 24px;
  background: var(--gold-grad);
  clip-path: url(#mihrab);
}
.countdown div::before { content: ""; position: absolute; inset: 2px; background: #fff; clip-path: url(#mihrab); z-index: -1; }
.countdown b { display: block; font-family: var(--font-serif); font-weight: 500; font-size: 2.4rem; line-height: 1.1; color: var(--blue-deep); }
.countdown span { font-family: var(--font-sans); font-size: .6rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }

/* ============ AYAT ============ */
.quote { font-size: 1.28rem; font-style: italic; line-height: 1.95; }
.source { margin-top: 14px; font-family: var(--font-sans); font-size: .76rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }

/* ============ 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: 3 / 4; margin: 0 auto 26px; filter: drop-shadow(0 12px 22px rgba(91,132,181,.3)); }
.person h3 { font-family: var(--font-script); font-weight: 400; font-size: 2.3rem; color: var(--blue-deep); line-height: 1.3; }
.role { font-family: var(--font-sans); font-weight: 500; letter-spacing: .3em; text-transform: uppercase; font-size: .66rem; color: var(--gold); margin: 4px 0 10px; }
.person p { color: var(--muted); }
.and { font-family: var(--font-script); font-size: 4rem; color: var(--gold); align-self: center; line-height: 1; }

/* ============ JADWAL ============ */
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.card {
  position: relative;
  background: #fff;
  border: 1px solid #dce8f5;
  border-radius: 16px;
  padding: 140px 30px 42px;
  text-align: center;
  box-shadow: 0 16px 44px rgba(91,132,181,.14);
}
.card::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(200,168,92,.4); border-radius: 10px; pointer-events: none; }
.card-icon { position: absolute; top: 24px; left: 50%; width: 130px; transform: translateX(-50%); overflow: visible; }
.card-icon.flower { width: 92px; top: 30px; }
.card h3 { font-family: var(--font-script); font-weight: 400; font-size: 2.5rem; color: var(--blue-deep); margin-bottom: 6px; line-height: 1.2; }
.card .when { font-weight: 600; font-size: 1.2rem; }
.card .time { font-family: var(--font-sans); font-weight: 400; font-size: .8rem; letter-spacing: .24em; color: var(--gold); margin-bottom: 14px; }
.card .where { color: var(--muted); }

/* ============ TIMELINE KISAH CINTA ============ */
.timeline { position: relative; margin-top: 10px; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: linear-gradient(var(--blue), var(--gold-light)); }
.t-item { position: relative; width: 50%; padding: 0 46px 42px 0; }
.t-item:nth-child(even) { margin-left: 50%; padding: 0 0 42px 46px; }
.t-dot { position: absolute; top: -8px; right: -24px; width: 48px; height: 48px; background: var(--mist); border-radius: 50%; display: grid; place-items: center; }
.t-dot svg { width: 42px; height: 42px; overflow: visible; filter: drop-shadow(0 2px 3px rgba(91,132,181,.3)); }
.t-item:nth-child(even) .t-dot { right: auto; left: -24px; }
.t-box { background: #fff; border: 1px solid #dce8f5; border-radius: 18px; padding: 22px 24px; box-shadow: 0 10px 28px rgba(91,132,181,.1); }
.t-year { font-family: var(--font-sans); font-size: .7rem; font-weight: 500; letter-spacing: .32em; color: var(--gold); }
.t-box h3 { font-family: var(--font-script); font-weight: 400; font-size: 2rem; color: var(--blue-deep); line-height: 1.3; margin: 2px 0 4px; }
.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, #e7f0fa, #ffffff);
  border: 6px solid #fff;
  outline: 1px solid #dce8f5;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--blue-deep); font-family: var(--font-sans); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(91,132,181,.16);
  overflow: hidden; transition: transform .5s;
}
.g:nth-child(1), .g:nth-child(5) { border-radius: 90px 90px 6px 6px; }
.g:hover { transform: translateY(-4px) scale(1.02); }
.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(28,42,62,.94); display: none; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: 92vh; border: 5px solid #fff; border-radius: 6px; }

/* ============ TANDA KASIH ============ */
.gifts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 34px; }
.gift { display: grid; gap: 2px; justify-items: center; background: #fff; border: 1px solid #dce8f5; border-top: 4px solid var(--blue); border-radius: 16px; padding: 28px 16px; box-shadow: 0 12px 30px rgba(91,132,181,.14); }
.gift strong { font-family: var(--font-sans); font-weight: 500; font-size: .7rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.gift span { font-family: var(--font-serif); font-weight: 600; font-size: 1.7rem; letter-spacing: .08em; color: var(--blue-deep); }
.gift em { color: var(--muted); }

/* ============ RSVP ============ */
.rsvp { display: grid; gap: 22px; }
.rsvp label { display: grid; gap: 4px; font-family: var(--font-sans); font-size: .66rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.rsvp input, .rsvp select, .rsvp textarea {
  width: 100%; padding: 10px 2px;
  font-family: var(--font-serif); font-size: 1.15rem; letter-spacing: 0; text-transform: none; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid #c9daee;
  border-radius: 0; outline: none; transition: .3s;
}
.rsvp textarea { border: 1px solid #c9daee; border-radius: 12px; padding: 12px 14px; resize: vertical; }
.rsvp input:focus, .rsvp select:focus { border-bottom-color: var(--blue-deep); }
.rsvp textarea:focus { border-color: var(--blue-deep); box-shadow: 0 0 0 4px rgba(143,180,222,.22); }
.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: var(--mist); border-left: 4px solid var(--blue); border-radius: 10px; padding: 16px 20px; }
.wish strong { font-family: var(--font-script); font-weight: 400; font-size: 1.7rem; color: var(--blue-deep); }
.wish small { margin-left: 8px; font-family: var(--font-sans); font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.wish p { color: var(--muted); line-height: 1.7; }

/* ============ FOOTER ============ */
.footer {
  position: relative;
  text-align: center;
  padding: 120px 20px 180px;
  overflow: hidden;
  background: var(--girih), linear-gradient(180deg, #fff, #e4eef9);
}
.footer-in { position: relative; z-index: 2; max-width: 600px; margin: 0 auto; }
.mosque-sm { width: 150px; margin: 0 auto 16px; display: block; overflow: visible; }
.copy { font-style: italic; color: var(--muted); }
.thanks { margin-top: 14px; font-family: var(--font-sans); font-weight: 500; letter-spacing: .4em; text-transform: uppercase; font-size: .72rem; color: var(--gold); }

/* ============ RESPONSIF ============ */
@media (max-width: 700px) {
  .section { padding: 80px 18px; }
  .hero { padding-top: 100px; }
  .and { width: 100%; font-size: 3.2rem; }
  .countdown div { width: 76px; height: 100px; padding-top: 16px; }
  .countdown b { font-size: 1.7rem; }
  .countdown span { font-size: .5rem; letter-spacing: .12em; }
  .gallery .g.wide { grid-column: span 1; }
  .arab.ayah { font-size: 1.4rem; }

  /* timeline satu sisi di HP */
  .timeline::before { left: 22px; }
  .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: -2px; right: auto; }
}

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