/* ==========================================================================
   KROTAR — Contact section & form
   ========================================================================== */

.contacto-glow-a {
    top: -50px;
    right: -60px;
    width: 480px;
    height: 480px;
}

.contacto-glow-b {
    bottom: -60px;
    left: -60px;
    width: 440px;
    height: 440px;
}

/* Halo sitting directly behind the form card so it never reads as a flat
   technical panel disconnected from the rest of the page. */
.contact-form-card::before {
    content: '';
    position: absolute;
    top: -15%;
    right: -15%;
    width: 60%;
    height: 45%;
    border-radius: 50%;
    filter: blur(80px);
    background: radial-gradient(circle, rgba(0, 145, 255, 0.28) 0%, transparent 75%);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 0;
}

/* Two columns on desktop (~40/60) so the whole section reads in close to
   one viewport instead of stacking message → card in a long vertical
   run. Both columns start on the same row (align-items:start). Falls back
   to a single centered column below 980px (see media query). */
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: var(--space-7);
    align-items: start;
}

.contact-intro {
    text-align: left;
}

.contact-intro .section-title {
    text-align: left;
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.contact-lead {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-body);
    margin: var(--space-3) 0 var(--space-5) 0;
    text-align: left;
}

/* De-emphasized on purpose — direct contact is a fallback, not competing
   with the headline above or the CTA in the card next to it. */
.contact-detail-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
}

.contact-detail-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: var(--color-text-dim);
}

.contact-detail-list .detail-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border-light);
    color: var(--color-text-dim);
}

.contact-detail-list a {
    color: var(--color-text-body);
    text-decoration: none;
}

.contact-detail-list a:hover {
    color: var(--color-text);
}

/* Form card — a clearly distinct dark-blue surface (not the generic
   near-black .glass-card background used elsewhere), so this card reads
   as the section's visual anchor instead of blending into the page. */
/* Interior split in two: form data (left) / four visual options (right) —
   trades width for height, with the CTA + note spanning both underneath.
   Falls back to a single stacked column at the same 980px breakpoint the
   outer .contact-grid already uses (see media query below). */
.contact-form-card {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.25rem;
    align-items: start;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(ellipse 120% 90% at 20% -10%, rgba(0, 145, 255, 0.16) 0%, transparent 55%),
        linear-gradient(165deg, rgba(0, 61, 150, 0.22) 0%, rgba(4, 8, 20, 0.94) 55%);
    border: 1px solid rgba(0, 145, 255, 0.38);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
        0 24px 60px rgba(0, 0, 0, 0.5),
        0 0 34px rgba(0, 90, 220, 0.14);
}

.contact-form-fields {
    grid-column: 1;
}

.contact-form-areas {
    grid-column: 2;
}

.form-submit-row,
.form-backend-note {
    grid-column: 1 / -1;
}

.area-select legend {
    display: block;
    width: 100%;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    letter-spacing: -0.005em;
    text-transform: uppercase;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 0.6rem;
}

/* Correo + WhatsApp stack full-width now that the column itself is only
   ~half the card's width — a nested two-column split here would make each
   field too narrow to be usable. */
.form-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.form-field {
    position: relative;
    z-index: 1;
    margin-bottom: 0.55rem;
    text-align: left;
}

.form-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-text-body);
    margin-bottom: 0.3rem;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.94rem;
    color: var(--color-text);
    background: rgba(4, 8, 20, 0.35);
    border: 1px solid rgba(59, 130, 246, 0.16);
    border-radius: var(--radius-sm);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.4rem;
}

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

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

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: rgba(0, 174, 239, 0.55);
    background: rgba(4, 8, 20, 0.5);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(0, 145, 255, 0.14);
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
    border-color: var(--color-error);
}

.form-error-msg {
    display: none;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--color-error);
}

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

/* "¿Qué quieres que revisemos?" — cuatro tarjetas de selección única en
   lugar de radio buttons nativos. El <input type="radio"> real sigue ahí
   (accesibilidad, envío del formulario, exclusividad nativa entre las
   cuatro), solo se oculta visualmente; el <label> completo es la tarjeta
   clicable. Mismos tokens de color/borde/sombra que el resto del
   formulario — ningún estilo nuevo. */
/* !important here is deliberate: this is a standard accessible-hide utility,
   and .form-field input { width: 100%; ... } elsewhere in this file has
   higher specificity (element+class) than .sr-only-input alone (class-only)
   and was silently stretching this "hidden" radio to 100% of the card —
   invisible on screen (clip still hides it) but a needlessly oversized,
   fragile layout box. Forcing 1x1px here is what makes it correct instead
   of "hidden by luck". */
.sr-only-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.area-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.4rem;
}

/* Each option is a small self-contained visual card: the approved photo
   fills the top area edge-to-edge, a thin caption strip sits below it —
   no icon, no description, the image itself does the work. */
.area-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: rgba(4, 8, 20, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: border-color var(--duration-fast) ease, box-shadow var(--duration-base) var(--ease-premium),
        transform var(--duration-base) var(--ease-premium);
}

.area-card:hover {
    border-color: rgba(0, 174, 239, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 145, 255, 0.15);
}

/* Compact selector height with a dark-blue gradient backdrop so
   object-fit:contain (full photo, no crop) never leaves a bare empty
   strip — the gradient reads as part of the card, not dead space. */
.area-card-visual {
    position: relative;
    display: block;
    width: 100%;
    height: 50px;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(0, 61, 150, 0.32) 0%, rgba(2, 4, 12, 0.9) 100%);
}

.area-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: filter var(--duration-fast) ease;
}

.area-card:hover .area-card-img {
    filter: brightness(1.12);
}

.sr-only-input:focus-visible+.area-card-visual {
    outline: 2px solid var(--color-cyan);
    outline-offset: -2px;
}

.area-card-label {
    padding: 0.4rem 0.4rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-text-body);
    transition: color var(--duration-fast) ease;
}

/* Selected state must be unmistakable at a glance — bright border, outer
   halo and a small filled indicator dot, not a faint color shift. */
.area-card::after {
    content: '';
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    background: rgba(4, 8, 20, 0.55);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity var(--duration-fast) ease, transform var(--duration-fast) ease,
        border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}

.area-card.is-selected {
    border-color: var(--color-cyan);
    box-shadow:
        inset 0 0 0 1px rgba(0, 174, 239, 0.5),
        0 14px 30px rgba(0, 0, 0, 0.4),
        0 0 26px rgba(0, 174, 239, 0.3);
}

.area-card.is-selected .area-card-label {
    color: var(--color-text);
}

.area-card.is-selected::after {
    opacity: 1;
    transform: scale(1);
    border-color: var(--color-cyan);
    background: var(--color-cyan);
}

.area-select.has-error .area-card {
    border-color: var(--color-error);
}

.form-consent {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0;
}

.form-consent input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 16px;
    height: 16px;
    accent-color: var(--color-cyan);
    flex-shrink: 0;
}

.form-consent label {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--color-text-body);
}

.form-consent a {
    color: var(--color-cyan);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.form-submit-row {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

/* The section's primary CTA — filled, centered, sized to read as the main
   action without dominating the whole card width. */
.contact-submit-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.form-status {
    font-size: 0.88rem;
    text-align: center;
    display: none;
}

.form-status.is-success {
    display: block;
    color: var(--color-success);
}

.form-status.is-error {
    display: block;
    color: var(--color-error);
}

/* Kept deliberately quiet — informational footnote, not a callout that
   should compete with the form itself. */
.form-backend-note {
    position: relative;
    z-index: 1;
    margin-top: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    font-size: 0.74rem;
    line-height: 1.5;
    color: var(--color-text-dim);
    text-align: center;
}

.form-backend-note strong {
    color: var(--color-text-muted);
    font-weight: 600;
}

@media (max-width: 980px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .contact-intro,
    .contact-intro .section-title,
    .contact-lead {
        text-align: center;
    }

    .contact-detail-list {
        align-items: center;
    }

    .contact-form-card {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
        row-gap: 0.75rem;
    }

    .contact-form-fields,
    .contact-form-areas {
        grid-column: 1;
    }
}

@media (max-width: 560px) {
    .contact-form-card {
        padding: 1rem 0.9rem;
    }

    .area-card-visual {
        height: 60px;
    }

    .contact-submit-btn {
        max-width: 100%;
    }
}
