:root {
    --green-950: #103b24;
    --green-800: #176437;
    --green-700: #218047;
    --green-100: #e9f5e9;
    --green-50: #f5faf3;
    --yellow: #f7bf26;
    --yellow-soft: #fff5cf;
    --ink: #173328;
    --muted: #64736b;
    --line: #dce7df;
    --danger: #b42318;
    --white: #ffffff;
    --shadow: 0 22px 60px rgba(25, 73, 43, 0.14);
}

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

body {
    min-height: 100vh;
    padding: 24px 12px 48px;
    color: var(--ink);
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 8% 8%, rgba(247, 191, 38, 0.2) 0 90px, transparent 91px),
        radial-gradient(circle at 94% 28%, rgba(33, 128, 71, 0.12) 0 150px, transparent 151px),
        linear-gradient(145deg, #f7fbf4 0%, #edf6e9 48%, #f9f6e7 100%);
}

body::before,
body::after {
    position: fixed;
    z-index: -1;
    width: 260px;
    height: 110px;
    content: "";
    border: 2px solid rgba(33, 128, 71, 0.12);
    border-radius: 100% 0 100% 0;
    transform: rotate(-22deg);
}

body::before { left: -100px; bottom: 8%; }
body::after { right: -120px; top: 58%; transform: rotate(155deg); }
.page-shell { width: min(100%, 920px); margin: 0 auto; }

.hero {
    position: relative;
    overflow: hidden;
    padding: 28px 24px 30px;
    color: var(--white);
    text-align: center;
    background: linear-gradient(135deg, var(--green-950), var(--green-700));
    border-radius: 24px 24px 0 0;
}

.hero::after {
    position: absolute;
    right: -42px;
    bottom: -80px;
    width: 230px;
    height: 230px;
    content: "";
    border: 38px solid rgba(247, 191, 38, 0.16);
    border-radius: 50%;
}

.brand-logo-wrap {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 126px;
    height: 96px;
    margin-bottom: 14px;
    overflow: hidden;
    background: var(--white);
    border: 4px solid rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(7, 36, 20, 0.25);
}

.brand-logo { width: 118px; height: 118px; object-fit: contain; }

.event-tag {
    position: relative;
    z-index: 1;
    display: table;
    margin: 0 auto 10px;
    padding: 6px 12px;
    color: var(--green-950);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--yellow);
    border-radius: 999px;
}

h1 {
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
    font-size: clamp(1.7rem, 5vw, 2.55rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.subtitle {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.94rem;
    line-height: 1.55;
}

.content-card {
    padding: 20px;
    background: var(--white);
    border-radius: 0 0 24px 24px;
    box-shadow: var(--shadow);
}

.banner-premios {
    padding: 20px;
    background: linear-gradient(135deg, var(--yellow-soft), #fffaf0);
    border: 1px solid #f3d778;
    border-radius: 18px;
}

.banner-premios h2 { color: var(--green-950); font-size: 1.08rem; text-align: center; }
.grid-premios { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 15px; }

.premio-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 66px;
    padding: 10px;
    color: var(--green-950);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.25;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(247, 191, 38, 0.42);
    border-radius: 12px;
}

.premio-icon {
    display: grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 800;
    background: var(--green-700);
    border-radius: 50%;
}

.aviso { margin: 20px 0; padding: 15px 18px; font-weight: 650; line-height: 1.5; text-align: center; border-radius: 12px; }
.aviso-exito { color: #166534; background: #ecfdf3; border: 1px solid #86d6a3; }
.aviso-error { color: var(--danger); background: #fff1f0; border: 1px solid #f2aaa5; }
form { margin-top: 24px; }
.form-section { padding: 20px 0; border-top: 1px solid var(--line); }
.form-section:first-of-type { padding-top: 0; border-top: 0; }
.section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }

.section-number {
    display: grid;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    place-items: center;
    color: var(--white);
    font-size: 0.83rem;
    font-weight: 800;
    background: var(--green-700);
    border-radius: 10px;
}

.section-heading h2 { margin-bottom: 3px; color: var(--green-950); font-size: 1.06rem; }
.section-heading p { color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
.form-row:last-child { margin-bottom: 0; }
.form-group.full { margin-bottom: 16px; }

label { display: block; margin-bottom: 7px; color: #29483a; font-size: 0.86rem; font-weight: 750; }
.required { color: var(--danger); }

input[type="text"],
input[type="tel"],
select {
    width: 100%;
    min-height: 49px;
    padding: 12px 14px;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    background: #fbfdfb;
    border: 1px solid #cfdcd3;
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input::placeholder { color: #94a29a; }
input[type="text"]:focus,
input[type="tel"]:focus,
select:focus { outline: none; background: var(--white); border-color: var(--green-700); box-shadow: 0 0 0 4px rgba(33, 128, 71, 0.11); }
.field-error { display: none; margin-top: 6px; color: var(--danger); font-size: 0.78rem; }

.upload-zone {
    position: relative;
    padding: 20px;
    text-align: center;
    background: var(--green-50);
    border: 2px dashed #95bd9d;
    border-radius: 14px;
    transition: border-color 0.2s, background 0.2s;
}

.upload-zone.has-file { background: #eefaf0; border-color: var(--green-700); }
.custom-file-upload input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.preview-boleta {
    display: block;
    width: min(100%, 420px);
    max-height: 280px;
    margin: 0 auto 14px;
    object-fit: contain;
    border: 1px solid #c9ddca;
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 7px 18px rgba(22, 83, 45, 0.12);
}

.preview-boleta[hidden] { display: none; }
.upload-zone.has-file .upload-icon { display: none; }
.error-foto-cliente { text-align: center; }

.upload-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin: 0 auto 10px;
    place-items: center;
    color: var(--green-800);
    font-size: 1.35rem;
    background: var(--green-100);
    border-radius: 50%;
}

.btn-subir-foto { display: inline-block; margin: 0; padding: 10px 17px; color: var(--white); border: 0; font: inherit; font-size: 0.88rem; font-weight: 750; background: var(--green-700); border-radius: 9px; cursor: pointer; }
.btn-subir-foto:hover { background: var(--green-950); }
.btn-subir-foto[aria-disabled="true"] { opacity: .65; pointer-events: none; }
.nombre-archivo { display: block; max-width: 100%; margin-top: 9px; overflow: hidden; color: var(--muted); font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.help-text { display: block; margin-top: 10px; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.upload-note { margin-top: 12px; padding: 11px 12px; color: #744d00; font-size: 0.79rem; line-height: 1.45; background: var(--yellow-soft); border-radius: 9px; }
.consent-note { margin: 4px 0 14px; color: var(--muted); font-size: 0.76rem; line-height: 1.45; text-align: center; }

.btn-enviar {
    width: 100%;
    min-height: 56px;
    padding: 15px 20px;
    color: var(--white);
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--green-700), var(--green-950));
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(23, 100, 55, 0.22);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-enviar:hover { transform: translateY(-1px); box-shadow: 0 13px 24px rgba(23, 100, 55, 0.28); }
.btn-enviar:active { transform: translateY(0); }
.page-footer { padding: 20px 10px 0; color: #587064; font-size: 0.76rem; text-align: center; }

@media (min-width: 700px) {
    body { padding: 42px 22px 60px; }
    .hero { padding: 28px 42px 30px; text-align: center; }
    .brand-logo-wrap { width: 132px; height: 102px; margin: 0 auto 14px; }
    .brand-logo { width: 124px; height: 124px; }
    .event-tag { margin: 0 auto 10px; }
    .subtitle { margin: 0 auto; }
    .content-card { padding: 34px 42px 40px; }
    .grid-premios { grid-template-columns: repeat(4, 1fr); }
    .form-row.duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-section { padding: 26px 0; }
    .upload-zone { padding: 25px; }
}

@media (max-width: 380px) {
    .content-card { padding: 16px; }
    .grid-premios { grid-template-columns: 1fr; }
}

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