/* Holcim Tector — paleta tomada de holcimsoluciones.com/colombia */
:root {
  --azul: #244772;
  --azul-osc: #17304e;
  --celeste: #22b4e8;
  --verde: #92c030;
  --verde-osc: #7aa426;
  --magenta: #c70067;
  --fondo: #f4f6f8;
  --borde: #d4dce2;
  --texto: #26313a;
  --suave: #5b6872;
  --rojo: #b3261e;
  --radio: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Holcim", "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--texto); background: var(--fondo); line-height: 1.5; }
img { max-width: 100%; height: auto; }
a { color: var(--azul); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Cabecera */
.hero { background: linear-gradient(135deg, var(--azul) 0%, var(--azul-osc) 100%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(34,180,232,.35), transparent 70%); pointer-events: none; }
.hero__barra { padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.14); }
.hero__logo { height: 36px; width: auto; display: block; margin: 0 auto; max-width: 70%; }
.hero__inner { text-align: center; max-width: 960px; margin: 0 auto; padding: 48px 20px 56px; position: relative; z-index: 1; }
.hero__etiqueta { display: inline-block; background: var(--verde); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; padding: 4px 12px; border-radius: 99px; }
.hero__titulo { font-size: clamp(1.8rem, 6vw, 3.2rem); line-height: 1.08; margin: 16px 0 12px; font-weight: 800; }
.hero__titulo span { color: var(--celeste); display: block; white-space: nowrap; }
.hero__titulo em { color: #fff; font-style: normal; }
.hero__sub { font-size: 1.1rem; margin: 0 auto 24px; max-width: 520px; color: #e4ebf4; }

/* Botones */
.btn { display: inline-block; border: 0; border-radius: var(--radio); padding: 14px 28px; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; text-align: center; transition: background .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--verde); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--verde-osc); }
.btn--ghost { background: transparent; color: var(--azul); border: 2px solid var(--azul); }
.btn--ghost:hover { background: var(--azul); color: #fff; }
.btn--block { display: block; width: 100%; }
:focus-visible { outline: 3px solid var(--celeste); outline-offset: 2px; }

/* Tarjetas */
.container { max-width: 760px; margin: -28px auto 0; padding: 0 16px 40px; position: relative; z-index: 2; }
.card { background: #fff; border-radius: 16px; padding: 28px 24px; box-shadow: 0 6px 24px rgba(36,71,114,.1); margin-bottom: 24px; border-top: 5px solid var(--azul); }
.card h2 { margin: 0 0 6px; color: var(--azul); font-size: 1.6rem; }
.card__intro { color: var(--suave); margin: 0 0 20px; }
.aviso-horario { background: #fff4e5; border-left: 4px solid #f59e0b; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }

/* Formulario */
.datos-persona__nota { font-size: .9rem; color: var(--suave); margin: 0 0 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; color: var(--azul); }
input[type="text"], input[type="email"], input[type="tel"] { width: 100%; padding: 12px 14px; border: 1.5px solid var(--borde); border-radius: 8px; font: inherit; background: #fff; color: var(--texto); }
input:focus { border-color: var(--celeste); outline: none; box-shadow: 0 0 0 3px rgba(34,180,232,.25); }
.field.has-error input[type="text"], .field.has-error input[type="email"], .field.has-error input[type="tel"] { border-color: var(--rojo); }
.field__error { color: var(--rojo); font-size: .85rem; margin: 4px 0 0; min-height: 0; }
.field__error:empty { display: none; }
.form-error { color: var(--rojo); font-weight: 700; margin: 8px 0; }
.form-error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; font-weight: 400 !important; color: var(--texto) !important; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--azul); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.actions { margin-top: 20px; }
.actions .btn { width: 100%; }
.actions--stack { display: grid; gap: 12px; }

/* Foto */
.foto__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.field .foto__zona { font-weight: 400; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--celeste); border-radius: 12px; background: #f0f9fd; padding: 24px 16px; cursor: pointer; text-align: center; margin-bottom: 0 !important; min-height: 140px; }
.foto__zona:hover { background: #e3f4fb; }
.foto__zona.tiene-foto { border-style: solid; border-color: var(--verde); background: #f6faea; }
.foto__zona img { max-height: 260px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.foto__icono { font-size: 2rem; }
.foto__texto { display: grid; font-weight: 400; color: var(--azul); }
.foto__texto small { color: var(--suave); }
.foto__consejos { margin: 10px 0 0; padding-left: 20px; font-size: .88rem; color: var(--suave); }

/* Resultado */
.exito__head { display: flex; align-items: center; gap: 12px; }
.exito__icono { font-size: 2rem; }
.codigos { list-style: none; padding: 0; margin: 0 0 20px; }
.codigo { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--azul); color: #fff; border-radius: 12px; padding: 18px 20px; }
.codigo__valor { font-size: clamp(1.4rem, 6vw, 2.2rem); font-weight: 800; letter-spacing: .08em; word-break: break-all; }
.codigo__copiar { background: var(--verde); color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.nota { font-size: .85rem; color: var(--suave); margin-top: 16px; }

/* Juego */
.juego__marco { min-height: 260px; }
.juego__marco iframe { border-radius: 12px; overflow: hidden; }
.juego__placeholder { display: grid; gap: 6px; place-items: center; text-align: center; min-height: 220px; border: 2px dashed var(--borde); border-radius: 12px; color: var(--suave); padding: 24px; }
.juego__placeholder strong { color: var(--azul); }

/* Ranking */
.ranking__tabla { display: grid; gap: 8px; }
.ranking__fila { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; background: var(--fondo); border-radius: 10px; }
.ranking__fila--top { background: #eaf6e0; border-left: 5px solid var(--verde); }
.ranking__pos { font-weight: 800; color: var(--azul); font-size: 1.2rem; text-align: center; }
.ranking__ced { font-family: ui-monospace, monospace; letter-spacing: .04em; }
.ranking__puntos { font-weight: 700; color: var(--azul); }
.ranking__vacio { text-align: center; color: var(--suave); padding: 20px 0; }
.ranking__nota { font-size: .8rem; color: var(--suave); margin: 12px 0 0; text-align: right; }

/* Preloader */
.preloader { position: fixed; inset: 0; background: rgba(23,48,78,.94); z-index: 100; display: grid; place-items: center; }
.preloader__caja { text-align: center; color: #fff; padding: 24px; }
.preloader__logo { height: 44px; width: auto; margin-bottom: 24px; }
.preloader__barra { width: 220px; height: 6px; background: rgba(255,255,255,.2); border-radius: 99px; overflow: hidden; margin: 0 auto 16px; }
.preloader__barra span { display: block; height: 100%; width: 40%; background: var(--verde); border-radius: 99px; animation: carga 1.2s ease-in-out infinite; }
@keyframes carga { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* Pie */
.footer { background: var(--azul-osc); color: #cfd9e6; text-align: center; padding: 28px 16px; font-size: .9rem; }
.footer a { color: #fff; }
.footer p { margin: 4px 0; }
.footer__small { font-size: .8rem; opacity: .8; }

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 22px 16px; }
  .hero__inner { padding: 32px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; } }
.hero__tektor { display: block; height: 56px; width: auto; max-width: 80%; margin: 0 auto; }
@media (max-width: 560px) { .hero__tektor { height: 44px; } }
.juego__alterno { margin: 14px 0 0; font-size: .92rem; color: var(--suave); text-align: center; }

/* ---- Optimización móvil ---- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, label { -webkit-tap-highlight-color: rgba(34,180,232,.2); }
.hero__barra { padding-top: calc(16px + env(safe-area-inset-top)); }
.footer { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.codigo__copiar { min-height: 44px; }
.check { padding: 4px 0; }
.juego__marco iframe { display: block; max-width: 100%; }
@media (max-width: 560px) {
  .hero__sub { font-size: 1rem; padding: 0 4px; }
  .hero__inner .btn { display: block; width: 100%; max-width: 360px; margin: 0 auto; }
  .btn { padding: 15px 20px; min-height: 48px; }
  .card h2 { font-size: 1.35rem; }
  .check { font-size: .95rem; gap: 12px; }
  .check input { width: 22px; height: 22px; margin-top: 2px; }
  .check a, .footer a, .juego__alterno a { display: inline-block; padding: 8px 2px; }
  .foto__zona { min-height: 160px; }
  .codigo { flex-direction: column; align-items: stretch; text-align: center; }
  .codigo__copiar { width: 100%; }
  .ranking__fila { grid-template-columns: 36px 1fr auto; gap: 8px; padding: 12px 10px; font-size: .95rem; }
  .ranking__ced { overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 360px) {
  .hero__titulo { font-size: 1.6rem; }
  .hero__tektor { height: 38px; }
}

.hero__sub + .hero__sub { margin-top: -8px; }
.nota--tyc { margin-top: 6px; }
.nota--tyc a { color: var(--azul); }
