/* ==========================================================================
   WEDDING PORTAL — Phase 6 Production Polish
   ========================================================================== */

/* --- Preloader --- */
.portal-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preloader-content {
    text-align: center;
}

.preloader-brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    letter-spacing: 6px;
    color: #8a8278;
    margin: 0 0 4px;
    text-transform: uppercase;
    font-weight: 400;
}

.preloader-sub {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.6rem;
    letter-spacing: 4px;
    color: #a09890;
    margin: 0 0 28px;
    text-transform: uppercase;
    font-weight: 300;
}

.preloader-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto;
    border: 2px solid rgba(180, 160, 120, 0.2);
    border-top-color: #b4a078;
    border-radius: 50%;
    animation: preloader-spin 1s linear infinite;
}

@keyframes preloader-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Theme Suppression — hide WP theme chrome --- */
header,
footer,
.site-header,
.site-footer,
.site-branding,
.main-navigation,
#masthead,
#colophon {
    display: none !important;
}

/* --- Reset & Scroll Jacking --- */
html.wedding-portal-active,
body.wedding-portal-active {
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    width: 100vw !important;
    cursor: none;
}

.wp-env * {
    cursor: none;
}

/* --- Global Container --- */
.wp-env {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #e8e4de url('../watercolor-bg.jpg') center center / cover no-repeat;
    overflow: hidden !important;
    z-index: 999999 !important;
    font-family: 'Cormorant Garamond', 'Times New Roman', 'Georgia', serif;
    perspective: 1200px;
}

/* --- Scroll Container --- */
.scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    z-index: 100;
    pointer-events: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroll-container::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.scroll-length {
    height: 10000px;
    width: 1px;
}

/* --- Custom Cursor --- */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 308px;
    height: 205px;
    margin-left: -154px;
    margin-top: -102px;
    pointer-events: none;
    z-index: 1000000;
    transform: rotate(-30deg);
    transform-origin: center center;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    background: none;
    border: none;
    box-shadow: none;
}

.custom-cursor img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(1px 2px 4px rgba(0, 0, 0, 0.15));
}

/* ===================================================================
   SCENE CONTAINER
   =================================================================== */
.scene-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

/* --- Stage Header (Gallery State) --- */
.stage-header {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}

.stage-header-sub {
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: #8a8278;
    margin: 0 0 8px;
    text-transform: uppercase;
    font-weight: 400;
}

.stage-header-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 5px;
    color: #3a3530;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.stage-header-script {
    font-family: 'Great Vibes', cursive;
    font-size: 1.2rem;
    color: #5a5347;
    margin: 0;
    font-weight: 400;
}

/* --- Stage Footer (Gallery State) --- */
.stage-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}

.footer-tagline {
    font-size: 0.85rem;
    color: #5a5347;
    font-style: italic;
    line-height: 1.5;
    margin: 0 0 14px;
    font-family: 'Cormorant Garamond', serif;
}

.inquiry-btn-styled {
    display: inline-block;
    padding: 14px 40px;
    background: rgba(176, 141, 40, 0.12);
    color: #3a3530;
    border: 1px solid #b08d28;
    font-family: 'Cormorant Garamond', serif;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.inquiry-btn-styled:hover {
    background: #b08d28;
    color: #fff;
}

.footer-locations {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: #8a8278;
    margin: 12px 0 0;
    text-transform: uppercase;
}

/* ===================================================================
   3D CARD — Three-Layer Hierarchy (Phase 6 Pattern)
   =================================================================== */

/* Layer 1: Perspective container — GSAP resizes this during morph */
.portal-scene {
    width: clamp(700px, 70vw, 1100px);
    height: clamp(500px, 58vh, 780px);
    /* Responsive card — scales to viewport */
    perspective: 1200px;
    position: relative;
    z-index: 5;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Layer 2: Rotating wrapper — GSAP rotates this on Y-axis */
.card-3d-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    will-change: transform;
    transition: none;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

.torn-edge-bg {
    position: absolute;
    top: -18px;
    left: -18px;
    width: calc(100% + 36px);
    height: calc(100% + 36px);
    object-fit: fill;
    z-index: -1;
    /* Behind card faces, not on top */
    pointer-events: none;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* --- Card Faces (shared) --- */
.card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 2;
    /* Above torn-edge-bg */
    background: transparent;
    /* No inherited color */
}

/* ===================================================================
   FACE 1: INVITATION FRONT
   =================================================================== */
.card-front {
    background: transparent !important;
    background-image: none !important;
    padding: 1.5rem 2.5rem;
    text-align: center;
    transform: rotateY(0deg);
}

.brand-name {
    font-size: 0.8rem;
    letter-spacing: 5px;
    color: #8a8278;
    margin: 0 0 4px;
    text-transform: uppercase;
    font-weight: 400;
}

.brand-sub {
    font-size: 0.55rem;
    letter-spacing: 4px;
    color: #a09890;
    margin: 0 0 14px;
    text-transform: uppercase;
    font-weight: 300;
}

.card-3d-wrapper h2 {
    font-family: 'Cormorant Garamond', serif;
    color: #2a2520;
    font-size: 2.2rem;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: 3px;
    margin: 0;
    text-transform: uppercase;
}

.card-script {
    font-family: 'Great Vibes', cursive;
    font-size: 1.4rem;
    color: #5a5347;
    margin: 4px 0 12px;
    font-weight: 400;
}

.wax-seal-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.card-tagline {
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: #6a6358;
    line-height: 1.6;
    margin: 0 0 10px;
    text-transform: uppercase;
    font-weight: 400;
}

.keyhole-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 4px;
    opacity: 0.85;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.card-cta {
    font-size: 0.6rem;
    letter-spacing: 3px;
    color: #8a8278;
    margin: 0;
    text-transform: uppercase;
    font-weight: 400;
}

/* ===================================================================
   FACE 2: VIDEO PLAYER
   =================================================================== */
.card-back {
    background: #111 !important;
    /* Opaque dark — no torn-edge bleed */
    color: #fff;
    transform: rotateY(180deg);
    border-radius: 6px;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
}

.video-frame-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    z-index: 2;
    pointer-events: none;
}

.play-icon {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    z-index: 1;
    position: relative;
}

.play-icon.small {
    font-size: 2rem;
}

.video-placeholder p {
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #d4cec4;
    text-align: center;
    padding: 0 10px;
    z-index: 1;
    position: relative;
}

/* ===================================================================
   FACE 3: INQUIRY FORM (Matching image_2 / image_10)
   =================================================================== */
.card-form {
    background-color: transparent !important;
    background-image: url('../paper-torn-edge.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    padding: 1.2rem 1.8rem;
    text-align: center;
    transform: translateZ(0.5px);
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
}

.form-seal-img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    margin: 4px 0 6px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

.form-touch {
    font-size: 0.6rem;
    letter-spacing: 3px;
    color: #8a8278;
    margin: 0 0 4px;
    text-transform: uppercase;
    font-weight: 400;
}

.card-form h3 {
    font-family: 'Cormorant Garamond', serif;
    color: #2a2520;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin: 0 0 2px;
    text-transform: uppercase;
}

.form-script {
    font-family: 'Great Vibes', cursive;
    font-size: 0.9rem;
    color: #5a5347;
    margin: 0 0 6px;
}

.form-section-title {
    font-size: 0.55rem;
    letter-spacing: 3px;
    color: #8a8278;
    margin: 0 0 10px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(176, 141, 40, 0.2);
    padding-bottom: 6px;
}

.card-form form {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}



.form-row-3 .form-field {
    flex: 1;
}

.form-row-inline {
    justify-content: flex-start;
}

.form-row-inline .form-field {
    flex: 0 0 55%;
}

.form-field {
    text-align: left;
}

.form-field.full-width {
    flex: 1;
}

.form-field label {
    display: block;
    font-size: 0.55rem;
    letter-spacing: 1px;
    color: #6a6358;
    margin-bottom: 3px;
    text-transform: none;
    font-weight: 400;
}

.card-form input,
.card-form textarea,
.card-form select {
    width: 100%;
    padding: 7px 8px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #d4cec4;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.8rem;
    color: #3a3530;
    outline: none;
    transition: border-color 0.3s ease;
    border-radius: 2px;
}

.card-form input:focus,
.card-form textarea:focus,
.card-form select:focus {
    border-color: #b08d28;
}

.card-form textarea {
    height: 50px;
    resize: none;
}

.card-form select {
    appearance: auto;
    cursor: pointer;
}

.submit-btn {
    display: inline-block;
    padding: 10px 30px;
    margin-top: 8px;
    background: rgba(176, 141, 40, 0.1);
    color: #3a3530;
    border: 1px solid #b08d28;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #b08d28;
    color: #fff;
}

.form-footer-note {
    font-size: 0.5rem;
    color: #8a8278;
    font-style: italic;
    line-height: 1.5;
    margin: 10px 0 4px;
}

.form-contact {
    font-size: 0.5rem;
    color: #6a6358;
    line-height: 1.5;
    margin: 0;
}

/* ===================================================================
   3D PARTICLES
   =================================================================== */
.petals-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform-style: preserve-3d;
    z-index: 10;
}

.particle {
    position: absolute;
    pointer-events: none;
    will-change: transform;
}

.particle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Foreground layer: extra large, blurred */
.particle.fg {
    filter: blur(5px);
    opacity: 0.7;
}

/* Near-foreground: slight blur */
.particle.near-fg {
    filter: blur(2px);
    opacity: 0.8;
}

@keyframes float1 {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0) rotateY(0) rotateZ(0);
    }

    50% {
        transform: translate3d(-25px, -35px, 15px) rotateX(18deg) rotateY(25deg) rotateZ(8deg);
    }

    100% {
        transform: translate3d(0, 0, 0) rotateX(0) rotateY(0) rotateZ(0);
    }
}

@keyframes float2 {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0) rotateY(0) rotateZ(0);
    }

    50% {
        transform: translate3d(35px, 25px, -15px) rotateX(-20deg) rotateY(12deg) rotateZ(-8deg);
    }

    100% {
        transform: translate3d(0, 0, 0) rotateX(0) rotateY(0) rotateZ(0);
    }
}

@keyframes float3 {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0) rotateY(0) rotateZ(0);
    }

    50% {
        transform: translate3d(-15px, 40px, 40px) rotateX(12deg) rotateY(-18deg) rotateZ(15deg);
    }

    100% {
        transform: translate3d(0, 0, 0) rotateX(0) rotateY(0) rotateZ(0);
    }
}

/* ===================================================================
   GALLERY
   =================================================================== */
.gallery-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.gallery-item {
    position: absolute;
    background: #111;
    color: #fff;
    border-radius: 2px;
    transform-style: preserve-3d;
    will-change: transform, opacity;
    overflow: hidden;
}

/* ===================================================================
   INQUIRY UI (hidden wrapper, JS compat)
   =================================================================== */
.inquiry-ui {
    display: none;
}

/* ===================================================================
   SEO — Screen Reader Only
   =================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

/* ===================================================================
   GALLERY — Pinned Header / Footer
   =================================================================== */
.gallery-pinned-ui {
    position: fixed;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 50;
    pointer-events: auto;
    transition: opacity 0.4s ease;
}

.gallery-pinned-ui.top {
    top: 30px;
}

.gallery-pinned-ui.bottom {
    bottom: 20px;
}

/* ===================================================================
   GALLERY — 8-item carousel
   =================================================================== */
.gallery-track {
    display: flex;
    align-items: center;
    gap: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}