/* ============================================================
   E&B Soluciones y Servicios, R.S. - Hoja de estilos
   Paleta: Azul petróleo profundo + Naranja corporativo
   ============================================================ */

:root {
    --navy-900: #0a1526;
    --navy-800: #0d1b2e;
    --navy-700: #12233b;
    --navy-600: #1b3357;
    --orange:   #e8622a;
    --orange-light: #ff7a3d;
    --gray-50:  #f7f8fa;
    --gray-100: #eef1f5;
    --gray-200: #dde3ea;
    --gray-400: #9aa6b4;
    --gray-600: #5a6672;
    --gray-800: #2a3441;
    --white:    #ffffff;
    --shadow-sm: 0 2px 8px rgba(10, 21, 38, 0.08);
    --shadow-md: 0 10px 30px rgba(10, 21, 38, 0.12);
    --shadow-lg: 0 20px 50px rgba(10, 21, 38, 0.18);
    --radius: 14px;
    --maxw: 1160px;
    --font-head: 'Barlow Condensed', 'Inter', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    line-height: 1.65;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 24px;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .3px;
    padding: 13px 26px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    white-space: nowrap;
}
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-light); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(232,98,42,.35); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; transform: translateY(-2px); }
.btn--whatsapp { background: #25d366; color: #fff; margin-top: 8px; }
.btn--whatsapp:hover { background: #1ebe5a; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,211,102,.35); }
.btn--block { width: 100%; }

/* ---------- Header / Navbar ---------- */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: rgba(10, 21, 38, .92);
    backdrop-filter: blur(10px);
    transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.header.scrolled { background: rgba(10, 21, 38, .98); box-shadow: var(--shadow-md); }
.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { display: block; width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #0f1f36; padding: 3px; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text strong { font-family: var(--font-head); font-size: 1.5rem; color: #fff; letter-spacing: 1px; }
.brand__text small { font-size: .58rem; color: var(--orange); letter-spacing: 2px; margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav__list { display: flex; gap: 28px; }
.nav__link {
    color: #d5dce5;
    font-weight: 500;
    font-size: .95rem;
    position: relative;
    padding: 4px 0;
    transition: color .2s ease;
}
.nav__link::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 0; height: 2px;
    background: var(--orange);
    transition: width .25s ease;
}
.nav__link:hover, .nav__link.active { color: #fff; }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav__toggle span {
    width: 26px; height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: transform .3s ease, opacity .3s ease;
}
.nav__toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 60px;
    background:
        linear-gradient(135deg, rgba(10,21,38,.94) 0%, rgba(18,35,59,.88) 55%, rgba(27,51,87,.82) 100%),
        radial-gradient(circle at 80% 20%, rgba(232,98,42,.25), transparent 45%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 0h60v60H0z' fill='%230d1b2e'/%3E%3Cpath d='M0 0h1v60H0zM0 0h60v1H0z' fill='%2314263f'/%3E%3C/svg%3E");
    background-size: cover, cover, 60px 60px;
    color: #fff;
}
.hero__content { position: relative; z-index: 2; max-width: 860px; }
.hero__badge {
    display: inline-block;
    font-size: .72rem;
    letter-spacing: 3px;
    font-weight: 600;
    color: var(--orange);
    border: 1px solid rgba(232,98,42,.5);
    border-radius: 30px;
    padding: 7px 18px;
    margin-bottom: 26px;
}
.hero__title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 22px;
}
.hero__title .highlight { color: var(--orange); display: block; }
.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #c6d0dc;
    max-width: 680px;
    margin-bottom: 34px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 60px; }

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 48px;
    padding-top: 34px;
    border-top: 1px solid rgba(255,255,255,.15);
    max-width: 720px;
}
.stat__num {
    display: block;
    font-family: var(--font-head);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--orange);
    line-height: 1;
}
.stat__label { font-size: .78rem; letter-spacing: 1px; text-transform: uppercase; color: var(--gray-400); margin-top: 8px; display: block; }

/* ---------- Secciones ---------- */
.section { padding: 92px 0; }
.section--alt { background: var(--gray-50); }
.section--dark { background: var(--navy-800); color: #fff; }

.section__head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.eyebrow {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 12px;
}
.section__title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--navy-800);
    line-height: 1.1;
    margin-bottom: 16px;
}
.section--dark .section__title, .section__head--light .section__title { color: #fff; }
.section__desc { color: var(--gray-600); font-size: 1.05rem; }
.section--dark .section__desc { color: #b8c3d1; }

/* ---------- Misión / Visión ---------- */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.mv-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 38px 34px;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
}
.mv-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.mv-card__bar { width: 48px; height: 4px; background: var(--orange); border-radius: 3px; margin-bottom: 18px; }
.mv-card__title {
    font-family: var(--font-head);
    font-size: 1.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--navy-800);
    margin-bottom: 14px;
}
.mv-card p { color: var(--gray-600); }

.siho {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
    color: #fff;
    border-radius: var(--radius);
    padding: 30px 34px;
    border-left: 5px solid var(--orange);
}
.siho__icon { font-size: 2rem; line-height: 1; }
.siho h4 { font-size: 1.15rem; margin-bottom: 8px; color: var(--orange-light); }
.siho p { color: #c6d0dc; font-size: .98rem; }

/* ---------- Portafolio ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.pcard {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    padding: 40px 34px 34px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.pcard::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
.pcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pcard:hover::before { transform: scaleX(1); }
.pcard__num {
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray-100);
    line-height: 1;
    position: absolute;
    top: 20px; right: 24px;
}
.pcard__title {
    font-family: var(--font-head);
    font-size: 1.45rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--navy-800);
    margin-bottom: 12px;
    max-width: 85%;
}
.pcard p { color: var(--gray-600); font-size: .97rem; }

/* ---------- Timeline / Experiencia ---------- */
.timeline { max-width: 820px; margin: 0 auto; position: relative; padding-left: 28px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 6px; bottom: 6px;
    width: 2px;
    background: var(--gray-200);
}
.tl-item { position: relative; padding: 0 0 34px 34px; }
.tl-item::before {
    content: '';
    position: absolute;
    left: -28px; top: 4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--orange);
}
.tl-item--featured::before { background: var(--orange); box-shadow: 0 0 0 5px rgba(232,98,42,.2); }
.tl-date {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--orange);
    margin-bottom: 6px;
    letter-spacing: 1px;
}
.tl-body h3 { font-size: 1.15rem; color: var(--navy-800); margin-bottom: 6px; }
.tl-body p { color: var(--gray-600); font-size: .95rem; }
.tl-item--featured .tl-body {
    background: var(--gray-50);
    border-left: 4px solid var(--orange);
    border-radius: 10px;
    padding: 18px 22px;
}

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; align-items: start; }

.cinfo { margin-bottom: 24px; }
.cinfo h4 { color: var(--orange-light); font-size: .8rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.cinfo p { color: #d5dce5; font-size: 1rem; }
.cinfo a { color: #d5dce5; transition: color .2s ease; }
.cinfo a:hover { color: var(--orange-light); }

.contact-form {
    background: #fff;
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 18px; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--gray-800); margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--gray-800);
    background: var(--gray-50);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--orange);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232,98,42,.12);
}
.field textarea { resize: vertical; }
.field input.invalid, .field textarea.invalid { border-color: #e03131; background: #fff5f5; }
.field__error { display: block; color: #e03131; font-size: .78rem; margin-top: 4px; min-height: 1em; }
.hidden-field { position: absolute; left: -9999px; visibility: hidden; height: 0; overflow: hidden; }
.form__status { margin-top: 14px; font-size: .92rem; font-weight: 600; text-align: center; }
.form__status.success { color: #2b8a3e; }
.form__status.error { color: #e03131; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: #c6d0dc; padding-top: 50px; }
.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand > div { display: flex; flex-direction: column; gap: 4px; }
.footer__logo { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; background: #12233b; padding: 4px; }
.footer__brand strong { color: #fff; font-family: var(--font-head); font-size: 1.2rem; letter-spacing: 1px; }
.footer__brand span { font-size: .85rem; color: var(--gray-400); }
.footer__nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__nav a { font-size: .92rem; transition: color .2s ease; }
.footer__nav a:hover { color: var(--orange-light); }
.footer__bottom { text-align: center; padding: 20px 0; font-size: .85rem; color: var(--gray-400); }

/* ---------- Botones flotantes ---------- */
.whatsapp-float {
    position: fixed;
    right: 22px; bottom: 22px;
    width: 56px; height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37,211,102,.45);
    z-index: 900;
    transition: transform .25s ease;
    animation: pulse 2.4s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); }
@keyframes pulse {
    0% { box-shadow: 0 6px 20px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5); }
    70% { box-shadow: 0 6px 20px rgba(37,211,102,.45), 0 0 0 14px rgba(37,211,102,0); }
    100% { box-shadow: 0 6px 20px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,0); }
}

.to-top {
    position: fixed;
    right: 24px; bottom: 88px;
    width: 46px; height: 46px;
    border: none;
    border-radius: 50%;
    background: var(--navy-700);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .3s ease, transform .3s ease, background .2s ease;
    z-index: 900;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--orange); }

/* ---------- Animaciones al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .mv-grid, .portfolio-grid, .contact-grid { grid-template-columns: 1fr; }
    .hero__stats { gap: 30px; }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        inset: 72px 0 auto 0;
        flex-direction: column;
        gap: 0;
        background: var(--navy-800);
        padding: 20px 24px 30px;
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        transition: transform .35s ease;
        border-top: 1px solid rgba(255,255,255,.08);
    }
    .nav.open { transform: translateY(0); }
    .nav__list { flex-direction: column; gap: 0; width: 100%; }
    .nav__list li { border-bottom: 1px solid rgba(255,255,255,.06); }
    .nav__link { display: block; padding: 14px 0; }
    .nav__cta { margin-top: 16px; width: 100%; }
    .nav__toggle { display: flex; }

    .hero { min-height: auto; padding: 110px 0 70px; }
    .hero__stats { grid-template-columns: 1fr; gap: 22px; }
    .stat { display: flex; align-items: baseline; gap: 14px; }
    .stat__label { margin-top: 0; }

    .section { padding: 64px 0; }
    .field--row { grid-template-columns: 1fr; }
    .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
    .container { padding-inline: 18px; }
    .contact-form { padding: 24px; }
    .brand__text small { font-size: .5rem; }
}

/* Respeta preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
