/*
    Traditional Sunda - Parahyangan Edition
    A soft and elegant design system inspired by Sundanese culture.
*/

:root {
    --primary: #4a6741; /* Jasmine Leaf Green */
    --secondary: #f4f7f0; /* Soft Moss */
    --accent: #d4af37; /* Brass Gold */
    --text: #2c3e50;
    --muted: #7f8c8d;
    --white: #ffffff;
    --font-script: 'Meie Script', cursive;
    --font-serif: 'Spectral', serif;
    --font-sans: 'Montserrat', sans-serif;
    --transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-serif); background-color: var(--secondary); color: var(--text); line-height: 1.8; overflow-x: hidden; }
body.no-scroll { overflow: hidden; height: 100vh; }

/* --- Pattern Background --- */
.batik-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M50 0 L100 50 L50 100 L0 50 Z" fill="none" stroke="%234a6741" stroke-width="0.05" opacity="0.2"/></svg>');
    opacity: 0.1;
}

/* --- Melati Decorations --- */
.melati {
    position: fixed; width: 150px; height: 150px; z-index: 500; pointer-events: none; opacity: 0.2;
}
.melati-tl { top: -20px; left: -20px; }
.melati-br { bottom: -20px; right: -20px; transform: rotate(180deg); }

/* --- Intro Screen --- */
.intro-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100dvh;
    background-color: var(--primary); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    transition: transform 1.2s cubic-bezier(0.7, 0, 0.3, 1);
}
.intro-screen.opened { transform: translateY(-100%); }
.intro-content { text-align: center; color: white; padding: 2rem; }
.intro-seal {
    width: 100px; height: 100px; border: 2px solid var(--accent); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 3rem;
}
.intro-names { font-family: var(--font-script); font-size: clamp(3rem, 10vw, 5rem); margin-bottom: 4rem; }
.btn-open {
    background: transparent; border: 1px solid var(--accent); color: var(--accent);
    padding: 1rem 3rem; font-family: var(--font-sans); text-transform: uppercase;
    letter-spacing: 0.3rem; font-size: 0.8rem; cursor: pointer; transition: var(--transition);
}
.btn-open:hover { background: var(--accent); color: var(--primary); }

/* --- Sections --- */
section { padding: 6rem 1.5rem; position: relative; }
@media (min-width: 992px) { section { padding: 10rem 2rem; } }
.container { max-width: 1100px; margin: 0 auto; text-align: center; }
.title { font-family: var(--font-script); font-size: clamp(2.5rem, 8vw, 4.5rem); color: var(--primary); margin-bottom: 1rem; }

/* --- Hero --- */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; background-color: var(--white); }
.hero-box {
    border: 2px solid var(--primary); padding: 3rem 1.5rem; width: 90%; max-width: 600px;
    background: rgba(255,255,255,0.9); box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
@media (min-width: 768px) { .hero-box { padding: 6rem 4rem; } }
.hero-names { font-family: var(--font-script); font-size: clamp(3.5rem, 10vw, 5.5rem); color: var(--primary); }

/* --- Countdown --- */
.countdown { display: flex; justify-content: center; gap: 1rem; margin-bottom: 4rem; }
@media (min-width: 768px) { .countdown { gap: 3rem; margin-bottom: 6rem; } }
.timer-item span { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1; }
@media (min-width: 768px) { .timer-item span { font-size: 4rem; } }

/* --- Navigation --- */
nav {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
    z-index: 1000; transition: var(--transition); opacity: 0;
}
nav.visible { transform: translateX(-50%) translateY(0); opacity: 1; }
.nav-inner {
    background: rgba(74, 103, 65, 0.9); backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem; border-radius: 100px; display: flex; gap: 1.5rem; border: 1px solid var(--accent);
}
nav a { color: rgba(255, 255, 255, 0.5); font-size: 1.1rem; width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
nav a.active { color: var(--accent); transform: scale(1.2); }

/* --- Gallery --- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.gallery-item { aspect-ratio: 1; overflow: hidden; border-radius: 20px; border: 5px solid white; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* --- RSVP --- */
.rsvp-layout { display: grid; grid-template-columns: 1fr; gap: 3rem; text-align: left; }
@media (min-width: 992px) { .rsvp-layout { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.sunda-form { background: white; padding: 2rem; border-radius: 30px; border: 1px solid var(--primary); }
@media (min-width: 768px) { .sunda-form { padding: 4rem; } }
.sunda-form input, .sunda-form textarea {
    width: 100%; padding: 1rem 0; background: transparent; border: none; border-bottom: 1px solid var(--primary);
    font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: 2.5rem;
}
.btn-submit {
    width: 100%; padding: 1.5rem; background: var(--primary); color: white; border: none;
    border-radius: 50px; text-transform: uppercase; letter-spacing: 0.3rem; cursor: pointer;
}

/* ── Responsive Fix ── */
@media (max-width: 600px) {
  /* Countdown */
  .countdown {
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
  }
  .timer-item {
    flex: 1 1 calc(50% - 0.8rem);
    min-width: 60px;
  }
  .timer-item span {
    font-size: clamp(1.8rem, 8vw, 2rem) !important;
  }

  /* Event grid - inline styles in HTML */
  #event .container > div[style*="grid"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* RSVP layout */
  .rsvp-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .sunda-form {
    padding: 2rem;
    border-radius: 20px;
  }

  /* Footer */
  footer {
    padding: 5rem 1.5rem !important;
  }
  footer h2 {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  footer p[style*="italic"] {
    font-size: clamp(0.9rem, 3.5vw, 1rem) !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Couple flex */
  #couple > .container > div[style*="flex"] {
    gap: 2rem !important;
  }
  #couple > .container > div[style*="flex"] > div[style*="min-width"] {
    min-width: unset !important;
    width: 100% !important;
  }

  /* Section padding */
  section {
    padding: 4rem 1.5rem;
  }
}
