/* 
 * Ambiance Edge - Tier-1 Luxury Design System
 * Enforcing 8px Grid, Cinematic Motion, and Premium Aesthetics
 */

:root {
    /* Refined Luxury Palette */
    --ae-bronze: #CD7F32;
    --ae-bronze-light: #DF9B5B;
    --ae-charcoal: #121212;
    --ae-charcoal-muted: #1F1F1F;
    --ae-cream: #FDFCFB;
    --ae-platinum: #EAEAEA;
    --ae-white: #FFFFFF;

    /* 8px Precision Grid System */
    --ae-space-05: 4px;
    --ae-space-1: 8px;
    --ae-space-2: 16px;
    --ae-space-3: 24px;
    --ae-space-4: 32px;
    --ae-space-6: 48px;
    --ae-space-8: 64px;
    --ae-space-12: 96px;

    /* Cinematic Motion (Apple-level bezier) */
    --ae-ease-cinematic: cubic-bezier(0.2, 0, 0, 1);
    --ae-transition-instant: 0.15s var(--ae-ease-cinematic);
    --ae-transition-fast: 0.35s var(--ae-ease-cinematic);
    --ae-transition-standard: 0.65s var(--ae-ease-cinematic);
    --ae-transition-slow: 1.2s var(--ae-ease-cinematic);

    /* Premium Polish */
    --ae-shadow-subtle: 0 4px 20px -4px rgba(0, 0, 0, 0.03);
    --ae-shadow-luxury: 0 20px 60px -10px rgba(0, 0, 0, 0.08);
    --ae-blur-luxury: blur(20px);
}

/* Typography Base */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--ae-cream);
    color: var(--ae-charcoal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.font-display {
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Global Transition Utility */
.ae-transition {
    transition: all var(--ae-transition-standard);
}

/* Premium Buttons */
.btn-luxury {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--ae-space-2) var(--ae-space-4);
    background: var(--ae-charcoal);
    color: var(--ae-white);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    transition: var(--ae-transition-standard);
    position: relative;
    overflow: hidden;
}

.btn-luxury:hover {
    background: var(--ae-bronze);
    transform: translateY(-2px);
    box-shadow: var(--ae-shadow-luxury);
}

.btn-luxury::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.8s var(--ae-ease-cinematic);
}

.btn-luxury:hover::before {
    left: 100%;
}

/* Glassmorphism System */
.glass-premium {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: var(--ae-blur-luxury);
    -webkit-backdrop-filter: var(--ae-blur-luxury);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 60fps Image & Content Reveals */
.reveal-content {
    opacity: 0;
    transform: translateY(20px);
}

.reveal-content.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s var(--ae-ease-cinematic), transform 1s var(--ae-ease-cinematic);
}

/* Luxury Hover States for Items */
.luxury-item-card {
    transition: var(--ae-transition-standard);
    background: var(--ae-white);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.luxury-item-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ae-shadow-luxury);
}

/* Subtle Shimmer for Processing states */
@keyframes ae-shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer-bg {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: ae-shimmer 2s infinite linear;
}

/* ===== Password Toggle ===== */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    flex: 1;
    padding-right: 2.5rem !important;
    min-width: 0;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(18, 18, 18, 0.25);
    transition: color 0.3s ease;
    flex-shrink: 0;
    z-index: 2;
}

.password-toggle:hover {
    color: #CD7F32;
}

.password-toggle svg,
.password-toggle i {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}