/* ==============================================================================
   AURA MATCHMAKING - CORE DESIGN SYSTEM & STYLESHEET
   Design Language: Quiet Luxury Editorial, Warm Romance, Modern Typography
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* --- Curated HSL Color Tokens --- */
    --color-navy: #111827;           /* Deep Velvet Navy */
    --color-navy-light: #1F2937;
    --color-gold: #C5A059;           /* Champagne Gold Accent */
    --color-gold-light: #F4EBD9;
    --color-gold-dark: #9E7D3B;
    --color-rose: #B85D58;           /* Warm Terracotta / Rosewood */
    --color-rose-light: #FDF2F2;
    --color-bg: #FBF9F5;             /* Soft Alabaster Background */
    --color-surface: #FFFFFF;        /* Warm Pearl White Card Surface */
    --color-border: #E5E1D8;         /* Subtle Warm Gray Border */
    --color-border-subtle: #F0EDE6;
    --color-text-main: #1F2937;
    --color-text-muted: #6B7280;
    --color-text-light: #9CA3AF;
    --color-success: #15803D;        /* Forest Green */
    --color-success-bg: #F0FDF4;
    --color-warning: #B45309;        /* Amber Warm */
    --color-warning-bg: #FFFBEB;

    /* --- Typography Tokens --- */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

    /* --- Spatial & Elevation Tokens --- */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(17, 24, 39, 0.04), 0 1px 2px rgba(17, 24, 39, 0.02);
    --shadow-md: 0 4px 12px rgba(17, 24, 39, 0.05), 0 1px 3px rgba(17, 24, 39, 0.02);
    --shadow-lg: 0 12px 32px -4px rgba(17, 24, 39, 0.08), 0 4px 12px -2px rgba(17, 24, 39, 0.03);
    --shadow-gold: 0 4px 20px rgba(197, 160, 89, 0.25);

    --transition-fast: 0.15s ease;
    --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Global Reset & Foundation --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Typography Utilities --- */
.serif {
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--color-navy);
    line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--color-navy);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-gold-dark);
}

.text-muted { color: var(--color-text-muted); }
.text-gold { color: var(--color-gold-dark); }
.text-rose { color: var(--color-rose); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-center { text-align: center; }

/* --- Container & Layout --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.container-narrow {
    max-width: 800px;
}

.container-wide {
    max-width: 1360px;
}

main {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* --- Luxury Header & Navbar --- */
.site-header {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-navy);
    text-transform: uppercase;
}

.brand-logo .seal {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(197, 160, 89, 0.4);
}

.brand-tagline {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
    text-transform: uppercase;
    display: block;
    margin-top: -3px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-link {
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--color-navy-light);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.25rem;
    position: relative;
}

.nav-link.active {
    color: var(--color-navy);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-gold);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-gold);
}

/* --- Buttons & Action Controls --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    font-size: 0.925rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background-color: var(--color-navy);
    color: white;
}

.btn-primary:hover {
    background-color: #030712;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-gold {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(197, 160, 89, 0.3);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #d3b069, var(--color-gold-dark));
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

.btn-rose {
    background-color: var(--color-rose);
    color: white;
}

.btn-rose:hover {
    background-color: #a44f4a;
    color: white;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-border);
    color: var(--color-navy);
}

.btn-outline:hover {
    background-color: var(--color-surface);
    border-color: var(--color-navy);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.825rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.85rem 1.85rem;
    font-size: 1.05rem;
}

/* --- Cards & Surfaces --- */
.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    position: relative;
}

.card-luxury {
    border-top: 3px solid var(--color-gold);
    box-shadow: var(--shadow-md);
}

/* --- Badges & Tags --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-gold {
    background-color: var(--color-gold-light);
    color: var(--color-gold-dark);
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.badge-rose {
    background-color: var(--color-rose-light);
    color: var(--color-rose);
    border: 1px solid rgba(184, 93, 88, 0.3);
}

.badge-navy {
    background-color: var(--color-navy);
    color: white;
}

.badge-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid rgba(21, 128, 61, 0.2);
}

/* --- Forms & Inputs --- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.95rem;
    font-family: var(--font-sans);
    font-size: 0.925rem;
    color: var(--color-text-main);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

/* Checkbox & Radio Tiles */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.6rem;
}

.check-tile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.check-tile:hover {
    border-color: var(--color-gold);
    background: white;
}

.check-tile input[type="checkbox"]:checked + span,
.check-tile input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--color-navy);
}

/* --- Demo Role Switcher Toolbar --- */
.demo-role-bar {
    background: #0f172a;
    color: white;
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.demo-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1360px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.demo-bar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.preview-mode-tag {
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.75rem;
    background: rgba(197, 160, 89, 0.15);
    border: 1px solid rgba(197, 160, 89, 0.4);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
}

.demo-active-user {
    color: #cbd5e1;
    font-size: 0.825rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.demo-pills {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.demo-pills-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-right: 0.2rem;
}

.demo-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.demo-btn:hover, .demo-btn.active {
    background: var(--color-gold);
    color: white;
    border-color: var(--color-gold);
}

.demo-btn-exit {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-weight: 600;
}

.demo-btn-exit:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.demo-btn-apply {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    border-color: var(--color-gold);
    color: white;
    font-weight: 700;
}

.demo-btn-apply:hover {
    background: linear-gradient(135deg, #d8b672, var(--color-gold));
    color: white;
}

/* --- Global Modal Dialog System --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: modalFadeIn 0.2s ease forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.preview-modal-dialog {
    max-width: 960px;
    border-top: 4px solid var(--color-gold);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close-btn:hover {
    color: var(--color-navy);
    background: var(--color-bg);
}

.preview-tier-card {
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.preview-tier-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--color-navy);
    color: #9CA3AF;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--color-navy-light);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-heading {
    font-family: var(--font-serif);
    color: white;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: #9CA3AF;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.825rem;
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--color-navy);
    color: white;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 4px solid var(--color-gold);
    animation: toastSlide 0.3s ease forwards;
}

@keyframes toastSlide {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 60px;
    }
    .nav-menu {
        display: none; /* Can be toggled */
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
