/* ═══════════════════════════════════════════════
   LYNTON CNC — Design System & Styles
   ═══════════════════════════════════════════════ */

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

:root {
    --bg: #ffffff;
    --surface: #f5f7fb;
    --surface2: #edf0f7;
    --border: rgba(0, 0, 0, 0.08);
    --accent: #1a56db;
    --accent-light: #3b82f6;
    --accent-glow: rgba(26, 86, 219, 0.18);
    --accent-dark: #1e3a8a;
    --cyan: #0891b2;
    --green: #059669;
    --violet: #7c3aed;
    --amber: #d97706;
    --red: #dc2626;
    --text: #1e293b;
    --muted: #64748b;
    --dark: #0f172a;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --float-offset: 0px;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ── CANVAS ── */
#particles-canvas {
    display: none;
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 6%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s, padding 0.4s;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 16px 6%;
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.85rem;
    letter-spacing: -0.5px;
    color: var(--dark);
    text-decoration: none;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 700;
    transition: color 0.2s;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-cta {
    background: var(--accent);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 4px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.78rem;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    transition: all 0.2s;
}

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

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: left center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
}

.nav-menu-mobile {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    padding: 2rem;
    flex-direction: column;
    gap: 1.2rem;
    z-index: 99;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

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

.nav-menu-mobile a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    z-index: 2;
}

.mobile-lang {
    display: flex;
    gap: 6px;
    margin-top: 0.5rem;
}

section {
    position: relative;
    z-index: 1;
}

/* ── HERO ── */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 6% 80px;
    background: linear-gradient(170deg, #f0f4ff 0%, #ffffff 40%, #f0f4ff 100%);
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e8501a' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    align-items: center;
    pointer-events: none;
}

/* ─── LIGHTBOX ─── */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}


.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(26, 86, 219, 0.06);
    border: 1px solid rgba(26, 86, 219, 0.2);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 2rem;
    animation: fadeUp 0.7s 0.1s ease both;
    position: relative;
    z-index: 1;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.hero-h1 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 5.2rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1.5px;
    max-width: 860px;
    animation: fadeUp 0.7s 0.25s ease both;
    color: var(--dark);
    position: relative;
    z-index: 1;
}

.hero-h1 .accent-blue {
    color: var(--accent);
    text-shadow: 0 0 40px var(--accent-glow);
}

.hero-h1 .accent-cyan {
    color: var(--cyan);
}

.hero-sub {
    position: relative;
    z-index: 1;
    margin-top: 1.4rem;
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 600px;
    font-weight: 400;
    animation: fadeUp 0.7s 0.4s ease both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2.4rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeUp 0.7s 0.55s ease both;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--dark);
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.15);
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(26, 86, 219, 0.04);
    transform: translateY(-2px);
    color: var(--accent);
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── REVEAL ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── STATS ── */
#stats {
    padding: 70px 6%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.stat-card {
    background: #fff;
    padding: 2.8rem 2rem;
    text-align: center;
    position: relative;
    transition: background 0.3s;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    border-radius: 0 0 4px 4px;
}

.stat-card:nth-child(1)::before {
    background: var(--accent);
}

.stat-card:nth-child(2)::before {
    background: var(--cyan);
}

.stat-card:nth-child(3)::before {
    background: var(--green);
}

.stat-card:nth-child(4)::before {
    background: var(--amber);
}

.stat-card:hover {
    background: var(--surface);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    color: var(--dark);
}

.stat-card:nth-child(1) .stat-number {
    color: var(--accent);
}

.stat-card:nth-child(2) .stat-number {
    color: var(--cyan);
}

.stat-card:nth-child(3) .stat-number {
    color: var(--green);
}

.stat-card:nth-child(4) .stat-number {
    color: var(--amber);
}

.stat-number span {
    font-size: 2rem;
    letter-spacing: -1px;
}

.stat-label {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.4;
}

/* ── SERVICES ── */
#servicios {
    padding: 100px 6%;
}

.section-tag {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px var(--accent-glow);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 1rem;
    max-width: 600px;
}

.section-desc {
    color: var(--muted);
    max-width: 520px;
    margin-bottom: 3.5rem;
    font-size: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 2.2rem;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    cursor: default;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.service-card:nth-child(1)::before {
    background: var(--accent);
    top: -60px;
    left: -60px;
}

.service-card:nth-child(2)::before {
    background: var(--cyan);
    top: -60px;
    right: -60px;
}

.service-card:nth-child(3)::before {
    background: var(--green);
    bottom: -60px;
    left: -60px;
}

.service-card:nth-child(4)::before {
    background: var(--violet);
    bottom: -60px;
    right: -60px;
}

.service-card:nth-child(5)::before {
    background: var(--amber);
    top: -60px;
    left: -60px;
}

.service-card:nth-child(6)::before {
    background: var(--accent);
    bottom: -60px;
    right: -60px;
}

.service-card:hover::before {
    opacity: 0.1;
}

.service-card:hover {
    border-color: rgba(26, 86, 219, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.service-icon {
    width: calc(100% + 4.4rem);
    margin: -2.2rem -2.2rem 1.5rem -2.2rem;
    height: 240px;
    overflow: hidden;
    position: relative;
    border-radius: 17px 17px 0 0;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.5s ease;
}

.service-card:hover .service-icon img {
    transform: scale(1.05);
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--dark);
    font-family: var(--font-display);
    font-weight: 700;
}

.service-desc {
    color: var(--muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: var(--surface);
    color: var(--muted);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
}

.service-card:hover .tag {
    border-color: rgba(26, 86, 219, 0.25);
    color: var(--dark);
    background: rgba(26, 86, 219, 0.04);
}

/* Expandable */
.service-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-top: auto;
    font-family: var(--font-body);
    position: relative;
    z-index: 2;
}

.service-expand-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.service-card.expanded .service-expand-btn svg {
    transform: rotate(180deg);
}

.service-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
}

.service-card.expanded .service-details {
    max-height: 500px;
    opacity: 1;
    margin-top: 1.5rem;
    border-top: 1px dashed var(--border);
    padding-top: 1.5rem;
}

.service-details h4 {
    color: var(--dark);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
}

.service-details p,
.service-details ul {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.service-details ul {
    padding-left: 1.2rem;
}

.service-details li {
    margin-bottom: 0.4rem;
}

/* ── PROJECTS ── */
#proyectos {
    padding: 100px 6%;
    background: linear-gradient(160deg, #f4f6fb 0%, #f8f9fc 50%, #f4f6fb 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.proj-filters {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.proj-filter {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.proj-filter:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.proj-filter.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.proj-swiper {
    padding-bottom: 3rem;
}

.swiper-pagination-bullet-active {
    background: var(--accent);
}

.proj-slide {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.4s;
    display: flex;
    flex-direction: column;
    height: auto;
    /* Swiper will manage height but stretch them often */
}

.proj-slide:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.proj-slide.hidden {
    display: none;
}

.proj-img {
    height: 240px;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}

.proj-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.proj-slide:hover .proj-img img {
    transform: scale(1.05);
}

.proj-info {
    padding: 1.5rem;
}

.proj-cat {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.proj-info h4 {
    font-family: var(--font-display);
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--dark);
}

.proj-info p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ── PROCESO ── */
#proceso {
    padding: 100px 6%;
}

.proceso-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.proceso-step {
    position: relative;
    padding: 2.2rem 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 1;
}

.proceso-step:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
}

.proceso-step:nth-child(1) {
    border-top: 3px solid var(--accent);
}

.proceso-step:nth-child(2) {
    border-top: 3px solid var(--cyan);
}

.proceso-step:nth-child(3) {
    border-top: 3px solid var(--green);
}

.proceso-step:nth-child(4) {
    border-top: 3px solid var(--violet);
}

.proceso-step:nth-child(1):hover {
    box-shadow: 0 20px 50px rgba(255, 107, 43, 0.08);
}

.proceso-step:nth-child(2):hover {
    box-shadow: 0 20px 50px rgba(0, 180, 216, 0.08);
}

.proceso-step:nth-child(3):hover {
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.08);
}

.proceso-step:nth-child(4):hover {
    box-shadow: 0 20px 50px rgba(167, 139, 250, 0.08);
}

.step-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.proceso-step:nth-child(1) .step-number {
    background-image: linear-gradient(135deg, var(--accent), rgba(255, 107, 43, 0.3));
}

.proceso-step:nth-child(2) .step-number {
    background-image: linear-gradient(135deg, var(--cyan), rgba(0, 180, 216, 0.3));
}

.proceso-step:nth-child(3) .step-number {
    background-image: linear-gradient(135deg, var(--green), rgba(16, 185, 129, 0.3));
}

.proceso-step:nth-child(4) .step-number {
    background-image: linear-gradient(135deg, var(--violet), rgba(167, 139, 250, 0.3));
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.step-icon img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    cursor: zoom-in;
}

.step-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.7rem;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.step-desc {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ── TECH ── */
#tecnologias {
    padding: 100px 6%;
}

.tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 3rem;
}

.tech-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: border-color 0.2s, transform 0.2s;
}

.tech-pill:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── COTIZADOR ── */
#cotizador {
    padding: 100px 6%;
    background: linear-gradient(160deg, #f4f6fb 0%, #f8f9fc 50%, #f4f6fb 100%);
    border-top: 1px solid var(--border);
}

.quot-card {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.05);
}

.quot-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(26, 86, 219, 0.04), transparent 70%);
    pointer-events: none;
}

.quot-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.quot-progress-fill {
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--accent), #3b82f6);
    border-radius: 100px;
    transition: width 0.5s ease;
}

.quot-step-label {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 2rem;
    text-align: right;
}

.quot-step {
    display: none;
}

.quot-step.active {
    display: block;
    animation: fadeUp 0.4s ease;
}

.quot-q {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.quot-options {
    display: grid;
    gap: 0.6rem;
}

.quot-opt {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.quot-opt:hover {
    border-color: rgba(26, 86, 219, 0.3);
    background: rgba(26, 86, 219, 0.04);
}

.quot-opt input {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
}

.quot-opt input:checked+span {
    color: var(--dark);
    font-weight: 600;
}

.quot-opt span {
    color: var(--muted);
    transition: color 0.2s;
}

.quot-next,
.quot-back {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.quot-next {
    background: var(--accent);
    color: #fff;
    margin-top: 1.5rem;
}

.quot-next:hover {
    box-shadow: 0 6px 20px var(--accent-glow);
    transform: translateY(-1px);
}

.quot-back {
    background: var(--surface);
    color: var(--muted);
}

.quot-back:hover {
    background: var(--surface2);
    color: var(--dark);
}

.quot-submit {
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    font-size: 1rem;
    padding: 14px 28px;
}

.quot-loading {
    text-align: center;
    padding: 3rem 0;
}

.quot-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.quot-result-content {
    line-height: 1.7;
}

.quot-result-content h3 {
    font-family: var(--font-display);
    color: var(--dark);
    margin: 1.5rem 0 0.8rem;
    font-size: 1.2rem;
}

.quot-result-content p,
.quot-result-content ul {
    color: var(--muted);
    font-size: 0.92rem;
}

.quot-result-content ul {
    padding-left: 1.2rem;
}

.quot-result-cta {
    display: inline-block;
    margin-top: 1.5rem;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.quot-result-cta:hover {
    box-shadow: 0 8px 28px var(--accent-glow);
    transform: translateY(-2px);
}

.quot-altavex-hook {
    background: rgba(26, 86, 219, 0.04);
    border: 1px solid rgba(26, 86, 219, 0.15);
    border-radius: 14px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

/* ── CONTACT ── */
#contacto {
    padding: 100px 6%;
    background: var(--dark);
    border-top: 1px solid var(--border);
    color: #e2e8f0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    color: #fff;
}

.contact-info p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.7;
}

.contact-perks {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.perk {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.perk-icon {
    font-size: 1.2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #94a3b8;
}

.form-group input,
.form-group textarea,
.form-group select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: border-color 0.2s;
    outline: none;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
}

.form-submit {
    align-self: flex-start;
    margin-top: 0.5rem;
}

/* ── FOOTER ── */
footer {
    padding: 60px 6% 30px;
    border-top: 1px solid var(--border);
    background: var(--dark);
    color: #e2e8f0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.88rem;
    margin-top: 1rem;
    line-height: 1.6;
    max-width: 320px;
}

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

.footer-col h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-col a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: #94a3b8;
}

/* ── CHATBOT ── */
.chat-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
    pointer-events: none;
}

.chat-bubble-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px var(--accent-glow);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    pointer-events: auto;
}

.chat-bubble-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.chat-bubble-btn svg {
    width: 26px;
    height: 26px;
}

.chat-notif {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
    display: none;
}

.chat-window {
    width: 380px;
    max-height: 520px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    background: var(--dark);
    color: #fff;
}

.chat-avatar {
    font-size: 1.8rem;
}

.chat-header-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
}

.chat-header-status {
    font-size: 0.75rem;
    color: var(--green);
}

.chat-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
    padding: 4px 8px;
    transition: color 0.2s;
}

.chat-close:hover {
    color: #fff;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 200px;
    max-height: 300px;
}

.msg {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
    animation: fadeUp 0.3s ease;
}

.msg.bot {
    background: var(--surface);
    border: 1px solid var(--border);
    align-self: flex-start;
    color: var(--text);
}

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

.msg.typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 1rem;
}

.msg.typing span {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: typingBounce 1.2s infinite;
}

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

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

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }
}

.chat-quick {
    padding: 0.6rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    border-top: 1px solid var(--border);
}

.quick-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 6px 12px;
    font-size: 0.75rem;
    color: var(--muted);
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.quick-btn:hover {
    border-color: rgba(26, 86, 219, 0.3);
    color: var(--dark);
}

.chat-input-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border);
}

.chat-input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
}

.chat-input:focus {
    border-color: var(--accent);
}

.chat-send {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.chat-send:hover {
    opacity: 0.85;
}

.chat-send svg {
    width: 18px;
    height: 18px;
}


/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

@media (max-width: 768px) {

    .nav-links,
    .nav-right {
        display: none;
    }

    .hamburger {
        display: flex;
    }

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

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

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

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

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .chat-window {
        width: calc(100vw - 2rem);
        right: 0;
    }

    #hero {
        padding: 100px 5% 60px;
    }

    .quot-card {
        padding: 1.5rem;
    }
}

/* ─── MODALS LEGALES ─── */
.legal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.legal-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.legal-modal {
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--surface2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: background 0.2s, color 0.2s;
}

.close-modal:hover {
    background: var(--accent);
    color: #fff;
}

.legal-modal h2 {
    font-family: var(--font-display);
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.legal-content {
    overflow-y: auto;
    padding-right: 1rem;
}

.legal-content p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.legal-content h3 {
    color: var(--dark);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
}

.legal-content ul {
    margin-bottom: 1rem;
    padding-left: 1.2rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.legal-content li {
    margin-bottom: 0.4rem;
}