/* ==========================================================================
   1. FONTS & ROOT VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Poppins:wght@300;400;500;600&display=swap');
@font-face {
    font-family: 'Klaristha';
    src: url('fonts/Ekahermawan\ -\ Klaristha\ Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
:root {
    --primary-color: #420d5a;
    --secondary-color: #420d5a;
    --bg-color: #fdfbf7;
    --text-dark: #333333;
    --font-cursive: 'Great Vibes', cursive;
    --font-serif: 'Klaristha', serif;
    --font-sans: 'Klaristha', sans-serif;
}

/* ==========================================================================
   2. GLOBAL RESETS & WRAPPERS
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: #420d5a;
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Locked state prevents scrolling until doors are tapped */
body.doors-locked {
    overflow: hidden;
    height: 100vh;
}
body.doors-locked .app-wrapper {
    overflow: hidden;
    height: 100vh;
}
.app-wrapper {
    width: 100vw;
    max-width: 420px;
    background-color: var(--bg-color);
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    overflow-x: hidden;
}

.scroll-transition-container {
    width: 100%;
    position: relative;
}

.sticky-view {
    width: 100%;
    position: relative;
}

/* ==========================================================================
   3. TYPOGRAPHY & TEXT STYLES
   ========================================================================== */
.font-cursive { font-family: var(--font-cursive); }
.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--primary-color);
    text-align: center;
}

.text-maroon { 
    color: var(--primary-color) !important; 
}

.sub-heading {
    font-family: var(--font-sans);
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 10px;
}

.couplenames {
    font-family: var(--font-cursive);
    font-size: 2.4rem !important;
    font-weight: 600;
    margin: 15px 0;
}

.couplenames span {
    font-family: var(--font-sans);
    font-size: 1.2rem !important;
    font-weight: 300;
    /* margin: 0 10px; */
    font-style: italic;
}

.section-title, .save-date-title {
    font-family: var(--font-cursive);
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.2;
}

.poetic-text {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1;
    color: #4a2c2a;
    padding: 0 15px;
}

.date-text {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 2.2rem;
    margin-top: 10px;
}

.names {
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* ==========================================================================
   4. CORE SECTIONS LAYOUT
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    text-align: center;
    overflow: hidden;
    padding: 60px 20px;
    background-color: #f4dad4;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;
}

/* Section Background Assets Mapping */
.hero-section.hero1 { background-image: url('images/section1/back.png'); }
.hero-section.hero2 { background-image: url('images/section2/back.png'); }
.hero-section.hero3 { background-image: url('images/section3/back.png'); }
.hero-section.hero5 { background-image: url('images/section5/back.png'); }
.hero-section.hero6 { background-image: url('images/section6/back.png'); }

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px 10px;
    width: 100%;
    max-width: 85%;
}

.topimg {
    width: 100%;
    /* max-width: 100%; */
    /* height: 84px; */
    margin-bottom: 15px;
    z-index: 2;
    position: absolute;
    top: 0;
}
.leftmiddleimg{
      /* width: 100%; */
      /* max-width: 100%; */
      height: 200px;
      margin-bottom: 15px;
      z-index: 2;
      position: absolute;
      left:0;
      top: 30%;
      z-index: 4;
}
.bottomimg {
    width: 100%;
    /* max-width: 100%; */
    /* height: 84px; */
    margin-bottom: -23px;
    z-index: 2;
    position: absolute;
    bottom: 0;
    z-index: 4;
}
/* Elegant Date Badge Ribbon */
.hero-content .datetime {
    display: flex;
    align-items: center;
    color: #800000;
    text-transform: uppercase;
    justify-content: center;
    margin-top: 20px;
}

.hero-content .datetime .day {
    width: 110px;
    border-top: 1px solid var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 5px 0;
    margin: 0;
}

.hero-content .datetime .grid.date {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 15px;
}

.hero-content .datetime .day-num {
    font-family: var(--font-serif);
    font-size: 2.8rem !important;
    line-height: 1;
    font-weight: 700 !important;
    margin: 0;
}

/* ==========================================================================
   5. INTERACTIVE 3D DOOR OVERLAY (SWING OPEN EFFECT)
   ========================================================================== */
#door-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
}

/* Perspective Context Box */
.door-perspective-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    perspective: 1400px; 
    perspective-origin: center;
}

.door {
    width: 50%;
    height: 100%;
    background-color: var(--primary-color);
    background-size: cover;
    background-repeat: no-repeat;
    transition: transform 3s cubic-bezier(0.25, 1, 0.5, 1), opacity 1.4s ease;
    z-index: 5;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.7);
}

.door-left {
    background-position: right;
    transform-origin: left center; /* Hinged securely on the left side */
    background-image: url('images/entry/door-left.png');
    /* border-right: 1px solid rgba(237, 201, 104, 0.3); */
}

.door-right {
    transform-origin: right center; /* Hinged securely on the right side */
    background-image: url('images/entry/door-right.png');
    /* border-left: 1px solid rgba(237, 201, 104, 0.3); */
}

/* Center Interactive Click Badge */
.door-badge {
    position: relative;
    z-index: 10000;
    transition: transform 0.8s ease, opacity 0.6s ease;
    pointer-events: none;
}

/* Triggered Open Dynamic States */
#door-overlay.open .door-left {
    transform: rotateY(-115deg); /* Flips outward towards the front-left */
    opacity: 0;
}

#door-overlay.open .door-right {
    transform: rotateY(115deg); /* Flips outward towards the front-right */
    opacity: 0;
}

#door-overlay.open .door-badge {
    transform: scale(0) rotate(360deg);
    opacity: 0;
}

/* Base Landing Section Visibility Control */
#entry-text {
    display: flex;
    visibility: hidden;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    width: 100%;
}

#entry-text.open { 
    visibility: visible; 
    opacity: 1;
}

/* ==========================================================================
   6. ANIMATIONS & FLOATING DECORATIONS
   ========================================================================== */
@keyframes floating {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes floating-delay {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.floating-img { 
    animation: floating 5s ease-in-out infinite; 
}

.floating-img-delay { 
    animation: floating-delay 6s ease-in-out infinite; 
    animation-delay: 1s; 
}

/* Rotating Decorative Background Mandala */
.rotating-bg {
    position: absolute;
    top: 45%;
    left: 50%;
    width: 350px;
    height: 350px;
    transform: translate(-50%, -50%);
    background: url('images/section1/bg.svg') no-repeat center center;
    background-size: contain;
    opacity: 0.35;
    z-index: 0;
    animation: rotateBg 50s linear infinite;
}

@keyframes rotateBg {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Side Framing Pillars */
.side-images {
    position: absolute;
    top: 5%;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    z-index: 1;
    width: 90px;
}

.side-images.side-left { left: 2%; }
.side-images.side-right { right: 2%; }

/* Bottom Illustration Base Containers */
.bottom-scroll-container {
    position: absolute;
    bottom: -12ch;
    width: 100%;
    z-index: 3;
    /* display: flex; */
    /* justify-content: flex-start; */
}

#scroll-scale-img {
    max-width: 100%;
    height: auto;
    max-height: 338px;
    r: 0;
    position: relative;
}

/* Bouncing Arrow Indicators */
.arrows {
    width: 60px;
    height: 60px;
    position: absolute;
    bottom: 34px;
    left: 42%;
    transform: translateX(-50%);
    z-index: 4;
}

.arrows path {
    stroke: var(--primary-color);
    fill: transparent;
    stroke-width: 2px;
    animation: arrowBlink 2s infinite;
}

.arrows path.a1 { animation-delay: -1s; }
.arrows path.a2 { animation-delay: -0.5s; }
.arrows path.a3 { animation-delay: 0s; }

@keyframes arrowBlink {
    0% { opacity: 0; transform: translateY(-10px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(10px); }
}

/* ==========================================================================
   7. MAP, VENUE & FOOTER DETAILS
   ========================================================================== */
.address-section { background-image: url('images/entry/map.png'); background-size: cover; }
.thankyou-section { background-image: url('images/entry/thankyou.png'); background-size: cover; }

.address-text {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.2;
    color: var(--text-dark);
    margin: 15px 0;
    font-weight: 400;
}

.address-text i {
    color: var(--primary-color);
    margin-right: 5px;
}

.map-container {
    width: 100%;
    padding: 0 10px;
    margin-top: 15px;
}

.map-container iframe {
    width: 100%;
    height: 150px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-directions {
    display: inline-block;
    margin-top: 18px;
    background-color: var(--primary-color);
    color: white !important;
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(128, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.btn-directions:active {
    transform: scale(0.96);
}

.thank-text {
    font-size: 1.25rem;
    line-height: 1;
    color: #4a2c2a;
}

.contact-info {
    font-size: 1rem;
    line-height: 1;
}

/* ==========================================================================
   8. FIXED FLOATING AUDIO CONTROLS
   ========================================================================== */
#audio-controls {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9990;
    background: var(--secondary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none; /* Controlled dynamically via JavaScript */
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: transform 0.2s ease;
}

#audio-controls:active {
    transform: scale(0.9);
}

#audio-controls i {
    font-size: 1.2rem;
}
.bottom-scroll-container img{
    max-width: 100%;
    height: auto;
    max-height: 291px;
}
.scratch-container {
    z-index: 9;
    position: relative;
    width: 230px;
    height: 44px;
    margin: 7px auto;
    border-radius: 20px;
    overflow: hidden;
    background: #f1eee9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-text {
    font-size: 2.3rem;
    color: #420d5a;
    font-family: 'Cormorant Garamond', serif;
    z-index: 1;
}

#scratchCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    z-index: 2;
}
.hero6 .bottom-scroll-container{
        bottom: -1vh;
}
.hero6 .bottom-scroll-container img{
    max-height: 229px;
}
.hero5 .bottom-scroll-container img{
    max-height: 325px;
}