/* ============================================================
   AFT — Accessing Future Technologies
   Rediseño moderno 2026
   ============================================================ */

:root {
    --bg: #070b14;
    --bg-soft: #0c1322;
    --bg-card: #101a2e;
    --bg-card-hover: #142138;
    --border: rgba(148, 184, 255, 0.12);
    --border-strong: rgba(148, 184, 255, 0.25);
    --text: #e8eefb;
    --text-muted: #93a1bd;
    --accent: #0ac6fc;
    --accent-2: #4f7cff;
    --accent-3: #8b5cf6;
    --gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
    --radius: 16px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

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

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

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #6fdcff;
}

.container {
    width: min(1180px, 92%);
    margin-inline: auto;
}

section {
    padding: 110px 0;
}

/* ---------- Tipografía de secciones ---------- */

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(10, 198, 252, 0.08);
    border: 1px solid rgba(10, 198, 252, 0.25);
    border-radius: 999px;
    padding: 6px 18px;
    margin-bottom: 18px;
}

.section-title {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.08rem;
    max-width: 640px;
}

.section-head {
    margin-bottom: 56px;
}

.section-head.center {
    text-align: center;
}

.section-head.center .section-subtitle {
    margin-inline: auto;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(7, 11, 20, 0.72);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.site-header.scrolled {
    border-bottom-color: var(--border);
    background: rgba(7, 11, 20, 0.88);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}

.brand:hover {
    color: var(--text);
}

.brand-short {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

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

.nav-cta {
    background: var(--gradient);
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--text);
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    padding: 200px 0 90px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% -10%, rgba(79, 124, 255, 0.22), transparent),
        radial-gradient(ellipse 50% 45% at 80% 0%, rgba(139, 92, 246, 0.18), transparent),
        radial-gradient(ellipse 45% 40% at 55% 25%, rgba(10, 198, 252, 0.10), transparent);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 184, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 184, 255, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-logo {
    height: 110px;
    width: auto;
    margin: 0 auto 26px;
    padding: 16px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 8px 30px rgba(10, 198, 252, 0.25), 0 20px 60px rgba(0, 0, 0, 0.4);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
    background: rgba(16, 26, 46, 0.6);
    border-radius: 999px;
    padding: 7px 18px;
    margin-bottom: 28px;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    max-width: 900px;
    margin: 0 auto 24px;
}

.hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 70px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 8px 30px rgba(79, 124, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(79, 124, 255, 0.5);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
    background: rgba(148, 184, 255, 0.08);
    color: var(--text);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: clamp(30px, 6vw, 80px);
    flex-wrap: wrap;
}

.stat .num {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---------- Marquee (carrusel de pantallas) ---------- */

.marquee-section {
    padding: 40px 0 90px;
    overflow: hidden;
}

.marquee {
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: marquee 60s linear infinite;
}

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

.marquee-track figure {
    flex: 0 0 auto;
    width: 380px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.marquee-track figure img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: top;
}

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

/* ---------- Tecnologías ---------- */

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

.tech-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.tech-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
}

.tech-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.tech-card:hover::before {
    opacity: 1;
}

.tech-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    margin-bottom: 22px;
}

.tech-icon img {
    max-height: 36px;
    max-width: 36px;
    object-fit: contain;
}

.tech-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.tech-card p {
    color: var(--text-muted);
    font-size: 0.96rem;
    margin-bottom: 18px;
}

.tech-card .more {
    font-size: 0.92rem;
    font-weight: 600;
}

/* ---------- Metodología ---------- */

.method {
    background: var(--bg-soft);
    border-block: 1px solid var(--border);
}

.method-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}

.method-text p {
    color: var(--text-muted);
    margin-bottom: 18px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    list-style: none;
}

.steps li {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.steps li:hover {
    border-color: var(--border-strong);
    transform: translateX(4px);
}

.steps .step-num {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--gradient);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.method-visual img {
    border-radius: var(--radius);
    width: 100%;
    height: auto;
}

/* ---------- IA para el transporte ---------- */

.ai {
    position: relative;
    overflow: hidden;
}

.ai::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 40% at 15% 20%, rgba(139, 92, 246, 0.14), transparent),
        radial-gradient(ellipse 50% 40% at 85% 70%, rgba(10, 198, 252, 0.10), transparent);
    pointer-events: none;
}

.ai .container {
    position: relative;
    z-index: 1;
}

.ai-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 70px;
}

/* Mockup de chat */

.chat-window {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow), 0 0 80px rgba(79, 124, 255, 0.12);
    overflow: hidden;
}

.chat-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}

.chat-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.chat-dot.red { background: #ff5f57; }
.chat-dot.yellow { background: #febc2e; }
.chat-dot.green { background: #28c840; }

.chat-title {
    margin-left: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.chat-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.msg.user {
    align-self: flex-end;
    background: var(--gradient);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.msg.bot {
    align-self: flex-start;
    background: rgba(148, 184, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.msg.typing {
    align-self: flex-start;
    display: flex;
    gap: 5px;
    background: rgba(148, 184, 255, 0.08);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.msg.typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typing 1.2s infinite ease-in-out;
}

.msg.typing span:nth-child(2) { animation-delay: 0.15s; }
.msg.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* Casos de uso */

.ai-points h3 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.ai-points > p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.ai-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-list li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    color: var(--text-muted);
    font-size: 0.96rem;
}

.ai-list strong {
    color: var(--text);
}

.ai-check {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(10, 198, 252, 0.12);
    border: 1px solid rgba(10, 198, 252, 0.35);
    color: var(--accent);
    font-size: 0.8rem;
    margin-top: 2px;
}

/* Tarjetas de servicios IA */

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

.ai-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ai-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 16px 48px rgba(139, 92, 246, 0.15);
}

.ai-card-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(139, 92, 246, 0.10);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--accent-3);
    margin-bottom: 18px;
}

.ai-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.ai-card p {
    color: var(--text-muted);
    font-size: 0.91rem;
    margin-bottom: 16px;
}

.ai-metric {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(10, 198, 252, 0.08);
    border: 1px solid rgba(10, 198, 252, 0.25);
    border-radius: 999px;
    padding: 4px 12px;
}

.ai-cta {
    text-align: center;
    margin-top: 60px;
}

.ai-cta p {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ---------- Portfolio ---------- */

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

.work-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.work-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.work-card .thumb {
    overflow: hidden;
    aspect-ratio: 16 / 11;
    border-bottom: 1px solid var(--border);
}

.work-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    transition: transform 0.4s ease;
}

.work-card:hover .thumb img {
    transform: scale(1.05);
}

.work-card .body {
    padding: 24px;
}

.work-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.work-card p {
    color: var(--text-muted);
    font-size: 0.93rem;
}

/* ---------- Contacto ---------- */

.contact {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    padding-bottom: 40px;
}

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

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

.field input,
.field textarea {
    font-family: var(--font);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 13px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}

.field textarea {
    min-height: 140px;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(10, 198, 252, 0.15);
}

.contact-form .btn {
    grid-column: 1 / -1;
    justify-self: start;
}

.contact-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    /* Compensa la altura de las etiquetas del formulario (label + gap)
       para alinear el cuadro con los inputs de Nombre y Email */
    margin-top: 31px;
}

.contact-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.contact-info .info-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.contact-info .info-item:last-of-type {
    border-bottom: none;
}

.contact-info .info-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(10, 198, 252, 0.08);
    border: 1px solid rgba(10, 198, 252, 0.25);
    color: var(--accent);
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border-strong);
    background: #040810;
    padding: 44px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text);
    font-size: 0.95rem;
}

.footer-inner a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 9px 20px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.footer-inner a:hover {
    background: rgba(10, 198, 252, 0.08);
    border-color: var(--accent);
}

/* ---------- Back to top ---------- */

#backtotop {
    position: fixed;
    right: 26px;
    bottom: 26px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 8px 24px rgba(79, 124, 255, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 90;
}

#backtotop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backtotop:hover {
    color: #fff;
}

/* ---------- Animaciones de aparición ---------- */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .marquee-track,
    .msg.typing span {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 992px) {
    .tech-grid,
    .portfolio-grid,
    .ai-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .method-layout,
    .contact-layout,
    .ai-layout {
        grid-template-columns: 1fr;
    }

    .method-visual {
        order: -1;
        max-width: 420px;
        margin-inline: auto;
    }

    .contact-info {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }

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

    .nav-links {
        position: fixed;
        inset: 76px 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(7, 11, 20, 0.97);
        border-bottom: 1px solid var(--border);
        padding: 12px 6%;
        display: none;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        padding: 12px 0;
    }

    .nav-links .nav-cta {
        text-align: center;
        margin-top: 8px;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
    }

    .brand-full {
        display: none;
    }

    .brand-short {
        display: inline;
    }

    .tech-grid,
    .portfolio-grid,
    .ai-grid,
    .steps,
    .contact-form {
        grid-template-columns: 1fr;
    }

    .marquee-track figure {
        width: 290px;
    }

    .marquee-track figure img {
        height: 185px;
    }
}
