/* ========================================
   Caffeine — Design Tokens
   Paleta: Caramelo & Pistache
   ======================================== */

:root {
    /* Fondos */
    --color-bg: #FAF7F2;
    --color-surface: #FFFFFF;
    --color-surface-alt: #FFFAF0;
    --color-surface-green: #EDF5EA;

    /* Texto */
    --color-text: #3B2316;
    --color-text-secondary: #6B5442;
    --color-text-muted: #999999;
    --color-text-inverse: #FFFFFF;

    /* Acentos */
    --color-accent-green: #7EAE7B;
    --color-accent-green-hover: #6A9A67;
    --color-accent-green-subtle: rgba(126, 174, 123, 0.15);
    --color-accent-warm: #D4A862;
    --color-accent-warm-hover: #C49952;

    /* Bordes */
    --color-border: #E8E0D6;
    --color-border-light: #F0EBE4;

    /* Estados */
    --color-disabled: #CCCCCC;
    --color-error: #D9534F;

    /* WhatsApp */
    --color-whatsapp: #25D366;
    --color-whatsapp-hover: #1EBE5B;

    /* Header */
    --color-header-bg: rgba(250, 247, 242, 0.95);
    --color-header-border: rgba(0, 0, 0, 0.05);

    /* Hero overlays */
    --color-hero-overlay-start: rgba(59, 46, 37, 0.4);
    --color-hero-overlay-end: rgba(59, 46, 37, 0.7);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(59, 35, 22, 0.06);
    --shadow-md: 0 4px 8px rgba(59, 35, 22, 0.1);
    --shadow-lg: 0 8px 16px rgba(59, 35, 22, 0.14);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 64px;

    /* Typography */
    --font-family-main: 'Roboto', sans-serif;
    --font-family-display: 'Playfair Display', Georgia, serif;
    --font-size-base: 16px;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;

    /* Transitions */
    --transition-fast: 0.15s ease-out;
    --transition-medium: 0.3s ease-in-out;
}

/* ========================================
   MODO BAR — Dark theme
   ======================================== */
[data-theme="bar"] {
    --color-bg: #1C1410;
    --color-surface: #2A1F18;
    --color-surface-alt: #332619;
    --color-surface-green: #1E2A1E;

    --color-text: #EDE6DC;
    --color-text-secondary: #A89380;
    --color-text-muted: #7A6E63;
    --color-text-inverse: #1C1410;

    --color-accent-green: #8DC48A;
    --color-accent-green-hover: #9FD09C;
    --color-accent-green-subtle: rgba(141, 196, 138, 0.12);
    --color-accent-warm: #E5B96E;
    --color-accent-warm-hover: #F0C880;

    --color-border: #3D2E24;
    --color-border-light: #33261C;

    --color-disabled: #4A3D34;
    --color-error: #E57373;

    --color-header-bg: rgba(28, 20, 16, 0.95);
    --color-header-border: rgba(237, 230, 220, 0.08);

    --color-hero-overlay-start: rgba(28, 20, 16, 0.5);
    --color-hero-overlay-end: rgba(28, 20, 16, 0.8);

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
}

/* ========================================
   Reset & Base
   ======================================== */
html,
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: var(--font-size-base);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    margin: 0 0 var(--spacing-md) 0;
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    font-family: var(--font-family-display);
    color: var(--color-text);
}

h4,
h5,
h6 {
    margin: 0 0 var(--spacing-md) 0;
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    color: var(--color-text);
}

p {
    margin: 0 0 var(--spacing-md) 0;
}

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

a:hover {
    color: var(--color-accent-green);
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

/* ========================================
   Utility Classes
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    width: 100%;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.my-lg {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-medium) forwards;
}

/* ========================================
   Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

/* Button & Link Interactions */
button {
    cursor: pointer;
    font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-accent-warm);
    outline-offset: 3px;
}

[tabindex="-1"]:focus { outline: none; }

@media (max-width: 760px) {
    .container { padding-left: 16px; padding-right: 16px; }
}
