:root {
    --bg-main: #07111f;
    --bg-soft: #0c1b30;
    --blue-primary: #3aa8ff;
    --cyan: #39f0ff;
    --text: #eaf6ff;
    --muted: rgba(234, 246, 255, .74);
    --line: rgba(130, 200, 255, .18);
    --card: rgba(7, 20, 38, .84);
    --radius: 24px;
    --shadow: 0 25px 80px rgba(0, 0, 0, .45);
}

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

html {
    min-height: 100%;
    background: var(--bg-main);
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 15%, rgba(58, 168, 255, .20), transparent 28%),
        radial-gradient(circle at 82% 20%, rgba(57, 240, 255, .11), transparent 30%),
        linear-gradient(135deg, #07111f, #0b1b32 48%, #102744);
    overflow-x: hidden;
}

.tech-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(58, 168, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(58, 168, 255, .035) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 92%);
}

.contact-section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: 100%;
    padding: 72px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.contact-box {
    width: 100%;
    max-width: 760px;
    padding: 38px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.brand-mark {
    width: 88px;
    height: 88px;
    margin: 0 auto 22px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    border: 1px solid rgba(58, 168, 255, .36);
    background: linear-gradient(145deg, rgba(58,168,255,.20), rgba(57,240,255,.05));
    box-shadow: 0 0 34px rgba(58,168,255,.20);
}

.brand-mark span {
    font-size: 44px;
    font-weight: 900;
    line-height: 1;
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(57, 240, 255, .4);
}

.small-title {
    display: inline-block;
    margin-bottom: 13px;
    color: var(--cyan);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: 2.5px;
}

h1 {
    margin-bottom: 16px;
    font-size: clamp(2.15rem, 6vw, 3.7rem);
    line-height: 1.02;
    letter-spacing: -2px;
}

.intro-text {
    max-width: 620px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.75;
}

.contact-form {
    width: 100%;
    margin-top: 34px;
    display: grid;
    gap: 20px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #d8ecff;
    font-size: 15px;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid rgba(0, 195, 255, .28);
    border-radius: 14px;
    outline: 0;
    background: rgba(3, 18, 35, .92);
    color: #fff;
    font: inherit;
    font-size: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.form-group select {
    color-scheme: dark;
}

.form-group textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #00c3ff;
    box-shadow: 0 0 22px rgba(0, 195, 255, .25);
}

.field-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: rgba(234, 246, 255, .52);
    font-size: 12px;
}

.turnstile-wrap {
    width: 100%;
    min-height: 65px;
    display: flex;
    align-items: center;
}

.form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
}

.main-btn,
.back-btn {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.main-btn {
    border: 0;
    color: #03101f;
    background: linear-gradient(135deg, #00c3ff, #7df9ff);
    box-shadow: 0 0 24px rgba(0, 195, 255, .32);
}

.main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 34px rgba(0, 195, 255, .48);
}

.back-btn {
    border: 1px solid rgba(0, 195, 255, .38);
    color: #d8ecff;
    background: rgba(0, 195, 255, .08);
}

.back-btn:hover {
    background: rgba(0, 195, 255, .16);
    box-shadow: 0 0 24px rgba(0, 195, 255, .22);
}

.form-alert {
    margin-top: 24px;
    padding: 15px 18px;
    border-radius: 14px;
    font-weight: 700;
    text-align: center;
}

.form-alert.success {
    border: 1px solid rgba(0, 255, 160, .35);
    background: rgba(0, 180, 100, .15);
    color: #b8ffd8;
}

.form-alert.error {
    border: 1px solid rgba(255, 80, 80, .35);
    background: rgba(180, 0, 0, .15);
    color: #ffd0d0;
}

.hidden-field {
    display: none !important;
}

@media (max-width: 768px) {
    .contact-section {
        padding: 34px 14px 45px;
    }

    .contact-box {
        max-width: 100%;
        padding: 28px 18px;
        border-radius: 24px;
    }

    .brand-mark {
        width: 74px;
        height: 74px;
        border-radius: 20px;
    }

    .brand-mark span {
        font-size: 37px;
    }

    h1 {
        letter-spacing: -1.2px;
    }

    .contact-form {
        gap: 17px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px;
        font-size: 16px; /* avoids iOS zoom */
    }

    .main-btn,
    .back-btn {
        min-height: 52px;
        font-size: 15px;
    }
}

@media (max-width: 420px) {
    .contact-section {
        padding: 22px 10px 36px;
    }

    .contact-box {
        padding: 24px 14px;
    }

    h1 {
        font-size: 2rem;
    }

    .intro-text {
        font-size: .95rem;
    }

    .field-meta {
        flex-direction: column;
        gap: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* =========================================================
   Logo principal del formulario
   ========================================================= */
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    margin: 0 auto 18px auto;
    overflow: hidden;
}

.brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

@media (max-width: 600px) {
    .brand-logo {
        width: 125px;
        height: 125px;
        margin-bottom: 14px;
    }
}