/*
Theme Name: Jharokha Homes Custom - Contact
Description: Custom styles for Jharokha Homes "Contact Us" page.
*/

/* 1. Base Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* 2. Global Reset & Typography */
.contact-page {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 3. Material Symbols Settings */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* 4. Utility: Hide Scrollbar (Clean UI) */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 5. Utility: Dense Grid fallback */
.grid-dense {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/*
 * -----------------------------------------------------------------------------
 * ANIMATED TEXT CYCLE (Framer Motion Replica)
 * -----------------------------------------------------------------------------
 */
.cycle-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    vertical-align: bottom;
    position: relative;
    height: 1.2em;
    transition: width 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.cycle-word {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(20px);
    filter: blur(8px);
    transition:
        opacity 0.4s ease,
        transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),
        filter 0.4s ease;
    will-change: transform, opacity, filter;
}

.cycle-word.active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    z-index: 2;
}

.cycle-word.exit {
    position: absolute;
    opacity: 0;
    transform: translateY(20px);
    filter: blur(8px);
    z-index: 1;
}

.cycle-word.enter {
    position: absolute;
    opacity: 0;
    transform: translateY(-20px);
    filter: blur(8px);
}

/*
 * -----------------------------------------------------------------------------
 * SHADCN / RADIX STYLE ANIMATIONS
 * -----------------------------------------------------------------------------
 */

@keyframes enterFromRight {
    from { opacity: 0; transform: translateX(200px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes enterFromLeft {
    from { opacity: 0; transform: translateX(-200px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes exitToRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(200px); }
}
@keyframes exitToLeft {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-200px); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.navigation-menu-content {
    display: none;
    transform-origin: top center;
    animation-duration: 0.2s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.group:hover .navigation-menu-content {
    display: block;
    animation-name: scaleIn;
}

.mobile-menu-overlay {
    transition: opacity 0.3s ease;
    pointer-events: none;
    opacity: 0;
}
.mobile-menu-overlay.open {
    pointer-events: auto;
    opacity: 1;
}

.mobile-menu-drawer {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu-drawer.open {
    transform: translateX(0);
}

/*
 * -----------------------------------------------------------------------------
 * COMPONENT: IMAGE COMPARISON SLIDER
 * -----------------------------------------------------------------------------
 */
.comparison-container {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.comparison-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.8);
    cursor: ew-resize;
    z-index: 20;
    transform: translateX(-50%);
}

.comparison-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comparison-handle:active .comparison-circle,
.comparison-handle.dragging .comparison-circle {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/*
 * -----------------------------------------------------------------------------
 * COMPONENT: FEATURE STEPS (Auto-Play)
 * -----------------------------------------------------------------------------
 */
.step-progress-bar {
    height: 100%;
    width: 2px;
    background-color: var(--color-accent);
    transform-origin: top;
    transform: scaleY(0);
}

.step-card {
    transition: opacity 0.5s ease;
}

.step-image {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 0;
}

.step-image.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    z-index: 10;
}

/*
 * -----------------------------------------------------------------------------
 * 3D CARD SWIPER (Hero Section)
 * -----------------------------------------------------------------------------
 */
.card-stack {
    position: relative;
    width: 300px;
    height: 400px;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.card-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    background-color: white;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
    overflow: hidden;
    transform-origin: center bottom;
    z-index: 1;
    transform: translateY(0) scale(0.9);
    opacity: 0;
}

.card-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.card-item:nth-last-child(1) {
    z-index: 3;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.card-item:nth-last-child(2) {
    z-index: 2;
    opacity: 1;
    transform: translateY(15px) scale(0.95);
}

.card-item:nth-last-child(3) {
    z-index: 1;
    opacity: 1;
    transform: translateY(30px) scale(0.90);
}

.card-item.swipe-out {
    animation: swipeOut 0.6s forwards cubic-bezier(0.55, 0.085, 0.68, 0.53);
}

@keyframes swipeOut {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(300px) translateY(50px) rotate(20deg);
        opacity: 0;
    }
}

/*
 * -----------------------------------------------------------------------------
 * LAZY LOADING BLUR-UP EFFECT
 * -----------------------------------------------------------------------------
 */
img.lazy-image {
    transition: filter 0.5s ease-out;
}
img.lazy-image.blur-up {
    filter: blur(10px);
}
img.lazy-image.loaded {
    filter: blur(0);
}

/* Custom CSS Variables */
:root {
    --bg: #0a0a0b;
    --bg-secondary: #141416;
    --fg: #fafafa;
    --fg-muted: #a1a1aa;
    --accent: #d4a574;
    --accent-hover: #e8c4a0;
    --card: #1c1c1f;
    --border: #27272a;
    --glass: rgba(255, 255, 255, 0.03);
    --error: #ef4444;
    --success: #22c55e;
}

/* Reveal Animation */
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reveal {
    opacity: 0;
    transform: translateY(60px);
}

.reveal.revealed {
    animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
}

.reveal-scale.revealed {
    animation: revealScale 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* Noise texture overlay */
.noise-overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 9999;
}

/* Gradient orbs */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Focus states */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Form Styles */
.form-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    width: 100%;
    color: var(--fg);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.1);
}

.form-input::placeholder {
    color: var(--fg-muted);
}

.form-input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.15);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--fg);
    margin-bottom: 0.5rem;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-error {
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group.error .form-input {
    border-color: var(--error);
}

.form-group.error .form-error {
    display: block;
}

/* Map Container */
.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(0.8) contrast(1.1) brightness(0.8);
    transition: filter 0.5s ease;
}

.map-container:hover iframe {
    filter: grayscale(0) contrast(1) brightness(1);
}

/* Office Card */
.office-card {
    position: relative;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.office-card:hover {
    border-color: rgba(212, 165, 116, 0.3);
    transform: translateY(-4px);
}

.office-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.office-card:hover::before {
    transform: scaleX(1);
}

/* Button States */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* Contact Info Item */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}

/* Dropdown Select Styling */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

/* Floating Label Effect */
.floating-label-group {
    position: relative;
}

.floating-label-group .form-input {
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
}

.floating-label-group .floating-label {
    position: absolute;
    top: 50%;
    left: 1.25rem;
    transform: translateY(-50%);
    color: var(--fg-muted);
    pointer-events: none;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.floating-label-group .form-input:focus + .floating-label,
.floating-label-group .form-input:not(:placeholder-shown) + .floating-label {
    top: 0.75rem;
    transform: translateY(0);
    font-size: 0.75rem;
    color: var(--accent);
}

/* Tab Animation */
.tab-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
