/* =========================================================================
   Fondo Franz Mayer — Convocatoria 2026
   Propuesta visual v4 — adaptación web editorial (no cartel pegado).
   Encabezado blanco compacto · franja editorial horizontal (texto + foto B/N
   independiente) · formulario centrado a lo ancho con stepper arriba.
   Blanco, negro y neutros; rojo institucional como acento.
   NOTA: solo capa visual. Se conservan clases/IDs y data-* que usa app.js.
   ========================================================================= */

:root {
    --red:      #d5122b;
    --red-dark: #a50f22;
    --ink:      #141414;
    --ink-soft: #3a3a3a;
    --black:    #000;
    --white:    #fff;
    --paper:    #f4f1ea;      /* neutro muy claro, uso mínimo */
    --line:     #e6e1d7;
    --line-mid: #d5cfc4;
    --muted:    #6f6a61;
    --error:    #d5122b;
    --error-bg: #fdecee;
    --ok:       #1c7a43;

    --sans:  'Archivo', 'Helvetica Neue', Arial, sans-serif;
    --serif: 'Newsreader', Georgia, 'Times New Roman', serif;

    --hdH: 62px;
    --wrap: 1000px;
    --band: 1200px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; font-family: var(--sans); color: var(--ink); background: var(--white);
    line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }

/* ============================ ENCABEZADO ============================ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--white); border-bottom: 2px solid var(--red);
}
.site-header__inner {
    max-width: var(--band); margin: 0 auto; height: var(--hdH);
    padding: 0 30px; display: flex; align-items: center; gap: 16px;
}
.site-header__logo { display: inline-flex; align-items: center; text-decoration: none; height: 100%; }
.site-header__logo img { height: 38px; width: auto; display: block; }
.site-header__logo .wordmark { font-weight: 800; letter-spacing: .01em; text-transform: uppercase; font-size: 18px; color: var(--red); }
.site-header__logo .wordmark b { color: var(--red); }
.site-header__tag {
    margin-left: auto; text-align: right; font-size: 10px; letter-spacing: .18em;
    text-transform: uppercase; color: var(--muted); line-height: 1.5;
}
.site-header__tag strong { color: var(--red); font-weight: 800; }

/* ============================ FRANJA EDITORIAL ============================
   Fotografía del claustro como FONDO a todo el ancho de la franja (a sangre),
   en blanco y negro, con el texto blanco a la izquierda sobre un oscurecimiento
   sutil que se desvanece para dejar ver la foto a la derecha. */
.band { position: relative; overflow: hidden; background: #111; border-bottom: 2px solid var(--ink); }
.band__bg {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: 50% 46%; background-repeat: no-repeat;
    filter: grayscale(1) contrast(1.05) brightness(.95);
}
.band__scrim {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        linear-gradient(to right, rgba(0,0,0,.86) 0%, rgba(0,0,0,.66) 38%, rgba(0,0,0,.34) 64%, rgba(0,0,0,.14) 100%),
        linear-gradient(to bottom, rgba(0,0,0,.18), rgba(0,0,0,.34));
}
.band__inner {
    position: relative; z-index: 2; max-width: var(--band); margin: 0 auto;
    padding: 42px 30px 44px; min-height: 340px;
    display: flex; flex-direction: column; justify-content: center;
}
.band__text { max-width: 640px; }
.band__kicker {
    font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700;
    color: #fff; margin: 0 0 14px;
}
.band__kicker .dot { color: var(--red); margin: 0 5px; font-weight: 800; }
.band__title {
    font-size: clamp(40px, 5.4vw, 66px); line-height: .95; font-weight: 800;
    letter-spacing: -.02em; margin: 0 0 14px; color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.band__desc {
    font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.8vw, 21px);
    color: rgba(255,255,255,.92); margin: 0 0 22px; max-width: 42ch;
    text-shadow: 0 1px 12px rgba(0,0,0,.5);
}
/* Bloque de cierre — rectángulo rojo, claramente visible */
.band__cierre { display: inline-flex; align-items: stretch; box-shadow: 0 6px 22px -10px rgba(0,0,0,.6); }
.band__cierre .lbl {
    writing-mode: vertical-rl; transform: rotate(180deg); background: #000; color: #fff;
    font-size: 7px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700;
    padding: 4px 7px; display: flex; align-items: center; justify-content: center;
}
.band__cierre .val {
    background: var(--red); color: #fff; padding: 8px 16px; font-size: 14.5px; font-weight: 700;
    line-height: 1.25; display: flex; align-items: center;
}

/* ============================ ÁREA DEL FORMULARIO ============================ */
.form-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 30px 72px; }

/* Stepper arriba de los campos */
.steps { position: sticky; top: var(--hdH); z-index: 20; background: var(--white); padding-top: 22px; }
.steps__bar { display: none; }
.steps__list {
    list-style: none; margin: 0; padding: 0 0 16px;
    display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 2px solid var(--ink);
}
.steps__item {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
    padding: 2px 10px 2px 0; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.25;
}
.steps__num {
    width: 34px; height: 34px; flex: 0 0 auto; border: 2px solid var(--ink); background: var(--white);
    color: var(--ink); display: grid; place-items: center; font-size: 14px; font-weight: 800;
    border-radius: 50%; transition: .18s;
}
.steps__item.is-active { color: var(--ink); }
.steps__item.is-active .steps__num { background: var(--red); border-color: var(--red); color: #fff; }
.steps__item.is-active::after { content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 34px; background: var(--red); }
.steps__item.is-done { color: var(--ink); }
.steps__item.is-done .steps__num { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps__item.is-done .steps__num .n { display: none; }
.steps__item.is-done .steps__num::after { content: '✓'; font-size: 15px; }

/* ============================ PASOS ============================ */
.step { display: none; padding-top: 34px; }
.step.is-active { display: block; animation: rise .28s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step__label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--red); margin: 0 0 8px; font-weight: 800; }
.step__title { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1.03; margin: 0 0 10px; }
.step__desc { color: var(--muted); font-size: 14.5px; margin: 0 0 26px; max-width: 70ch; padding-bottom: 20px; border-bottom: 1px solid var(--line); }

/* ============================ CAMPOS ============================ */
.field { margin-bottom: 22px; }
.field > label, .field__legend { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 7px; }
.req { color: var(--red); font-weight: 800; }
.hint { display: block; font-size: 12.5px; color: var(--muted); margin: 3px 0 8px; font-weight: 400; }

input[type=text], input[type=email], input[type=tel], input[type=number],
select, textarea {
    width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
    background: var(--white); border: 1px solid var(--line-mid); border-radius: 2px;
    padding: 12px 13px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
select {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23141414' stroke-width='1.6'/></svg>");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
input::placeholder, textarea::placeholder { color: #ada596; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(213,18,43,.14); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--red); background: var(--error-bg); }
.field__error { display: none; color: var(--red); font-size: 12.5px; margin-top: 6px; font-weight: 500; }
.field.has-error .field__error { display: block; }

.counter { float: right; font-size: 11px; color: var(--muted); font-weight: 700; }
.counter.over { color: var(--red); }

/* Opciones tipo chip — rectangulares */
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
    position: relative; border: 1.5px solid var(--ink); border-radius: 2px; padding: 10px 18px;
    cursor: pointer; font-size: 14px; background: var(--white); transition: .15s; user-select: none; font-weight: 600;
}
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt:hover { background: var(--paper); }
.opt.is-checked { border-color: var(--red); background: var(--red); color: #fff; }
.opt.is-checked .hint { color: rgba(255,255,255,.85); }

/* Filas — mejor uso del ancho */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 620px) { .row { grid-template-columns: 1fr; gap: 0; } }

.conditional { display: none; }
.conditional.is-shown { display: block; }
.anexo-h { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); margin: 30px 0 4px; font-weight: 800; padding-top: 20px; border-top: 2px solid var(--ink); }

/* ============================ ARCHIVOS ============================ */
.file { border: 1.5px dashed var(--line-mid); border-radius: 2px; background: var(--white); padding: 18px; transition: .15s; }
.file.dragover { border-color: var(--red); background: var(--error-bg); }
.file__top { display: flex; align-items: flex-start; gap: 14px; }
.file__icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 2px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 19px; }
.file__body { flex: 1; min-width: 0; }
.file__name { font-weight: 700; font-size: 14px; }
.file__specs { font-size: 12.5px; color: var(--muted); }
.file__btn {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 11px; font-size: 13px; font-weight: 700;
    border: 1.5px solid var(--ink); background: var(--white); color: var(--ink); padding: 8px 16px; border-radius: 2px; cursor: pointer; transition: .15s;
}
.file__btn:hover { background: var(--ink); color: #fff; }
.file input[type=file] { display: none; }
.file__chosen { margin-top: 13px; font-size: 13.5px; display: none; align-items: center; gap: 10px; }
.file__chosen.is-shown { display: flex; }
.file__chosen .pill { background: var(--paper); border: 1px solid var(--line-mid); border-radius: 2px; padding: 6px 12px; display: inline-flex; align-items: center; gap: 9px; max-width: 100%; }
.file__chosen .pill::before { content: '✓'; color: var(--ok); font-weight: 800; }
.file__chosen .pill b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__remove { cursor: pointer; color: var(--muted); font-weight: 700; border: 0; background: none; font-size: 16px; line-height: 1; }
.file__remove:hover { color: var(--red); }
.file.has-error { border-color: var(--red); background: var(--error-bg); }
.file__error { display: none; color: var(--red); font-size: 12.5px; margin-top: 10px; font-weight: 600; }
.file.has-error .file__error { display: block; }

.note { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--red); padding: 13px 16px; font-size: 13.5px; margin-bottom: 22px; color: var(--ink); }
.note--muted { border-left-color: var(--line-mid); color: var(--muted); }

/* ===================== MÓDULOS DE PRESUPUESTO (descarga / subida) =====================
   Dos bloques independientes y visualmente distintos dentro del Paso 3. */
.pmod { border: 1px solid var(--line); border-radius: 3px; padding: 18px 20px; margin: 22px 0; background: var(--white); }
.pmod--descarga { border-left: 4px solid var(--red); background: #fbfbfb; }
.pmod--subida   { border-left: 4px solid var(--ink); }
.pmod__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pmod__num {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff; background: var(--ink);
}
.pmod--descarga .pmod__num { background: var(--red); }
.pmod__title { margin: 0; font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: .01em; }
.pmod__text { margin: 4px 0 14px; font-size: 14px; color: var(--ink-soft); }
.pmod__file { margin: 12px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .01em; }
.pmod .field { margin-bottom: 0; }

.tpl-btn { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 800; border: 0; background: var(--red); color: #fff; padding: 12px 20px; border-radius: 3px; text-decoration: none; text-transform: uppercase; letter-spacing: .04em; box-shadow: 0 2px 0 var(--red-dark); transition: background .15s ease, transform .05s ease; }
.tpl-btn:hover { background: var(--red-dark); color: #fff; }
.tpl-btn:active { transform: translateY(1px); box-shadow: none; }
.tpl-btn:focus-visible { outline: 3px solid rgba(213,18,43,.35); outline-offset: 2px; }
.tpl-btn__ico { display: inline-flex; align-items: center; }
.tpl-btn__ico svg { display: block; }

/* ============================ REVISIÓN ============================ */
.review__group { border: 1px solid var(--line); border-top: 3px solid var(--ink); padding: 18px 20px; margin-bottom: 14px; background: var(--white); }
.review__group h3 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; font-weight: 800; }
.review__group .edit { float: right; font-size: 12px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; background: none; border: 0; }
.review__group .edit:hover { text-decoration: underline; }
.review__item { display: grid; grid-template-columns: 220px 1fr; gap: 12px; padding: 7px 0; font-size: 14px; border-top: 1px solid var(--line); }
.review__item:first-of-type { border-top: 0; }
.review__item dt { color: var(--muted); font-weight: 600; }
.review__item dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 620px) { .review__item { grid-template-columns: 1fr; gap: 2px; } }

.consent { display: flex; gap: 13px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--ink); padding: 16px 18px; margin: 10px 0 6px; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--red); }
.consent label { font-size: 14px; }
.consent.has-error { border-color: var(--red); border-left-color: var(--red); background: var(--error-bg); }

/* ============================ NAVEGACIÓN / BOTONES ============================ */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 34px; padding-top: 24px; border-top: 2px solid var(--ink); }
.btn { font-family: var(--sans); font-size: 14px; font-weight: 800; cursor: pointer; border-radius: 2px; padding: 15px 30px; border: 2px solid var(--ink); transition: .15s; line-height: 1; text-transform: uppercase; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 10px; }
.btn--primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn--primary .arrow { transition: transform .18s; }
.btn--primary:hover .arrow { transform: translateX(4px); }
.btn--ghost { background: var(--white); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.form-alert { display: none; background: var(--error-bg); border: 1px solid var(--red); border-left: 4px solid var(--red); color: var(--red); padding: 12px 15px; font-size: 14px; margin-top: 20px; font-weight: 600; }
.form-alert.is-shown { display: block; }

/* ============================ VISTAS SECUNDARIAS ============================ */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 30px 90px; }
.done { padding: 52px 0 20px; }
.done__badge { width: 76px; height: 76px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 40px; font-weight: 800; margin-bottom: 24px; }
.done__kicker { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--red); font-weight: 800; margin: 0 0 8px; }
.done h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -.02em; line-height: 1.02; margin: 0 0 16px; }
.done__lead { color: var(--ink); font-size: 16px; max-width: 54ch; margin: 0 0 26px; }
.folio-block { display: flex; align-items: stretch; border: 2px solid var(--ink); margin: 0 0 30px; max-width: 480px; }
.folio-block .lbl { background: var(--ink); color: #fff; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; font-weight: 800; padding: 0 16px; display: flex; align-items: center; }
.folio-block .val { padding: 16px 18px; font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: .03em; }
.next-steps { border-top: 2px solid var(--ink); padding-top: 22px; }
.next-steps h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 16px; font-weight: 800; }
.next-steps ol { margin: 0; padding: 0; list-style: none; counter-reset: ns; }
.next-steps li { counter-increment: ns; position: relative; padding: 0 0 16px 44px; font-size: 14.5px; color: var(--ink); }
.next-steps li::before { content: counter(ns); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border: 2px solid var(--red); color: var(--red); border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.next-steps li b { display: block; }
.closed { text-align: center; padding: 80px 0; }
.closed h1 { font-weight: 800; font-size: 34px; }
.closed p { color: var(--muted); max-width: 46ch; margin: 12px auto; }
.errbox { padding: 56px 0; }
.errbox ul { margin: 18px 0; padding-left: 18px; color: var(--red); line-height: 1.8; }

/* ============================ PIE ============================ */
.site-footer { border-top: 2px solid var(--ink); background: var(--white); }
.site-footer__inner { max-width: var(--band); margin: 0 auto; padding: 20px 30px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.site-footer__inner strong { color: var(--red); }

/* =========================================================================
   RESPONSIVO — En celular: primero el TEXTO, luego la FOTO, luego el formulario
   ========================================================================= */
@media (max-width: 860px) {
    .band__inner { min-height: 290px; padding: 26px 20px 30px; }
    .band__bg { background-position: 50% 50%; }      /* encuadre distinto al de escritorio */
    .band__scrim {
        background:
            linear-gradient(to bottom, rgba(0,0,0,.28) 0%, rgba(0,0,0,.32) 45%, rgba(0,0,0,.6) 100%),
            linear-gradient(to right, rgba(0,0,0,.6), rgba(0,0,0,.28));
    }
    .band__title { font-size: clamp(34px, 9vw, 48px); }
    .band__desc { font-size: 17px; margin-bottom: 18px; max-width: none; }

    .form-wrap { padding: 0 18px 60px; }

    /* Stepper: barra de progreso + puntos numerados, sin etiquetas (no se empalman) */
    .steps { padding-top: 16px; }
    .steps__bar { display: block; height: 4px; background: var(--paper); overflow: hidden; margin-bottom: 12px; }
    .steps__bar span { display: block; height: 100%; background: var(--red); width: 20%; transition: width .35s ease; }
    .steps__list { padding-bottom: 14px; }
    .steps__item { align-items: center; gap: 0; font-size: 0; padding: 0; }
    .steps__item.is-active::after { display: none; }
    .steps__num { width: 32px; height: 32px; font-size: 13px; margin: 0 auto; }

    .step__title { font-size: 24px; }
    .nav { flex-wrap: wrap; }
    .nav .btn { flex: 1; min-width: 140px; justify-content: center; }
    .site-header__logo img { height: 34px; }
}
@media (max-width: 400px) {
    .steps__num { width: 28px; height: 28px; font-size: 12px; }
    .btn { padding: 14px 18px; }
}
