/* =========================================================
   01projects — Design tokens
   Theme lock: dark only (brand identity, futurista/dark-tech)
   Shape lock: pill buttons / 20px cards / 10px inputs
   Accent lock: #FFDE70 only, used identically across sections
   ========================================================= */
:root {
    --bg: #02021E;
    --bg-elevated: #0A0A33;
    --bg-elevated-2: #0F0F3D;
    --line: rgba(245, 244, 239, 0.10);
    --line-strong: rgba(245, 244, 239, 0.18);

    --accent: #FFDE70;
    --accent-soft: rgba(255, 222, 112, 0.12);
    --accent-soft-2: rgba(255, 222, 112, 0.22);
    --accent-ink: #1a1608; /* text on accent bg */

    --text: #F5F4EF;
    --text-muted: #A6A6C6;
    --text-faint: #6E6E93;

    --radius-card: 20px;
    --radius-input: 10px;
    --radius-pill: 999px;

    --container: 1280px;
    --gap-section: clamp(4rem, 9vw, 8rem);
    --gap-section-sm: clamp(2.5rem, 5vw, 4rem);

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --font-display: "Cabinet Grotesk", "General Sans", system-ui, sans-serif;
    --font-body: "General Sans", system-ui, -apple-system, sans-serif;

    --shadow-accent: 0 20px 60px -20px rgba(255, 222, 112, 0.25);
    --shadow-soft: 0 20px 50px -25px rgba(0, 0, 0, 0.6);
}

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

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    margin: 0;
}

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

/* off-black focus rings, brand-tinted */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    max-width: var(--container);
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
}

section {
    position: relative;
}

/* ---------- fixed decorative grain (perf-safe: fixed, pointer-events none) ---------- */
.grain {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- eyebrow ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--accent);
}

/* ---------- buttons (pill lock) ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 0.9rem 1.7rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: transform .35s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
    will-change: transform;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 70px -18px rgba(255, 222, 112, 0.4);
}

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

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.65rem 1.2rem;
    font-size: 0.85rem;
}

.btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

/* ---------- WhatsApp floating button (site-wide) ---------- */
.whatsapp-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.5rem;
    z-index: 90;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 12px 32px -10px rgba(37, 211, 102, 0.55);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.whatsapp-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 16px 40px -10px rgba(37, 211, 102, 0.7);
}

.whatsapp-fab::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: whatsappPulse 2.6s ease-out infinite;
    pointer-events: none;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: .65;
    }
    100% {
        transform: scale(1.65);
        opacity: 0;
    }
}

@media (max-width: 640px) {
    .whatsapp-fab {
        bottom: 6.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-fab::before {
        animation: none;
        display: none;
    }
}

/* ---------- honeypot field (spam trap, hidden from real users) ---------- */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- nav ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 72px;
    display: flex;
    align-items: center;
    background: rgba(2, 2, 30, 0.6);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--line);
}

.nav .container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo img {
    height: 22px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    margin-left: auto;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a {
    transition: color .25s var(--ease);
    position: relative;
}

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

.nav-links a[aria-current="page"] {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-input);
}

@media (max-width: 860px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        padding: 0.5rem clamp(1.25rem, 4vw, 3rem) 1rem;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
    }

    .nav-links a {
        padding: 0.85rem 0;
        width: 100%;
        border-bottom: 1px solid var(--line);
    }

    .nav.is-open .nav-links {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-actions .btn-ghost {
        display: none;
    }
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 2rem;
    width: 100%;
    padding-block: clamp(2rem, 6vw, 4rem);
}

.hero-copy {
    max-width: 620px;
}

.hero h1 {
    font-size: clamp(2.4rem, 5.4vw, 4.2rem);
    line-height: 1.04;
    color: var(--text);
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero-sub {
    margin-top: 1.5rem;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    color: var(--text-muted);
    max-width: 46ch;
}

.hero-actions {
    margin-top: 2.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stage {
    position: relative;
    height: clamp(360px, 46vw, 620px);
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hero-stage-fallback {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-card);
    background: radial-gradient(60% 55% at 60% 35%, rgba(255, 222, 112, 0.22), transparent 70%),
    radial-gradient(40% 40% at 30% 70%, rgba(255, 222, 112, 0.10), transparent 70%);
    display: none;
    align-items: center;
    justify-content: center;
}

.hero-stage-fallback svg {
    width: 55%;
    opacity: .9;
}

.no-webgl .hero-stage-fallback {
    display: flex;
}

.no-webgl #hero-canvas {
    display: none;
}

.spotlight {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(600px circle at var(--sx, 50%) var(--sy, 20%), rgba(255, 222, 112, 0.10), transparent 60%);
}

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

    .hero-copy {
        max-width: none;
        order: 1;
    }

    .hero-stage {
        order: 2;
        height: min(420px, 90vw);
    }
}

/* ---------- sr-only (accessible text for decorative marquees) ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- logo marquee (trust strip, lives under the hero) ---------- */
.logo-strip {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-block: clamp(2.25rem, 4vw, 3rem);
}

.logo-strip-label {
    text-align: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text);
    font-size: clamp(1.15rem, 2.4vw, 1.6rem);
    letter-spacing: -0.01em;
    margin-bottom: 2.25rem;
}

.logo-strip-label .accent-text {
    color: var(--accent);
}

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

.marquee-track {
    display: flex;
    align-items: center;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    width: max-content;
    animation: marquee 34s linear infinite;
}

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

.logo-mark {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-shrink: 0;
    color: var(--text-faint);
    transition: color .3s var(--ease), opacity .3s var(--ease);
    opacity: .75;
}

.logo-mark:hover {
    color: var(--text-muted);
    opacity: 1;
}

.logo-mark img {
    height: 26px;
    width: auto;
    flex-shrink: 0;
}

.logo-mark span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

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

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
    }
}

/* ---------- section headers ---------- */
.section-head {
    max-width: 640px;
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-head h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.75rem);
    line-height: 1.1;
}

.section-head p {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 52ch;
}

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

.section-pad {
    padding-block: var(--gap-section);
}

.section-pad-sm {
    padding-block: var(--gap-section-sm);
}

/* ---------- servicios: bento (4 cells, asymmetric, NOT 3 equal cards) ---------- */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 1.25rem;
}

.bento-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-card);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    padding: clamp(1.5rem, 2.4vw, 2.25rem);
    display: flex;
    flex-direction: column;
    transition: border-color .35s var(--ease), transform .35s var(--ease), background-color .35s var(--ease);
}

.bento-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-4px);
}

.bento-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 222, 112, 0.14), transparent 70%);
    opacity: 0;
    transition: opacity .4s var(--ease);
    pointer-events: none;
}

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

.bento-card .icon {
    transition: transform .4s var(--ease);
}

.bento-card:hover .icon {
    transform: translateY(-3px) scale(1.06);
}

.bento-card .icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-input);
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.bento-card h3 {
    font-size: 1.2rem;
    margin-bottom: .6rem;
}

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

.bento-a {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    background: linear-gradient(155deg, var(--bg-elevated-2), var(--bg-elevated));
    border-color: var(--accent-soft-2);
}

.bento-a .icon {
    width: 56px;
    height: 56px;
    font-size: 1.6rem;
}

.bento-a h3 {
    font-size: 1.5rem;
}

.bento-a p {
    font-size: 1rem;
}

/* mini chat mockup: fills the extra height of the featured card with a small
   agent/user conversation that plays once when the card scrolls into view. */
.agent-chat {
    margin-top: auto;
    padding-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.agent-chat-msg {
    max-width: 82%;
    padding: .65rem .9rem;
    border-radius: var(--radius-input);
    font-size: .85rem;
    line-height: 1.45;
}

.agent-chat-msg.is-user {
    align-self: flex-end;
    background: var(--bg-elevated-2);
    border: 1px solid var(--line);
    color: var(--text-muted);
    border-bottom-right-radius: 4px;
}

.agent-chat-msg.is-bot {
    align-self: flex-start;
    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-2);
    color: var(--accent);
    border-bottom-left-radius: 4px;
}

.agent-chat-typing {
    align-self: flex-start;
    display: flex;
    gap: .3rem;
    padding: .7rem .9rem;
    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-2);
    border-radius: var(--radius-input);
    border-bottom-left-radius: 4px;
}

.agent-chat-typing span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: .5;
}

.js .agent-chat-typing span {
    animation: agentTypingDot 1.1s ease-in-out infinite;
}

.agent-chat-typing span:nth-child(2) {
    animation-delay: .15s;
}

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

@keyframes agentTypingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: .45;
    }
    30% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

/* entrance choreography: user message, then typing dots, then the agent's reply —
   plays once, reusing the existing reveal system's .is-visible hook on the card. */
.js .agent-chat-msg,
.js .agent-chat-typing {
    opacity: 0;
}

.js .bento-a.is-visible .agent-chat-msg {
    animation: agentChatIn .45s var(--ease) forwards;
    animation-delay: var(--d, 0s);
}

.js .bento-a.is-visible .agent-chat-typing {
    animation: agentChatIn .3s var(--ease) forwards, agentChatOut .25s ease forwards;
    animation-delay: var(--d, 0s), var(--hide, .45s);
}

@keyframes agentChatIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* fades the typing dots out, then drops them from the flex flow so the next
   bubble slides up cleanly instead of leaving an empty gap behind. */
@keyframes agentChatOut {
    0% {
        opacity: 1;
    }
    99% {
        opacity: 0;
        display: flex;
    }
    100% {
        opacity: 0;
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .agent-chat-msg,
    .agent-chat-typing {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .agent-chat-typing span {
        animation: none !important;
    }
}

/* right-hand 2x2 block of equal cards, next to the featured bento-a */
.bento-b {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.bento-c {
    grid-column: 4 / 5;
    grid-row: 1 / 2;
}

.bento-d {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.bento-e {
    grid-column: 4 / 5;
    grid-row: 2 / 3;
}

@media (max-width: 980px) {
    .bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-a {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .bento-b,
    .bento-c,
    .bento-d,
    .bento-e {
        grid-column: auto;
        grid-row: auto;
    }
}

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

    .bento-a, .bento-b, .bento-c, .bento-d, .bento-e {
        grid-column: 1 / 2;
        grid-row: auto;
    }
}

/* ---------- proceso: timeline (distinct layout family) ---------- */
.timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    position: relative;
}

.timeline-track {
    position: absolute;
    top: 23px;
    left: 4%;
    right: 4%;
    height: 1px;
    background: var(--line-strong);
    overflow: hidden;
}

.timeline-track-fill {
    height: 100%;
    width: 100%;
    background: var(--accent);
}

.js .timeline-track-fill {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.4s var(--ease) .1s;
}

.js .timeline-track.is-visible .timeline-track-fill {
    transform: scaleX(1);
}

.timeline-step {
    position: relative;
}

.timeline-step .step-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--accent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}

.timeline-step:hover .step-icon {
    transform: scale(1.08);
    box-shadow: 0 0 0 6px var(--accent-soft);
}

.timeline-step h3 {
    font-size: 1.1rem;
    margin-bottom: .5rem;
}

.timeline-step p {
    color: var(--text-muted);
    font-size: .92rem;
}

@media (max-width: 900px) {
    .timeline {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline-track {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .js .timeline-track-fill {
        transition: none;
        transform: scaleX(1);
    }
}


/* ---------- producto: split feature (max 2 consecutive splits w/ hero) ---------- */
.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.product-copy h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.5rem);
    line-height: 1.1;
}

.product-copy p {
    margin-top: 1.1rem;
    color: var(--text-muted);
    font-size: 1.02rem;
    max-width: 50ch;
}

.product-features {
    margin-top: 2rem;
    display: grid;
    gap: .9rem;
}

.product-features li {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .95rem;
    color: var(--text);
}

.product-features li i {
    color: var(--accent);
    margin-top: .15rem;
    flex-shrink: 0;
}

.product-actions {
    margin-top: 2rem;
}

.product-visual {
    position: relative;
    border-radius: var(--radius-card);
    border: 1px solid var(--line);
    background: linear-gradient(160deg, var(--bg-elevated-2), var(--bg));
    aspect-ratio: 4/3.4;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-visual .glow {
    position: absolute;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(255, 222, 112, 0.28), transparent 70%);
    filter: blur(10px);
    animation: pulseGlow 5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: .85;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-visual .glow {
        animation: none;
    }
}

.product-visual .metric {
    position: relative;
    z-index: 1;
    text-align: center;
}

.product-visual .metric .value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    color: var(--accent);
    line-height: 1;
}

.product-visual .metric .label {
    margin-top: .5rem;
    color: var(--text-muted);
    font-size: .85rem;
    letter-spacing: .04em;
}

.product-grid-lines {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: .4;
}

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

    .product-visual {
        order: -1;
    }
}

/* ---------- CTA band (full-width, distinct family) ---------- */
@property --cta-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.cta-band {
    border-radius: var(--radius-card);
    background: linear-gradient(135deg, var(--bg-elevated-2), var(--bg-elevated));
    padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.5rem, 5vw, 4rem);
    text-align: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.cta-band::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--cta-angle), transparent 0deg, var(--accent) 40deg, transparent 130deg, transparent 230deg, var(--accent) 320deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateRing 7s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes rotateRing {
    to {
        --cta-angle: 360deg;
    }
}

.cta-band::before {
    content: "";
    position: absolute;
    top: -45%;
    left: 50%;
    translate: -50% 0;
    width: 75%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(255, 222, 112, 0.28), transparent 70%);
    pointer-events: none;
}

.cta-band h2 {
    font-size: clamp(2.1rem, 4.6vw, 3.4rem);
    max-width: 20ch;
    margin-inline: auto;
    position: relative;
    z-index: 2;
}

.cta-band p {
    margin-top: 1rem;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

.cta-band .hero-actions {
    justify-content: center;
    margin-top: 2.25rem;
    position: relative;
    z-index: 2;
}

.cta-band .hero-actions .btn-primary {
    padding: 1.05rem 2.1rem;
    font-size: 1rem;
}

.cta-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: .5;
    pointer-events: none;
    z-index: 1;
    animation: floatParticle 7s ease-in-out infinite;
}

.cta-particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.cta-particle:nth-child(2) {
    top: 72%;
    left: 18%;
    animation-delay: 1.4s;
    width: 4px;
    height: 4px;
}

.cta-particle:nth-child(3) {
    top: 24%;
    left: 88%;
    animation-delay: .7s;
}

.cta-particle:nth-child(4) {
    top: 78%;
    left: 82%;
    animation-delay: 2.1s;
    width: 5px;
    height: 5px;
}

.cta-particle:nth-child(5) {
    top: 48%;
    left: 4%;
    animation-delay: 3s;
    width: 4px;
    height: 4px;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0);
        opacity: .35;
    }
    50% {
        transform: translateY(-18px);
        opacity: .85;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta-band::after {
        animation: none;
    }

    .cta-particle {
        animation: none;
    }
}

/* ---------- footer ---------- */
.footer {
    border-top: 1px solid var(--line);
    padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: .92rem;
    max-width: 32ch;
}

.footer-col h4 {
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 1.1rem;
}

.footer-col ul {
    display: grid;
    gap: .75rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: .92rem;
    transition: color .25s var(--ease);
}

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

.footer-social {
    display: flex;
    gap: .75rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}

.footer-social a:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding-top: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-faint);
    font-size: .82rem;
}

.footer-bottom ul {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-bottom a:hover {
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .footer-top {
        grid-template-columns: 1fr;
    }
}

/* ---------- reveal on scroll (IntersectionObserver driven, class toggle only) ----------
   Gated behind .js (set by a blocking inline script in <head>) so content stays fully
   visible if JavaScript fails to load — no permanently-invisible sections. */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-reveal-group] > * {
    transition-delay: calc(var(--i, 0) * 80ms);
}

@media (prefers-reduced-motion: reduce) {
    .js [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .btn, .bento-card, .footer-social a {
        transition: none !important;
    }
}

/* ---------- page hero (secondary pages: trabajos, contacto, legal) ---------- */
.page-hero {
    padding-top: clamp(9rem, 16vw, 11rem);
    padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.page-hero .eyebrow {
    margin-bottom: 1rem;
}

.page-hero h1 {
    font-size: clamp(2.2rem, 4.6vw, 3.4rem);
    max-width: 16ch;
}

.page-hero p {
    margin-top: 1.1rem;
    color: var(--text-muted);
    max-width: 56ch;
    font-size: 1.05rem;
}

/* ---------- trabajos: filters + grid ---------- */
.filters {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: .55rem 1.1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 500;
    transition: all .25s var(--ease);
}

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

.filter-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

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

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

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

.work-card .thumb {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.work-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}

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

.work-card .thumb .tag {
    position: absolute;
    top: .9rem;
    left: .9rem;
    padding: .35rem .75rem;
    border-radius: var(--radius-pill);
    background: rgba(2, 2, 30, 0.7);
    backdrop-filter: blur(8px);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--accent);
    border: 1px solid var(--accent-soft-2);
}

.work-card .info {
    padding: 1.4rem 1.5rem 1.6rem;
}

.work-card h3 {
    font-size: 1.1rem;
}

.work-card p {
    margin-top: .4rem;
    color: var(--text-muted);
    font-size: .88rem;
}

@media (max-width: 980px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ---------- work detail stats strip (varies layout, avoids 3rd split) ---------- */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stats-strip .stat {
    padding: 2rem clamp(1rem, 3vw, 2rem);
    border-left: 1px solid var(--line);
}

.stats-strip .stat:first-child {
    border-left: none;
}

.stats-strip .stat .value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--accent);
}

.stats-strip .stat .label {
    margin-top: .4rem;
    color: var(--text-muted);
    font-size: .85rem;
}

@media (max-width: 760px) {
    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-strip .stat:nth-child(2n+1) {
        border-left: none;
    }

    .stats-strip .stat:nth-child(n+3) {
        border-top: 1px solid var(--line);
    }
}

/* ---------- contacto ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(2rem, 5vw, 4rem);
}

.contact-info-card {
    border-radius: var(--radius-card);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    padding: clamp(1.75rem, 3vw, 2.5rem);
    height: fit-content;
}

.contact-info-card .row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding-block: 1.1rem;
    border-top: 1px solid var(--line);
}

.contact-info-card .row:first-of-type {
    border-top: none;
    padding-top: 0;
}

.contact-info-card .row i {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-input);
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info-card .row h4 {
    font-size: .95rem;
    margin-bottom: .25rem;
}

.contact-info-card .row p, .contact-info-card .row a {
    color: var(--text-muted);
    font-size: .9rem;
}

.contact-info-card .row a:hover {
    color: var(--accent);
}

.form-card {
    border-radius: var(--radius-card);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    padding: clamp(1.75rem, 3.5vw, 2.75rem);
}

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

.field {
    display: grid;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

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

.field .hint {
    font-size: .78rem;
    color: var(--text-faint);
}

.field input, .field textarea, .field select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-input);
    padding: .85rem 1rem;
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.field input::placeholder, .field textarea::placeholder {
    color: var(--text-faint);
}

.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.field textarea {
    resize: vertical;
    min-height: 130px;
}

.field.has-error input, .field.has-error textarea {
    border-color: #ff8a8a;
}

.field .error-msg {
    display: none;
    font-size: .8rem;
    color: #ff8a8a;
}

.field.has-error .error-msg {
    display: block;
}

.field-check {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.field-check input {
    margin-top: .2rem;
    accent-color: var(--accent);
}

.field-check a {
    color: var(--accent);
}

.field-check.has-error {
    color: #ff8a8a;
}

.field-check.has-error input {
    outline: 1px solid #ff8a8a;
    outline-offset: 2px;
}

.form-status {
    display: none;
    margin-top: 1.25rem;
    padding: 1rem 1.2rem;
    border-radius: var(--radius-input);
    font-size: .9rem;
}

.form-status.is-success {
    display: block;
    background: rgba(120, 220, 150, 0.12);
    color: #8be3a3;
    border: 1px solid rgba(120, 220, 150, 0.3);
}

.form-status.is-error {
    display: block;
    background: rgba(255, 138, 138, 0.1);
    color: #ff8a8a;
    border: 1px solid rgba(255, 138, 138, 0.3);
}

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

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

/* ---------- legal pages ---------- */
.legal-content {
    max-width: 760px;
    padding-bottom: var(--gap-section);
}

.legal-content h2 {
    font-size: 1.4rem;
    margin-top: 2.75rem;
    margin-bottom: 1rem;
}

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

.legal-content p, .legal-content li {
    color: var(--text-muted);
    font-size: .98rem;
    margin-bottom: 1rem;
}

.legal-content ul {
    padding-left: 1.25rem;
    list-style: disc;
}

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

.legal-updated {
    color: var(--text-faint);
    font-size: .85rem;
    margin-bottom: 2.5rem;
    display: block;
}

/* ---------- cookie banner ---------- */
.cookie-banner {
    position: fixed;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.25rem;
    max-width: 640px;
    margin-inline: auto;
    z-index: 100;
    background: var(--bg-elevated-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    transform: translateY(140%);
    transition: transform .5s var(--ease);
}

.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-banner p {
    font-size: .88rem;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
}

.cookie-banner a {
    color: var(--accent);
}

.cookie-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner {
        transition: none;
    }
}

/* ---------- skip link (a11y) ---------- */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -60px;
    background: var(--accent);
    color: var(--accent-ink);
    padding: .75rem 1.25rem;
    border-radius: var(--radius-input);
    z-index: 200;
    font-weight: 600;
    font-size: .85rem;
    transition: top .25s var(--ease);
}

.skip-link:focus {
    top: 1rem;
}

/* =========================================================
   Landing de captación: consultoria.html
   Reutiliza hero, bento-card, timeline, stats-strip y cta-band.
   ========================================================= */
.landing .nav-actions {
    margin-left: auto;
}

.lp-hero {
    min-height: auto;
    padding-top: calc(72px + clamp(2rem, 6vw, 4rem));
}

.lp-assurances {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.5rem;
    color: var(--text-muted);
    font-size: .88rem;
}

.lp-assurances li {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.lp-assurances i {
    color: var(--accent);
    font-size: 1.05rem;
}

/* tarjeta "plan digital" del hero */
.lp-plan {
    position: relative;
    border-radius: var(--radius-card);
    border: 1px solid var(--line-strong);
    background: linear-gradient(160deg, var(--bg-elevated-2), var(--bg-elevated));
    padding: clamp(1.5rem, 3vw, 2.25rem);
    box-shadow: var(--shadow-soft);
    max-width: 480px;
    justify-self: end;
    width: 100%;
}

.lp-plan::before {
    content: "";
    position: absolute;
    inset: -30% -20% auto auto;
    width: 70%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(255, 222, 112, 0.18), transparent 70%);
    pointer-events: none;
}

.lp-plan-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.lp-plan-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.lp-plan-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: .75rem;
}

.lp-plan-steps li {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: .9rem 1rem;
    border-radius: var(--radius-input);
    border: 1px solid var(--line);
    color: var(--text-faint);
    font-size: .85rem;
}

.lp-plan-steps li i {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--line-strong);
    color: var(--text-muted);
}

.lp-plan-steps strong {
    display: block;
    color: var(--text);
    font-size: .98rem;
    font-weight: 600;
}

.lp-plan-steps .is-done i {
    background: var(--accent-soft);
    border-color: var(--accent-soft-2);
    color: var(--accent);
}

.lp-plan-steps .is-active {
    border-color: var(--accent-soft-2);
    background: var(--accent-soft);
}

.lp-plan-steps .is-active i {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.js .lp-plan-steps .is-active i {
    animation: lpSpin 6s linear infinite;
}

@keyframes lpSpin {
    to {
        rotate: 360deg;
    }
}

/* situaciones / dolor */
.lp-pains {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.lp-pain {
    border-radius: var(--radius-card);
    border: 1px dashed var(--line-strong);
    padding: 1.6rem;
}

.lp-pain i {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

.lp-pain p {
    color: var(--text);
    font-size: .98rem;
}

/* soluciones */
.lp-solutions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* agenda + Calendly */
.lp-agenda {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.lp-agenda-copy h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.75rem);
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.lp-agenda-copy > p {
    color: var(--text-muted);
}

.lp-agenda-alt {
    margin-top: 2rem;
    font-size: .9rem;
}

.lp-agenda-alt a {
    color: var(--accent);
}

.lp-calendly {
    position: relative;
    border-radius: var(--radius-card);
    border: 1px solid var(--line-strong);
    background: var(--bg-elevated);
    overflow: hidden;
    min-height: 420px;
}

.lp-calendly-gate,
.lp-calendly-done {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    padding: 2.5rem 1.5rem;
}

.lp-calendly-gate > i,
.lp-calendly-done > i {
    font-size: 2.5rem;
    color: var(--accent);
}

.lp-calendly-gate p,
.lp-calendly-done p {
    color: var(--text-muted);
    font-size: .92rem;
    max-width: 38ch;
}

.lp-calendly [hidden] {
    display: none;
}

.lp-calendly-direct {
    font-size: .85rem;
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lp-calendly.is-loaded .lp-calendly-gate {
    display: none;
}

.lp-calendly .calendly-inline-widget {
    min-width: 320px;
    height: 700px;
}

/* FAQ */
.lp-faq-wrap {
    max-width: 860px;
}

.lp-faq details {
    border-bottom: 1px solid var(--line);
}

.lp-faq summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
}

.lp-faq summary::-webkit-details-marker {
    display: none;
}

.lp-faq summary::after {
    content: "+";
    font-size: 1.4rem;
    color: var(--accent);
    transition: transform .3s var(--ease);
    flex-shrink: 0;
}

.lp-faq details[open] summary::after {
    transform: rotate(45deg);
}

.lp-faq details p {
    color: var(--text-muted);
    padding-bottom: 1.4rem;
    max-width: 65ch;
}

.lp-footer {
    border-top: none;
    padding-block: 0 2rem;
}

.lp-footer a:hover {
    color: var(--text-muted);
}

@media (max-width: 1080px) {
    .lp-pains,
    .lp-solutions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .lp-plan {
        justify-self: stretch;
        max-width: none;
        order: 2;
    }

    .lp-agenda {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .lp-pains,
    .lp-solutions {
        grid-template-columns: 1fr;
    }

    .landing .nav-actions .btn {
        padding-inline: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .js .lp-plan-steps .is-active i {
        animation: none;
    }
}
