/**
 * globals.css - Estilos compartilhados do librenzagarcia.me
 * Inclui: reset, variáveis, navegação, starfield, footer, utilities
 */

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

/* ================================================
   RESET & BASE
   ================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

:root {
    --bg-primary: #faf9f6;
    --bg-secondary: #f5f3ed;
    --bg-card: #ffffff;
    --text-primary: #2a2520;
    --text-secondary: #5a5550;
    --text-light: #8a8580;
    --accent-gold: #d4a574;
    --accent-red: #c83e3e;
    --border: #e5e3dc;
    --nav-height: 120px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ================================================
   ANIMATED GRADIENT BACKGROUND
   ================================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #faf9f6, #f5f3ed, #faf5ea, #f8f6f2);
    background-size: 400% 400%;
    animation: gradientShift 30s ease infinite;
    z-index: -3;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ================================================
   STARFIELD BACKGROUND
   ================================================ */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.015;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 50%;
    animation: twinkle 6s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

/* ================================================
   NAVIGATION
   ================================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-left {
    padding-left: 10px;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.logo:hover {
    color: var(--accent-gold);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-red);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    width: 100%;
}

/* ================================================
   LANGUAGE SELECTOR
   ================================================ */
.language-selector {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.3rem;
    border-radius: 50px;
}

.lang-btn {
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.lang-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.lang-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* ================================================
   FOOTER
   ================================================ */
footer {
    margin-top: auto;
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    background: rgba(250, 249, 246, 0.5);
}

.footer-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ================================================
   FOCUS INDICATORS (Accessibility)
   ================================================ */
*:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}

/* Remove default :focus (mouse clicks) - only :focus-visible should show */
*:focus:not(:focus-visible) {
    outline: none;
}

/* volume-card has gradient border effect on focus-visible, no need for outline */
.volume-card:focus-visible,
.volume-card:focus {
    outline: none;
}

/* ================================================
   UTILITY CLASSES
   ================================================ */
.hidden {
    display: none !important;
}

.section-offset {
    margin-top: var(--nav-height);
    padding: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================================
   RESPONSIVE - TABLET
   ================================================ */
@media (max-width: 768px) {
    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .logo {
        font-size: 1.2rem;
    }
}

/* ================================================
   RESPONSIVE - MOBILE
   ================================================ */
@media (max-width: 500px) {
    :root {
        --nav-height: 140px;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }
}
