/*
 * DESCRIPCIÓN: Archivo UI estático estilo_monsa.css.
 * RELACIONES: Vistas Blade en resources/views/
 * FUNCIONALIDADES: Estilos/Scripts para presentación final.
 */
/* ============================================
   MORALES, MONTES DE OCA, SANDOVAL Y ASOCIADOS, S.C.
   ESTILO: ROYAL OIL & GOLD — Contabilidad de Alto Poder
   ============================================ */

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

/* Fuente embebida — DK Rat Infested Mailbox */
@font-face {
    font-family: 'DK Rat Infested Mailbox';
    src: url('/fonts/DK_Rat_Infested_Mailbox.ttf') format('truetype'),
         url('/fonts/DKRatInfestedMailbox.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   VARIABLES GLOBALES — Royal Oil & Gold
   ============================================ */
:root {
    --bg-void:      #050403;
    --bg-base:      #0A0806;
    --bg-raised:    #0F0D0A;
    --bg-card:      #14110D;
    --bg-overlay:   #1C1813;

    --gold-950: #2A1F08;
    --gold-900: #3D2E0C;
    --gold-800: #5C4512;
    --gold-700: #7A5E1A;
    --gold-600: #9C7A24;
    --gold-500: #C29E34;
    --gold-400: #DDBE55;
    --gold-300: #EAD48A;
    --gold-200: #F4E8B6;
    --gold-100: #FBF5DF;
    --gold-50:  #FFFCF0;

    --ivory-50:  #FFFFFA;
    --ivory-100: #FEFCF5;
    --ivory-200: #F5F0E0;
    --ivory-300: #E0D8C0;
    --ivory-400: #C0B898;
    --ivory-500: #988F70;
    --ivory-600: #706750;
    --ivory-700: #4F483A;
    --ivory-800: #2F2A22;
    --ivory-900: #1A1712;

    --wealth-500: #2A9D65;
    --loss-500:   #C42E2E;
    --warn-500:   #D4A00A;

    --font-display: 'DK Rat Infested Mailbox', 'DM Serif Display', Georgia, serif;
    --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

    --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
    --space-5:20px; --space-6:24px; --space-8:32px; --space-10:40px;
    --space-12:48px; --space-16:64px;

    --r-sm:4px; --r-md:8px; --r-lg:12px; --r-xl:16px; --r-full:9999px;

    --t-fast: all 0.12s ease;
    --t-base: all 0.22s cubic-bezier(0.25, 0, 0.2, 1);
    --t-slow: all 0.38s cubic-bezier(0.25, 0, 0.1, 1);

    --shadow-md:    0 8px 28px rgba(0,0,0,0.8);
    --shadow-lg:    0 20px 48px rgba(0,0,0,0.85);
    --shadow-gold:  0 0 32px rgba(194,158,52,0.2);
    --shadow-gold-lg: 0 0 64px rgba(194,158,52,0.15);

    --border-subtle: 1px solid rgba(255,255,255,0.05);
    --border-gold:   1px solid rgba(194,158,52,0.35);
    --border-gold-lg:1px solid rgba(194,158,52,0.6);

    --header-height: 80px;
    --nav-height:    56px;
    --container-max: 1440px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

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

body {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--ivory-300);
    background: var(--bg-void);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(194,158,52,0.04) 0%, transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(194,158,52,0.03) 0%, transparent 45%),
        radial-gradient(circle at 25% 40%, rgba(194,158,52,0.025) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 32px 32px;
    overflow-x: hidden;
}

/* Resplandor radial atmosférico */
body::before {
    content: '';
    position: fixed;
    top: -200px; left: 50%;
    transform: translateX(-50%);
    width: 1200px; height: 600px;
    background: radial-gradient(ellipse, rgba(194,158,52,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
    color: var(--gold-200);
    margin-bottom: 0.75rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(194,158,52,0.15), 0 1px 2px rgba(0,0,0,0.6);
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); }
h3 { font-size: 1.85rem; }
h4 { font-size: 1.4rem; }

h6 {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold-400);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

p { margin-bottom: 1rem; color: var(--ivory-400); }

a { color: var(--gold-300); text-decoration: none; transition: var(--t-fast); }
a:hover { color: var(--gold-200); }

strong { color: var(--ivory-100); font-weight: 600; }

em { color: var(--gold-400); font-style: italic; font-weight: 400; }

/* ============================================
   CONTENEDOR APP
   ============================================ */
.app-container {
    max-width: var(--container-max);
    margin: 0 auto;
    background: var(--bg-base);
    border-radius: var(--r-xl);
    border: var(--border-gold);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: revealUp 0.7s cubic-bezier(0.25, 0, 0.2, 1) both;
}

.app-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--gold-700) 15%,
        var(--gold-400) 40%,
        var(--gold-300) 55%,
        var(--gold-400) 70%,
        transparent 100%
    );
    z-index: 10;
}

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

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

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 32px rgba(194,158,52,0.2); }
    50%      { box-shadow: 0 0 48px rgba(194,158,52,0.4); }
}

/* ============================================
   HEADER
   ============================================ */
.header {
    height: var(--header-height);
    padding: 0 var(--space-10);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-void);
    border-bottom: var(--border-gold);
    position: relative;
    z-index: 100;
}

.header::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 400px; height: 100%;
    background: radial-gradient(ellipse at 20% 50%, rgba(194,158,52,0.10) 0%, transparent 70%);
    pointer-events: none;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    position: relative;
    z-index: 1;
}

.logo {
    font-family: var(--font-display);
    font-size: 2.1rem;
    color: var(--gold-300);
    letter-spacing: 0.02em;
    text-shadow: 0 0 24px rgba(194,158,52,0.3);
    line-height: 1;
}

.logo-divider {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, transparent, var(--gold-600), transparent);
}

.company-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.company-name-main {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ivory-200);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.company-name-sub {
    font-size: 0.65rem;
    color: var(--gold-500);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    position: relative;
    z-index: 1;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 8px 18px;
    background: rgba(0,0,0,0.5);
    border: var(--border-gold);
    border-radius: var(--r-full);
    font-size: 0.78rem;
    color: var(--ivory-300);
    transition: var(--t-base);
}

.user-badge:hover {
    border-color: var(--gold-400);
    background: rgba(194,158,52,0.06);
}

.user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-void);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* ============================================
   NAV
   ============================================ */
.nav-menu {
    height: var(--nav-height);
    background: var(--bg-base);
    border-bottom: var(--border-subtle);
    display: flex;
    padding: 0 var(--space-10);
    position: sticky;
    top: 0;
    z-index: 90;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0 var(--space-6);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ivory-500);
    cursor: pointer;
    transition: var(--t-base);
    position: relative;
    white-space: nowrap;
    letter-spacing: 0.08em;
    border-bottom: 2px solid transparent;
    text-transform: uppercase;
}

.nav-item:hover {
    color: var(--ivory-200);
    background: rgba(194,158,52,0.06);
}

.nav-item.active {
    color: var(--gold-300);
    border-bottom-color: var(--gold-500);
    font-weight: 700;
}

/* ============================================
   CONTENIDO
   ============================================ */
.content {
    padding: var(--space-12) var(--space-10);
    background: var(--bg-base);
    position: relative;
}

/* ============================================
   HERO — bienvenida
   ============================================ */
.hero {
    background: var(--bg-raised);
    border: var(--border-gold);
    border-radius: var(--r-xl);
    padding: var(--space-12) var(--space-12);
    margin-bottom: var(--space-12);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom,
        transparent,
        var(--gold-500) 30%,
        var(--gold-400) 60%,
        transparent
    );
}

.hero::after {
    content: '';
    position: absolute;
    right: -120px; top: -120px;
    width: 480px; height: 480px;
    background: radial-gradient(ellipse, rgba(194,158,52,0.10) 0%, transparent 65%);
    pointer-events: none;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    background: rgba(194,158,52,0.08);
    border: var(--border-gold);
    border-radius: var(--r-full);
    padding: 6px 18px;
    font-size: 0.7rem;
    color: var(--gold-300);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    margin-bottom: var(--space-6);
    animation: fadeIn 0.8s 0.2s both;
}

.hero-tag::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--gold-400);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--gold-400);
    animation: glow 2s infinite;
}

.hero h1 {
    margin-bottom: var(--space-5);
    background: linear-gradient(135deg, var(--gold-100) 0%, var(--gold-300) 50%, var(--gold-500) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeIn 0.8s 0.3s both;
    position: relative;
}

.hero p.lead {
    font-size: 1.15rem;
    color: var(--ivory-300);
    max-width: 720px;
    line-height: 1.7;
    animation: fadeIn 0.8s 0.4s both;
}

.hero-meta {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-8);
    animation: fadeIn 0.8s 0.5s both;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: rgba(0,0,0,0.45);
    border: var(--border-gold);
    padding: 8px 20px;
    border-radius: var(--r-full);
    font-size: 0.8rem;
    color: var(--ivory-400);
}

.hero-meta span strong {
    color: var(--gold-300);
    font-weight: 600;
}

.hero-meta .icon {
    color: var(--gold-400);
    font-size: 0.9rem;
}

/* ============================================
   GRID DE TARJETAS PRINCIPALES
   ============================================ */
.section-divider {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin: var(--space-16) 0 var(--space-8);
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(194,158,52,0.3), transparent);
}

.section-label-text {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--gold-500);
    white-space: nowrap;
    padding: 0 var(--space-4);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-10);
}

.card {
    background: var(--bg-card);
    border-radius: var(--r-lg);
    padding: var(--space-8);
    border: var(--border-gold);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--t-base);
}

.card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 120px; height: 120px;
    background: radial-gradient(ellipse at 100% 0%, rgba(194,158,52,0.18) 0%, transparent 70%);
    transition: var(--t-base);
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-600), transparent);
    opacity: 0;
    transition: var(--t-base);
}

.card:hover {
    background: var(--bg-overlay);
    border-color: var(--gold-400);
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
}

.card:hover::before {
    background: radial-gradient(ellipse at 100% 0%, rgba(194,158,52,0.35) 0%, transparent 65%);
}

.card:hover::after { opacity: 1; }

.card-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gold-500);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.card-label::before {
    content: '';
    width: 28px; height: 1px;
    background: var(--gold-500);
    flex-shrink: 0;
}

.card-amount {
    font-family: var(--font-display);
    font-size: 2.8rem;
    color: var(--ivory-100);
    letter-spacing: -0.01em;
    line-height: 1;
    margin-bottom: var(--space-5);
}

.card-amount.positive { color: var(--gold-300); }
.card-amount.negative { color: var(--loss-500); }

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-5);
    border-top: var(--border-gold);
    font-size: 0.78rem;
    color: var(--ivory-500);
}

.card-footer .delta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.delta.up   { color: var(--wealth-500); }
.delta.down { color: var(--loss-500); }

/* ============================================
   SECCIÓN — Servicios
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-10);
}

.service-card {
    background: var(--bg-card);
    border: var(--border-gold);
    border-radius: var(--r-lg);
    padding: var(--space-8);
    position: relative;
    overflow: hidden;
    transition: var(--t-base);
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        var(--gold-700), var(--gold-400), var(--gold-300), var(--gold-400), var(--gold-700));
    background-size: 200% 100%;
    opacity: 0.5;
    transition: var(--t-base);
}

.service-card:hover {
    border-color: var(--gold-400);
    box-shadow: var(--shadow-gold-lg);
    transform: translateY(-4px);
}

.service-card:hover::before {
    opacity: 1;
    animation: shimmer 3s linear infinite;
}

.service-icon {
    width: 60px; height: 60px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, rgba(194,158,52,0.18), rgba(194,158,52,0.04));
    border: var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
    font-size: 1.6rem;
    color: var(--gold-300);
    transition: var(--t-base);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, rgba(194,158,52,0.3), rgba(194,158,52,0.1));
    border-color: var(--gold-400);
    transform: scale(1.05);
    box-shadow: 0 0 24px rgba(194,158,52,0.25);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
    color: var(--gold-200);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--ivory-400);
    line-height: 1.7;
    margin-bottom: var(--space-6);
}

.service-card .service-link {
    font-size: 0.78rem;
    color: var(--gold-400);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    transition: var(--t-fast);
}

.service-card .service-link::after {
    content: '→';
    transition: var(--t-fast);
}

.service-card:hover .service-link::after {
    transform: translateX(4px);
}

/* ============================================
   TABLA DE IMPUESTOS
   ============================================ */
.tax-table {
    background: var(--bg-card);
    border-radius: var(--r-lg);
    border: var(--border-gold);
    overflow: hidden;
    margin-bottom: var(--space-8);
}

.tax-table-header {
    padding: var(--space-6) var(--space-8);
    border-bottom: var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.3);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.tax-table h3 {
    font-size: 1.5rem;
    color: var(--gold-200);
    margin-bottom: 0;
}

.tax-table .header-meta {
    font-size: 0.7rem;
    color: var(--gold-500);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
}

.tax-body { padding: 0 var(--space-8); }

.tax-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: var(--border-subtle);
    transition: var(--t-fast);
}

.tax-row:last-child { border-bottom: none; }

.tax-row:hover {
    background: rgba(194,158,52,0.04);
    margin: 0 calc(-1 * var(--space-8));
    padding-left: var(--space-8);
    padding-right: var(--space-8);
}

.tax-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ivory-400);
}

.tax-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ivory-200);
    font-variant-numeric: tabular-nums;
}

.tax-value.positive { color: var(--gold-300); }
.tax-value.negative { color: var(--loss-500); }

.total-row {
    background: linear-gradient(90deg, rgba(194,158,52,0.10), rgba(194,158,52,0.04));
    border-top: var(--border-gold-lg);
    padding: var(--space-6) var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-row .tax-label {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--gold-300);
    text-transform: uppercase;
}

.total-row .tax-value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    color: var(--gold-200);
    letter-spacing: 0.01em;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: none;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: var(--t-base);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
    color: var(--bg-void);
    box-shadow: 0 4px 16px rgba(194,158,52,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    box-shadow: 0 6px 24px rgba(194,158,52,0.45), inset 0 1px 0 rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--gold-300);
    border: var(--border-gold-lg);
}

.btn-secondary:hover {
    background: rgba(194,158,52,0.08);
    border-color: var(--gold-400);
    color: var(--gold-200);
}

.action-buttons {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-8);
    flex-wrap: wrap;
}

/* ============================================
   CTA — Banner final
   ============================================ */
.cta-banner {
    margin-top: var(--space-16);
    background:
        radial-gradient(ellipse at center, rgba(194,158,52,0.12) 0%, transparent 70%),
        var(--bg-raised);
    border: var(--border-gold);
    border-radius: var(--r-xl);
    padding: var(--space-16) var(--space-12);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::before,
.cta-banner::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(194,158,52,0.10), transparent 70%);
    pointer-events: none;
}

.cta-banner::before { top: -150px; left: -150px; }
.cta-banner::after  { bottom: -150px; right: -150px; }

.cta-banner h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: var(--space-5);
    background: linear-gradient(135deg, var(--gold-100), var(--gold-400));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.cta-banner p {
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto var(--space-8);
    color: var(--ivory-300);
    position: relative;
    z-index: 1;
}

.cta-banner .action-buttons {
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-void);
    padding: var(--space-12) var(--space-10) var(--space-8);
    border-top: var(--border-gold);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-10);
    margin-bottom: var(--space-10);
}

.footer-brand .logo {
    font-size: 1.7rem;
    margin-bottom: var(--space-4);
    display: block;
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--ivory-500);
    max-width: 320px;
    line-height: 1.7;
}

.footer-col h6 {
    margin-bottom: var(--space-5);
    color: var(--gold-400);
}

.footer-col ul { list-style: none; }

.footer-col li {
    padding: 6px 0;
    font-size: 0.85rem;
}

.footer-col a {
    color: var(--ivory-500);
    transition: var(--t-fast);
}

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

.footer-bottom {
    border-top: var(--border-subtle);
    padding-top: var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--ivory-600);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-bottom .signature {
    color: var(--gold-500);
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar          { width: 8px; height: 8px; }
::-webkit-scrollbar-track    { background: var(--bg-void); }
::-webkit-scrollbar-thumb    { background: var(--gold-800); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-600); }

/* ============================================
   ANIMACIONES PREMIUM — Royal Motion System
   Paleta: negros profundos + dorados royal
   ============================================ */

/* ---------- Keyframes base de entrada ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Keyframes de lujo (atmósfera dorada) ---------- */
@keyframes goldPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(194,158,52,0.45),
                    0 0 24px rgba(194,158,52,0.18);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(194,158,52,0),
                    0 0 36px rgba(194,158,52,0.32);
    }
}

@keyframes goldSheen {
    0%   { transform: translateX(-120%) skewX(-22deg); }
    100% { transform: translateX(220%)  skewX(-22deg); }
}

@keyframes goldTextShimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

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

@keyframes blink-caret {
    0%, 49%   { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ---------- Sistema de scroll reveal (utilitarias) ----------
   Uso (HTML):
     <div class="reveal reveal-up">…</div>
     <div class="reveal reveal-left" data-delay="200">…</div>
   JS sugerido (IntersectionObserver) añade .is-visible cuando entra en viewport.
*/
.reveal {
    opacity: 0;
    will-change: opacity, transform;
    transition: opacity 0.7s cubic-bezier(0.25, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.25, 0, 0.2, 1);
}

.reveal-up         { transform: translateY(30px); }
.reveal-scale      { transform: scale(0.96); }
.reveal-left       { transform: translateX(-40px); }
.reveal-right      { transform: translateX(40px); }

.reveal.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Delays escalonados (sin necesidad de JS extra) */
.reveal[data-delay="100"].is-visible { transition-delay: 0.10s; }
.reveal[data-delay="200"].is-visible { transition-delay: 0.20s; }
.reveal[data-delay="300"].is-visible { transition-delay: 0.30s; }
.reveal[data-delay="400"].is-visible { transition-delay: 0.40s; }
.reveal[data-delay="500"].is-visible { transition-delay: 0.50s; }
.reveal[data-delay="600"].is-visible { transition-delay: 0.60s; }

/* ---------- Stagger automático para grids ---------- */
.cards-grid > .card,
.services-grid > .service-card {
    animation: fadeUp 0.7s cubic-bezier(0.25, 0, 0.2, 1) both;
}

.cards-grid    > .card:nth-child(1),
.services-grid > .service-card:nth-child(1) { animation-delay: 0.05s; }
.cards-grid    > .card:nth-child(2),
.services-grid > .service-card:nth-child(2) { animation-delay: 0.15s; }
.cards-grid    > .card:nth-child(3),
.services-grid > .service-card:nth-child(3) { animation-delay: 0.25s; }
.cards-grid    > .card:nth-child(4),
.services-grid > .service-card:nth-child(4) { animation-delay: 0.35s; }
.cards-grid    > .card:nth-child(5),
.services-grid > .service-card:nth-child(5) { animation-delay: 0.45s; }
.cards-grid    > .card:nth-child(6),
.services-grid > .service-card:nth-child(6) { animation-delay: 0.55s; }

/* ---------- Header / Logo / Nav ---------- */
.header     { animation: fadeUp 0.6s cubic-bezier(0.25, 0, 0.2, 1) both; }
.logo-area  { animation: slideInLeft  0.7s cubic-bezier(0.25, 0, 0.2, 1) 0.1s both; }
.header-actions { animation: slideInRight 0.7s cubic-bezier(0.25, 0, 0.2, 1) 0.1s both; }

.logo {
    background: linear-gradient(
        90deg,
        var(--gold-500) 0%,
        var(--gold-200) 25%,
        var(--gold-50)  50%,
        var(--gold-200) 75%,
        var(--gold-500) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldTextShimmer 6s linear infinite;
}

.nav-item {
    /* línea dorada que crece en hover */
}
.nav-item::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
    transition: width 0.32s cubic-bezier(0.25, 0, 0.2, 1),
                left  0.32s cubic-bezier(0.25, 0, 0.2, 1);
}
.nav-item:hover::after {
    width: 70%;
    left: 15%;
}

/* ---------- Hero — refinamientos ---------- */
.hero {
    animation: fadeInScale 0.9s cubic-bezier(0.25, 0, 0.2, 1) 0.15s both;
}

.hero h1 {
    background-size: 200% auto;
    animation: fadeIn 0.8s 0.3s both,
               goldTextShimmer 8s linear 1.1s infinite;
}

.hero-tag::before {
    /* mejora del glow dorado pulsante existente */
    animation: goldPulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ---------- Cards (entrada + tilt sutil al hover) ---------- */
.card {
    transition: transform 0.45s cubic-bezier(0.25, 0, 0.2, 1),
                box-shadow 0.45s cubic-bezier(0.25, 0, 0.2, 1),
                border-color 0.3s ease,
                background 0.3s ease;
}

.card:hover {
    transform: translateY(-6px) scale(1.012);
}

.card-amount {
    transition: transform 0.4s cubic-bezier(0.25, 0, 0.2, 1),
                color 0.3s ease;
}

.card:hover .card-amount {
    transform: translateX(2px);
    color: var(--gold-100);
}

/* ---------- Service cards: línea superior animada ---------- */
.service-card::before {
    /* la barra dorada superior late de forma continua */
    animation: borderRotate 6s linear infinite;
}

.service-card:hover {
    transform: translateY(-6px) scale(1.01);
}

.service-card .service-link::after {
    transition: transform 0.32s cubic-bezier(0.25, 0, 0.2, 1);
}

.service-card:hover .service-link::after {
    transform: translateX(8px);
}

/* ---------- Botones: efecto "sheen" dorado al hover ---------- */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 252, 240, 0.0) 20%,
        rgba(255, 252, 240, 0.45) 50%,
        rgba(255, 252, 240, 0.0) 80%,
        transparent 100%
    );
    transform: translateX(-120%) skewX(-22deg);
    pointer-events: none;
}

.btn:hover::before {
    animation: goldSheen 0.85s cubic-bezier(0.25, 0, 0.2, 1) forwards;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn-primary:active {
    transform: translateY(0) scale(0.99);
    transition: transform 0.08s ease;
}

.btn-secondary:hover {
    transform: translateY(-1px);
}

/* ---------- Tax table: filas con entrada lateral suave ---------- */
.tax-row {
    animation: slideInLeft 0.5s cubic-bezier(0.25, 0, 0.2, 1) both;
}

.tax-row:nth-child(1) { animation-delay: 0.05s; }
.tax-row:nth-child(2) { animation-delay: 0.10s; }
.tax-row:nth-child(3) { animation-delay: 0.15s; }
.tax-row:nth-child(4) { animation-delay: 0.20s; }
.tax-row:nth-child(5) { animation-delay: 0.25s; }
.tax-row:nth-child(6) { animation-delay: 0.30s; }
.tax-row:nth-child(7) { animation-delay: 0.35s; }
.tax-row:nth-child(8) { animation-delay: 0.40s; }

.total-row {
    animation: fadeInScale 0.7s cubic-bezier(0.25, 0, 0.2, 1) 0.5s both;
    position: relative;
    overflow: hidden;
}

.total-row::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(194, 158, 52, 0.18) 50%,
        transparent 100%
    );
    animation: goldSheen 5s cubic-bezier(0.4, 0, 0.6, 1) 1s infinite;
    pointer-events: none;
}

/* ---------- CTA banner: resplandor lento, premium ---------- */
.cta-banner {
    animation: fadeInScale 0.9s cubic-bezier(0.25, 0, 0.2, 1) both;
}

.cta-banner::before { animation: floatSoft 8s ease-in-out infinite; }
.cta-banner::after  { animation: floatSoft 10s ease-in-out 1s infinite reverse; }

.cta-banner h2 {
    background-size: 200% auto;
    animation: goldTextShimmer 5s linear infinite;
}

/* ---------- Section dividers: línea que se dibuja ---------- */
.section-divider::before,
.section-divider::after {
    transform: scaleX(0);
    transform-origin: center;
    animation: drawLine 1.2s cubic-bezier(0.25, 0, 0.2, 1) 0.2s forwards;
}

@keyframes drawLine {
    to { transform: scaleX(1); }
}

/* ---------- User badge: avatar con leve flotación ---------- */
.user-avatar {
    transition: transform 0.4s cubic-bezier(0.25, 0, 0.2, 1),
                box-shadow 0.4s ease;
}

.user-badge:hover .user-avatar {
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 0 18px rgba(194, 158, 52, 0.45);
}

/* ---------- Footer: enlaces con desplazamiento dorado ---------- */
.footer-col a {
    position: relative;
    display: inline-block;
}

.footer-col a::before {
    content: '→';
    display: inline-block;
    margin-right: 0;
    width: 0;
    opacity: 0;
    color: var(--gold-400);
    transition: width 0.3s cubic-bezier(0.25, 0, 0.2, 1),
                opacity 0.3s ease,
                margin-right 0.3s cubic-bezier(0.25, 0, 0.2, 1);
}

.footer-col a:hover::before {
    width: 14px;
    opacity: 1;
    margin-right: 6px;
}

/* ============================================
   ACCESIBILIDAD — Reducir movimiento
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .content { padding: var(--space-8); }
}

@media (max-width: 768px) {
    body { padding: 12px; }

    .header {
        height: auto;
        padding: var(--space-5);
        flex-wrap: wrap;
        gap: var(--space-4);
    }

    .company-name, .logo-divider { display: none; }

    .nav-menu {
        padding: 0 var(--space-5);
        overflow-x: auto;
        scrollbar-width: none;
    }
    .nav-menu::-webkit-scrollbar { display: none; }

    .nav-item { padding: 0 var(--space-4); font-size: 0.7rem; }

    .content { padding: var(--space-6); }

    .hero { padding: var(--space-8) var(--space-6); }
    .hero-meta { gap: var(--space-2); }

    .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
    .footer-bottom { flex-direction: column; text-align: center; }

    .action-buttons { flex-direction: column; }
    .btn { width: 100%; }

    .cta-banner { padding: var(--space-10) var(--space-6); }
}
/* ---------- Responsive Tables ---------- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
