/* ============================================
   Automarketing Digital — v7 (Apple-like)
   Dark + Blanco + Azul Apple · Mobile-first
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-feature-settings: "ss01", "cv01", "cv11";
}

img,
picture,
video,
svg {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* --- Tokens (Apple palette) --- */
:root {
    --text: #1d1d1f;
    --text-soft: #424245;
    --text-muted: #6e6e73;
    --text-mute-2: #86868b;

    --bg: #ffffff;
    --bg-soft: #f5f5f7;
    --bg-2: #fbfbfd;

    --line: #d2d2d7;
    --line-soft: #e8e8ed;

    --accent: #005ec3;
    --accent-hover: #004ea1;

    --dark: #1d1d1f;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;

    /* Type scale Apple-like */
    --fs-xs: 0.75rem;
    --fs-sm: 0.8125rem;
    --fs-base: 1rem;
    --fs-md: 1.0625rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.5rem;
    --fs-2xl: 2rem;
    --fs-3xl: 2.5rem;
    --fs-4xl: clamp(2.5rem, 5vw, 3.75rem);
    --fs-display: clamp(2rem, 6vw, 6rem);

    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    --lh-tight: 1.05;
    --lh-snug: 1.15;
    --lh-normal: 1.4;
    --lh-relaxed: 1.55;

    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;
    --sp-24: 6rem;
    --sp-32: 8rem;

    --r-sm: 0.375rem;
    --r-md: 0.75rem;
    --r-lg: 1.125rem;
    --r-xl: 1.5rem;
    --r-2xl: 2rem;
    --r-pill: 980px;

    --tr-fast: 150ms ease;
    --tr-base: 250ms ease;

    --container: 980px;
    --container-narrow: 720px;
    --container-wide: 1200px;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 22px;
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 22px;
}

.container-wide {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 22px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.022em;
    line-height: var(--lh-tight);
}

h1 {
    font-size: var(--fs-display);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1;
    font-feature-settings: "ss01", "cv01", "cv11";
}

.hero h1 {
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    overflow-wrap: break-word;
    background: linear-gradient(180deg, #1d1d1f 0%, #424245 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: var(--sp-4);
}

h3 {
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
    letter-spacing: -0.022em;
    line-height: 1.15;
    margin-bottom: var(--sp-3);
}

h4 {
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--sp-2);
}

p {
    color: var(--text-soft);
    line-height: var(--lh-relaxed);
    font-size: var(--fs-md);
}

p + p {
    margin-top: var(--sp-4);
}

strong {
    font-weight: var(--fw-semibold);
    color: var(--text);
}

em {
    font-style: italic;
}

/* --- Eyebrow / kicker (Apple style) --- */
.eyebrow {
    display: inline-block;
    font-size: var(--fs-md);
    font-weight: var(--fw-regular);
    color: var(--text-muted);
    margin-bottom: var(--sp-3);
    letter-spacing: 0;
}

/* --- Botones (pill Apple) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 12px 22px;
    border-radius: var(--r-pill);
    font-size: var(--fs-md);
    font-weight: var(--fw-regular);
    line-height: 1;
    transition: background var(--tr-base), color var(--tr-base), transform var(--tr-fast);
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    min-height: 44px;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    font-weight: 500;
}

.btn-outline:hover {
    color: var(--accent-hover);
    border-color: var(--accent-hover);
    background: rgba(0, 94, 195, 0.06);
}

.btn-outline::after {
    content: ' ›';
    font-size: 1.05em;
    margin-left: 2px;
}

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

.btn-dark:hover {
    background: #2a2a2c;
}

.btn-ghost-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-large {
    padding: 14px 28px;
    font-size: var(--fs-md);
}

/* --- Top nav (Apple-like glass) --- */
.topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 44px;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.topnav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 22px;
}

.topnav-brand {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--text);
}

.topnav-brand-mark {
    width: 24px;
    height: 24px;
    background: var(--dark);
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--fw-bold);
    font-size: 0.8125rem;
    line-height: 1;
}

.topnav-brand-text {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.01em;
}

.topnav-links {
    display: none;
    gap: var(--sp-6);
    align-items: center;
}

.topnav-links a {
    font-size: var(--fs-xs);
    color: var(--text-soft);
    transition: color var(--tr-fast);
}

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

.topnav-cta {
    color: var(--accent) !important;
    font-weight: var(--fw-medium);
}

.topnav-cta:hover {
    color: var(--accent-hover) !important;
}

.topnav-burger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    cursor: pointer;
}

.topnav-burger span {
    width: 18px;
    height: 1px;
    background: var(--text);
    border-radius: 1px;
    transition: transform var(--tr-fast), opacity var(--tr-fast);
}

.topnav-mobile {
    display: none;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0 22px;
}

.topnav-mobile.is-open {
    display: flex;
}

.topnav-mobile a {
    font-size: var(--fs-md);
    padding: 14px 0;
    border-bottom: 1px solid var(--line-soft);
    color: var(--text);
}

.topnav-mobile a:last-child {
    border-bottom: 0;
}

@media (min-width: 768px) {
    .topnav-links {
        display: flex;
    }

    .topnav-burger {
        display: none;
    }
}

/* --- Hero (Apple-like centered) --- */
.hero {
    padding: var(--sp-24) 0 var(--sp-20);
    background: var(--bg);
    text-align: center;
}

.hero-eyebrow {
    color: var(--text-muted);
    font-weight: var(--fw-regular);
    font-size: var(--fs-md);
    margin-bottom: var(--sp-3);
}

.hero h1 {
    margin: 0 auto var(--sp-5);
    max-width: 18ch;
}

.hero-sub {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--text-muted);
    line-height: 1.3;
    max-width: 32ch;
    margin: 0 auto var(--sp-8);
    font-weight: var(--fw-regular);
}

.hero-cta {
    display: flex;
    gap: var(--sp-5);
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero {
        padding: var(--sp-32) 0 var(--sp-24);
    }
}

/* --- Sections --- */
.section {
    padding: var(--sp-20) 0;
}

@media (min-width: 1024px) {
    .section {
        padding: var(--sp-24) 0;
    }
}

.section-soft {
    background: var(--bg-soft);
}

.section-dark {
    background: var(--dark);
    color: #fff;
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: #fff;
}

.section-dark p {
    color: rgba(255, 255, 255, 0.8);
}

.section-dark .eyebrow {
    color: rgba(255, 255, 255, 0.6);
}

.section-header {
    text-align: center;
    max-width: 56ch;
    margin: 0 auto var(--sp-16);
}

.section-header.is-left {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.section-header h2 {
    margin-bottom: var(--sp-3);
}

.section-header p {
    font-size: var(--fs-lg);
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- Cards (Apple-like, soft) --- */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: var(--sp-8);
    transition: transform var(--tr-base), box-shadow var(--tr-base);
    position: relative;
    overflow: hidden;
}

.card-hoverable::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 50% 0%, rgba(0, 94, 195, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

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

.card-hoverable > * {
    position: relative;
    z-index: 1;
}

.card-hoverable:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.card-soft {
    background: var(--bg-soft);
    border-color: transparent;
}

.card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(0, 94, 195, 0.10), rgba(0, 94, 195, 0.04));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-6);
    color: var(--accent);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hoverable:hover .card-icon {
    transform: scale(1.06);
}

.card-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.75;
}

.card h3 {
    font-size: var(--fs-lg);
    margin-bottom: var(--sp-2);
}

.card p {
    font-size: var(--fs-base);
    color: var(--text-muted);
    margin-bottom: var(--sp-4);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    font-size: var(--fs-md);
    font-weight: var(--fw-regular);
    color: var(--accent);
    transition: color var(--tr-fast);
}

.card-link:hover {
    color: var(--accent-hover);
}

.card-link::after {
    content: ' ›';
    margin-left: 2px;
}

/* --- Grids --- */
.grid {
    display: grid;
    gap: var(--sp-5);
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

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

@media (min-width: 768px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Steps --- */
.steps {
    display: grid;
    gap: var(--sp-10);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: var(--fw-semibold);
    font-size: var(--fs-base);
    margin-bottom: var(--sp-5);
}

.step h3 {
    margin-bottom: var(--sp-2);
}

.step p {
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .steps {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sp-8);
    }
}

/* --- Caso real --- */
.caso-card {
    display: grid;
    gap: var(--sp-10);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-2xl);
    padding: var(--sp-12) var(--sp-8);
}

.caso-meta {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--sp-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.caso-card h3 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    margin-bottom: var(--sp-4);
}

.caso-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
    margin-top: var(--sp-6);
}

.caso-stat {
    background: var(--bg-soft);
    border-radius: var(--r-md);
    padding: var(--sp-5);
    text-align: center;
}

.caso-stat-num {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-semibold);
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: var(--sp-2);
}

.caso-stat-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .caso-card {
        grid-template-columns: 1.2fr 1fr;
        align-items: center;
        padding: var(--sp-16);
    }
}

/* --- Bloque CTA / final --- */
.cta-block {
    text-align: center;
    padding: var(--sp-20) var(--sp-5);
}

.cta-block h2 {
    margin-bottom: var(--sp-4);
}

.cta-block p {
    color: var(--text-muted);
    max-width: 50ch;
    margin: 0 auto var(--sp-8);
    font-size: var(--fs-lg);
}

.cta-block .hero-cta {
    justify-content: center;
}

/* --- Footer (Apple style) --- */
.footer {
    background: var(--bg-soft);
    padding: var(--sp-16) 0 var(--sp-6);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    gap: var(--sp-10);
    margin-bottom: var(--sp-8);
    border-bottom: 1px solid var(--line);
    padding-bottom: var(--sp-10);
}

.footer-col h3 {
    font-size: var(--fs-xs);
    color: var(--text);
    margin-bottom: var(--sp-4);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-brand-col .topnav-brand {
    margin-bottom: var(--sp-4);
}

.footer-tagline {
    font-size: var(--fs-xs);
    margin-top: var(--sp-3);
    color: var(--text-muted);
}

.footer-col a {
    display: block;
    font-size: var(--fs-xs);
    color: var(--text-soft);
    padding: 4px 0;
    transition: color var(--tr-fast);
}

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

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--sp-3);
    font-size: 12px;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
    margin-right: var(--sp-3);
    text-decoration: underline;
}

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

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

/* --- Utilidades --- */
.u-center { text-align: center; }
.u-mb-0 { margin-bottom: 0 !important; }
.u-mb-2 { margin-bottom: var(--sp-2) !important; }
.u-mb-4 { margin-bottom: var(--sp-4) !important; }
.u-mb-6 { margin-bottom: var(--sp-6) !important; }
.u-mt-4 { margin-top: var(--sp-4) !important; }
.u-mt-8 { margin-top: var(--sp-8) !important; }

/* --- Skip link a11y --- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 10px;
    background: var(--accent);
    color: #fff;
    padding: var(--sp-3) var(--sp-5);
    font-weight: var(--fw-semibold);
    border-radius: var(--r-md);
    z-index: 9999;
}

.skip-link:focus {
    left: 10px;
}

/* --- Hero visual sutil --- */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 1100px;
    height: 1100px;
    max-width: 200vw;
    background: radial-gradient(circle, rgba(0, 94, 195, 0.06) 0%, rgba(0, 94, 195, 0.02) 30%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

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

/* --- Section dark visual sutil --- */
.section-dark {
    position: relative;
    overflow: hidden;
}

.section-dark::before {
    content: 'A';
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(20rem, 50vw, 38rem);
    color: rgba(255, 255, 255, 0.025);
    line-height: 0.85;
    font-weight: 800;
    letter-spacing: -0.06em;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    z-index: 0;
}

.section-dark > .container,
.section-dark > .container-narrow {
    position: relative;
    z-index: 1;
}

/* --- Card hover Apple-like más refinado --- */
.card-hoverable {
    cursor: default;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.card-hoverable:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px -12px rgba(15, 23, 41, 0.10);
    border-color: var(--line-soft);
}

.card-hoverable:hover .card-link {
    gap: var(--sp-2);
}

.card-link {
    transition: gap 0.3s ease, color 0.2s ease;
}

/* --- Fade-in al scroll --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger para grids - cada card con delay incremental */
.grid > .fade-in:nth-child(1) { transition-delay: 0ms; }
.grid > .fade-in:nth-child(2) { transition-delay: 60ms; }
.grid > .fade-in:nth-child(3) { transition-delay: 120ms; }
.grid > .fade-in:nth-child(4) { transition-delay: 180ms; }
.grid > .fade-in:nth-child(5) { transition-delay: 240ms; }
.grid > .fade-in:nth-child(6) { transition-delay: 300ms; }
.grid > .fade-in:nth-child(7) { transition-delay: 360ms; }

.steps > .fade-in:nth-child(1) { transition-delay: 0ms; }
.steps > .fade-in:nth-child(2) { transition-delay: 100ms; }
.steps > .fade-in:nth-child(3) { transition-delay: 200ms; }

/* --- Caso card refinado --- */
.caso-stat {
    transition: transform 0.3s ease;
}

.caso-stat-num {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: var(--fw-bold);
    letter-spacing: -0.03em;
}

/* --- Mockups (laptop / phone) --- */
.hero-visual {
    margin-top: var(--sp-16);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: var(--sp-6);
    position: relative;
    z-index: 1;
}

.device-laptop {
    position: relative;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16/10;
    background: #1d1d1f;
    border-radius: 14px 14px 6px 6px;
    padding: 14px 14px 10px 14px;
    box-shadow:
        0 40px 80px -20px rgba(15, 23, 41, 0.25),
        0 12px 28px rgba(15, 23, 41, 0.08);
}

.device-laptop::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #2a2a2c;
    border-radius: 2px;
}

.device-laptop::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: -6%;
    width: 112%;
    height: 18px;
    background: linear-gradient(180deg, #2a2a2c 0%, #1d1d1f 100%);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 6px 16px rgba(15, 23, 41, 0.10);
    z-index: -1;
}

.device-laptop img,
.device-laptop .device-screen {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
    object-position: top;
    display: block;
    background: #fff;
}

.device-phone {
    position: relative;
    width: 220px;
    aspect-ratio: 9/19;
    background: #1d1d1f;
    border-radius: 36px;
    padding: 12px;
    box-shadow:
        0 40px 80px -20px rgba(15, 23, 41, 0.25),
        0 12px 28px rgba(15, 23, 41, 0.08);
    flex-shrink: 0;
}

.device-phone::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 86px;
    height: 22px;
    background: #1d1d1f;
    border-radius: 14px;
    z-index: 2;
}

.device-phone img,
.device-phone .device-screen {
    width: 100%;
    height: 100%;
    border-radius: 26px;
    object-fit: cover;
    object-position: top;
    display: block;
    background: #fff;
}

@media (max-width: 768px) {
    .hero-visual {
        margin-top: var(--sp-12);
    }

    .hero-visual .device-phone {
        display: none; /* solo laptop en mobile para no saturar */
    }

    .device-laptop {
        max-width: 100%;
    }
}

/* --- Caso card con visual --- */
.caso-card-visual {
    background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%);
    border: 1px solid var(--line);
    border-radius: var(--r-2xl);
    padding: var(--sp-12) var(--sp-8);
    overflow: hidden;
}

.caso-card-visual .caso-meta {
    text-align: center;
    margin-bottom: var(--sp-3);
}

.caso-card-visual h3 {
    text-align: center;
    margin-bottom: var(--sp-4);
}

.caso-card-visual > p {
    text-align: center;
    max-width: 50ch;
    margin: 0 auto var(--sp-10);
}

.caso-visual-stack {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: var(--sp-6);
    margin-bottom: var(--sp-10);
}

.caso-visual-stack .device-laptop {
    max-width: 600px;
}

.caso-visual-stack .device-phone {
    width: 180px;
}

@media (max-width: 768px) {
    .caso-visual-stack {
        gap: 0;
    }

    .caso-visual-stack .device-phone {
        display: none;
    }

    .caso-visual-stack .device-laptop {
        max-width: 100%;
    }

    .caso-card-visual {
        padding: var(--sp-8) var(--sp-5);
    }
}

.caso-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-4);
    max-width: 720px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .caso-stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

.caso-stats-row .caso-stat {
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--sp-5) var(--sp-3);
}

.hero-cta-center {
    justify-content: center;
}

/* --- Gallery --- */
.gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-6);
}

@media (min-width: 640px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-item {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: var(--sp-5);
    transition: transform var(--tr-base), box-shadow var(--tr-base), border-color var(--tr-base);
    overflow: hidden;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px -12px rgba(15, 23, 41, 0.1);
    border-color: var(--line-soft);
}

.gallery-frame {
    position: relative;
    background: #1d1d1f;
    border-radius: 10px 10px 4px 4px;
    padding: 8px 8px 6px 8px;
    aspect-ratio: 16/10;
    margin-bottom: var(--sp-5);
    box-shadow: 0 12px 28px -8px rgba(15, 23, 41, 0.15);
    overflow: hidden;
}

.gallery-frame::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #2a2a2c;
    border-radius: 2px;
    z-index: 2;
}

.gallery-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 3px;
    background: #fff;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .gallery-frame img {
    transform: scale(1.04);
}

.gallery-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-2);
}

.gallery-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.gallery-item h3 {
    font-size: var(--fs-md);
    margin-bottom: var(--sp-2);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.card h3, .card-soft h3 {
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--sp-2);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.gallery-item p {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0;
}

.gallery-item-link {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.gallery-item-link[href]:hover ~ .gallery-frame::after {
    content: '';
}

/* --- Páginas de servicios --- */
.service-hero {
    padding: var(--sp-24) 0 var(--sp-16);
    background: var(--bg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 900px;
    max-width: 200vw;
    background: radial-gradient(circle, rgba(0, 94, 195, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

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

.service-hero h1 {
    margin: 0 auto var(--sp-5);
    max-width: 22ch;
    font-weight: 800;
    letter-spacing: -0.045em;
    background: linear-gradient(180deg, #1d1d1f 0%, #424245 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (min-width: 1024px) {
    .service-hero {
        padding: var(--sp-32) 0 var(--sp-20);
    }
}

/* --- Bloque problema (lista de dolores) --- */
.problem-list {
    display: grid;
    gap: var(--sp-4);
    max-width: 600px;
    margin: 0 auto;
}

.problem-item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-4);
    padding: var(--sp-4) 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--fs-md);
    color: var(--text-soft);
}

.problem-item::before {
    content: '×';
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(232, 76, 76, 0.1);
    color: #d44;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--fw-bold);
    font-size: 14px;
}

/* --- Tabla de servicios con estados --- */
.service-list {
    display: grid;
    gap: var(--sp-4);
}

.service-row {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: var(--sp-6);
    display: grid;
    gap: var(--sp-3);
    transition: border-color var(--tr-base), box-shadow var(--tr-base);
}

.service-row:hover {
    border-color: var(--line-soft);
    box-shadow: 0 8px 24px -8px rgba(15, 23, 41, 0.08);
}

.service-row-head {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-wrap: wrap;
}

.service-row-head h3 {
    margin: 0;
    font-size: var(--fs-lg);
    flex: 1;
    min-width: 200px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.status-tested {
    background: rgba(34, 197, 94, 0.10);
    color: #15803d;
}

.status-tested::before {
    content: '✓';
    font-size: 13px;
}

.status-untested {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.status-untested::before {
    content: '⚠';
    font-size: 12px;
}

.service-row p {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--fs-base);
    line-height: 1.55;
}

.service-row .service-fits {
    font-size: var(--fs-sm);
    color: var(--text-mute-2);
    font-style: italic;
    margin-top: var(--sp-2);
}

.service-fits::before {
    content: 'Cuándo encaja: ';
    font-style: normal;
    font-weight: var(--fw-semibold);
    color: var(--text-soft);
}

/* --- Bloque "Lo que NO hacemos" --- */
.dont-list {
    background: var(--bg-soft);
    border-radius: var(--r-xl);
    padding: var(--sp-8) var(--sp-6);
    max-width: 720px;
    margin: 0 auto;
}

.dont-list-item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--fs-base);
    color: var(--text-soft);
}

.dont-list-item:last-child {
    border-bottom: 0;
}

.dont-list-item::before {
    content: '✕';
    flex-shrink: 0;
    color: var(--text-muted);
    font-weight: var(--fw-bold);
    margin-top: 2px;
}

/* --- Cross-linking final --- */
.crosslinks {
    display: grid;
    gap: var(--sp-4);
    margin-top: var(--sp-12);
}

.crosslink-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: var(--sp-5) var(--sp-6);
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    transition: transform var(--tr-base), border-color var(--tr-base);
}

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

.crosslink-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(0, 94, 195, 0.08);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crosslink-text {
    flex: 1;
}

.crosslink-text strong {
    display: block;
    font-size: var(--fs-md);
    color: var(--text);
    margin-bottom: 2px;
}

.crosslink-text span {
    display: block;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.crosslink-arrow {
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .crosslinks {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Form (auditoría gratuita) --- */
.audit-form {
    margin-top: var(--sp-4);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-field {
    display: flex;
    flex-direction: column;
}

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

.form-field label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text);
    margin-bottom: var(--sp-2);
}

.form-optional {
    font-weight: var(--fw-regular);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    margin-left: 4px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: var(--fs-md);
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
    font-family: inherit;
    line-height: 1.4;
}

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

.form-field select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%228%22%20viewBox%3D%220%200%2012%208%22%3E%3Cpath%20fill%3D%22%23424245%22%20d%3D%22M6%208L0%200h12L6%208z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* === Legal pages (aviso-legal, privacidad, cookies) === */
.legal-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--sp-12) var(--sp-5) var(--sp-16);
}
.legal-eyebrow {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--sp-3);
}
.legal-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: var(--sp-3);
}
.legal-date {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--sp-10);
    padding-bottom: var(--sp-6);
    border-bottom: 1px solid var(--line);
}
.legal-section {
    margin-bottom: var(--sp-10);
}
.legal-section h2 {
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--sp-4);
    color: var(--text);
}
.legal-section p {
    font-size: var(--fs-md);
    line-height: 1.65;
    color: var(--text-soft);
    margin-bottom: var(--sp-3);
}
.legal-section ul {
    margin: var(--sp-3) 0 var(--sp-3) var(--sp-5);
    padding: 0;
}
.legal-section li {
    font-size: var(--fs-md);
    line-height: 1.65;
    color: var(--text-soft);
    margin-bottom: var(--sp-2);
    list-style: disc;
}
.legal-box {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: var(--sp-5) var(--sp-6);
    margin-bottom: var(--sp-4);
}
.legal-box p {
    margin-bottom: var(--sp-2);
    font-size: var(--fs-md);
}
.legal-box p:last-child { margin-bottom: 0; }
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--sp-3) 0;
    font-size: var(--fs-sm);
}
.legal-table th, .legal-table td {
    padding: var(--sp-3) var(--sp-4);
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.legal-table th {
    background: var(--bg-soft);
    font-weight: 600;
    color: var(--text);
}
.legal-table td {
    color: var(--text-soft);
}
.legal-link, .legal-section a {
    color: var(--accent);
    text-decoration: underline;
}
.legal-link:hover, .legal-section a:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

/* === Cookie banner v7 === */
.ck-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    color: #fff;
    padding: var(--sp-5) var(--sp-5);
    z-index: 99999;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.25);
}
.ck-banner-inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
    align-items: center;
    justify-content: space-between;
}
.ck-banner-text {
    flex: 1;
    min-width: 260px;
    font-size: var(--fs-sm);
    line-height: 1.55;
    color: #d2d2d7;
}
.ck-banner-text a { color: #fff; text-decoration: underline; }
.ck-banner-actions {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
}
.ck-btn {
    border-radius: 980px;
    padding: 9px 20px;
    font-size: var(--fs-sm);
    cursor: pointer;
    font-family: inherit;
    border: 1px solid transparent;
    transition: opacity 0.15s;
}
.ck-btn-reject {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}
.ck-btn-reject:hover { border-color: #fff; }
.ck-btn-accept {
    background: var(--accent);
    color: #fff;
    border: none;
}
.ck-btn-accept:hover { opacity: 0.9; }
