/* ==========================================================================
   CARNET AUSTRAL - STUDIO CRÉA
   Style System & Premium Custom CSS
   ========================================================================== */

/* Design Tokens & Variables */
:root {
    /* Color Palette - Light Theme ("Boutique Cream") */
    --bg-color: #FAF6EE;
    --bg-canvas: #FAF6EE;
    --bg-card: rgba(255, 255, 255, 0.65);
    --text-color: #1E1B18;
    --text-muted: #615C56;
    --accent-color: #FCC33B;
    --accent-hover: #E3AF1B;
    --accent-rgb: 252, 195, 59;
    --border-color: rgba(252, 195, 59, 0.25);
    --border-hover: rgba(252, 195, 59, 0.5);
    --shadow-color: rgba(30, 27, 24, 0.06);
    --card-shadow: 0 30px 60px rgba(30, 27, 24, 0.08), 0 2px 10px rgba(30, 27, 24, 0.02);
    --input-bg: rgba(255, 255, 255, 0.8);
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Layout & Animation values */
    --border-radius-lg: 24px;
    --border-radius-sm: 12px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

[data-theme="dark"] {
    /* Color Palette - Dark Theme ("Boutique Obsidian") */
    --bg-color: #131210;
    --bg-canvas: #131210;
    --bg-card: rgba(24, 23, 21, 0.7);
    --text-color: #FAF6EE;
    --text-muted: #A19B91;
    --accent-color: #FCC33B;
    --accent-hover: #FDD168;
    --accent-rgb: 252, 195, 59;
    --border-color: rgba(252, 195, 59, 0.15);
    --border-hover: rgba(252, 195, 59, 0.4);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --card-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.2);
    --input-bg: rgba(20, 19, 17, 0.8);
}

/* Reset & Defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 250px;
}

.logo-pulse-container {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 2px solid var(--accent-color);
}

.logo-pulse {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: goldPulse 2s infinite ease-in-out;
}

.preloader-bar-container {
    width: 150px;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.preloader-bar {
    width: 0%;
    height: 100%;
    background-color: var(--accent-color);
    animation: fillBar 1.8s forwards cubic-bezier(0.1, 0.8, 0.1, 1);
}

/* Background Canvas */
#dust-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    box-shadow: 0 4px 15px var(--shadow-color);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    border-color: var(--accent-color);
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.25);
}

.theme-toggle-btn svg {
    width: 22px;
    height: 22px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .icon-sun {
    display: none;
}

[data-theme="dark"] .icon-moon {
    display: none;
}

/* Main Container Layout */
.app-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    opacity: 0; /* Animated entry in JS */
    transform: translateY(20px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-container.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header Section */
.site-header {
    margin-top: 20px;
    margin-bottom: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.logo-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent-color), transparent, var(--accent-color));
    box-shadow: 0 15px 35px var(--shadow-color);
    transition: var(--transition-smooth);
}

.logo-wrapper:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 20px 45px rgba(var(--accent-rgb), 0.15);
}

.site-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid var(--bg-color);
}

.brand-info {
    animation: fadeIn 1s var(--transition-smooth) 0.2s;
}

.brand-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--text-color);
    margin-bottom: 6px;
    text-indent: 0.25em; /* Compensate for letter spacing */
}

.brand-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.4em;
    color: var(--accent-color);
    text-transform: uppercase;
    text-indent: 0.4em;
}

/* Main Content Area */
.main-content {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 60px 40px;
    margin-bottom: 50px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    gap: 40px;
    transition: border-color 0.5s ease, background-color 0.5s ease, box-shadow 0.5s ease;
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px;
}

.quote-container {
    position: relative;
    max-width: 620px;
    margin: 0 auto;
}

.lead-quote {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    line-height: 1.5;
    font-weight: 600;
    color: var(--text-color);
    font-style: italic;
}

@media (max-width: 600px) {
    .lead-quote {
        font-size: 1.65rem;
    }
    .main-content {
        padding: 45px 20px;
    }
}

.badge-container {
    margin-top: 10px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-color);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7);
    animation: dotPulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

/* Footer Section */
.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    width: 100%;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
    box-shadow: 0 4px 10px var(--shadow-color);
}

.social-link:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(var(--accent-rgb), 0.2);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.copyright {
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    line-height: 1.4;
}

/* Animations Keyframes */
@keyframes goldPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(252, 195, 59, 0.2);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 10px 40px rgba(252, 195, 59, 0.45);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(252, 195, 59, 0.2);
    }
}

@keyframes fillBar {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

@keyframes dotPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
    }
}

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

/* Media Queries for fine tuning responsiveness */
@media (max-width: 500px) {
    .theme-toggle-btn {
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
    }
    .app-container {
        padding: 40px 15px;
    }
}
