/* ==========================================================================
   MAISON ETHOS | GLOBAL DESIGN SYSTEM (BRUTALIST / LUXURY)
   ========================================================================== */

/* ── 1. GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── 2. DESIGN TOKENS (VARIABLES) ── */
:root {
    --black: #0d0d0d;
    --white: #fafafa;
    --gray-100: #f5f5f4;
    --gray-200: #e8e6e1;
    --gray-400: #a8a29e;
    --gray-600: #57534e;
    --accent: #c9b99a;
    --accent-light: #f0ebe3;
    --red: #b91c1c;
}

/* ── 3. BASE & RESET ── */
html, body { 
    overscroll-behavior: none !important; 
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-100);
    color: var(--black);
    -webkit-user-select: none; 
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Allow text selection only in input fields */
input, textarea { 
    -webkit-user-select: text; 
    user-select: text; 
}

/* Prevent image dragging to maintain native app feel */
img { 
    pointer-events: none; 
    -webkit-user-drag: none; 
}

/* Utility to completely block context menus/selection */
.no-context { 
    -webkit-touch-callout: none; 
    user-select: none; 
}

/* ── 4. TYPOGRAPHY UTILITIES ── */
.font-editorial {
    font-family: 'Cormorant Garamond', serif;
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px; 
    font-weight: 400; 
    color: var(--black); 
    margin-bottom: 16px;
}

/* ── 5. PRELOADER (THE LOADING SCREEN) ── */
#preloader {
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: var(--white); 
    z-index: 99999;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    gap: 20px;
    transition: opacity 0.6s ease-out;
}

#preloader.hidden { 
    opacity: 0; 
    pointer-events: none; 
}

.preloader-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px; 
    font-weight: 300; 
    letter-spacing: 10px;
    text-transform: uppercase; 
    color: var(--black);
}

.preloader-line {
    width: 40px; height: 1px; 
    background: var(--black);
    animation: expand 1.2s ease-in-out infinite alternate;
}

@keyframes expand { 
    from { width: 20px; opacity: 0.3; } 
    to { width: 60px; opacity: 1; } 
}

/* ── 6. ANIMATIONS ── */
.fade-in { 
    animation: fadeIn 0.5s ease forwards; 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(8px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* ── 7. FORM ELEMENTS (STARK & SHARP) ── */
.field-label {
    display: block; 
    font-size: 9px; 
    font-weight: 600;
    letter-spacing: 3px; 
    text-transform: uppercase;
    color: var(--gray-600); 
    margin-bottom: 8px;
}

.input-field {
    width: 100%; 
    padding: 13px 16px;
    background: var(--white); 
    border: 1px solid var(--gray-200);
    border-radius: 0; /* Brutalist sharp corners */
    font-size: 14px; 
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s; 
    color: var(--black); 
    letter-spacing: 0.2px;
}

.input-field:focus { 
    outline: none; 
    border-color: var(--black); 
}

.input-field:disabled {
    background: var(--gray-100); 
    color: var(--gray-400);
    border-color: var(--gray-200); 
    cursor: not-allowed;
    -webkit-text-fill-color: var(--gray-600);
}

.input-field::placeholder { 
    color: var(--gray-400); 
}

/* ── 8. BUTTONS (HEAVY TRACKING) ── */
.btn-primary {
    background: var(--black); 
    color: var(--white);
    padding: 14px 24px; 
    border: none; 
    border-radius: 0;
    font-family: 'Inter', sans-serif; 
    font-size: 11px; 
    font-weight: 600;
    letter-spacing: 3px; 
    text-transform: uppercase;
    display: inline-flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px;
    width: 100%; 
    cursor: pointer; 
    transition: background 0.2s;
}
.btn-primary:active { transform: scale(0.99); background: #222; }

.btn-secondary {
    background: transparent; 
    color: var(--black);
    padding: 13px 24px; 
    border: 1px solid var(--black); 
    border-radius: 0;
    font-family: 'Inter', sans-serif; 
    font-size: 11px; 
    font-weight: 600;
    letter-spacing: 3px; 
    text-transform: uppercase;
    display: inline-flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px;
    width: 100%; 
    cursor: pointer; 
    transition: all 0.2s;
}
.btn-secondary:hover { background: var(--black); color: var(--white); }
.btn-secondary:active { transform: scale(0.99); }

.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--white); color: var(--gray-600);
    border: 1px solid var(--gray-200); width: 100%; padding: 13px;
    border-radius: 0; font-size: 13px; font-weight: 500;
    letter-spacing: 0.3px; transition: all 0.2s; margin-top: 10px; cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.btn-google:active { background: var(--gray-100); transform: scale(0.99); }

.btn-delete {
    width: 100%; background: transparent; color: var(--red);
    border: 1px solid #fecaca; padding: 14px;
    font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase; cursor: pointer;
    transition: all 0.2s; display: flex; justify-content: center; align-items: center; gap: 10px;
    border-radius: 0;
}
.btn-delete:hover { background: var(--red); color: var(--white); border-color: var(--red); }

/* ── 9. CARDS & CONTAINERS ── */
.card {
    background: var(--white); 
    border: 1px solid var(--gray-200);
    padding: 24px; 
    margin-bottom: 16px;
    border-radius: 0;
}

.card-label {
    font-size: 9px; font-weight: 600; letter-spacing: 3px;
    text-transform: uppercase; color: var(--gray-400); margin-bottom: 4px;
    display: flex; align-items: center; gap: 8px;
}

/* ── 10. BADGES ── */
.badge { 
    padding: 4px 10px; 
    font-size: 9px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    border-radius: 0; 
}
.badge-gray { background: var(--gray-200); color: var(--gray-600); }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef9c3; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }

/* ── 11. GLOBAL MESSAGE BOX (TOAST) ── */
#message-box { z-index: 9999; }

/* ── 12. DIVIDERS ── */
.divider { display: flex; align-items: center; margin: 24px 0; gap: 16px; }
.divider-line { flex: 1; height: 1px; background: var(--gray-200); }
.divider-text { font-size: 9px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--gray-400); }

/* ── 13. ME WATERMARK UTILITY (For Black Cards) ── */
.me-watermark {
    position: relative;
    overflow: hidden;
}
.me-watermark::after {
    content: 'ME';
    position: absolute; right: -10px; bottom: -20px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 120px; font-weight: 300; color: rgba(255,255,255,0.04);
    line-height: 1; letter-spacing: -4px; pointer-events: none; user-select: none;
}