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

:root {
    --bg: #ffffff;
    --bg-alt: #f6f6f2;
    --ink: #14161b;
    --ink-soft: #4b4f59;
    --ink-muted: #7a7f8a;
    --accent: #0e7a5b;
    --accent-dark: #0a5f47;
    --accent-soft: #e8f3ee;
    --whatsapp: #25d366;
    --whatsapp-dark: #1eb958;
    --line: #e4e4de;
    --line-dark: #2a2d33;
    --dark: #15171c;
    --dark-2: #1d2026;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 14px 40px rgba(20, 22, 27, 0.08);
    --font: 'Manrope', 'Segoe UI', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

/* ---------- BOTONES ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 26px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    font-family: var(--font);
}

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

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: #fff;
}

.btn-whatsapp:hover,
.btn-whatsapp-nav:hover {
    background: var(--whatsapp-dark);
}

.btn-whatsapp-nav {
    background: var(--whatsapp);
    color: #fff;
    padding: 9px 16px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.btn-outline {
    border-color: var(--line);
    color: var(--ink);
    background: var(--bg);
}

.btn-outline:hover {
    border-color: var(--ink);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    background: transparent;
}

.btn-outline-light:hover {
    border-color: #fff;
}

.btn-lg {
    padding: 15px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

/* ---------- HEADER ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 4px 20px rgba(20, 22, 27, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.5px;
    color: var(--ink);
}

.logo-text span {
    color: var(--accent);
    font-weight: 600;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink-soft);
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--ink);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- HERO ---------- */
.hero {
    padding: 150px 0 90px;
    background-color: var(--dark);
    background-image: url('../img/bg-circuit-dark.svg');
    background-size: 400px 400px;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, #000 30%, transparent 75%);
    pointer-events: none;
    animation: gridMove 3.4s linear infinite;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(111, 211, 172, 0.1);
    border: 1px solid rgba(111, 211, 172, 0.3);
    color: #6fd3ac;
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px;
    letter-spacing: 0.4px;
    margin-bottom: 22px;
}

.hero-title {
    font-size: clamp(35px, 4.6vw, 54px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    color: #fff;
}

.hero-title .accent {
    color: #6fd3ac;
}

.hero-text {
    font-size: 16.5px;
    color: #b7bdc9;
    max-width: 520px;
    margin-bottom: 34px;
}

.hero-text strong {
    color: #fff;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 52px;
}

.hero-stats {
    display: flex;
    gap: 56px;
}

.stat-number {
    display: block;
    font-size: 27px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 13px;
    color: #9aa2b0;
}

/* Tarjeta de código */
.code-card {
    background: #1b1e25;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.code-dots {
    display: flex;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-dark);
}

.code-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) {
    background: #ff5f57;
}

.code-dots span:nth-child(2) {
    background: #febc2e;
}

.code-dots span:nth-child(3) {
    background: #28c840;
}

.code-text {
    padding: 26px;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 13.5px;
    line-height: 2;
    color: #cfd3dc;
    white-space: pre-wrap;
    word-break: break-word;
}

.c-key {
    color: #ff8c69;
}

.c-var {
    color: #9ecbff;
}

.c-fn {
    color: #ffd180;
}

.c-str {
    color: #a8e0a1;
}

.c-com {
    color: #6d7380;
    font-style: italic;
}

/* ---------- EQUIPO ---------- */
.team {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 880px;
    margin: 0 auto;
}

.team-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 42px 34px;
    text-align: center;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.team-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.team-avatar {
    width: 86px;
    height: 86px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    border: 2px solid rgba(14, 122, 91, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 1px;
}

.team-photo {
    object-fit: cover;
    display: block;
    box-shadow: 0 6px 18px rgba(20, 22, 27, 0.15);
}

.team-card h3 {
    font-size: 19px;
    font-weight: 800;
    color: var(--ink);
}

.team-role {
    color: var(--accent);
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 7px 0 14px;
}

.team-text {
    color: var(--ink-soft);
    font-size: 14.5px;
}

@media (max-width: 768px) {
    .team {
        grid-template-columns: 1fr;
    }
}

/* ---------- SECCIONES ---------- */
.section {
    padding: 96px 0;
}

.section-dark {
    background-color: var(--dark);
    background-image: url('../img/bg-circuit-dark.svg');
    background-size: 400px 400px;
    color: #fff;
}

.section-dark .section-title {
    color: #fff;
}

.section-dark .section-sub {
    color: #a6abb6;
}

.section-head {
    max-width: 660px;
    margin: 0 auto 60px;
    text-align: center;
}

.section-tag {
    display: block;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-dark .section-tag {
    color: #6fd3ac;
}

.section-title {
    font-size: clamp(27px, 3.2vw, 38px);
    font-weight: 800;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: var(--ink);
    margin-bottom: 14px;
}

.section-sub {
    color: var(--ink-soft);
    font-size: 15.5px;
}

/* ---------- FEATURES ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px 28px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature h3 {
    font-size: 17.5px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 9px;
}

.feature p {
    color: var(--ink-soft);
    font-size: 14.5px;
}

/* ---------- SERVICIOS ---------- */
.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service {
    background: var(--dark-2);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    padding: 32px 26px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.service:hover {
    border-color: #6fd3ac;
    transform: translateY(-4px);
}

.service-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
    color: #6fd3ac;
    margin-bottom: 20px;
}

.service-icon svg {
    width: 22px;
    height: 22px;
}

.service h3 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 9px;
}

.service p {
    color: #a6abb6;
    font-size: 14px;
}

/* ---------- PROCESO ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.step {
    border-top: 3px solid var(--line);
    padding-top: 22px;
}

.step-num {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
}

.step h3 {
    font-size: 17.5px;
    font-weight: 700;
    margin: 10px 0 8px;
}

.step p {
    color: var(--ink-soft);
    font-size: 14.5px;
}

/* ---------- CTA ---------- */
.cta {
    background: var(--accent);
    padding: 84px 0;
    text-align: center;
}

.cta-title {
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #fff;
    margin-bottom: 12px;
}

.cta-text {
    color: rgba(255, 255, 255, 0.85);
    max-width: 540px;
    margin: 0 auto 32px;
    font-size: 16px;
}

.cta-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-outline-light:hover {
    border-color: #fff;
}

/* ---------- CONTACTO ---------- */
#contacto {
    background: var(--bg-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: start;
}

.contact-info .section-title {
    font-size: 30px;
}

.contact-text {
    color: var(--ink-soft);
    margin-bottom: 26px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.contact-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

.contact-item h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 1px;
}

.contact-item a,
.contact-item p {
    color: var(--ink-soft);
    font-size: 14.5px;
}

.contact-item a:hover {
    color: var(--accent);
}

.contact-form {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 38px;
    box-shadow: var(--shadow);
}

.contact-form h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 7px;
    color: var(--ink);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink);
    font-size: 14.5px;
    font-family: var(--font);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 122, 91, 0.12);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #d64545;
}

.form-error {
    display: none;
    color: #d64545;
    font-size: 13px;
    margin-top: 5px;
}

.form-error.show {
    display: block;
}

.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

.form-feedback {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    background: rgba(214, 69, 69, 0.08);
    border: 1px solid rgba(214, 69, 69, 0.3);
    color: #b33a3a;
}

.form-feedback.show {
    display: block;
}

.btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

.form-success {
    text-align: center;
    padding: 18px 4px;
}

.form-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-success-icon svg {
    width: 30px;
    height: 30px;
}

.form-success h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 8px;
}

.form-success p {
    color: var(--ink-soft);
    font-size: 14.5px;
    max-width: 380px;
    margin: 0 auto 24px;
}

.form-success .btn {
    margin: 0 auto;
}

@keyframes successPop {
    from {
        transform: scale(0.6);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.form-note {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--ink-muted);
    text-align: center;
}

/* ---------- FOOTER ---------- */
.footer {
    background-color: var(--dark);
    background-image: url('../img/bg-circuit-dark.svg');
    background-size: 400px 400px;
    color: #fff;
    padding: 60px 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 44px;
}

.footer-brand .logo-text {
    color: #fff;
}

.footer-brand p {
    color: #a6abb6;
    font-size: 14px;
    margin-top: 14px;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: #a6abb6;
    font-size: 14px;
    margin-bottom: 9px;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #6fd3ac;
}

.footer-bottom {
    border-top: 1px solid var(--line-dark);
    padding: 22px 24px;
    text-align: center;
    font-size: 13px;
    color: #7d828e;
}

/* ---------- WHATSAPP FLOTANTE ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--whatsapp);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 26px rgba(37, 211, 102, 0.4);
    z-index: 90;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    transform: scale(1.07);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

.whatsapp-float-tooltip {
    position: absolute;
    right: 68px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.whatsapp-float:hover .whatsapp-float-tooltip {
    opacity: 1;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-visual {
        max-width: 520px;
    }

    .features,
    .services {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px 24px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        padding: 24px;
        gap: 18px;
        transform: translateY(-120%);
        transition: transform 0.3s ease;
        z-index: 99;
    }

    .nav.open {
        transform: translateY(0);
    }

    .nav-link {
        font-size: 16px;
    }

    .nav-toggle {
        display: flex;
    }

    .btn-whatsapp-nav {
        display: none;
    }

    .hero {
        padding: 120px 0 70px;
    }

    .hero-title {
        font-size: 33px;
    }

    .hero-stats {
        gap: 36px;
    }

    .features,
    .services {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 28px 22px;
    }
}

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

    .hero-actions,
    .cta-actions {
        flex-direction: column;
    }

    .hero-actions .btn,
    .cta-actions .btn {
        width: 100%;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ------------------------------------------------------------------
   MOTION
------------------------------------------------------------------ */

/* ---- Fondo del hero en movimiento ---- */
@keyframes gridMove {
    to {
        background-position: 72px 72px;
    }
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

.blob-1 {
    width: 520px;
    height: 520px;
    top: -160px;
    right: -120px;
    background: rgba(14, 122, 91, 0.28);
    animation: blobFloat1 18s ease-in-out infinite alternate;
}

.blob-2 {
    width: 420px;
    height: 420px;
    bottom: -140px;
    left: -100px;
    background: rgba(111, 211, 172, 0.10);
    animation: blobFloat2 22s ease-in-out infinite alternate;
}

@keyframes blobFloat1 {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(-90px, 70px) scale(1.15);
    }
}

@keyframes blobFloat2 {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(80px, -60px) scale(1.2);
    }
}

#particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ---- Entrada del hero ---- */
.hero-content > * {
    animation: fadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-content > *:nth-child(1) {
    animation-delay: 0.05s;
}

.hero-content > *:nth-child(2) {
    animation-delay: 0.15s;
}

.hero-content > *:nth-child(3) {
    animation-delay: 0.25s;
}

.hero-content > *:nth-child(4) {
    animation-delay: 0.35s;
}

.hero-content > *:nth-child(5) {
    animation-delay: 0.45s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.code-card {
    animation: cardIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(36px) rotateX(8deg);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Maquina de escribir */
.code-text {
    padding: 26px;
    min-height: 232px;
}

.code-caret {
    display: inline-block;
    width: 9px;
    height: 17px;
    margin-left: 2px;
    background: #6fd3ac;
    vertical-align: text-bottom;
    animation: caretBlink 0.9s steps(2) infinite;
}

@keyframes caretBlink {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

/* Parallax tarjeta */
.parallax {
    will-change: transform;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Marquee ---- */
.marquee {
    background: var(--accent);
    overflow: hidden;
    padding: 14px 0;
    position: relative;
    z-index: 1;
}

.marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 44px;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    padding-right: 44px;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-track span {
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.marquee-track i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* ---- Animaciones al hacer scroll ---- */
html.js .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js .reveal.visible {
    opacity: 1;
    transform: none;
}

/* ---- Hover tarjetas (movimiento sutil) ---- */
.feature,
.service {
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.feature:hover,
.service:hover {
    transform: translateY(-5px);
}

.service:hover {
    border-color: #6fd3ac;
}

.step {
    transition: transform 0.25s ease;
}

.step:hover {
    transform: translateX(6px);
}

/* ---- Contadores ---- */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* ---- Enlaces nav con subrayado ---- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* Boton con brillo al pasar */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.btn:hover::after {
    left: 130%;
}

/* ---- Movimiento boton whatsapp flotante ---- */
.whatsapp-float {
    animation: floatY 3.2s ease-in-out infinite;
}

@keyframes floatY {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}

/* ---- Accesibilidad: reducir movimiento ---- */
@media (prefers-reduced-motion: reduce) {
    html.js .reveal,
    .hero-content > *,
    .code-card {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .hero::after,
    .blob,
    .marquee-track,
    .whatsapp-float {
        animation: none !important;
    }
}

/* ---- Ajustes responsive del motion ---- */
@media (max-width: 768px) {
    .blob-1,
    .blob-2 {
        width: 280px;
        height: 280px;
        filter: blur(70px);
    }

    .code-text {
        min-height: 250px;
    }
}

/* ------------------------------------------------------------------
   LÍNEA DE ESCANEO, SELECCIÓN Y AJUSTES DE ANCLA
------------------------------------------------------------------ */

::selection {
    background: var(--accent);
    color: #fff;
}

section[id] {
    scroll-margin-top: 76px;
}

.code-card {
    position: relative;
    overflow: hidden;
}

.code-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to bottom, transparent, rgba(111, 211, 172, 0.1), transparent);
    animation: scan 5.5s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes scan {
    0% {
        top: -70px;
    }
    100% {
        top: 100%;
    }
}

/* ------------------------------------------------------------------
   BOTÓN VOLVER ARRIBA
------------------------------------------------------------------ */

.scroll-top {
    position: fixed;
    bottom: 96px;
    right: 26px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(20, 22, 27, 0.12);
    opacity: 0;
    transform: translateY(14px);
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, background 0.2s ease, color 0.2s ease;
    z-index: 85;
}

.scroll-top svg {
    width: 20px;
    height: 20px;
}

.scroll-top.visible {
    opacity: 1;
    transform: none;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ------------------------------------------------------------------
   PÁGINAS LEGALES
------------------------------------------------------------------ */

.legal-hero {
    background-color: var(--dark);
    background-image: url('../img/bg-circuit-dark.svg');
    background-size: 400px 400px;
    padding: 150px 0 64px;
    position: relative;
    overflow: hidden;
}

.legal-hero::after {
    content: '';
    position: absolute;
    right: -140px;
    top: -140px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(14, 122, 91, 0.18);
    filter: blur(70px);
    pointer-events: none;
}

.breadcrumb {
    font-size: 13.5px;
    color: #a6abb6;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb a {
    color: #6fd3ac;
    font-weight: 600;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #5a5f6b;
}

.legal-hero h1 {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    margin-bottom: 10px;
}

.legal-date {
    color: #8d93a0;
    font-size: 14px;
}

.legal-body {
    background: var(--bg);
    padding: 64px 0 90px;
}

.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 56px;
    align-items: start;
}

.legal-toc {
    position: sticky;
    top: 96px;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legal-toc h3 {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 12px;
}

.legal-toc a {
    font-size: 14px;
    color: var(--ink-soft);
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.legal-toc a:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.legal-content {
    max-width: 780px;
}

.legal-content h2 {
    font-size: 23px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.3px;
    margin: 44px 0 14px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    scroll-margin-top: 96px;
}

.legal-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.legal-content p {
    color: var(--ink-soft);
    font-size: 15px;
    margin-bottom: 14px;
}

.legal-content ul {
    margin: 0 0 16px;
    padding-left: 22px;
}

.legal-content ul li {
    color: var(--ink-soft);
    font-size: 15px;
    margin-bottom: 8px;
}

.legal-content a {
    color: var(--accent);
    font-weight: 600;
}

.legal-content a:hover {
    text-decoration: underline;
}

.cookie-table {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0 26px;
}

.cookie-row {
    display: grid;
    grid-template-columns: 180px 1fr 140px;
    gap: 14px;
    padding: 13px 18px;
    font-size: 14px;
    border-top: 1px solid var(--line);
}

.cookie-row:first-child {
    border-top: none;
}

.cookie-row span {
    color: var(--ink-soft);
}

.cookie-row:first-child span {
    color: var(--ink);
}

.cookie-head {
    background: var(--bg-alt);
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.footer-bottom-links {
    margin-top: 6px;
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: #7d828e;
}

.footer-bottom-links a {
    color: #7d828e;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #6fd3ac;
}

@media (max-width: 992px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .legal-toc {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .legal-toc h3 {
        width: 100%;
        margin-bottom: 4px;
    }

    .cookie-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* ------------------------------------------------------------------
   BANNER DE COOKIES (MODAL CENTRADO)
------------------------------------------------------------------ */

.cookie-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(12, 15, 20, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.cookie-overlay:not(.is-hidden) {
    opacity: 1;
    visibility: visible;
}

.cookie-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 310;
    width: min(600px, calc(100% - 32px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fdfefd;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
    padding: 30px 30px 26px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.cookie-banner:not(.is-hidden) {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.cookie-banner-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.cookie-banner-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
}

.cookie-banner-icon svg {
    width: 22px;
    height: 22px;
}

.cookie-banner h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
}

.cookie-banner-text {
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 20px;
}

.cookie-banner-text a {
    color: var(--accent);
    font-weight: 700;
}

.cookie-banner-text a:hover {
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.cookie-banner-actions .btn {
    flex: 1;
    padding: 12px 18px;
    font-size: 14px;
}

.cookie-link {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: var(--font);
    padding: 12px 8px;
    border-radius: 8px;
    flex: 0 0 auto;
    transition: color 0.2s ease;
}

.cookie-link:hover {
    text-decoration: underline;
}

.cookie-close {
    background: none;
    border: none;
    color: var(--ink-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    font-family: var(--font);
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.cookie-close:hover {
    color: var(--ink);
    background: var(--bg-alt);
}

.cookie-custom {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: cookiePanel 0.35s ease;
}

.cookie-custom[hidden] {
    display: none;
}

.cookie-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.cookie-option-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
}

.cookie-option-icon svg {
    width: 17px;
    height: 17px;
}

.cookie-option-info {
    flex: 1;
    min-width: 0;
}

.cookie-option-info strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    display: block;
}

.cookie-option-info p {
    font-size: 12.5px;
    color: var(--ink-muted);
    margin-top: 1px;
}

.cookie-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch .slider {
    position: absolute;
    inset: 0;
    background: var(--line);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cookie-switch .slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.cookie-switch input:checked + .slider {
    background: var(--accent);
}

.cookie-switch input:checked + .slider::before {
    transform: translateX(20px);
}

.cookie-switch input:disabled + .slider {
    cursor: not-allowed;
    opacity: 0.55;
    background: var(--accent);
}

.cookie-switch input:disabled + .slider::before {
    transform: translateX(20px);
}

.cookie-custom-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.cookie-custom-actions .btn {
    padding: 12px 26px;
    font-size: 14px;
}

@keyframes cookiePanel {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 24px 20px 22px;
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-banner-actions .btn,
    .cookie-banner-actions .cookie-link {
        width: 100%;
    }

    .cookie-custom-actions {
        justify-content: stretch;
    }

    .cookie-custom-actions .btn {
        width: 100%;
    }
}