/* ==========================================================================
   LinkedTIC — main.css
   Metodología: BEM | Mobile-first | CSS3 nativo
   Breakpoints: 375 (base) → 768px → 1024px → 1440px
   ========================================================================== */

/* ── 1. RESET MÍNIMO ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

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

ul,
ol {
    list-style: none;
}

/* ── 2. BASE ──────────────────────────────────────────────────────────────── */
body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text);
    background-color: var(--color-surface);
    line-height: var(--leading-normal);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    /* Compensa el header fijo en scroll-snap y smooth scroll nativo */
    scroll-padding-top: 7rem;
}

/* Offset para header fijo al navegar por anchors */
section[id] {
    scroll-margin-top: 7rem;
}

/* ── 3. CONTENEDOR GLOBAL ────────────────────────────────────────────────── */
.hero__container,
.about__container,
.services__container,
.methodology__container,
.no-risk__container,
.contact__container,
.header__container,
.footer__container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-3);
}

/* ── 4. SECTION LABEL (pastilla de categoría) ─────────────────────────────── */
.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
    background-color: rgba(14, 165, 233, 0.10);
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-2);
}

.section-label--inverse {
    color: var(--color-primary-light);
    background-color: rgba(56, 189, 248, 0.18);
}

/* ── 5. BOTONES ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--fw-semibold);
    padding: 1.4rem 2.8rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    white-space: nowrap;
}

.btn--cta {
    background-color: var(--color-cta);
    color: var(--color-cta-contrast);
    box-shadow: var(--shadow-md);
}

.btn--cta:hover {
    background-color: var(--color-cta-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-0.2rem);
}

.btn--cta:focus-visible {
    outline: 3px solid var(--color-cta);
    outline-offset: 3px;
}

.btn--outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--outline:hover {
    background-color: var(--color-primary);
    color: var(--color-primary-contrast);
}

.btn--outline:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

.btn--full {
    width: 100%;
}

/* ── 6. ANIMACIONES ON-SCROLL ────────────────────────────────────────────── */
.scroll-reveal {
    opacity: 0;
    transform: translateY(var(--anim-distance));
    transition:
        opacity var(--anim-duration) var(--anim-easing),
        transform var(--anim-duration) var(--anim-easing);
}

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

/* Delays escalonados para cards */
.scroll-reveal[data-delay="1"] {
    transition-delay: 120ms;
}

.scroll-reveal[data-delay="2"] {
    transition-delay: 240ms;
}

/* ── 7. BOTÓN VOLVER ARRIBA ───────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: var(--space-3);
    right: var(--space-3);
    z-index: var(--z-fixed);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.8rem;
    height: 4.8rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(1rem);
    transition:
        opacity var(--transition-base),
        transform var(--transition-base),
        background-color var(--transition-fast);
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--color-primary-dark);
}

.back-to-top:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

/* ── 8. HEADER ────────────────────────────────────────────────────────────── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background-color: var(--color-surface);
    border-bottom: 1px solid transparent;
    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base);
}

.header.scrolled {
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    height: 7rem;
}

/* Logo */
.header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--fw-bold);
    line-height: 1;
}

.header__logo-linked {
    color: var(--color-text);
}

.header__logo-tic {
    color: var(--color-primary);
}

/* Mobile toggle */
.header__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    width: 3.2rem;
    height: 3.2rem;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.header__toggle-bar {
    display: block;
    height: 0.2rem;
    background-color: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-fast);
    transform-origin: center;
}

.header__toggle[aria-expanded="true"] .header__toggle-bar:nth-child(1) {
    transform: translateY(0.7rem) rotate(45deg);
}

.header__toggle[aria-expanded="true"] .header__toggle-bar:nth-child(2) {
    opacity: 0;
}

.header__toggle[aria-expanded="true"] .header__toggle-bar:nth-child(3) {
    transform: translateY(-0.7rem) rotate(-45deg);
}

.header__toggle:focus-visible {
    outline: 3px solid var(--color-focus);
}

/* Nav — mobile first */
.header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: var(--space-2) 0;
}

.header__nav.is-open {
    display: block;
}

.header__nav-list {
    display: flex;
    flex-direction: column;
    padding-inline: var(--space-3);
}

.header__nav-link {
    display: block;
    padding: var(--space-2) 0;
    font-size: var(--text-base);
    font-weight: var(--fw-medium);
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    transition: color var(--transition-fast);
}

.header__nav-link:hover,
.header__nav-link.active {
    color: var(--color-primary);
}

.header__nav-list li:last-child .header__nav-link {
    border-bottom: none;
}

.header__nav-link--cta {
    color: var(--color-cta);
    font-weight: var(--fw-semibold);
}

.header__nav-link--cta:hover {
    color: var(--color-cta-dark);
}

/* ── 9. HERO ──────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100svh;
    background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 55%, #e0f2fe 100%);
    display: flex;
    align-items: center;
    padding-top: 7rem;
    /* compensa header fijo */
    overflow: hidden;
}

.hero__container {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding-block: var(--space-7);
}

.hero__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 68rem;
}

.hero__eyebrow {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.hero__title {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--fw-bold);
    line-height: var(--leading-tight);
    color: var(--color-text);
}

.hero__subtitle {
    font-size: var(--text-md);
    color: var(--color-muted);
    line-height: var(--leading-relaxed);
    max-width: 58rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-1);
}

.hero__microcopy {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

/* Visual – logo PNG */
.hero__visual {
    display: none;
    /* oculto en mobile */
    align-self: center;
    flex-shrink: 0;
}

.hero__visual-logo {
    width: 100%;
    max-width: 46rem;
    height: auto;
    object-fit: contain;
    /* Sutil sombra de marca para dar presencia sin fondo */
    filter: drop-shadow(0 8px 32px rgba(14, 165, 233, 0.22));
    transition: filter var(--transition-slow);
}

.hero__visual-logo:hover {
    filter: drop-shadow(0 12px 40px rgba(14, 165, 233, 0.38));
}


/* Wave */
.hero__wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero__wave svg {
    width: 100%;
}

/* ── 10. ABOUT ────────────────────────────────────────────────────────────── */
.about {
    background-color: var(--color-bg);
    padding-block: var(--space-7);
}

.about__container {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.about__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--fw-bold);
    line-height: var(--leading-snug);
    margin-bottom: var(--space-3);
}

.about__text {
    font-size: var(--text-md);
    color: var(--color-muted);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-2);
}

/* Stats */
.about__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.stat {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    text-align: center;
}

.stat__number {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--fw-bold);
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.stat__plus {
    font-size: var(--text-xl);
}

.stat__label {
    font-size: var(--text-sm);
    color: var(--color-muted);
    line-height: var(--leading-snug);
}

/* ── 11. SERVICES ─────────────────────────────────────────────────────────── */
.services {
    background-color: var(--color-surface);
    padding-block: var(--space-7);
}

.services__intro {
    text-align: center;
    max-width: 64rem;
    margin-inline: auto;
    margin-bottom: var(--space-5);
}

.services__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--fw-bold);
    line-height: var(--leading-snug);
    margin-bottom: var(--space-2);
}

.services__subtitle {
    font-size: var(--text-md);
    color: var(--color-muted);
    line-height: var(--leading-relaxed);
}

.services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
}

/* ── 12. CARD (servicios) ─────────────────────────────────────────────────── */
.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition:
        box-shadow var(--transition-base),
        transform var(--transition-base),
        border-color var(--transition-base);
    cursor: default;
}

.card:hover {
    box-shadow: var(--shadow-brand);
    border-color: var(--color-primary-light);
    transform: translateY(-0.3rem);
}

.card__icon-wrap {
    width: 5.6rem;
    height: 5.6rem;
    background: rgba(14, 165, 233, 0.10);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    color: var(--color-primary);
    flex-shrink: 0;
}

.card__icon {
    width: 2.6rem;
    height: 2.6rem;
}

.card__title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--fw-semibold);
    color: var(--color-text);
    margin-bottom: var(--space-2);
    line-height: var(--leading-snug);
}

.card__body {
    font-size: var(--text-base);
    color: var(--color-muted);
    line-height: var(--leading-relaxed);
}

/* ── 13. METHODOLOGY ──────────────────────────────────────────────────────── */
.methodology {
    background-color: var(--color-bg);
    padding-block: var(--space-7);
}

.methodology__intro {
    text-align: center;
    max-width: 64rem;
    margin-inline: auto;
    margin-bottom: var(--space-5);
}

.methodology__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--fw-bold);
    line-height: var(--leading-snug);
    margin-bottom: var(--space-2);
}

.methodology__subtitle {
    font-size: var(--text-md);
    color: var(--color-muted);
}

.methodology__steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
}

/* Step Card */
.step-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    position: relative;
    overflow: hidden;
    transition:
        box-shadow var(--transition-base),
        border-color var(--transition-base);
}

.step-card:hover {
    box-shadow: var(--shadow-brand);
    border-color: var(--color-primary-light);
}

.step-card__badge {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: var(--fw-bold);
    color: rgba(14, 165, 233, 0.12);
    line-height: 1;
    position: absolute;
    top: var(--space-2);
    right: var(--space-3);
    user-select: none;
}

.step-card__icon-wrap {
    width: 5rem;
    height: 5rem;
    background: rgba(14, 165, 233, 0.10);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    color: var(--color-primary);
}

.step-card__icon {
    width: 2.4rem;
    height: 2.4rem;
}

.step-card__title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--fw-semibold);
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.step-card__body {
    font-size: var(--text-base);
    color: var(--color-muted);
    line-height: var(--leading-relaxed);
}

/* ── 14. NO-RISK ──────────────────────────────────────────────────────────── */
.no-risk {
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary-dark) 100%);
    padding-block: var(--space-7);
}

.no-risk__container {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.no-risk__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--fw-bold);
    line-height: var(--leading-snug);
    color: var(--color-surface);
    margin-bottom: var(--space-3);
}

.no-risk__text {
    font-size: var(--text-md);
    color: rgba(255, 255, 255, 0.80);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-2);
}

.no-risk__content .btn--cta {
    margin-top: var(--space-2);
}

/* Benefit cards */
.no-risk__benefits {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.benefit-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    transition: background-color var(--transition-base);
}

.benefit-card:hover {
    background-color: rgba(255, 255, 255, 0.13);
}

.benefit-card__icon-wrap {
    width: 4.8rem;
    height: 4.8rem;
    background: rgba(14, 165, 233, 0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-primary-light);
}

.benefit-card__icon {
    width: 2.2rem;
    height: 2.2rem;
}

.benefit-card__title {
    font-size: var(--text-base);
    font-weight: var(--fw-medium);
    color: var(--color-surface);
    line-height: var(--leading-snug);
}

/* ── 15. CONTACT ──────────────────────────────────────────────────────────── */
.contact {
    background-color: var(--color-surface);
    padding-block: var(--space-7);
}

.contact__container {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    max-width: 72rem;
}

.contact__intro {
    text-align: center;
}

.contact__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--fw-bold);
    line-height: var(--leading-snug);
    margin-bottom: var(--space-2);
}

.contact__subtitle {
    font-size: var(--text-md);
    color: var(--color-muted);
    line-height: var(--leading-relaxed);
}

/* Honeypot — completamente oculto */
.contact__honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Formulario */
.contact__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.form-group__label {
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text);
}

.form-group__required {
    color: var(--color-primary);
}

.form-group__optional {
    font-weight: var(--fw-regular);
    color: var(--color-muted);
}

.form-group__input {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.6rem;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
    width: 100%;
}

.form-group__input::placeholder {
    color: rgba(71, 85, 105, 0.5);
}

.form-group__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.form-group__input--invalid {
    border-color: var(--color-error);
}

.form-group__input--textarea {
    resize: vertical;
    min-height: 12rem;
}

.form-group__error {
    font-size: var(--text-sm);
    color: var(--color-error);
    min-height: 1.8rem;
}

.form-group--submit {
    margin-top: var(--space-1);
}

.contact__microcopy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    color: var(--color-muted);
    justify-content: center;
}

.contact__feedback {
    text-align: center;
    font-size: var(--text-base);
    font-weight: var(--fw-medium);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    display: none;
}

.contact__feedback.feedback--success {
    display: block;
    background-color: rgba(34, 197, 94, 0.10);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.30);
}

.contact__feedback.feedback--error {
    display: block;
    background-color: rgba(239, 68, 68, 0.10);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.30);
}

/* ── 16. FOOTER ───────────────────────────────────────────────────────────── */
.footer {
    background-color: var(--color-text);
    padding-block: var(--space-5);
}

.footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--fw-bold);
}

.footer__logo-linked {
    color: rgba(255, 255, 255, 0.85);
}

.footer__logo-tic {
    color: var(--color-primary-light);
}

.footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2) var(--space-3);
}

.footer__link {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.60);
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--color-primary-light);
}

.footer__link:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
    border-radius: 2px;
}

.footer__legal {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.35);
}

/* ── 17. RESPONSIVE — TABLET (768px) ─────────────────────────────────────── */
@media (min-width: 768px) {

    .header__toggle {
        display: none;
    }

    .header__nav {
        display: block;
        position: static;
        background: none;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .header__nav-list {
        flex-direction: row;
        gap: var(--space-1);
        padding-inline: 0;
        align-items: center;
    }

    .header__nav-link {
        padding: 0.8rem 1.4rem;
        border-bottom: none;
        border-radius: var(--radius-md);
    }

    .header__nav-link--cta {
        background-color: var(--color-cta);
        color: var(--color-cta-contrast) !important;
        padding: 0.8rem 1.8rem;
        border-radius: var(--radius-md);
    }

    .header__nav-link--cta:hover {
        background-color: var(--color-cta-dark);
    }

    /* Hero */
    .hero__title {
        font-size: var(--text-4xl);
    }

    /* About stats 3 cols */
    .about__stats {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Services 2-col */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Steps 3-col */
    .methodology__steps {
        grid-template-columns: repeat(3, 1fr);
    }

    /* No-risk */
    .no-risk__container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: var(--space-6);
    }

    /* Contact */
    .contact__container {
        margin-inline: auto;
    }

    /* Footer horizontal */
    .footer__container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        text-align: left;
    }

}

/* ── 18. RESPONSIVE — DESKTOP (1024px) ───────────────────────────────────── */
@media (min-width: 1024px) {

    /* Hero 2-col */
    .hero__container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-7);
    }

    .hero__visual {
        display: flex;
    }

    .hero__title {
        font-size: var(--text-5xl);
    }

    /* About 2-col */
    .about__container {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-7);
    }

    .about__content {
        flex: 1 1 54rem;
    }

    .about__stats {
        flex: 1 1 28rem;
        grid-template-columns: 1fr;
        align-self: center;
    }

    /* Services 3-col */
    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Contact form wider */
    .contact__form {
        padding: var(--space-6);
    }
}

/* ── 19. RESPONSIVE — WIDE (1440px) ──────────────────────────────────────── */
@media (min-width: 1440px) {
    .hero__title {
        font-size: var(--text-5xl);
    }
}