
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    scrollbar-color: #fff #121212;
}

body {
    background-color: #121212;
    font-family: 'Poppins', sans-serif;
}

/* ---------------- Hero ---------------- */
.hero {
    position: relative;
    padding: 5rem 2rem 4rem;
}

.hero__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 1fr; /* dos columnas por defecto (grandes) */
    gap: 2.5rem;
    align-items: center;
}

.hero__title {
    font-family: 'Rosario', 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 3vw, 2.7rem);
    line-height: 1.15;
    color: #fff;
    letter-spacing: 0.2px;
}

.hero__title span {
    color: #2ab7ca;
}

.hero__subtitle {
    margin-top: 1rem;
    color: #dcdcdc;
    font-size: clamp(1.7rem, 1.3vw, 1.05rem);
}

.hero__subtitle span { color: #2ab7ca; }

.hero__cta { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 0.85rem 1.3rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.btn--primary {
    background: #2ab7ca;
    color: #0b0b0b;
    box-shadow: none;
    border: none;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.btn--ghost {
    border: none;
    color: #2ab7ca;
    box-shadow: none;
    border: 2px solid #2ab7ca;
}

.btn--ghost:hover {
    background: #2ab7ca;
    color: #0b0b0b;
    box-shadow: none;
}

.hero__visual {
    position: relative;
    height: min(60vh, 520px);
    min-height: 320px;
    border-radius: 16px;
    overflow: hidden;
    background: #121212;
    outline: none;
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.header {
    width: 100%;
    background: transparent;
    position: relative;
    z-index: 100;
}

.header__container {
    max-width: 1300px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 2rem;
}

.header__logo img {
    height: 48px;
    width: auto;
    display: block;
}

.header__nav {
    display: flex;
}

.header__menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header__link {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    transition: color 0.2s;
    padding: 0.3rem 0;
}

.header__link:hover,
.header__link.active {
    color: #2ab7ca;
}

.header__link::after {
    content: '';
    display: block;
    height: 3px;
    width: 0;
    background: #2ab7ca;
    border-radius: 2px;
    transition: width 0.2s;
    margin-top: 4px;
}

.header__link:hover::after,
.header__link.active::after {
    width: 100%;
}

.header__menu-btn {
    display: none;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0.3rem;
}

.header__menu-btn img {
    width: 40px;
    height: 27px;
}

/* Bloquear scroll cuando el menú móvil está abierto */
body.menu-open { overflow: hidden; }

/* Compensación del header fijo al navegar por anclas */
section[id],
.reveal[id],
[id^="proyectos"],
[id^="servicios"],
[id^="sobre-nosotros"],
[id^="contacto"],
[id^="inicio"] {
    scroll-margin-top: var(--scroll-mt, 88px);
}

/* Suavizado de scroll global */
html { scroll-behavior: smooth; }

/* Garantiza que los contenedores se puedan enfocar cuando llegamos por ancla */
section:focus { outline: none; }

/* Mejoras de enfoque visibles para accesibilidad en enlaces del menú */
.header__link:focus-visible,
.footer__links a:focus-visible {
    outline: 2px solid #2ab7ca;
    outline-offset: 3px;
    border-radius: 4px;
}

@media (max-width: 850px) {
    .header__container {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 0.7rem 1rem;
    }
    .header__logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 201;
    }
    .header__logo img {
        height: 40px;
        width: auto;
        display: block;
    }
    .header__nav {
        display: none;
    }
    .header__menu-btn {
        display: block;
        position: absolute;
        left: 1rem;
        z-index: 202;
    }

    /* Drawer del menú usando el propio nav y un overlay por box-shadow */
    .header.header--open .header__nav {
        display: block;
        position: fixed;
        top: 0; left: 0; height: 100vh; width: 80%; max-width: 360px;
        background: #121212;
        z-index: 200;
        padding-top: 5rem;
        box-shadow: 0 0 0 9999px rgba(0,0,0,0.45);
        transform: translateX(0);
        animation: slideIn .28s ease both;
    }
    @keyframes slideIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
    .header__menu { flex-direction: column; gap: 1.5rem; margin-left: 2rem; }
    .header__link { font-size: 1.1rem; }
}
@media (max-width: 1024px) {
    .hero { padding: 4rem 1.5rem 3rem; }
    .hero__inner { grid-template-columns: 1fr; }
    .hero__visual { order: 2; height: min(52vh, 460px); }
    .hero__text { order: 1; }
}

@media (max-width: 850px) {
    .hero { padding-top: 4rem; }
    .hero__cta {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start;
        align-items: center;
        gap: 0.7rem;
    }
    .hero__cta .btn {
        min-width: 0;
        width: auto;
        flex: 0 1 auto;
        white-space: nowrap;
    }
    .hero__title { font-size: clamp(2.2rem, 3vw, 2.2rem); }
    .hero__subtitle { font-size: clamp(1.5rem, 1.3vw, 1.05rem); }
}
@media (max-width: 1024px) { .hero__visual { display: none; } }

/* ---------------- Services ---------------- */
.services {
    padding: 2rem 2rem 4.5rem;
}

.services__inner { max-width: 1200px; margin: 0 auto; }


.section-title {
        text-align: center;
        color: #fff;
        font-family: 'Poppins', sans-serif;
        font-weight: 700;
        font-size: clamp(2.5rem, 2.4vw, 2.2rem);
        margin-bottom: 3rem;
}


.section-title span { color: #2ab7ca; }

.services__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
}

.services__contact {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.services__btn {
    margin-top: 30px;
    font-size: 1.1rem;
    padding: 1rem 2.2rem;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 6px 24px rgba(42,183,202,0.13);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.services__btn:hover {
    background: #1896a8;
    color: #fff;
    box-shadow: 0 10px 32px rgba(42,183,202,0.18);
}

@media (max-width: 1200px) {
    .services__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 750px) {
    .services__grid { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
    .section-title {
        font-size: clamp(1.9rem, 4vw, 1.7rem);
    }
}

/* ---------------- About ---------------- */
.about { padding: 3rem 2rem 4rem; }
.about__inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 2.2rem; align-items: center; }
.about__visual { background: #121212; border-radius: 14px; overflow: hidden; position: relative; }
.about__svg { display: block; width: 100%; height: auto; }
.about__content { color: #dcdcdc; }
.about__title { color: #fff; font-family: 'Poppins', system-ui; font-weight: 700; font-size: clamp(2.5rem, 2.4vw, 2.2rem); margin-bottom: 0.8rem; }
.about__title span { color: #2ab7ca; }
.about__lead { font-size: 1.4rem; color: #cfd8da; margin-bottom: 2.5rem; }
.about__bullets { list-style: none; display: grid; gap: 0.55rem; }
.about__bullets li { position: relative; padding-left: 1.2rem; font-size: 1.17rem; }
.about__bullets li::before { content: '•'; color: #2ab7ca; position: absolute; left: 0; top: 0; }


/* Línea de acento animada SIEMPRE (todas las resoluciones) */
.about__svg .wire--accent { stroke-dasharray: 8 260; animation: flow 3.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -268; } }

/* Reveal genérico reutilizable */
.reveal[data-animate] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.plan {
    background: #151515;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(14px);
    opacity: 0;
    transition: transform .5s ease, opacity .5s ease, box-shadow .25s ease, border-color .25s ease;
}

.plan__cta {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
}

.plan[data-animate].is-visible { transform: translateY(0); opacity: 1; }

.plan:hover {
    border-color: rgba(42,183,202,0.35);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.plan--accent {
    background: #101618;
    border-color: rgba(42,183,202,0.35);
}

.plan__header { display: grid; gap: .2rem; }
.plan__title { color: #fff; font-weight: 700; font-size: 1.15rem; }
.plan__subtitle { color: #b9c4c6; font-size: .95rem; }

.plan__features { list-style: none; display: grid; gap: .55rem; }
.plan__features li { color: #d7d7d7; font-size: .95rem; position: relative; padding-left: 1.3rem; }
.plan__features li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 0.05rem;
    color: #2ab7ca;
    font-size: .95rem;
}

.plan__cta { margin-top: .4rem; }

/* Layout adaptativo para medianas/pequeñas: texto arriba, visual abajo */
@media (max-width: 1024px) {
    .about { padding: 2.5rem 1.5rem 3.2rem; }
    .about__inner { grid-template-columns: 1fr; }
    .about__content { order: 1; }
    .about__visual { order: 2; margin-top: -30px; }
}
@media (max-width: 850px) {
    .about__title {
        font-size: clamp(1.9rem, 4vw, 1.7rem);
        margin-top: -30px;
        margin-bottom: 1.5rem;
    }
    .about__lead {
        font-size: 1.3rem;
    }
    .about__bullets li {
        font-size: 1.15rem;
    }
}

/* Líneas SVG más gruesas en resoluciones medianas y pequeñas */
@media (max-width: 850px) {
    .about__svg .wire { stroke-width: 7px !important; }
    .about__svg .wire--accent { stroke-width: 7px !important; }
}

/* ---------------- Projects ---------------- */
.projects { padding: 2rem 2rem 4.5rem; }
.projects__inner { max-width: 1200px; margin: 0 auto; }
.projects .section-title { margin-bottom: 2.2rem; }

.projects__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.project-card { 
    background: #151515; 
    border: 1px solid rgba(255,255,255,0.06); 
    border-radius: 14px; 
    overflow: hidden; 
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; 
}
.project-card:hover { 
    transform: translateY(-4px); 
    border-color: rgba(42,183,202,0.35);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.project-card__link { display: grid; grid-template-rows: auto 1fr; color: inherit; text-decoration: none; }
.project-card__link--disabled { cursor: default; }
.project-card__media { width: 100%; aspect-ratio: 16/9; background: #0f0f0f; overflow: hidden; }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-card__body { padding: 1rem 1rem 1.2rem; }
.project-card__title {
    color: #fff;
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0 0 .3rem;
    letter-spacing: 0.01em;
}
@media (max-width: 850px) {
    .project-card__title {
        font-size: 1.3rem;
    }
}
.project-card__desc { color: #cfd8da; font-size: .95rem; }

@media (max-width: 1200px) { .projects__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 750px) { .projects__grid { grid-template-columns: 1fr; } }

/* ---------------- Why us ---------------- */
.why { padding: 2rem 2rem 4.5rem; }
.why__inner { max-width: 1200px; margin: 0 auto; }
.why .section-title { margin-bottom: 2rem; }

@media (max-width: 850px) {
    .why .section-title,
    .projects .section-title {
        font-size: clamp(1.7rem, 4vw, 1.4rem);
        margin-top: -40px;
        margin-bottom: 3rem;
    }
}
.why__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.why__item { background: #151515; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 1.2rem; transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.why__item:hover { border-color: rgba(42,183,202,0.35); box-shadow: 0 10px 30px rgba(0,0,0,0.25); transform: translateY(-3px); }
.why__icon { width: 42px; height: 42px; display: grid; place-items: center; background: rgba(42,183,202,0.08); border-radius: 10px; margin-bottom: .8rem; }
.why__title { color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: .25rem; }
.why__desc { color: #cfd8da; font-size: .95rem; }

@media (max-width: 1200px) { .why__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 750px) { .why__grid { grid-template-columns: 1fr; } }

/* ---------------- Contact ---------------- */
.contact { padding: 2rem 2rem 4.5rem; }
.contact__inner { max-width: 1200px; margin: 0 auto; }
.contact .section-title { margin-bottom: 2rem; }
.contact__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 1.2rem; align-items: start; }

.contact__info { display: grid; gap: 1rem; }
.contact__card { display: grid; grid-template-columns: auto 1fr; gap: .85rem; align-items: center; background: #151515; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 1rem; }
.contact__card-icon { width: 44px; height: 44px; display: grid; place-items: center; background: rgba(42,183,202,0.08); border-radius: 10px; }
.contact__card-title { color: #fff; font-weight: 700; font-size: 1.05rem; margin: 0 0 .1rem; }
.contact__link { color: #2ab7ca; text-decoration: none; font-weight: 600; }
.contact__link:hover { text-decoration: underline; }
.contact__hint { color: #b9c4c6; font-size: .9rem; }

.contact__form { background: #151515; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 1.2rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__field { display: grid; gap: .45rem; min-width: 0; }
.form__field label { color: #e9efef; font-weight: 600; font-size: .95rem; }
.form__field input,
.form__field textarea { background: #0f0f0f; color: #e8e8e8; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: .85rem 1rem; outline: none; transition: border-color .2s ease, box-shadow .2s ease; font-family: inherit; }
.form__field textarea { resize: vertical; min-height: 120px; }
.form__field input::placeholder,
.form__field textarea::placeholder { color: #98a2a4; }
.form__field input:focus,
.form__field textarea:focus { border-color: rgba(42,183,202,0.5); box-shadow: 0 0 0 3px rgba(42,183,202,0.18); }
.field-error { color: #ff8686; min-height: 1.1em; font-size: .85rem; }
.contact__note { color: #cfd8da; font-size: .95rem; margin: .4rem 0 1rem; }
.contact__submit { font-size: 1.05rem; padding: .9rem 1.6rem; border-radius: 12px; }
.form__success { color: #a0e8b0; margin-top: .8rem; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #0f1415; color: #e8f6f8; border: 1px solid rgba(42,183,202,0.35); border-radius: 12px; padding: .9rem 1.1rem; box-shadow: 0 10px 30px rgba(0,0,0,0.35); opacity: 0; transition: opacity .25s ease, transform .25s ease; z-index: 500; max-width: calc(100% - 2rem); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1024px) {
    .contact__grid { grid-template-columns: 1fr; }
    .form__row { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
    .contact .section-title { font-size: clamp(1.9rem, 4vw, 1.7rem); }
}

@media (max-width: 600px) {
    .contact { padding: 1.8rem 1rem 3rem; }
    .contact__form { padding: 1rem; }
    .form__field label { font-size: .9rem; }
    .contact__submit { width: 100%; }
}

    /* ---------------- Footer ---------------- */
    .footer { background: #0f0f0f; border-top: 1px solid rgba(255,255,255,0.06); padding: 3rem 2rem 2rem; }
    .footer__inner { max-width: 1200px; margin: 0 auto; }
    .footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 1.2rem; align-items: start; }
    .footer__logo img { height: 44px; width: auto; display: block; }
    .footer__desc { color: #cfd8da; margin-top: .8rem; font-size: .95rem; }
    .footer__title { color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: .6rem; }
    .footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
    .footer__links a { color: #dfe7e9; text-decoration: none; }
    .footer__links a:hover { color: #2ab7ca; }
    .footer__contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
    .footer__contact-list li { display: flex; align-items: center; gap: .5rem; }
    .footer__contact-list a { color: #dfe7e9; text-decoration: none; }
    .footer__contact-list a:hover { color: #2ab7ca; }
    .footer__icon { display: inline-grid; place-items: center; width: 28px; height: 28px; background: rgba(42,183,202,0.08); border-radius: 8px; }
    .footer__social-row { display: flex; gap: .6rem; }
    .social-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #141414; color: #9fcfd7; transition: transform .2s ease, background .2s ease; }
    .social-btn:hover { transform: translateY(-2px); background: #1a1a1a; color: #bff1f6; }
    .footer__bottom { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.06); display: flex; justify-content: space-between; align-items: center; color: #aeb9bb; font-size: .95rem; gap: 1rem; }
    .footer__legal { list-style: none; padding: 0; margin: 0; display: flex; gap: .9rem; }
    .footer__legal a { color: #dfe7e9; text-decoration: none; }
    .footer__legal a:hover { color: #2ab7ca; }

    @media (max-width: 1024px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
    @media (max-width: 750px) {
        .footer { padding: 2.2rem 1.4rem; }
        .footer__grid { grid-template-columns: 1fr; }
        .footer__bottom { flex-direction: column; align-items: flex-start; }
    }

