/* ═══════════════════════════════════════════════════════
   MAIN.CSS — Variables, Reset, Base, Botones, Utilidades
   WebClic Studio
   ═══════════════════════════════════════════════════════ */

/* ─── Variables ──────────────────────────────────────── */
:root {
    --red:          #E0121B;
    --red-dark:     #B50E15;
    --red-light:    #FF2530;

    --dark:         #0D0D0D;
    --dark-2:       #111111;
    --dark-3:       #1A1A1A;
    --dark-4:       #222222;
    --dark-border:  rgba(255,255,255,0.07);

    --white:        #FFFFFF;
    --gray-50:      #F8F9FA;
    --gray-100:     #F1F3F5;
    --gray-200:     #E9ECEF;
    --gray-400:     #9CA3AF;
    --gray-500:     #6B7280;
    --gray-600:     #4B5563;
    --gray-800:     #1F2937;
    --gray-900:     #111827;

    --font:         'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-sm:    6px;
    --radius-md:    10px;
    --radius-lg:    16px;
    --radius-xl:    24px;
    --radius-full:  9999px;

    --shadow-sm:    0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:    0 8px 32px rgba(0,0,0,0.14);
    --shadow-red:   0 0 30px rgba(224,18,27,0.28);

    --transition:   0.2s ease;
    --container:    1280px;
    --topbar-h:     36px;
    --nav-h:        84px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img, video {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font);
}

input, textarea, select {
    font-family: var(--font);
}

/* ─── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--dark-2); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ─── Accesibilidad ──────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─── Performance: renderizado eficiente ─────────────── */

/* Las imágenes no causan layout shift al cargar */
img { height: auto; }

/* GPU para elementos animados */
.hero__device, .web-mock, .hero__card,
.icard:hover, .service-card:hover, .sector-card:hover,
.site-card, .showcase-item__screen img {
    will-change: transform;
}

/* Smooth scroll nativo */
html { scroll-behavior: smooth; }

/* Secciones bajo el fold: renderizado diferido (ahorra CPU) */
.section, .sec, .stats-bar, .tech-strip {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* Hero siempre visible inmediatamente */
.hero, .prj-hero, .web-hero, .sys-hero, .dash-hero,
.ads-hero, .sec-hero {
    content-visibility: visible;
}

/* Font rendering suave */
body { text-rendering: optimizeSpeed; }
h1, h2, h3 { text-rendering: optimizeLegibility; }

/* ─── Utilidades ─────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
}

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

/* ─── Botones ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
    font-weight: 700;
    border-radius: var(--radius-lg);
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), box-shadow var(--transition),
                transform var(--transition);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn--primary {
    background: var(--red);
    color: var(--white);
    box-shadow: var(--shadow-red);
}
.btn--primary:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.btn--outline {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.18);
}
.btn--outline:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
}

.btn--sm  { font-size: 13px; padding: 8px 16px; }
.btn--md  { font-size: 14px; padding: 10px 20px; }
.btn--lg  { font-size: 15px; padding: 14px 28px; }
.btn--xl  { font-size: 15px; padding: 18px 32px; }

/* ─── Eyebrow (etiqueta sobre títulos) ───────────────── */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(224,18,27,0.10);
    border: 1px solid rgba(224,18,27,0.22);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--red);
}

.eyebrow__dot {
    width: 6px;
    height: 6px;
    background: var(--red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.85); }
}

/* ─── Tags (hero badges) ─────────────────────────────── */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
}
.tag i { color: var(--red); }

/* ─── Avatars ────────────────────────────────────────── */
.avatars {
    display: flex;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--red);
    border: 2px solid var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--white);
    margin-left: -8px;
}
.avatar:first-child { margin-left: 0; }

/* ─── Section base ───────────────────────────────────── */
.section {
    padding: 96px 0;
}
@media (max-width: 768px) {
    .section { padding: 64px 0; }
}

.section--light { background: var(--white); }
.section--dark  { background: var(--dark); }
.section--gray  { background: var(--gray-50); }

/* ─── Section header ─────────────────────────────────── */
.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    text-align: left;
    gap: 16px;
}

.section-header__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 12px;
}

.section-header__title {
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 900;
    line-height: 1.15;
    color: var(--gray-900);
}

.section-header--dark .section-header__title {
    color: var(--white);
}

.section-header__line {
    width: 48px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
    margin: 16px auto 0;
}

.section-header--row .section-header__line {
    margin: 16px 0 0;
}

.section-header__desc {
    margin-top: 16px;
    color: var(--gray-500);
    font-size: 17px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.section-header__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-400);
    transition: color var(--transition);
    white-space: nowrap;
    padding-bottom: 4px;
}
.section-header__link:hover { color: var(--white); }

/* ─── Navbar base (completado en layout.js / main.css) ──
   Los estilos del navbar están en css/navbar.css          */
