/* ============================================================
   Unión de Arroceros SAS — Formulario de Consentimiento
   Paleta: Rojo Supremo · Blanco · Crema cálida
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=Dancing+Script:wght@700&display=swap');

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

:root {
  --red:       #C41E24;
  --red-dk:    #9E1218;
  --red-lt:    #E83030;
  --red-xdk:   #7A0D11;
  --cream:     #FFF8F0;
  --cream-dk:  #FCEEDE;
  --white:     #FFFFFF;
  --text:      #1C1C1C;
  --muted:     #7A6F6A;
  --border:    #E8D8CC;
  --green-ok:  #1E7C3A;
  --error:     #B02020;
  --gold:      #D4960A;
  --radius:    12px;
  --shadow:    0 6px 32px rgba(196,30,36,.12);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* ══════════════════════════════════════════════════════════
   MODAL DE BIENVENIDA
══════════════════════════════════════════════════════════ */

/* Overlay: cubre toda la pantalla */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 10, 10, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity .35s ease;
}
.modal-overlay.closing {
  opacity: 0;
  pointer-events: none;
}

/* Caja del modal: ocupa casi todo el alto de la pantalla */
.modal-box {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 900px;
  height: 92vh;
  max-height: 860px;
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  transform: scale(1) translateY(0);
  transition: transform .35s cubic-bezier(.34,1.3,.64,1), opacity .35s ease;
}
.modal-overlay.closing .modal-box {
  transform: scale(.95) translateY(20px);
  opacity: 0;
}

/* ── Botón cerrar ── */
.modal-close-btn {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 20;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
}
.modal-close-btn:hover {
  background: rgba(255,255,255,.35);
  transform: rotate(90deg);
}

/* ── Columna izquierda: imagen ── */
.modal-img-col {
  flex: 0 0 44%;
  position: relative;
  overflow: hidden;
}

/* Placeholder visual cuando no hay imagen */
.modal-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(155deg,
    var(--red-xdk) 0%,
    var(--red-dk)  30%,
    var(--red)     60%,
    #D4222A        100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.mip-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
}
.mip-logo {
  font-size: 3rem;
  width: 80px; height: 80px;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.mip-label {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .3px;
}
.mip-sublabel {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  border: 1px dashed rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 5px 14px;
  margin-top: 4px;
}
/* Círculos decorativos del placeholder */
.mip-deco {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.mip-deco-1 { width: 280px; height: 280px; top: -60px;   right: -80px; }
.mip-deco-2 { width: 180px; height: 180px; bottom: -40px; left: -50px; }

/* Imagen real (cuando se reemplaza el placeholder) */
.modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ── Columna derecha: texto ── */
.modal-text-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 44px;
  overflow-y: auto;
  background: var(--white);
}

/* Separador visual entre columnas */
.modal-text-col::before {
  content: '';
  display: block;
  height: 4px;
  width: 56px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 4px;
  margin-bottom: 24px;
}

.modal-eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

.modal-headline {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 18px;
}
.modal-headline em {
  font-style: italic;
  color: var(--red);
  font-family: 'Dancing Script', cursive;
  font-size: 2.5rem;
  line-height: 1;
  display: block;
}

.modal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.modal-divider span:not(.modal-icon) {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.modal-icon { font-size: .9rem; }

.modal-body-text {
  font-size: .9rem;
  line-height: 1.78;
  color: var(--muted);
  margin-bottom: 14px;
}
.modal-body-text strong { color: var(--text); font-weight: 700; }
.modal-body-text:last-of-type { margin-bottom: 22px; }

/* Canales */
.modal-channels {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.modal-channel {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--cream-dk);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 7px 16px;
  font-size: .83rem;
  font-weight: 700;
  color: var(--text);
}
.modal-channel svg { color: var(--red); flex-shrink: 0; }

/* Botón CTA */
.modal-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px 28px;
  font-family: 'Nunito', sans-serif;
  font-size: .97rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .3px;
  box-shadow: 0 4px 18px rgba(196,30,36,.28);
  transition: background .18s, box-shadow .18s, transform .13s;
  margin-bottom: 20px;
  align-self: flex-start;
}
.modal-cta-btn:hover {
  background: var(--red-lt);
  box-shadow: 0 6px 24px rgba(196,30,36,.38);
}
.modal-cta-btn:active { transform: scale(.97); }

.modal-legal {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: #bbb;
}

/* ── Responsive del modal ── */
@media (max-width: 700px) {
  .modal-box {
    flex-direction: column;
    height: 92vh;
    max-height: none;
  }
  .modal-img-col {
    flex: 0 0 220px;
    width: 100%;
  }
  .modal-text-col {
    padding: 28px 24px 24px;
    justify-content: flex-start;
  }
  .modal-headline      { font-size: 1.5rem; }
  .modal-headline em   { font-size: 2rem; }
  .modal-close-btn     { background: rgba(0,0,0,.25); }
}

@media (max-width: 420px) {
  .modal-overlay { padding: 0; }
  .modal-box     { border-radius: 0; height: 100vh; max-height: 100vh; }
  .modal-img-col { flex: 0 0 160px; }
  .modal-text-col { padding: 22px 18px; }
}


/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
.site-header {
  background: var(--red);
  position: relative;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.brand-name {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.brand-sub {
  display: block;
  font-size: .72rem;
  color: rgba(255,255,255,.7);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}
.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: .74rem;
  color: rgba(255,255,255,.88);
  white-space: nowrap;
}
.header-wave { line-height: 0; overflow: hidden; }
.header-wave svg { width: 100%; height: 28px; display: block; }


/* ══════════════════════════════════════════════════════════
   MAIN / FORMULARIO
══════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  padding: 0 0 60px;
}
.page-wrapper {
  max-width: 940px;
  margin: 0 auto;
  padding: 36px 20px 0;
}

/* ── Card ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--shadow);
}
@media (max-width: 600px) { .card { padding: 26px 18px; } }

/* ── Consent box ── */
.consent-box {
  background: var(--cream-dk);
  border-left: 5px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 22px;
  margin-bottom: 28px;
}
.consent-box .greeting {
  font-size: .93rem;
  font-weight: 700;
  color: var(--red-dk);
  margin-bottom: 12px;
  line-height: 1.5;
}
.consent-box p {
  font-size: .86rem;
  line-height: 1.75;
  color: #3A2A2A;
  margin-bottom: 10px;
}
.consent-box p:last-child { margin-bottom: 0; }
.consent-box a { color: var(--red); font-weight: 600; }

/* ── Pregunta ── */
.card-question {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}
.card-sub {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 26px;
}

/* ── Alert ── */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .87rem;
  margin-bottom: 20px;
}
.alert-error {
  background: #FFF2F2;
  border: 1px solid #F5BABA;
  color: var(--error);
}

/* ── Fields ── */
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
  margin-bottom: 20px;
}
@media (max-width: 480px) { .fields-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }

label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--red-dk);
  margin-bottom: 5px;
}
label .req { color: var(--gold); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"] {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: .92rem;
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  background: var(--cream);
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}
input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(196,30,36,.11);
  background: var(--white);
}
.has-error input {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(176,32,32,.09);
}
.err-msg {
  font-size: .75rem;
  color: var(--error);
  margin-top: 4px;
  display: none;
}
.err-msg.show { display: block; }

/* ── Meta chips ── */
.meta-info {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.meta-chip {
  background: var(--cream-dk);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: .75rem;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}

/* ── Botones del form ── */
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 360px) { .btn-row { grid-template-columns: 1fr; } }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius);
  padding: 14px 12px;
  font-family: 'Nunito', sans-serif;
  font-size: .97rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .4px;
  transition: transform .13s, box-shadow .13s, filter .18s;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-accept {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 18px rgba(196,30,36,.28);
}
.btn-accept:hover {
  background: var(--red-lt);
  box-shadow: 0 6px 24px rgba(196,30,36,.36);
}
.btn-reject {
  background: var(--white);
  color: var(--error);
  border: 2px solid var(--error);
}
.btn-reject:hover { background: #FFF2F2; }

.btn-volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  background: var(--cream-dk);
  color: var(--red-dk);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 22px;
  font-family: 'Nunito', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
}
.btn-volver:hover { background: var(--cream); }

/* ══════════════════════════════════════════════════════════
   VISTA RESPUESTA
══════════════════════════════════════════════════════════ */
.respuesta-card { text-align: center; }
.respuesta-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.icon-accept { background: #E8F5EC; color: var(--green-ok); }
.icon-reject { background: #F5E8E8; color: var(--error); }
.icon-error  { background: #FFF3CD; color: #856404; }
.respuesta-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 10px;
}
.respuesta-msg {
  font-size: .93rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 26px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}
.respuesta-detalle {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  margin-bottom: 8px;
}
.detalle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
}
.detalle-row:last-child { border-bottom: none; }
.detalle-row:nth-child(even) { background: var(--cream); }
.detalle-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  white-space: nowrap;
}
.detalle-val {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 800;
}
.badge-accept { background: #DCF5E5; color: var(--green-ok); }
.badge-reject { background: #F5DCDC; color: var(--error); }


/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--red-dk);
  padding: 16px 28px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .76rem;
  color: rgba(255,255,255,.5);
}
.footer-inner a { color: rgba(255,255,255,.8); text-decoration: none; }
.footer-inner a:hover { color: #fff; }
