:root {
  --bg: #f4f1ed;
  --bg-soft: #f8f6f2;
  --gold: #b9852e;
  --gold-dark: #8f621c;
  --text: #3d3229;
  --text-soft: #6d5a4b;
  --line: rgba(185, 133, 46, 0.22);
  --shadow: 0 20px 60px rgba(30, 24, 18, 0.18);
  --left-width: 60%;
  --right-width: 40%;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* GAMBAR */
img {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

button {
  border: none;
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  z-index: -2;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.55), transparent 28%),
    radial-gradient(circle at 80% 25%, rgba(255, 255, 255, 0.65), transparent 24%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.7), transparent 22%);
}

.script {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  line-height: 1.05;
  color: var(--gold-dark);
}

.section-title {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* COVER */
.cover {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: linear-gradient(180deg, rgba(248, 246, 242, 0.97), rgba(241, 237, 231, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 0.8s ease;
}

.cover.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
}

.cover-card {
  width: min(1120px, 100%);
  min-height: auto;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(185, 133, 46, 0.2);
  border-radius: 38px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.cover-visual,
.cover-content {
  padding: 48px;
}

.cover-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch-frame {
  width: min(92%, 430px);
  aspect-ratio: 0.78 / 1;
  border-radius: 220px 220px 0 0;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.72);
  outline: 1px solid rgba(143, 98, 28, 0.45);
  box-shadow: var(--shadow);
}

.arch-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.cover-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

.cover-content h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.9rem, 6vw, 5rem);
  letter-spacing: 0.06em;
  color: var(--gold);
  font-weight: 600;
}

.cover-date {
  color: var(--gold-dark);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.cover-names {
  font-size: clamp(3.2rem, 5vw, 5.2rem);
  margin: 14px 0 8px;
}

.cover-guest {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.4rem, 2.1vw, 2rem);
  color: var(--gold-dark);
  line-height: 1.35;
}

.cover-guest strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.5rem, 2.3vw, 2.15rem);
  font-weight: 600;
}

.open-btn {
  margin-top: 14px;
  background: linear-gradient(135deg, #f0b44c, #d89c33);
  color: #fffdf8;
  padding: 16px 36px;
  border-radius: 999px;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 30px rgba(185, 133, 46, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.open-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(185, 133, 46, 0.34);
}

/* MAIN */
.main {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.main.ready {
  opacity: 1;
  transform: translateY(0);
}

.split-layout {
  display: flex;
  min-height: 100vh;
}

/* LEFT PANEL */
.left-panel {
  width: var(--left-width);
  position: sticky;
  top: 0;
  height: 100vh;
  background: #111;
  overflow: hidden;
  flex-shrink: 0;
}

.left-photo {
  position: relative;
  height: 100%;
}

.left-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9);
  will-change: transform;
}

.left-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 28px 30px;
  color: #fff;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.18) 38%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

.left-date {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.left-names {
  font-size: clamp(2.4rem, 4vw, 4rem);
  margin-bottom: 10px;
  color: #fff;
}

.left-quote {
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 92%;
  font-weight: 500;
}

/* RIGHT PANEL */
.right-panel {
  width: var(--right-width);
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(250, 248, 244, 0.92), rgba(244, 241, 237, 0.98));
  border-left: 1px solid var(--line);
  position: relative;
  flex-shrink: 0;
}

/* HERO RIGHT */
.hero-right {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.slides {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  overflow: hidden;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02) translateZ(0);
  transition: transform 6s ease;
  filter: brightness(0.78);
  will-change: transform;
}

.slide.active img {
  transform: scale(1.12) translateZ(0);
}

.hero-right::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.28));
  z-index: 1;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 44px;
  color: #fff;
}

.hero-overlay p {
  font-size: 1rem;
  line-height: 1.7;
  max-width: 520px;
}

/* RIGHT CONTENT */
.right-content {
  position: relative;
  z-index: 2;
}

.story-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 44px;
  border-bottom: 1px solid var(--line);
}

.story-card {
  width: min(600px, 100%);
  text-align: center;
}

.opening-symbol {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.8rem;
  color: var(--gold);
  margin-bottom: 14px;
  letter-spacing: 0.12em;
}

.opening-title {
  font-size: clamp(2.6rem, 4.2vw, 4.2rem);
  margin-bottom: 20px;
}

.opening-text,
.story-card p,
.invitation-paragraph {
  line-height: 1.85;
  color: var(--text-soft);
  font-size: 1rem;
}

.couple-section .story-card {
  display: grid;
  gap: 26px;
  justify-items: center;
}

.couple-name {
  font-size: clamp(3rem, 5vw, 4.4rem);
  margin-bottom: 4px;
}

.couple-fullname {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3.2vw, 2.5rem);
  color: #a64d18;
  line-height: 1.18;
  font-weight: 500;
}

.couple-desc {
  color: #9a6b41;
  line-height: 1.8;
  font-size: 1rem;
}

/* FOTO MEMPELAI */
.mini-frame {
  width: 250px;
  height: 380px;
  margin: 24px auto 0;
  padding: 8px;
  background: #fdfaf7;
  border: 2px solid #d8b08a;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.mini-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  will-change: transform;
}

.ampersand {
  display: block;
  text-align: center;
  font-family: "Great Vibes", cursive;
  font-size: 4rem;
  color: #9a4961;
  margin: 20px 0;
}

/* EVENT */
.event-card {
  width: min(640px, 100%);
  min-height: 74vh;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  background: #000;
}

.event-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.58);
  will-change: transform;
}

.event-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.48));
}

.event-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  color: #fff;
  text-align: center;
}

.glass-box {
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  padding: 28px;
}

.event-type {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  font-weight: 700;
}

.event-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
}

.date-box,
.detail-box {
  background: rgba(255, 255, 255, 0.82);
  color: var(--gold-dark);
  border-radius: 18px;
  padding: 18px;
}

.date-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  line-height: 1.04;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-box strong {
  font-size: 3rem;
  line-height: 0.9;
  font-weight: 600;
}

.detail-box {
  text-align: left;
  display: grid;
  gap: 12px;
  font-size: 1rem;
  line-height: 1.7;
}

.detail-box strong {
  color: var(--text);
  font-size: 1.2rem;
}

.location-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 6px auto 18px;
  padding: 12px 24px;
  border-radius: 999px;
  background: #fff7e9;
  color: var(--gold-dark);
  text-decoration: none;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.event-note {
  font-size: 1.02rem;
  line-height: 1.75;
  margin-bottom: 18px;
}

.event-closing {
  font-size: clamp(2rem, 2vw, 2rem);
  color: rgba(255, 255, 255, 0.96);
}

/* COUNTDOWN */
.countdown-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 24px;
  background: #df8f79;
  position: relative;
  overflow: hidden;
}

.countdown-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/floral-bg.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  pointer-events: none;
}

.countdown-container {
  width: min(700px, 100%);
  text-align: center;
  position: relative;
  z-index: 1;
}

.countdown-slider-wrap {
  width: 320px;
  margin: 0 auto 40px;
  overflow: hidden;
  position: relative;
}

.countdown-slider {
  display: flex;
  gap: 16px;
  width: max-content;
  will-change: transform;
}

.countdown-thumb {
  width: 140px;
  height: 160px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.12);
}

.countdown-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.countdown-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 30px;
}

.countdown-date h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
}

.line {
  width: 80px;
  height: 2px;
  background: #5a1f1b;
}

.countdown-text {
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-weight: 600;
  color: #5a1f1b;
}

.countdown-boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 420px;
  margin: auto;
}

.countdown-box {
  background: #fff8ef;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.countdown-box strong {
  font-size: 20px;
  color: #d2a13a;
  display: block;
}

.countdown-box span {
  font-size: 11px;
  letter-spacing: 1px;
  display: block;
  margin-top: 4px;
  color: #8c6b2f;
}

/* GALLERY */
.gallery-section {
  min-height: 100vh;
  padding: 90px 24px;
  background: linear-gradient(180deg, #f4f1ed, #efeae3);
}

.gallery-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  text-align: center;
}

.gallery-wrap h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin: 0 0 8px;
  color: #3d3229;
}

.gallery-script {
  font-size: clamp(3rem, 5vw, 5rem);
  margin: 0 0 28px;
  display: inline-block;
  color: #b9852e;
  font-family: "Great Vibes", cursive;
  line-height: 1.1;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 26px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(61, 50, 41, 0.14);
  box-shadow: 0 14px 30px rgba(38, 30, 21, 0.1);
  background: #fff;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(38, 30, 21, 0.16);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  will-change: transform;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.86);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.show {
  display: flex;
}

.lightbox-content {
  max-width: min(900px, 100%);
  max-height: calc(100vh - 60px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.lightbox-content img {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 60px);
  object-fit: contain;
  background: #111;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 1.35rem;
  z-index: 2;
}

/* AUDIO */
.audio-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dca23d, #b9852e);
  color: #fff;
  box-shadow: 0 16px 30px rgba(185, 133, 46, 0.34);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* RETINA */
@media (min-resolution: 2dppx) {
  img {
    image-rendering: auto;
  }
}

/* RESPONSIVE */
@media (max-width: 1080px) {
  :root {
    --left-width: 55%;
    --right-width: 45%;
  }

  .cover-card {
    grid-template-columns: 1fr;
  }

  .event-grid {
    grid-template-columns: 1fr;
  }

  .detail-box {
    text-align: center;
  }
}

@media (max-width: 991px) {
  .split-layout {
    flex-direction: column;
  }

  .left-panel,
  .right-panel {
    width: 100%;
  }

  .left-panel {
    position: relative;
    height: 86vh;
  }

  .hero-right,
  .story-section {
    min-height: auto;
  }

  .hero-overlay,
  .story-section {
    padding: 32px 22px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .countdown-boxes {
    grid-template-columns: repeat(2, 1fr);
    max-width: 260px;
  }
}

/* KHUSUS FIX COVER MOBILE */
@media (max-width: 640px) {
  .cover {
    align-items: flex-start;
    padding: 20px 14px;
  }

  .cover-card {
    grid-template-columns: 1fr;
    max-height: none;
    min-height: auto;
    border-radius: 24px;
  }

  .cover-visual,
  .cover-content {
    padding: 24px;
  }

  .arch-frame {
    width: 80%;
    margin: 0 auto;
  }

  .open-btn {
    margin-top: 10px;
    padding: 14px 26px;
  }

  .left-overlay,
  .hero-overlay {
    padding: 20px;
  }

  .story-section {
    padding: 34px 18px;
  }

  .glass-box {
    padding: 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .countdown-slider-wrap {
    width: 260px;
  }

  .countdown-thumb {
    width: 115px;
    height: 140px;
  }

  .countdown-date {
    flex-direction: column;
    gap: 12px;
  }

  .line {
    width: 70px;
  }

  .countdown-text {
    font-size: 0.96rem;
  }
}

/* TAMBAHAN UNTUK LAYAR PENDEK */
@media (max-height: 700px) {
  .cover {
    align-items: flex-start;
  }
}