/* ==========================================================================
   POLISH LAYER — art direction premium (dimuat setelah couple.css)
   Cinematic photo grading · editorial gallery · stationery letter · refined UI
   ========================================================================== */
.couple-site {
  --r-photo: 14px;
  --ink: #3E1C1F;
  --font-serif-soft: "Cormorant Garamond", var(--font-head);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .42  0 0 0 0 .18  0 0 0 0 .16  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  overflow-x: clip;
}

/* ---------- Tekstur kertas halus di seluruh halaman ---------- */
.couple-site::before {
  content: ""; position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background-image: var(--grain); background-size: 160px; opacity: .07;
}

/* ---------- Navigasi ---------- */
.nav__link { letter-spacing: .02em; }
.nav.is-scrolled, .nav.is-open { background: rgba(255, 246, 242, .8); }
.nav__brand { text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }

/* ---------- Hero: grading sinematik ---------- */
.hero::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 70vmax; height: 70vmax; right: -25vmax; top: -30vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 150, .38), transparent 62%);
  filter: blur(20px);
}
.hero__media > img { filter: saturate(1.06) contrast(1.05) brightness(.98); }
.hero__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 58% 38%, transparent 46%, rgba(58, 8, 16, .34) 100%),
    linear-gradient(to top, rgba(58, 8, 16, .30), transparent 38%),
    linear-gradient(120deg, rgba(255, 170, 120, .10), transparent 50%);
}
.hero__title { text-shadow: 0 2px 24px rgba(255, 255, 255, .55); }
.hero__names { letter-spacing: .04em; }
.hero__tagline { font-family: var(--font-serif-soft); font-style: italic; font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); line-height: 1.5; }
.chip { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 18px rgba(107, 15, 26, .08); }

/* ---------- Judul section ---------- */
.section-title h2 { letter-spacing: -.005em; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.section-title::before, .section-title::after { background: linear-gradient(to right, transparent, rgba(200, 32, 46, .55)); }
#timeline { background: linear-gradient(180deg, transparent, rgba(246, 211, 208, .38) 25%, rgba(246, 211, 208, .38) 75%, transparent); }
#moments  { background: linear-gradient(180deg, transparent, rgba(246, 211, 208, .22) 40%, transparent); }

/* ---------- Our Story ---------- */
.story { border-color: rgba(255, 255, 255, .85); box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .8); }
.story__desc, .story__more p { font-family: var(--font-serif-soft); font-size: 1.18rem; line-height: 1.7; }
.polaroid { box-shadow: 0 18px 40px rgba(107, 15, 26, .22), 0 2px 0 rgba(255, 255, 255, .8) inset; }
.polaroid .ph { filter: saturate(1.05) contrast(1.03); }
.story__quote p { text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }

/* ---------- Galeri editorial ---------- */
.gallery { counter-reset: gal; }
.g-item { counter-increment: gal; }
.g-btn { border-radius: var(--r-photo); box-shadow: 0 10px 28px rgba(107, 15, 26, .12), 0 0 0 1px rgba(255, 255, 255, .6) inset; }
.g-btn .ph > img { filter: saturate(1.05) contrast(1.04); }
.g-btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 100% at 50% 40%, transparent 55%, rgba(58, 8, 16, .22) 100%);
}
.g-cap {
  z-index: 1; display: flex; align-items: baseline; gap: .7em;
  background: linear-gradient(to top, rgba(58, 8, 16, .78), rgba(58, 8, 16, .25) 60%, transparent);
}
.g-cap::before {
  content: counter(gal, decimal-leading-zero);
  font: 600 .62rem/1 var(--font-body); font-style: normal; letter-spacing: .2em; opacity: .85;
}
@media (hover: hover) {
  .g-cap { opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
  .g-btn:hover .g-cap, .g-btn:focus-visible .g-cap { opacity: 1; transform: none; }
}

/* ---------- Timeline ---------- */
.tl-photo { border-width: 4px; box-shadow: 0 0 0 2px var(--rose-soft), 0 0 0 7px rgba(255, 255, 255, .6), var(--shadow-md); }
.tl-photo img { filter: saturate(1.05); }
.tl-date {
  display: inline-block; padding: .28em .85em; border-radius: var(--r-pill);
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(200, 32, 46, .09); border: 1px solid rgba(200, 32, 46, .18);
}
.tl-desc { font-family: var(--font-serif-soft); font-size: 1.05rem; line-height: 1.5; }

/* ---------- Surat cinta: stationery ---------- */
.envelope__seal {
  width: 17%; border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%;
  background: radial-gradient(circle at 34% 28%, #E2394A 0%, #C8202E 38%, #8E1220 100%);
  box-shadow: 0 5px 12px rgba(107, 15, 26, .5), inset 0 2px 3px rgba(255, 190, 190, .45), inset 0 -3px 5px rgba(60, 0, 8, .45);
}
.envelope__seal::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 1px solid rgba(255, 220, 215, .5); }
.paper {
  max-width: 580px; font-family: var(--font-serif-soft); font-weight: 500;
  background-color: #FFFBF6;
  background-image: var(--grain), linear-gradient(180deg, #FFFDF9, #FBF1EA);
  background-size: 160px, auto;
  box-shadow: 0 18px 40px rgba(107, 15, 26, .18), 0 0 0 1px rgba(200, 32, 46, .16), inset 0 0 60px rgba(176, 120, 90, .12);
}
.paper::before { content: ""; position: absolute; left: clamp(34px, 7vw, 52px); top: 0; bottom: 0; width: 1px; background: rgba(200, 32, 46, .18); }
.paper__greeting { font-family: var(--font-script); font-style: normal; font-size: clamp(2rem, 1.5rem + 1.6vw, 2.5rem); line-height: 1.2; margin-bottom: 10px; color: var(--rose-deep); }
.paper__body {
  gap: 0; font-style: italic; font-size: clamp(1.14rem, 1.05rem + .45vw, 1.32rem); line-height: 2; color: var(--ink);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2em - 1px), rgba(200, 32, 46, .11) calc(2em - 1px), rgba(200, 32, 46, .11) 2em);
}
.paper__body p { text-indent: 1.6em; overflow-wrap: anywhere; }
.paper__body p:first-child { text-indent: 0; }
.paper__body p:first-child::first-letter {
  float: left; font-family: var(--font-script); font-style: normal; font-size: 3.5em; line-height: .78;
  padding: .08em .1em 0 0; color: var(--rose-deep);
}
.paper__closing { font-size: 1.18rem; text-align: center; margin-top: 22px; }
.paper__closing::before { content: "\2766"; display: block; margin-bottom: 6px; color: var(--rose); font-style: normal; opacity: .75; }

/* ---------- Music player: piringan hitam ---------- */
.player__art { border-radius: 50%; border: 4px solid #fff; box-shadow: 0 10px 24px rgba(107, 15, 26, .22); animation: spin 14s linear infinite paused; }
body.is-playing .player__art { animation-play-state: running; }
.player__art::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 3px rgba(107, 15, 26, .25); }
.viz span { background: linear-gradient(to top, var(--burgundy), var(--rose)); }

/* ---------- Special Moments ---------- */
.moment { border-radius: var(--r-photo); }
.moment .ph > img { filter: saturate(1.06) contrast(1.04); }
.moment__shade { background: linear-gradient(to top, rgba(58, 8, 16, .82) 0%, rgba(58, 8, 16, .28) 45%, transparent 72%); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: radial-gradient(80% 120% at 50% 0%, rgba(200, 32, 46, .38), transparent 62%), linear-gradient(160deg, var(--burgundy), #3A0810);
}
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 56px; pointer-events: none; background: linear-gradient(to bottom, rgba(255, 244, 241, .12), transparent); }
.footer__names { font-family: var(--font-script); font-size: clamp(2.2rem, 2.4vw + 1.4rem, 3rem); }
.footer__quote { font-family: var(--font-serif-soft); font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); }
.footer .close-gate-btn { color: #FBE9EC; border-color: rgba(247, 214, 210, .4); background: rgba(255, 255, 255, .07); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.footer .close-gate-btn:hover, .footer .close-gate-btn:focus-visible { background: rgba(255, 255, 255, .14); box-shadow: 0 10px 28px rgba(200, 32, 46, .35); }

/* ---------- Lightbox ---------- */
.lb-frame img { border-radius: 10px; outline: 1px solid rgba(255, 255, 255, .14); outline-offset: 0; }
.lightbox.is-open .lb-figure { animation: lbIn .6s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Mobile: ruang napas & cegah overflow ---------- */
@media (max-width: 599px) {
  .story__desc, .story__more p { font-size: 1.1rem; }
  .paper { width: calc(100% - 8px); }
  .paper__body { line-height: 1.95; }
  .footer__names { font-size: 2.3rem; }
}
@media (prefers-reduced-motion: reduce) { .player__art { animation: none; } }

/* ---------- Layar sangat sempit (HP kecil / bingkai preview ±240px) ---------- */
.footer__inner { grid-template-columns: minmax(0, 1fr); }
.footer__names, .hero__names { flex-wrap: wrap; justify-content: center; max-width: 100%; }
.footer__quote, .footer__copy, .hero__names span { overflow-wrap: anywhere; max-width: 100%; }
@media (min-width: 900px) { .footer__inner { grid-template-columns: 1fr 1.4fr 1fr; } }
@media (max-width: 300px) {
  .footer__names { font-size: 1.9rem; gap: .3em; }
}
