/* ============================================================
   shared.css — Estilos comunes a index.html y portfolio.html
   BauViTech · Software & Solutions
   ============================================================ */

/* ── GOOGLE FONTS ─────────────────────────────────────────────
   Importar en cada HTML:
   <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Bricolage+Grotesque:wght@700;800&display=swap" rel="stylesheet">
   ──────────────────────────────────────────────────────────── */

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

/* ── VARIABLES — TEMA OSCURO (default, index) ───────────────── */
:root {
    /* Brand colors */
    --cyan:   #06b6d4;
    --blue:   #2563eb;
    --indigo: #4f46e5;
    --violet: #7c3aed;

    /* Gradientes */
    --grad:      linear-gradient(135deg, var(--cyan), var(--blue), var(--indigo));
    --grad-text: linear-gradient(120deg, #38bdf8 0%, #6366f1 50%, #a78bfa 100%);

    /* Tema oscuro (usado en index.html y dark mode del portfolio) */
    --bg:         #080b12;
    --bg2:        #0e1320;
    --surface:    #141a28;
    --surface2:   #1c2438;
    --border:     #1f2d44;
    --border2:    #253248;
    --text:       #e8edf5;
    --text-muted: #7a8ba8;
    --text-dim:   #dedfe0;
    --nav-bg:     rgba(8,11,18,0.88);
}

/* ── VARIABLES — TEMA CLARO (portfolio light mode) ──────────── */
html.light {
    --bg:         #f8f7f4;
    --bg2:        #ffffff;
    --surface:    #ffffff;
    --surface2:   #f1f0fb;
    --border:     #e2e0db;
    --border2:    #ccc9f5;
    --text:       #111111;
    --text-muted: #666666;
    --text-dim:   #3d3d3d;
    --nav-bg:     rgba(248,247,244,0.88);
    --indigo:     #4f46e5;
    --blue:       #2563eb;
    --grad-text:  linear-gradient(120deg, #4f46e5 0%, #7c3aed 60%, #ec4899 100%);
}

/* ── BASE ───────────────────────────────────────────────────── */
body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
    font-family: 'Bricolage Grotesque', sans-serif;
    line-height: 1.1;
}

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

/* ── GRADIENT TEXT ──────────────────────────────────────────── */
.grad-text {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── NAV ─────────────────────────────────────────────────────── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s, border-color 0.3s;
}

.nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 28px; height: 66px;
    display: flex; align-items: center; justify-content: space-between;
}

/* Logo */
.logo, .logo-container {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none;
}

.logo-hex {
    width: 36px; height: 36px; flex-shrink: 0;
    background: var(--grad);
    clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
    display: flex; align-items: center; justify-content: center;
}

.logo-hex span {
    color: #fff; font-size: 17px; font-weight: 800;
    font-family: 'Bricolage Grotesque', sans-serif;
}

.logo-text { line-height: 1.1; }

.logo-name {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 18px; font-weight: 700;
    color: var(--text); letter-spacing: .3px;
}

.logo-name .vi { color: var(--blue); }
.logo-sub { font-size: 9px; color: var(--text-dim); letter-spacing: 2.5px; text-transform: uppercase; }

/* Nav links */
.nav-links {
    display: flex; align-items: center; gap: 24px;
}

.nav-links a {
    font-size: 13.5px; font-weight: 500;
    color: var(--text-muted);
    transition: color .2s;
}

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

.nav-cta {
    background: var(--indigo) !important;
    color: #fff !important;
    padding: 8px 18px; border-radius: 8px;
    font-weight: 600 !important; font-size: 13px !important;
    transition: background .2s !important;
}

.nav-cta:hover { background: #4338ca !important; }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: 1px solid var(--border);
    border-radius: 8px; padding: 9px 10px; cursor: pointer;
}

.hamburger span {
    display: block; width: 18px; height: 2px;
    background: var(--text-muted); border-radius: 2px;
    transition: background .2s;
}

/* Nav controls (theme + lang) */
.nav-controls {
    display: flex; align-items: center; gap: 8px;
}

.ctrl-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-muted); font-size: 15px;
    transition: border-color .2s, color .2s, background .2s;
}

.ctrl-btn:hover { border-color: var(--indigo); color: var(--text); }
.ctrl-btn.active { background: var(--indigo); border-color: var(--indigo); color: #fff; }

.lang-pill {
    display: flex; align-items: center;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; overflow: hidden;
}

.lang-pill button {
    padding: 6px 11px; font-size: 12px; font-weight: 700;
    color: var(--text-muted); background: none; border: none; cursor: pointer;
    transition: background .2s, color .2s;
    font-family: 'Outfit', sans-serif;
}

.lang-pill button.active {
    background: var(--indigo); color: #fff;
}

.lang-pill button:hover:not(.active) { color: var(--text); }

/* Mobile menu */
.mobile-menu {
    display: none; flex-direction: column;
    background: var(--bg2); border-bottom: 1px solid var(--border);
    position: fixed; top: 66px; left: 0; right: 0; z-index: 99;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
    padding: 14px 28px; font-size: 15px; font-weight: 500;
    color: var(--text-muted); border-bottom: 1px solid var(--border);
    transition: color .2s;
}

.mobile-menu a:hover { color: var(--text); }

.mobile-menu-controls {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 28px; border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
    background: var(--indigo); color: #fff;
    padding: 13px 30px; border-radius: 10px;
    font-weight: 700; font-size: 15px;
    font-family: 'Outfit', sans-serif;
    display: inline-flex; align-items: center; gap: 8px;
    transition: background .2s, transform .2s, box-shadow .2s;
    border: none; cursor: pointer;
}

.btn-primary:hover {
    background: #4338ca; transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(79,70,229,.35);
}

.btn-outline {
    border: 1px solid var(--border2); color: var(--text-muted);
    padding: 13px 30px; border-radius: 10px;
    font-weight: 600; font-size: 15px;
    font-family: 'Outfit', sans-serif;
    display: inline-flex; align-items: center; gap: 8px;
    transition: border-color .2s, color .2s, transform .2s;
    background: none; cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--indigo); color: var(--text);
    transform: translateY(-2px);
}

/* ── SECTION BASE ────────────────────────────────────────────── */
.section { padding: 96px 28px; }
.section-alt { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.container { max-width: 1200px; margin: 0 auto; }

.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
    text-transform: uppercase; color: var(--blue); margin-bottom: 16px;
}

.section-label::before {
    content: ''; display: block;
    width: 20px; height: 1px; background: var(--blue);
}

.section-title {
    font-size: clamp(28px, 4vw, 44px); font-weight: 800;
    color: var(--text); margin-bottom: 16px;
}

.section-sub {
    font-size: 16px; color: var(--text-muted);
    max-width: 540px; line-height: 1.7;
}

/* ── DIVIDER ─────────────────────────────────────────────────── */
.divider {
    width: 40px; height: 2px;
    background: var(--grad); border-radius: 2px;
    margin: 16px 0 20px;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
    background: var(--bg2); border-top: 1px solid var(--border);
    padding: 48px 28px 32px;
}

.footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
}

.footer-desc {
    font-size: 13.5px; color: var(--text-muted);
    line-height: 1.7; margin-top: 14px; max-width: 300px;
}

.footer-col-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 13px; font-weight: 700; color: var(--text);
    letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 16px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
    font-size: 13.5px; color: var(--text-muted); transition: color .2s;
}

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

.footer-bottom {
    max-width: 1200px; margin: 40px auto 0;
    padding-top: 24px; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: var(--text-dim); flex-wrap: wrap; gap: 8px;
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.3)} }
@keyframes fadeUp { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:translateY(0); } }

.fade-up { opacity: 0; animation: fadeUp .6s ease-out forwards; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .45s; }

/* ── RESPONSIVE SHARED ───────────────────────────────────────── */
@media (max-width: 768px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .section { padding: 64px 20px; }
}

@media (max-width: 480px) {
    .footer-inner { grid-template-columns: 1fr; }
}
