/* Base Variables & Typography */
@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Cinzel:wght@400;600&family=Montserrat:wght@300;400;600&display=swap');

:root {
  --mf-bg: #fdfbf7;
  --mf-card-bg: #f4f5f5;
  --mf-even-bg: #ffffff;
  --mf-text: #2b3238;
  --mf-muted: #6b7280;
  --mf-accent: #9e6c26;
  --mf-border: rgba(0, 0, 0, 0.05);
  --mf-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  
  --font-title: 'Cinzel', serif;
  --font-body: 'Montserrat', sans-serif;
  
  --max-width: 500px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background-color: #000;
  font-family: var(--font-body);
  color: var(--mf-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

html:not(.aos-ready) [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.invitation-root {
  max-width: var(--max-width);
  margin: 0 auto;
  background-color: var(--mf-bg);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
  overflow: hidden;
}

/* Floral Placeholders */
.floral-top-right {
  position: absolute;
  bottom: 40%;
  right: -10px;
  width: 90px;
  height: 35vh;
  background-image: url('img/floral_right.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center right;
  opacity: 0.85;
  z-index: 10;
  pointer-events: none;
}
.floral-bottom-left {
  position: absolute;
  bottom: 0;
  left: -10px;
  width: 90px;
  height: 35vh;
  background-image: url('img/floral_left.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom left;
  opacity: 0.85;
  z-index: 10;
  pointer-events: none;
}
.floral-top-left {
  position: absolute;
  top: 5%;
  left: -10px;
  width: 90px;
  height: 35vh;
  background-image: url('img/floral_left.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: top left;
  opacity: 0.85;
  z-index: 10;
  pointer-events: none;
}
.floral-bottom-right {
  position: absolute;
  bottom: 0;
  right: -10px;
  width: 90px;
  height: 35vh;
  background-image: url('img/floral_right.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom right;
  opacity: 0.85;
  z-index: 10;
  pointer-events: none;
}

/* Typography Utilities */
.text-center { text-align: center; }
.font-title { font-family: var(--font-title); }
.font-body { font-family: var(--font-body); }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-title); font-weight: 400; }
p { margin: 0; }

/* Arch Frame */
.arch-frame {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  margin: 0 auto;
  border-radius: 180px 180px 0 0;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}
.arch-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 180px 180px 0 0;
}

/* Cover Section */
.cover-section {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background-color: var(--mf-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px 15px;
  transition: transform 0.8s cubic-bezier(0.7,0,0.3,1), opacity 0.8s ease;
}
.cover-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}
.cover-card {
  background: var(--mf-card-bg);
  border-radius: 180px 180px 15px 15px;
  width: 100%;
  max-width: 400px;
  max-height: 95vh;
  padding: 8px; /* For the double border effect */
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}
.cover-card-inner {
  border: 1.5px solid var(--mf-border);
  border-radius: 172px 172px 8px 8px;
  padding: 10px 10px 30px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
}
.cover-card-inner::-webkit-scrollbar { display: none; }
.cover-section.cover-open {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.cover-anim {
  animation: fadeUp 1s ease both;
}
.cover-intro.cover-anim { animation-delay: 0.2s; }
.cover-title.cover-anim { animation-delay: 0.4s; }
.cover-guest.cover-anim { animation-delay: 0.6s; }
.btn-dark.cover-anim { animation-delay: 0.8s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.cover-intro {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--mf-muted);
  margin-top: 30px;
  margin-bottom: 15px;
}
.cover-title {
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 25px;
}
.cover-guest {
  margin-top: 20px;
  margin-bottom: 25px;
  font-size: 0.85rem;
  color: var(--mf-muted);
}
.cover-guest span {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--mf-text);
  margin-top: 5px;
}

.btn-dark {
  background: var(--mf-accent);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 1px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s ease;
  text-decoration: none;
}
.btn-dark:hover { background: #000; }

/* Main Content area */
.invitation-content {
  padding-bottom: 80px; /* Space for bottom nav */
}

/* Home Section */
.home-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 0 20px 40px 20px;
  position: relative;
  background-color: var(--mf-card-bg);
}

.home-hero-img {
  width: 100vw;
  max-width: var(--max-width);
  height: 60vh;
  position: relative;
  margin-left: -20px;
  margin-right: -20px;
  margin-bottom: -20vh; /* Pulls the text up to overlap the faded area */
  -webkit-mask-image: linear-gradient(to bottom, black 15%, transparent 85%);
  mask-image: linear-gradient(to bottom, black 15%, transparent 85%);
}
.home-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.hero-fade {
  display: none;
}

.home-date {
  font-size: 1rem;
  letter-spacing: 1px;
  margin-bottom: 30px;
}

.save-the-date {
  font-size: 0.9rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 15px;
  color: var(--mf-muted);
}

.countdown {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 30px;
}
.cd-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cd-num {
  font-size: 1.5rem;
  font-weight: 400;
  font-family: var(--font-title);
  border-bottom: 1px solid var(--mf-muted);
  padding-bottom: 4px;
  margin-bottom: 4px;
  width: 40px;
}
.cd-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--mf-muted);
}

/* Content Sections */
.section-block {
  padding: 60px 20px;
  position: relative;
  background: linear-gradient(to bottom, var(--mf-even-bg, #ffffff) 0%, var(--mf-card-bg) 100px, var(--mf-card-bg) 100%);
}
.section-block:nth-of-type(even) {
  background: linear-gradient(to bottom, var(--mf-card-bg) 0%, var(--mf-even-bg, #ffffff) 100px, var(--mf-even-bg, #ffffff) 100%);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-header p {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--mf-muted);
  margin-bottom: 10px;
}
.section-header h2 {
  font-size: 1.8rem;
}

/* Mempelai */
.mempelai-card {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}
.mempelai-arch-wrap {
  width: 220px;
  margin: 0 auto 10px auto;
  border: 1px solid var(--mf-text);
  border-radius: 120px 120px 0 0;
  padding: 8px 8px 0 8px;
  position: relative;
}
.mempelai-arch-wrap img {
  width: 100%;
  aspect-ratio: 4/5;
  margin: 0;
  border-radius: 110px 110px 0 0;
  border-bottom: 1px solid var(--mf-text);
}
.mempelai-signature {
  font-family: 'Alex Brush', cursive;
  font-size: 3rem;
  color: rgba(0,0,0,0.06);
  line-height: 0.5;
  margin-top: -30px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.mempelai-name {
  font-size: 1.6rem;
  margin-bottom: 15px;
  position: relative;
  z-index: 3;
}
.mempelai-parents {
  font-size: 0.85rem;
  color: var(--mf-muted);
  line-height: 1.6;
}
.mempelai-and {
  font-family: var(--font-title);
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 2px;
  margin: 30px 0;
  color: var(--mf-muted);
}
.mempelai-and::before, .mempelai-and::after {
  content: "";
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--mf-muted);
  vertical-align: middle;
  margin: 0 15px;
}

/* Events */
.event-card {
  background: var(--mf-card-bg);
  border: 1px solid var(--mf-border);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  position: relative;
}
.event-card::before {
  content: "";
  position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  pointer-events: none;
}
.event-title {
  font-size: 1.8rem;
  margin-bottom: 15px;
}
.event-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}
.event-divider span {
  flex: 1;
  height: 1px;
  background: #e5e5e5;
  max-width: 60px;
}
.event-divider svg {
  color: var(--mf-accent);
  width: 20px; height: 20px;
}
.event-date {
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 15px;
}
.event-time {
  font-size: 0.85rem;
  color: var(--mf-muted);
  margin-bottom: 20px;
}
.event-venue {
  font-weight: 600;
  margin-bottom: 5px;
}
.event-address {
  font-size: 0.85rem;
  color: var(--mf-muted);
  line-height: 1.5;
  margin-bottom: 25px;
}
.btn-outline {
  background: transparent;
  color: var(--mf-accent);
  border: 1px solid var(--mf-accent);
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  text-decoration: none;
}
.btn-outline:hover {
  background: var(--mf-accent);
  color: #fff;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.gallery-item:hover img {
  transform: scale(1.05);
}

/* Forms */
.form-group {
  margin-bottom: 15px;
  text-align: left;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 5px;
  color: var(--mf-muted);
}
.kisah-item {
  background: #ffffff;
  border: 1px solid var(--mf-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--mf-shadow);
}
.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: var(--font-body);
  background: #fff;
  color: #222;
  transition: border-color 0.3s;
}
.form-control:focus {
  outline: none;
  border-color: var(--mf-accent);
}
.radio-group {
  display: flex; gap: 15px; flex-wrap: wrap;
}
.radio-label {
  display: flex; align-items: center; gap: 8px; font-size: 0.85rem; cursor: pointer;
}

.ucapan-list {
  margin-top: 30px;
  text-align: left;
  display: flex; flex-direction: column; gap: 15px;
}
.ucapan-item {
  background: #fff;
  color: #222;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.ucapan-head {
  display: flex; justify-content: space-between; margin-bottom: 8px;
}
.ucapan-name { font-weight: 600; font-size: 0.9rem; }
.ucapan-time { font-size: 0.75rem; color: var(--mf-muted); }
.ucapan-msg { font-size: 0.85rem; line-height: 1.5; color: var(--mf-muted); margin: 0; }

/* Bottom Navbar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  background: #111;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  z-index: 9000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #888;
  text-decoration: none;
  font-size: 0.7rem;
  gap: 4px;
  transition: color 0.3s;
}
.nav-item.active, .nav-item:hover {
  color: #fff;
}
.nav-item svg {
  width: 20px; height: 20px;
}

/* Audio Player */
.music-toggle {
  position: fixed;
  bottom: 80px; /* Above navbar */
  right: 20px;
  width: 40px; height: 40px;
  background: var(--mf-accent);
  color: #fff;
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  cursor: pointer; border: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 9000;
}
.music-toggle.playing {
  animation: rotate 4s linear infinite;
}
@keyframes rotate { 100% { transform: rotate(360deg); } }

/* Utils */
.mb-0 { margin-bottom: 0 !important; }
.mt-4 { margin-top: 2rem !important; }
.w-100 { width: 100%; }
