:root{
  /* Marca IDIRSA: rojo + negro sobre blanco (sin mezclas “barro”) */
  --brand-red: #e30613;
  --brand-red-hover: #c50511;
  --brand-red-soft: rgba(227, 6, 19, 0.07);
  --brand-red-ring: rgba(227, 6, 19, 0.22);
  --ink: #141414;
  --ink-soft: #242424;
  --muted: #4a4a4a;
  --muted2: #6b6b6b;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --surface-3: #ececee;
  --border: #e0e0e4;
  --border-strong: #c8c8d0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.08);
  --radius: 14px;
  --radius2: 20px;
  --container: 1120px;
  /* Alias usados en el resto del CSS */
  --text: var(--ink);
  --accent: var(--brand-red);
  --accent2: var(--brand-red-hover);
  --good: #0a5c44;
  --bad: #a10410;
  --bg0: var(--surface);
  --bg1: var(--surface-2);
  --stroke: var(--border);
  --card: var(--surface);
  --shadow: var(--shadow-md);
  --topbar-bg: #ffffff;
  --topbar-border: var(--border);
  --topbar-text: var(--ink);
  --topbar-muted: var(--muted);
  --topbar-chip-shadow: var(--shadow-sm);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:14px;
  top:14px;
  width:auto;height:auto;
  padding:10px 12px;
  border-radius:12px;
  background: var(--surface);
  border: 2px solid var(--brand-red);
  color: var(--ink);
  z-index:1000;
}

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background: var(--topbar-bg);
  border-bottom: 3px solid var(--brand-red);
  box-shadow: var(--shadow-sm);
}
.topbar__inner{
  max-width: var(--container);
  margin:0 auto;
  /* Header compacto tipo web estándar */
  padding: 8px clamp(12px, 2vw, 20px);
  display:flex;
  align-items:center;
  gap: clamp(10px, 1.6vw, 18px);
  justify-content:space-between;
  flex-wrap: wrap;
}

.topbar__brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
  flex: 0 1 auto;
}

/* Logo empresa PNG 1470×311: banda horizontal; solo limitamos altura, el ancho sale solo */
.brand__logo-wrap{
  flex-shrink: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--topbar-chip-shadow);
}
.brand__logo{
  display: block;
  /* PNG 1470×311: banda ancha; fijamos altura y el ancho sale del archivo */
  height: clamp(28px, 3.6vw, 40px);
  width: auto;
  max-height: 40px;
  max-width: min(380px, 48vw);
  object-fit: contain;
}

.brand__meta{display:flex; flex-direction:column; line-height:1.15;}
.brand__title{
  font-weight:900;
  letter-spacing:.2px;
  font-size:clamp(15px, 1.9vw, 19px);
  color: var(--topbar-text);
}
.brand__subtitle{
  color: var(--topbar-muted);
  font-size:clamp(12px, 1.6vw, 14px);
}

.topbar__logos{
  display:flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  flex: 1 1 260px;
  min-width: 0;
  row-gap: 8px;
}

/* Caja fija: todas las marcas ocupan el mismo espacio; la imagen se escala dentro */
.partner-logo-cell{
  flex: 0 0 auto;
  width: clamp(76px, 8.2vw, 96px);
  height: clamp(44px, 5vw, 54px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--topbar-chip-shadow);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.partner-logo-cell:hover{
  transform: translateY(-1px);
  border-color: var(--brand-red);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.partner-logo{
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.topbar__nav{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(12px, 2vw, 20px) 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.topbar__nav a{
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
}
.topbar__nav a:hover{
  color: var(--brand-red);
  text-decoration: underline;
}
.topbar__nav a[aria-current="page"]{
  color: var(--brand-red);
}

.field__input:read-only{
  background: var(--surface-2);
  color: var(--muted);
}

.auth-page .content--narrow{
  max-width: 520px;
  margin: 0 auto;
}
.card--auth{
  padding: 22px;
}
.auth__h1{
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--ink);
}
.auth__lead{
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.auth__foot{
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted2);
}
.auth__notice{
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.auth__lead--tight{
  margin: 0 0 8px;
  font-size: 13px;
}
.reg-status{
  min-height: 1.35em;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.reg-status--loading{
  font-weight: 700;
  color: var(--ink);
}
.reg-status--ok{
  color: #0d8050;
}
.reg-status--err{
  color: #b42318;
}
.form__split--stack{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-page .panel-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.panel-head__h1{
  margin: 0;
  font-size: 22px;
  color: var(--ink);
}
.panel-head__sub{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tabs__btn{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  font-size: 13px;
}
.tabs__btn.is-active{
  background: var(--brand-red-soft);
  border-color: var(--brand-red);
  color: var(--brand-red);
}
.tab-panel{
  margin-bottom: 24px;
}
.tab-panel[hidden]{
  display: none !important;
}
.prose-card{
  padding: 18px;
}
.prose-card p{
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}
.prose-card p + p{
  margin-top: 12px;
}
.panel-subtitle{
  font-size: 15px;
  margin: 16px 0 8px;
  color: var(--ink);
  font-weight: 900;
}
.panel-list{
  list-style: none;
  margin: 0;
  padding: 0;
}
.panel-list__item{
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.panel-list__empty{
  color: var(--muted2);
  font-size: 13px;
  padding: 8px 0;
}
.panel-bullets{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}
.panel-bullets li{
  margin-bottom: 8px;
}

.landing-flow{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.landing-flow__step{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 14px;
  box-shadow: var(--shadow-sm);
}
.landing-flow__n{
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
  font-size: 13px;
  background: var(--brand-red);
  color: #fff;
  margin-bottom: 8px;
}
.landing-flow__t{
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--ink);
}
.landing-flow__d{
  font-size: 12px;
  color: var(--muted2);
  line-height: 1.4;
}
.landing-cta{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  align-items: center;
}
.landing-cta__hint{
  font-size: 13px;
  color: var(--muted2);
}
.landing-cta .primary-btn,
.landing-cta .secondary-btn{
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.page{padding-bottom:60px;}

.hero{
  position: relative;
  /* Sin overflow:hidden: antes recortaba el bloque de texto junto a la mascota */
  overflow: visible;
}
.hero__bg{
  position: absolute;
  z-index: 0;
  inset: 0;
  min-height: 100%;
  background:
    radial-gradient(ellipse 85% 70% at 8% 18%, var(--brand-red-soft), transparent 52%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 62%);
  pointer-events: none;
}
.hero__inner{
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 52px) clamp(14px, 2.5vw, 24px) clamp(22px, 3vw, 36px);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: start;
}
.hero__text{
  position: relative;
  z-index: 2;
  min-width: 0;
}
.hero__display{
  margin: 0 0 clamp(12px, 2vw, 20px);
  font-size: clamp(34px, 6.2vw, 72px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero__display--accent{
  color: var(--brand-red);
}
.hero__h1{
  font-size: clamp(22px, 3.2vw, 36px);
  margin:0;
  line-height:1.12;
  font-weight: 950;
  color: var(--ink);
}
.hero__h1--accent{
  color: var(--brand-red);
}
.hero__p{
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.8vw, 16px);
  line-height:1.5;
}

.hero__facts{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
.fact{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 12px;
  box-shadow: var(--shadow-sm);
}
.fact__k{color: var(--muted2); font-size:12px; font-weight:700; letter-spacing:.3px; text-transform:uppercase;}
.fact__v{margin-top:6px; font-weight:850; font-size:13px; color: var(--ink);}

.hero__art{
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}
.gecko{
  width: min(340px, 100%);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.12));
  /* Evita que la mascota “invada” la columna del texto en anchos intermedios */
  margin-top: clamp(0px, 2vw, 12px);
}

.content{
  max-width: var(--container);
  margin:0 auto;
  padding: 18px clamp(14px, 2.5vw, 24px);
}
.grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 16px;
  align-items:start;
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  box-shadow: var(--shadow-sm);
}
.card--form{padding: 18px 18px;}
.card--result{padding: 18px 18px;}

.card__title{
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 950;
  letter-spacing:.2px;
  color: var(--ink);
}
.card__hint{
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.card__hint code{
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 10px;
  color: var(--ink);
}

.form{display:flex; flex-direction:column; gap: 12px;}
.form__split{
  display:grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
}
.form__split:nth-child(3){
  grid-template-columns: 1fr 1fr;
}
.form__actions{display:flex; flex-direction:column; gap: 10px;}
.fineprint{color: var(--muted2); font-size:12px; line-height:1.5;}

.field{display:flex; flex-direction:column; gap:6px;}
.field__label{color: var(--muted2); font-size:12px; font-weight:800; letter-spacing:.2px;}
.field__input{
  width:100%;
  padding: 12px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  border-radius: 14px;
  outline:none;
  font-size: 15px;
}
.field__input:focus{
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px var(--brand-red-ring);
}

.primary-btn,.secondary-btn,.ghost-btn{
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 900;
  cursor:pointer;
  font-size: 15px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.primary-btn{
  background: var(--brand-red);
  border: 1px solid var(--brand-red);
  color: #fff;
}
.primary-btn:hover:not(:disabled){
  background: var(--brand-red-hover);
  border-color: var(--brand-red-hover);
}
.primary-btn:disabled{opacity:.65; cursor:not-allowed;}

.secondary-btn{
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink);
}
.secondary-btn:hover{
  border-color: var(--brand-red);
  color: var(--brand-red);
}
.ghost-btn{
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
}
.ghost-btn:hover{
  background: var(--surface-3);
  border-color: var(--border-strong);
}
.ghost-btn:hover,.secondary-btn:hover,.primary-btn:hover:not(:disabled){transform: translateY(-1px);}

.alert{
  margin-top:12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(161, 4, 16, 0.35);
  background: rgba(227, 6, 19, 0.08);
  color: var(--ink);
}
.alert--ok{
  border-color: rgba(10, 92, 68, 0.35);
  background: rgba(10, 92, 68, 0.08);
}

.result__banner{
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
  font-weight: 850;
  line-height:1.3;
  color: var(--ink);
}
.result__banner--win{
  background: rgba(10, 92, 68, 0.1);
  border-color: rgba(10, 92, 68, 0.28);
}
.result__banner--lose{
  background: var(--brand-red-soft);
  border-color: rgba(227, 6, 19, 0.35);
}

.empty-state{
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  padding: 14px;
}
.empty-state__small{margin-top:10px; font-size:12px; color: var(--muted2);}
.empty-state.is-hidden{display:none !important;}

/* Resultado consulta código: un solo bloque visible (evita que .result {display:flex} anule [hidden]) */
.panel-result__panel{display:none !important; flex-direction:column;}
.panel-result__panel.is-shown{display:flex !important;}

.result{display:flex; flex-direction:column;}

.prize{
  display:flex; align-items:center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.prize__icon{
  width:64px;height:64px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
}
.prize__name{font-size:16px; font-weight:950; color: var(--ink);}
.prize__badge{
  margin-top:4px;
  color: var(--muted2);
  font-weight: 900;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.voucher{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
}
.voucher__title{font-weight: 950; margin-bottom: 10px; color: var(--ink);}
.voucher__img{width:100%; height:auto; max-height: 260px; object-fit:contain; border-radius: 12px;}
.voucher__row{
  display:flex; align-items:center; justify-content:space-between;
  gap: 10px; margin-top: 12px;
}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;}
.muted{color: var(--muted2);}
.voucher__actions{display:flex; justify-content:flex-end;}

.redeem{
  padding-top: 6px;
}
.redeem__title{font-weight: 950; margin-bottom: 8px; color: var(--ink);}
.redeem__grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
.redeem__item{
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 10px;
}
.redeem__item--full{grid-column: span 1;}
.redeem__k{color: var(--muted2); font-size:12px; font-weight:800;}
.redeem__v{margin-top:6px; font-weight: 950; color: var(--ink);}
.redeem__p{color: var(--muted); font-size: 13px; line-height: 1.5; margin: 10px 0 0;}
.link{
  display:inline-block;
  margin-top: 10px;
  color: var(--brand-red);
  font-weight: 900;
  text-decoration: none;
}
.link:hover{
  text-decoration: underline;
  color: var(--brand-red-hover);
}

.result--lose{background: transparent;}
.lose__body{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lose__block{
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
}
.strong{font-weight: 950;}
.lose__p{color: var(--muted); font-size: 13px; line-height:1.5; margin: 12px 0 0;}

.legal{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display:flex; flex-direction:column; gap:8px;
}
.legal__row{display:flex; align-items:center; gap:10px; color: var(--muted2); font-size:12px;}
.dot{
  width:10px; height:10px; border-radius: 50%;
  background: var(--brand-red);
  box-shadow: 0 0 0 3px var(--brand-red-soft);
}

.footer{
  max-width: var(--container);
  margin: 28px auto 0;
  padding: 0 clamp(14px, 2.5vw, 24px) 30px;
}
.footer__inner{
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display:grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 14px;
}
/* Logo empresa en pie: fondo claro + banda horizontal (mismo criterio que el header) */
.footer__logo-wrap{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 10px;
  margin-bottom: 4px;
  max-width: 100%;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.footer__logo{
  display: block;
  height: clamp(34px, 4.5vw, 50px);
  width: auto;
  max-height: 50px;
  max-width: min(300px, 100%);
  object-fit: contain;
}
.footer__small{
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
}
.footer__logo-wrap + .footer__small{
  margin-top: 12px;
}
.footer__title{font-weight: 950; margin-top: 2px; color: var(--ink);}
.footer__col--right{justify-self:end; text-align:right;}

.footer__brands{
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.footer__brands-title{
  margin: 0 0 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted2);
}
.footer__brands-logos{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  row-gap: 12px;
  justify-content: center;
  align-items: center;
}
/* Footer: marcas más grandes que en el header */
.footer__brands .partner-logo-cell{
  width: clamp(100px, 12vw, 140px);
  height: clamp(58px, 7.2vw, 82px);
  padding: 10px 12px;
}

.footer--dashboard{
  margin-top: 40px;
  padding-top: 0;
}
.footer--dashboard .footer__brands{
  margin-top: 0;
  padding-top: 24px;
}

@media (max-width: 980px){
  .hero__inner{grid-template-columns: 1fr; align-items:start;}
  .hero__art{justify-content:flex-start;}
  .grid{grid-template-columns: 1fr; }
  .form__split{grid-template-columns: 1fr;}
  .hero__facts{grid-template-columns: 1fr; }
  .redeem__grid{grid-template-columns: 1fr;}
  .footer__inner{grid-template-columns: 1fr;}
  .footer__col--right{text-align:left; justify-self:start;}

  .topbar__inner{
    justify-content: center;
  }
  .topbar__brand{
    width: 100%;
    justify-content: center;
  }
  .topbar__logos{
    flex: 1 1 100%;
    justify-content: center;
    max-width: 100%;
  }
  .partner-logo-cell{
    width: clamp(68px, 18vw, 86px);
    height: clamp(40px, 11vw, 50px);
    padding: 5px;
  }
  .footer__brands .partner-logo-cell{
    width: clamp(88px, 26vw, 120px);
    height: clamp(52px, 15vw, 72px);
    padding: 8px 10px;
  }
  .brand__logo{
    max-width: min(280px, 88vw);
    height: clamp(26px, 7vw, 36px);
    max-height: 36px;
  }
  .landing-flow{
    grid-template-columns: 1fr;
  }
  .form__split--stack{
    grid-template-columns: 1fr;
  }
}

