:root {
    --contact-dark: #07111f;
    --contact-accent: #0ea5e9;
    --contact-accent-dark: #0284c7;
    --contact-text: #0f172a;
    --contact-muted: #5f6f86;
    --contact-border: #dce4ee;
    --contact-soft: #f4f7fb;
    --contact-white: #ffffff;
}

.contact-page,
.contact-page * {
    box-sizing: border-box;
}

.contact-page {
    overflow: hidden;
    background: var(--contact-white);
    color: var(--contact-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.contact-container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.contact-hero {
    position: relative;
    isolation: isolate;
    min-height: 610px;
    display: flex;
    align-items: center;
    padding: 112px 0 104px;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 28%, rgba(14, 165, 233, 0.2), transparent 28%),
        linear-gradient(120deg, #050b15 0%, var(--contact-dark) 55%, #0b2036 100%);
    color: var(--contact-white);
}

.contact-hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.02) 40%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.02) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    z-index: -1;
    pointer-events: none;
    transform: translateX(-150%) skewX(-20deg);
    animation: contactHeroShimmer 5s linear infinite;
}

@keyframes contactHeroShimmer {
    0% { transform: translateX(-150%) skewX(-20deg); }
    20% { transform: translateX(200%) skewX(-20deg); }
    100% { transform: translateX(200%) skewX(-20deg); }
}

.contact-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% + 72px);
    height: calc(100% + 72px);
    z-index: -2;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to right, transparent, #000 35%, #000);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 35%, #000);
    animation: contactHeroGridPan 12s linear infinite;
    pointer-events: none;
}

@keyframes contactHeroGridPan {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-72px, -72px); }
}

.contact-hero__decoration {
    position: absolute;
    right: -180px;
    bottom: -330px;
    width: 700px;
    height: 700px;
    z-index: -2;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 50%;
    box-shadow:
        0 0 0 100px rgba(14, 165, 233, 0.035),
        0 0 0 200px rgba(14, 165, 233, 0.025);
    transform-origin: center;
    animation: contactHeroRingsPulse 3s ease-in-out infinite alternate;
}

@keyframes contactHeroRingsPulse {
    0% {
        transform: scale(0.95) rotate(-5deg);
        opacity: 0.6;
        border-color: rgba(56, 189, 248, 0.1);
        box-shadow:
            0 0 0 60px rgba(14, 165, 233, 0.015),
            0 0 0 130px rgba(14, 165, 233, 0.01);
    }
    100% {
        transform: scale(1.15) rotate(15deg);
        opacity: 1;
        border-color: rgba(56, 189, 248, 0.35);
        box-shadow:
            0 0 0 90px rgba(14, 165, 233, 0.06),
            0 0 0 180px rgba(14, 165, 233, 0.04);
    }
}

.contact-hero__content {
    position: relative;
    z-index: 2;
    width: min(880px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1180px) / 2));
    margin-right: 24px;
}

.contact-kicker {
    margin: 0 0 16px;
    color: var(--contact-accent);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.contact-hero h1 {
    margin: 0;
    color: var(--contact-white);
    font-size: clamp(42px, 5.6vw, 76px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.038em;
}

.contact-hero h2 {
    max-width: 790px;
    margin: 24px 0 0;
    color: #dce8f5;
    font-size: clamp(23px, 3vw, 36px);
    line-height: 1.2;
    font-weight: 650;
    letter-spacing: -0.025em;
}

.contact-hero__description {
    max-width: 760px;
    margin: 24px 0 0;
    color: #9fb0c4;
    font-size: 17px;
    line-height: 1.75;
}

.contact-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}

.contact-button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.contact-button:hover {
    transform: translateY(-2px);
}

.contact-button--light {
    background: var(--contact-white);
    color: var(--contact-dark);
}

.contact-button--light:hover {
    background: #eaf7fd;
}

.contact-button--outline {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--contact-white);
}

.contact-button--outline:hover {
    border-color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.07);
}

.contact-main {
    padding: 32px 0 48px;
    background:
        linear-gradient(180deg, var(--contact-soft) 0, #ffffff 420px);
}

.contact-section-heading {
    max-width: 690px;
    margin-bottom: 46px;
}

.contact-section-heading h2,
.contact-form-card__header h2 {
    margin: 0;
    color: var(--contact-text);
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.contact-section-heading > p:last-child,
.contact-form-card__header > p:last-child {
    margin: 16px 0 0;
    color: var(--contact-muted);
    font-size: 16px;
    line-height: 1.7;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.84fr) minmax(500px, 1.35fr);
    gap: 34px;
    align-items: start;
}

.contact-details {
    display: grid;
    gap: 12px;
}

.contact-details__intro {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
    overflow: hidden;
    padding: 30px 28px;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(135deg, #ffffff 0%, #f5f9fd 100%);
    color: var(--contact-text);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.contact-details__intro::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--contact-accent);
}

.contact-details__intro::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -96px;
    width: 210px;
    height: 210px;
    border: 1px solid rgba(14, 165, 233, 0.16);
    border-radius: 50%;
    box-shadow: 0 0 0 38px rgba(14, 165, 233, 0.035);
    pointer-events: none;
}

.contact-details__intro span {
    position: relative;
    z-index: 1;
    color: var(--contact-accent-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.contact-details__intro strong {
    position: relative;
    z-index: 1;
    max-width: 310px;
    font-size: 22px;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.contact-details__intro p {
    position: relative;
    z-index: 1;
    max-width: 360px;
    margin: 0;
    color: var(--contact-muted);
    font-size: 14px;
    line-height: 1.62;
}

.contact-details__badges {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.contact-details__badges small {
    padding: 7px 10px;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.contact-detail {
    min-width: 0;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--contact-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--contact-text);
    text-decoration: none;
    transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.contact-detail:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.contact-detail__icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eaf7fd;
    color: var(--contact-accent-dark);
}

.contact-detail__icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-detail small,
.contact-detail strong,
.contact-detail em {
    display: block;
}

.contact-detail small {
    margin-bottom: 5px;
    color: #728198;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-detail strong {
    overflow-wrap: anywhere;
    color: var(--contact-text);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
}

.contact-detail em {
    margin-top: 4px;
    color: var(--contact-muted);
    font-size: 13px;
    line-height: 1.45;
    font-style: normal;
}

.contact-form-card {
    padding: 42px;
    border: 1px solid var(--contact-border);
    border-radius: 22px;
    background: var(--contact-white);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
}

.contact-form-card__header {
    max-width: 660px;
    margin-bottom: 32px;
}

.contact-form-card__header h2 {
    font-size: clamp(30px, 3vw, 40px);
}

.contact-form {
    position: relative;
}

.contact-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.contact-form__full {
    grid-column: 1 / -1;
}

.form-field {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.form-field label {
    color: #29364a;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 750;
}

.form-field label span {
    color: #dc2626;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid #cad5e2;
    border-radius: 10px;
    background: #fbfcfe;
    color: var(--contact-text);
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.form-field input,
.form-field select {
    padding: 0 15px;
}

.form-field textarea {
    min-height: 150px;
    padding: 14px 15px;
    line-height: 1.6;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--contact-accent);
    background: var(--contact-white);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.contact-form__required {
    margin: 18px 0 0;
    color: #748196;
    font-size: 12px;
    line-height: 1.5;
}

.contact-submit {
    width: 100%;
    min-height: 54px;
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 10px;
    background: var(--contact-dark);
    color: var(--contact-white);
    font: inherit;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.contact-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--contact-accent-dark);
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.2);
}

.contact-submit:disabled {
    cursor: wait;
    opacity: 0.78;
}

.contact-submit__loader {
    width: 17px;
    height: 17px;
    display: none;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: contact-spin 700ms linear infinite;
}

.contact-submit.is-loading .contact-submit__loader {
    display: block;
}

.contact-message {
    min-height: 0;
    margin-top: 14px;
    padding: 0;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 700;
}

.contact-message--success,
.contact-message--error {
    padding: 13px 15px;
}

.contact-message--success {
    border: 1px solid #a7d7bd;
    background: #f0faf4;
    color: #17603a;
}

.contact-message--error {
    border: 1px solid #f1b8b8;
    background: #fff5f5;
    color: #9f2525;
}

.contact-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 360ms cubic-bezier(0.16, 1, 0.3, 1), transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-page.contact-motion-ready .reveal {
    opacity: 0;
    transform: translateY(18px);
}

.contact-page.contact-motion-ready .reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 80ms; }
.delay-2 { transition-delay: 150ms; }
.delay-3 { transition-delay: 220ms; }
.delay-4 { transition-delay: 290ms; }

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

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

    .contact-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .contact-container {
        width: min(100% - 32px, 1180px);
    }

    .contact-hero {
        min-height: auto;
        padding: 82px 0 76px;
    }

    .contact-hero__content {
        width: auto;
        margin-left: 16px;
        margin-right: 16px;
    }

    .contact-hero h1 {
        font-size: clamp(38px, 13vw, 56px);
        overflow-wrap: anywhere;
    }

    .contact-hero h2 {
        font-size: 23px;
    }

    .contact-hero__description {
        font-size: 15px;
    }

    .contact-hero__actions,
    .contact-button {
        width: 100%;
    }

    .contact-main {
        padding: 24px 0 32px;
    }

    .contact-section-heading {
        margin-bottom: 32px;
    }

    .contact-details,
    .contact-form__grid {
        grid-template-columns: 1fr;
    }

    .contact-form__full {
        grid-column: auto;
    }

    .contact-form-card {
        padding: 26px 20px;
        border-radius: 18px;
    }

    .contact-detail {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .contact-button,
    .contact-detail,
    .contact-submit {
        transition: none;
    }
}

/*
==========================================================================
Immersive app-like refinements
==========================================================================
*/

.contact-page {
    background:
        linear-gradient(180deg, #ffffff 0%, #f7fbff 42%, #ffffff 100%);
}

.contact-hero,
.contact-form-card,
.contact-details__intro {
    isolation: isolate;
}

.contact-kicker {
    width: fit-content;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border: 1px solid rgba(14, 165, 233, 0.24);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.08);
}

.contact-detail,
.contact-form-card,
.contact-details__intro {
    transform: translateZ(0);
}

.contact-detail {
    position: relative;
    overflow: hidden;
}

.contact-detail::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.13), transparent 36%);
    opacity: 0;
    transition: opacity 220ms ease;
}

.contact-detail:hover::before {
    opacity: 1;
}

.contact-detail__icon {
    box-shadow:
        0 14px 28px rgba(15, 23, 42, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.65);
    animation: contactIconPulse 3.8s ease-in-out infinite;
}

@keyframes contactIconPulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
        box-shadow:
            0 14px 28px rgba(15, 23, 42, 0.08),
            inset 0 0 0 1px rgba(255, 255, 255, 0.65);
    }
    50% {
        transform: scale(1.09);
        filter: brightness(1.04);
        box-shadow:
            0 18px 34px rgba(15, 23, 42, 0.12),
            inset 0 0 0 1px rgba(255, 255, 255, 0.9);
    }
}

.contact-button,
.contact-submit {
    min-height: 54px;
}

@media (max-width: 680px) {
    .contact-hero {
        margin: 12px 12px 0;
        border-radius: 26px;
        padding-top: 64px;
        padding-bottom: 66px;
        box-shadow: 0 24px 56px rgba(15, 23, 42, 0.18);
    }

    .contact-main {
        padding-top: 16px;
        padding-bottom: 24px;
    }

    .contact-detail,
    .contact-form-card,
    .contact-details__intro {
        border-radius: 18px;
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    }

    .contact-detail:active,
    .contact-button:active,
    .contact-submit:active {
        transform: scale(0.985);
    }

    .contact-detail {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 14px;
    }

    .contact-detail__icon {
        width: 50px;
        height: 50px;
        border-radius: 15px;
    }
}

.contact-detail:hover {
    border-color: rgba(15, 23, 42, 0.14);
}

.contact-detail::before {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.045), transparent 36%);
}

@media (prefers-reduced-motion: reduce) {
    .contact-detail__icon {
        animation: none !important;
    }
}

/* Acople perfecto del footer en contacto */
.layout-publico .footer-publico {
    margin-top: 0 !important;
}
