/* ---------- CONTACTO ---------- */
.contacto-sec {
    --ct-accent: var(--accent, #ff4d6d);
    --ct-accent-rgb: 255, 77, 109;
    --ct-line: rgba(255, 255, 255, .09);
    --ct-surface: rgba(255, 255, 255, .04);
    --ct-muted: rgba(255, 255, 255, .62);
    --ct-radius: 18px;
    --ct-ease: cubic-bezier(.16, 1, .3, 1);

    position: relative;
    isolation: isolate;
    padding-block: clamp(4rem, 8vw, 7rem);
    scroll-margin-top: 4.5rem;
    -webkit-tap-highlight-color: transparent;
}
.ct-atmosphere {
    position: absolute;
    inset: -10% 0;
    overflow: clip;
    z-index: -1;
    pointer-events: none;
}
.ct-atmosphere::before {
    content: "";
    position: absolute;
    inset: -10% -5%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 38% 40% at 22% 25%, rgba(var(--ct-accent-rgb), .09), transparent 70%),
        radial-gradient(ellipse 34% 40% at 85% 75%, rgba(var(--ct-accent-rgb), .07), transparent 70%);
    animation: ctDrift 20s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes ctDrift {
    from { transform: translate3d(-1.5%, 1%, 0) scale(1); }
    to   { transform: translate3d(1.5%, -1%, 0) scale(1.06); }
}
.contacto-sec.is-inactive .ct-atmosphere::before { animation-play-state: paused; will-change: auto; }

.ct-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    grid-template-areas: "intro form" "faq form";
    grid-template-rows: auto 1fr;
    gap: clamp(1.5rem, 3vw, 2.25rem) clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}
.ct-intro { grid-area: intro; }
.ct-form-card { grid-area: form; }
.ct-faq { grid-area: faq; }

/* En escritorio el formulario te acompaña mientras leés las dudas */
@media (min-width: 901px) {
    .ct-form-card { position: sticky; top: 6rem; }
}

/* Aparición de las tarjetas */
.ct-reveal {
    opacity: 0;
    transform: translateY(28px) scale(.985);
    transition: opacity .9s var(--ct-ease), transform .9s var(--ct-ease);
    transition-delay: var(--delay, 0ms);
}
.ct-reveal.visible { opacity: 1; transform: none; }

/* ---------- Intro (secuencia escalonada) ---------- */
.ct-s {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .8s var(--ct-ease), transform .8s var(--ct-ease);
    transition-delay: calc(var(--i, 0) * 110ms + 60ms);
}
.ct-stagger.visible .ct-s { opacity: 1; transform: none; }

.ct-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.25rem;
    color: var(--ct-accent);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.ct-eyebrow::before {
    content: "";
    width: 34px;
    height: 1px;
    background: var(--ct-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .9s var(--ct-ease) .15s;
}
.ct-stagger.visible .ct-eyebrow::before { transform: scaleX(1); }

.ct-intro h2 {
    margin: 0 0 1.1rem;
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    line-height: 1.06;
    letter-spacing: -.03em;
}
/* Cada línea sube desde una máscara */
.ct-line {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: .1em;
    margin-bottom: -.1em;
}
.ct-line > span {
    display: inline-block;
    transform: translateY(115%);
    transition: transform 1s var(--ct-ease);
    transition-delay: calc(var(--i, 1) * 120ms + 80ms);
}
.ct-stagger.visible .ct-line > span { transform: none; }

.ct-intro > p { max-width: 44ch; margin: 0; color: var(--ct-muted); line-height: 1.7; }
.ct-intro .ct-direct {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .4rem;
    max-width: none;
    margin-top: 1.1rem;
    font-size: .9rem;
}
.ct-direct a {
    padding-block: .15rem;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(var(--ct-accent), var(--ct-accent)) 0 100% / 0% 1px no-repeat;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    transition: color .2s, background-size .4s var(--ct-ease);
}
.ct-direct span { margin-inline: .6rem; opacity: .4; }
.ct-direct { margin-right: .5rem; }
.ct-direct a:not(:first-child) { margin-left: 0; }
@media (hover: hover) {
    .ct-direct a:hover { color: var(--ct-accent); background-size: 100% 1px; }
}
.ct-direct a:focus-visible { outline: 2px solid var(--ct-accent); outline-offset: 3px; border-radius: 3px; }

/* ---------- Tarjeta base (borde con spotlight) ---------- */
.ct-card {
    position: relative;
    padding: 1px;
    border-radius: var(--ct-radius);
    background: var(--ct-line);
    isolation: isolate;
}
.ct-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(360px circle at var(--x, 50%) var(--y, 0%), rgba(var(--ct-accent-rgb), .7), transparent 60%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
.ct-card:hover::before,
.ct-form-card:focus-within::before { opacity: 1; }
.ct-in {
    position: relative;
    border-radius: calc(var(--ct-radius) - 1px);
    background: linear-gradient(180deg, #13171F 0%, #0B0F14 100%);   /* mismo fondo de tarjeta que tu CTA anterior */
    overflow: hidden;
}

/* ---------- Formulario ---------- */
.ct-form { padding: clamp(1.4rem, 3vw, 2.2rem); }

/* Selector de modo con "pastilla" que se desliza */
.ct-seg {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 1.6rem;
    padding: 4px;
    border: 1px solid var(--ct-line);
    border-radius: 12px;
    background: var(--ct-surface);
}
.ct-seg-pill { display: none; }
.ct-seg label { position: relative; cursor: pointer; touch-action: manipulation; }
.ct-seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.ct-seg span:not(.ct-seg-pill) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .55rem .5rem;
    border-radius: 9px;
    color: var(--ct-muted);
    font-size: .9rem;
    line-height: 1.2;
    text-align: center;
    transition: background .2s ease, color .25s ease, box-shadow .2s ease, transform .15s ease;
}
.ct-seg input:checked + span {
    background: rgba(var(--ct-accent-rgb), .14);
    box-shadow: inset 0 0 0 1px rgba(var(--ct-accent-rgb), .5);
    color: #fff;
}
.ct-seg input:focus-visible + span { outline: 2px solid var(--ct-accent); outline-offset: 2px; }
.ct-seg label:active span { transform: scale(.97); }
@media (hover: hover) {
    .ct-seg label:hover span { color: #fff; }
}
@supports selector(:has(*)) {
    .ct-seg-pill {
        display: block;
        position: absolute;
        top: 4px;
        bottom: 4px;
        left: 4px;
        width: calc(50% - 6px);
        border-radius: 9px;
        background: rgba(var(--ct-accent-rgb), .14);
        box-shadow: inset 0 0 0 1px rgba(var(--ct-accent-rgb), .5);
        transition: transform .45s var(--ct-ease);
        pointer-events: none;
    }
    .ct-seg:has(input[value="contratar"]:checked) .ct-seg-pill { transform: translateX(calc(100% + 4px)); }
    .ct-seg input:checked + span { background: transparent; box-shadow: none; }
}

.ct-field { display: grid; gap: .55rem; margin: 0 0 1.3rem; padding: 0; border: 0; min-width: 0; }
.ct-label { padding: 0; color: rgba(255, 255, 255, .88); font-size: .85rem; transition: color .2s ease; }
.ct-label em { color: var(--ct-muted); font-style: normal; }
.ct-field:focus-within > .ct-label { color: #fff; }

.ct-input {
    width: 100%;
    box-sizing: border-box;
    padding: .85rem 1rem;
    border: 1px solid var(--ct-line);
    border-radius: 12px;
    background: var(--ct-surface);
    color: #fff;
    font: inherit;
    font-size: 1rem;              /* 16px: evita el zoom automático en iPhone */
    line-height: 1.5;
    min-height: 48px;
    transition: border-color .2s ease, box-shadow .25s ease, background .2s ease;
}
/* Sin scroll propio por defecto: el JS (autogrow) lo activa solo cuando el texto supera el alto máximo.
   Así el dedo desliza la página y no el cuadro. */
textarea.ct-input { min-height: 120px; resize: none; overflow-y: hidden; }
.ct-input::placeholder { color: rgba(255, 255, 255, .35); transition: color .2s ease; }
.ct-input:focus::placeholder { color: rgba(255, 255, 255, .2); }
.ct-input:focus {
    outline: none;
    border-color: rgba(var(--ct-accent-rgb), .7);
    background: rgba(255, 255, 255, .05);
    box-shadow: 0 0 0 4px rgba(var(--ct-accent-rgb), .14);
}
.ct-input[aria-invalid="true"] { border-color: #ff6b6b; }
.ct-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(255, 107, 107, .16); }

.ct-error { color: #ff8a8a; font-size: .82rem; }
.ct-error[hidden] { display: none; }
.ct-error:not([hidden]) { animation: ctErr .4s var(--ct-ease); }
@keyframes ctErr {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* Bloque "¿Qué tenés en mente?": se despliega con suavidad */
.ct-collapse {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows .5s var(--ct-ease), opacity .35s ease;
}
.ct-collapse.is-open { grid-template-rows: 1fr; opacity: 1; transition-delay: 0s, .1s; }
.ct-collapse-in {
    min-height: 0;
    overflow: hidden;
    margin: -4px;           /* deja lugar al foco sin mover el layout */
    padding: 4px;
}
.ct-collapse .ct-field { margin: 0; padding-bottom: 1.3rem; }

/* Chips */
.ct-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.ct-chip { position: relative; cursor: pointer; touch-action: manipulation; }
.ct-chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.ct-chip span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .5rem 1rem;
    border: 1px solid var(--ct-line);
    border-radius: 100px;
    background: var(--ct-surface);
    color: rgba(255, 255, 255, .75);
    font-size: .88rem;
    transition: border-color .2s ease, background .2s ease, color .2s ease, transform .15s ease;
}
.ct-chip:active span { transform: scale(.96); }
.ct-chip input:checked + span {
    border-color: rgba(var(--ct-accent-rgb), .75);
    background: rgba(var(--ct-accent-rgb), .13);
    color: #fff;
    animation: ctPop .4s var(--ct-ease);
}
@keyframes ctPop {
    0%   { transform: scale(.94); }
    55%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.ct-chip input:focus-visible + span { outline: 2px solid var(--ct-accent); outline-offset: 2px; }
@media (hover: hover) {
    .ct-chip:hover span { border-color: rgba(255, 255, 255, .22); }
}

/* Botón de envío */
.ct-submit {
    width: 100%;
    min-height: 52px;
    justify-content: center;
    gap: .55rem;
    margin-top: .25rem;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform .2s var(--ct-ease), box-shadow .3s ease, filter .2s ease;
}
.ct-arrow { display: inline-block; transition: transform .35s var(--ct-ease); }
.ct-submit:active { transform: scale(.98); }
.ct-submit.is-done { pointer-events: none; }
.ct-submit.is-done .ct-arrow { animation: ctCheck .5s var(--ct-ease); }
@keyframes ctCheck {
    from { opacity: 0; transform: scale(.4) rotate(-40deg); }
    to   { opacity: 1; transform: none; }
}
@media (hover: hover) {
    .ct-submit:hover { box-shadow: 0 10px 30px -10px rgba(var(--ct-accent-rgb), .6); }
    .ct-submit:hover .ct-arrow { transform: translateX(5px); }
}

.ct-note { margin: .9rem 0 0; color: var(--ct-muted); font-size: .8rem; line-height: 1.5; text-align: center; }
.ct-note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; transition: color .2s; }
@media (hover: hover) {
    .ct-note a:hover { color: var(--ct-accent); }
}

/* ---------- Dudas frecuentes ---------- */
.ct-faq-title { margin: 0; padding: 1.3rem 1.5rem .6rem; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ct-muted); }
.ct-q { border-top: 1px solid var(--ct-line); }
.ct-faq-title + .ct-q { border-top: 0; }
.ct-q summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 56px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    list-style: none;
    font-size: .98rem;
    font-weight: 600;
    transition: color .2s ease, background .2s ease;
    -webkit-user-select: none;
    user-select: none;
}
.ct-q summary::-webkit-details-marker { display: none; }
.ct-q summary::after {
    content: "";
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    margin-right: 4px;
    border-right: 2px solid var(--ct-muted);
    border-bottom: 2px solid var(--ct-muted);
    transform: rotate(45deg);
    transition: transform .4s var(--ct-ease), border-color .25s ease;
}
.ct-q[open] summary { color: #fff; }
.ct-q[open] summary::after { transform: rotate(-135deg); border-color: var(--ct-accent); }
.ct-q summary:active { background: rgba(255, 255, 255, .03); }
.ct-q summary:focus-visible { outline: 2px solid var(--ct-accent); outline-offset: -2px; }
.ct-q p { margin: 0; padding: 0 1.5rem 1.2rem; color: var(--ct-muted); font-size: .92rem; line-height: 1.65; }
.ct-q p a { color: var(--ct-accent); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) {
    .ct-q summary:hover { color: var(--ct-accent); }
    .ct-q summary:hover::after { border-color: var(--ct-accent); }
}

/* Celular / tablet sin mouse: luz fija en la esquina de cada tarjeta */
@media (hover: none) {
    .ct-card::before {
        opacity: 1;
        background: radial-gradient(240px circle at 0% 0%, rgba(var(--ct-accent-rgb), .5), transparent 65%);
    }
}

/* ---------- Responsive: en celular primero el formulario, después las dudas ---------- */
@media (max-width: 900px) {
    .ct-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "intro" "form" "faq";
        grid-template-rows: auto;
        gap: 1.75rem;
    }
    .ct-intro > p { max-width: none; }
}
@media (max-width: 720px) {
    .contacto-sec { padding-block: 3.5rem; padding-bottom: max(3.5rem, env(safe-area-inset-bottom)); }
    .ct-intro h2 { font-size: clamp(2rem, 9vw, 2.6rem); }

    /* Contacto directo como botones fáciles de tocar */
    .ct-intro .ct-direct { gap: .5rem; margin-top: 1.4rem; }
    .ct-direct { margin-right: 0; }
    .ct-direct span { display: none; }
    .ct-direct a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: .5rem 1rem;
        border: 1px solid var(--ct-line);
        border-radius: 100px;
        background: var(--ct-surface);
    }
    .ct-direct a:active { background: rgba(var(--ct-accent-rgb), .14); border-color: rgba(var(--ct-accent-rgb), .5); }

    .ct-form { padding: 1.35rem 1.1rem; }
    .ct-seg span:not(.ct-seg-pill) { font-size: .85rem; padding: .55rem .25rem; }
    .ct-chip span { padding: .5rem .9rem; font-size: .86rem; }
    .ct-faq-title, .ct-q summary { padding-inline: 1.15rem; }
    .ct-q p { padding-inline: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ct-atmosphere::before { animation: none; will-change: auto; }
    .ct-reveal, .ct-s, .ct-line > span { opacity: 1; transform: none; transition: none; }
    .ct-seg-pill, .ct-submit, .ct-chip span { transition: none; }
    .ct-error, .ct-chip input:checked + span { animation: none; }
}