/* ==========================================================================
   GURÚ ROJO | Skeleton Oficial de Páginas de Estado & Error
   Identidad Visual New Branding 2027 · Autocontenido (Cero dependencias CDN)
   ========================================================================== */

@font-face {
    font-family: 'BR Candor';
    src: url('/_gururojo/assets/fonts/BRCandor-Regular-BF65519844306f6.otf') format('opentype'),
         url('/assets/fonts/BRCandor-Regular-BF65519844306f6.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('/_gururojo/assets/fonts/BRCandor-Medium-BF655198440bb69.otf') format('opentype'),
         url('/assets/fonts/BRCandor-Medium-BF655198440bb69.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('/_gururojo/assets/fonts/BRCandor-SemiBold-BF655198444222b.otf') format('opentype'),
         url('/assets/fonts/BRCandor-SemiBold-BF655198444222b.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('/_gururojo/assets/fonts/BRCandor-Bold-BF6551984434a53.otf') format('opentype'),
         url('/assets/fonts/BRCandor-Bold-BF6551984434a53.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('/_gururojo/assets/fonts/BRCandor-Black-BF655198441e922.otf') format('opentype'),
         url('/assets/fonts/BRCandor-Black-BF655198441e922.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;
    --font-brand: 'BR Candor', 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-logo: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Paleta Oficial GURÚ ROJO */
    --brand-navy: #151D2E;
    --brand-dark: #151D2E;
    --brand-card-dark: #1C263B;
    --brand-red: #D04050;
    --brand-coral: #E5564E;
    --brand-amber: #F59E0B;
    --brand-emerald: #10B981;

    /* Tokens Modo Claro (Por Defecto) */
    --bg-page: #F8FAFC;
    --bg-header: rgba(255, 255, 255, 0.88);
    --bg-card: #FFFFFF;
    --bg-subtle: #F1F5F9;
    --bg-badge: rgba(208, 64, 80, 0.10);
    --border-subtle: rgba(203, 213, 225, 0.85);
    --text-primary: #151D2E;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --hex-center: #FFFFFF;
    --hex-grid-stroke: rgba(21, 29, 46, 0.055);
    --shadow-card: 0 18px 45px -12px rgba(21, 29, 46, 0.10), 0 4px 12px -2px rgba(21, 29, 46, 0.04);
    --shadow-glow-red: 0 0 25px -2px rgba(208, 64, 80, 0.45);
    --shadow-glow-coral: 0 0 30px -2px rgba(229, 86, 78, 0.40);

    scrollbar-width: thin;
    scrollbar-color: #D04050 #E2E8F0;
}

:root.dark {
    color-scheme: dark;
    --bg-page: #151D2E;
    --bg-header: rgba(21, 29, 46, 0.88);
    --bg-card: #1C263B;
    --bg-subtle: rgba(15, 23, 42, 0.72);
    --bg-badge: rgba(208, 64, 80, 0.18);
    --border-subtle: rgba(51, 65, 85, 0.75);
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --hex-center: #151D2E;
    --hex-grid-stroke: rgba(255, 255, 255, 0.045);
    --shadow-card: 0 22px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03);
    scrollbar-color: #D04050 #151D2E;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-brand);
    background-color: var(--bg-page);
    color: var(--text-primary);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.2s ease, color 0.2s ease;
}

::selection {
    background-color: var(--brand-red);
    color: #FFFFFF;
}

/* Fondo Ambiental Hexagonal + Aura de Marca */
.gr-bg-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.gr-bg-layer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 98' fill='none' stroke='%23D04050' stroke-opacity='0.065' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 56px 98px;
}

.gr-bg-layer::after {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: min(920px, 120vw);
    height: 440px;
    background: radial-gradient(ellipse at center, rgba(208, 64, 80, 0.14) 0%, rgba(229, 86, 78, 0.06) 45%, transparent 72%);
}

/* ==========================================================================
   HEADER OFICIAL GURÚ ROJO
   ========================================================================== */
.gr-header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.gr-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gr-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    user-select: none;
    font-family: var(--font-logo);
    font-weight: 700;
    font-size: clamp(1.45rem, 2.5vw, 1.95rem);
    letter-spacing: -0.025em;
    line-height: 1;
}

.gr-logo-dark {
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.gr-logo-red {
    color: var(--brand-red);
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
}

.gr-logo-hex {
    width: 1.05em;
    height: 1.05em;
    margin: 0 0.08em;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.gr-logo:hover .gr-logo-hex {
    transform: rotate(180deg);
}

.gr-logo-hex-center {
    fill: var(--hex-center);
    transition: fill 0.2s ease;
}

.gr-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.gr-theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-subtle);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.gr-theme-btn:hover {
    border-color: var(--brand-red);
    color: var(--brand-red);
}

.gr-theme-btn:active {
    transform: scale(0.95);
}

.gr-theme-btn svg {
    width: 19px;
    height: 19px;
}

.gr-icon-sun { display: none; }
.gr-icon-moon { display: block; }
:root.dark .gr-icon-sun { display: block; color: #FBBF24; }
:root.dark .gr-icon-moon { display: none; }

.gr-portal-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.gr-portal-pill:hover {
    background: rgba(16, 185, 129, 0.20);
    transform: translateY(-1px);
}

.gr-dot-live {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: var(--brand-emerald);
    flex-shrink: 0;
}

.gr-dot-live::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 9999px;
    background: var(--brand-emerald);
    opacity: 0.45;
    animation: grPulse 1.8s ease-out infinite;
}

.gr-nav-home {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.95rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-red);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.gr-nav-home:hover {
    background: var(--bg-badge);
    color: var(--brand-coral);
}

/* ==========================================================================
   CONTENIDO PRINCIPAL & TARJETA DE ESTADO
   ========================================================================== */
.gr-main {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem) 1.25rem;
}

.gr-card {
    width: 100%;
    max-width: 680px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 28px;
    padding: clamp(1.75rem, 4.5vw, 3rem);
    box-shadow: var(--shadow-card);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gr-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D04050 0%, #E5564E 45%, #F59E0B 100%);
}

/* Hexágono Animado + Código HTTP */
.gr-status-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 112px;
    height: 112px;
    margin-bottom: 1.25rem;
}

.gr-status-emblem svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 18px rgba(208, 64, 80, 0.35));
}

.gr-code-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-logo);
    font-weight: 900;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.gr-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.9rem;
    border-radius: 9999px;
    background: var(--bg-badge);
    border: 1px solid rgba(208, 64, 80, 0.25);
    color: var(--brand-red);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

.gr-category-pill.is-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #D97706;
}

:root.dark .gr-category-pill.is-warning {
    color: #FBBF24;
}

.gr-category-pill.is-info {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #059669;
}

:root.dark .gr-category-pill.is-info {
    color: #34D399;
}

.gr-title {
    font-size: clamp(1.75rem, 4.2vw, 2.65rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 0.9rem;
}

.gr-title-accent {
    background: linear-gradient(135deg, #D04050 0%, #E5564E 45%, #F59E0B 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gr-description {
    font-size: clamp(0.95rem, 1.8vw, 1.06rem);
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 1.65rem;
}

/* Bloque de Diagnóstico Técnico */
.gr-diagnostics {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 0.95rem 1.15rem;
    margin-bottom: 1.75rem;
    text-align: left;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 0.75rem 1rem;
    font-size: 0.78rem;
}

.gr-diag-item {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.gr-diag-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.gr-diag-value {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Botones de Acción */
.gr-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.gr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.55rem;
    border-radius: 14px;
    font-family: var(--font-brand);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.gr-btn:hover {
    transform: translateY(-2px);
}

.gr-btn:active {
    transform: scale(0.98);
}

.gr-btn-primary {
    color: #FFFFFF;
    background: linear-gradient(135deg, #D04050 0%, #E5564E 60%, #EA580C 100%);
    box-shadow: var(--shadow-glow-red);
}

.gr-btn-primary:hover {
    box-shadow: var(--shadow-glow-coral);
}

.gr-btn-secondary {
    color: var(--text-primary);
    background: var(--bg-subtle);
    border-color: var(--border-subtle);
}

.gr-btn-secondary:hover {
    border-color: var(--brand-red);
    color: var(--brand-red);
}

.gr-btn-whatsapp {
    color: #FFFFFF;
    background: #25D366;
    box-shadow: 0 8px 20px -6px rgba(37, 211, 102, 0.45);
}

.gr-btn-whatsapp:hover {
    background: #1EBE5B;
}

/* Barra de Ayuda Rápida & Tarjeta VPS GURÚ ROJO */
.gr-help-bar {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gr-help-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.gr-help-link:hover {
    color: var(--brand-red);
}

.gr-vps-box {
    margin-top: 0.25rem;
    padding: 1rem 1.15rem;
    border-radius: 18px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.gr-vps-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.gr-vps-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.gr-vps-host-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.gr-vps-copy {
    font-size: 0.79rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.gr-vps-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 0.55rem;
}

.gr-vps-chip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 700;
    transition: border-color 0.18s ease, transform 0.15s ease, color 0.18s ease;
}

.gr-vps-chip:hover {
    border-color: var(--brand-red);
    color: var(--brand-red);
    transform: translateY(-1px);
}

.gr-vps-chip-sub {
    display: block;
    font-size: 0.67rem;
    font-weight: 600;
    color: var(--text-muted);
}

.gr-vps-chip-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    background: var(--bg-badge);
    color: var(--brand-red);
}

.gr-vps-chip.is-wa .gr-vps-chip-icon {
    background: rgba(37, 211, 102, 0.14);
    color: #16A34A;
}

:root.dark .gr-vps-chip.is-wa .gr-vps-chip-icon {
    color: #4ADE80;
}

/* ==========================================================================
   ÍNDICE DEL SKELETON (GRID DE VISUALIZACIÓN)
   ========================================================================== */
.gr-hub {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.gr-hub-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2.5rem;
}

.gr-hub-section {
    margin-bottom: 2.5rem;
}

.gr-hub-section-title {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--brand-red);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.gr-hub-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.gr-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 1rem;
}

.gr-hub-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 0 6px 20px -10px rgba(21, 29, 46, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.gr-hub-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-red);
    box-shadow: 0 14px 28px -12px rgba(208, 64, 80, 0.24);
}

.gr-hub-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.gr-hub-code {
    font-family: var(--font-logo);
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--brand-red);
}

.gr-hub-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.22rem 0.55rem;
    border-radius: 9999px;
    background: var(--bg-subtle);
    color: var(--text-muted);
}

.gr-hub-name {
    font-size: 0.98rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.gr-hub-desc {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.gr-hub-path {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================================
   FOOTER OFICIAL #151D2E
   ========================================================================== */
.gr-footer {
    position: relative;
    z-index: 10;
    background-color: #151D2E;
    border-top: 1px solid #1E293B;
    color: #94A3B8;
    padding: 1.75rem 1.25rem;
}

.gr-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.78rem;
}

.gr-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gr-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.15rem;
}

.gr-footer-links a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.gr-footer-links a:hover {
    color: #E5564E;
}

/* ==========================================================================
   ANIMACIONES DE ARISTAS DEL HEXÁGONO (DE main.css)
   ========================================================================== */
@keyframes facetFade {
    0% { opacity: 0.35; transform: scale(0.94); }
    40% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.45; transform: scale(0.96); }
}

@keyframes grPulse {
    0% { transform: scale(1); opacity: 0.55; }
    100% { transform: scale(2.1); opacity: 0; }
}

.facet-0 { transform-origin: center; animation: facetFade 2.6s infinite ease-in-out 0.0s; }
.facet-1 { transform-origin: center; animation: facetFade 2.6s infinite ease-in-out 0.2s; }
.facet-2 { transform-origin: center; animation: facetFade 2.6s infinite ease-in-out 0.4s; }
.facet-3 { transform-origin: center; animation: facetFade 2.6s infinite ease-in-out 0.6s; }
.facet-4 { transform-origin: center; animation: facetFade 2.6s infinite ease-in-out 0.8s; }
.facet-5 { transform-origin: center; animation: facetFade 2.6s infinite ease-in-out 1.0s; }

@media (max-width: 640px) {
    .gr-portal-pill span:last-child {
        display: none;
    }
    .gr-actions .gr-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .facet-0, .facet-1, .facet-2, .facet-3, .facet-4, .facet-5,
    .gr-dot-live::after {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
