/* Entrada · foto a pantalla completa + tarjeta de acceso */
body.entrada {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 76px 18px 28px;
  font-family: Manrope, "Segoe UI", sans-serif;
  color: #0f172a;
  background: #0b1220;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
}

.entrada-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("/images/san-jose-el-tablon.jpg") center / cover no-repeat;
  transform: scale(1.03);
  animation: entradaBgIn 1.1s ease-out both, entradaBgDrift 32s ease-in-out 1.1s infinite alternate;
}
@media (max-width: 720px) {
  .entrada-bg { background-position: center top; }
}
.entrada-shade {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(9, 13, 22, 0.58) 0%, rgba(9, 21, 34, 0.28) 40%, rgba(9, 13, 22, 0.78) 100%),
    linear-gradient(90deg, rgba(9, 13, 22, 0.18) 0%, rgba(9, 13, 22, 0.08) 55%, rgba(9, 13, 22, 0.42) 100%);
}

@keyframes entradaBgIn {
  from { opacity: 0; transform: scale(1.1); }
  to { opacity: 1; transform: scale(1.03); }
}
@keyframes entradaBgDrift {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-1%, 0.5%, 0); }
}
@keyframes entradaPanelIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.entrada-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: flex-start;
  padding: 22px 20px 0;
  animation: entradaPanelIn 0.55s ease-out both;
}
.entrada-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.entrada-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}
.entrada-mark svg { width: 20px; height: 20px; }
.entrada-name {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

.entrada-hero { display: none; }

.entrada-panel {
  width: min(100%, 428px);
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.28);
  animation: entradaPanelIn 0.65s ease-out 0.06s both;
}
.entrada-panel-body {
  padding: 28px 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entrada-title {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.2;
}
.entrada-lead {
  margin: 0;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
}

.entrada-tabs {
  display: flex;
  position: relative;
  padding: 4px;
  margin: 4px 0 2px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.entrada-tab-indicator {
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #fff;
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 1;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  transition: left 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  pointer-events: none;
}
.entrada-tabs[data-modo="admin"] .entrada-tab-indicator {
  left: calc(50%);
}
body.entrada .entrada-tab {
  width: 50%;
  min-height: 40px;
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
  padding: 8px 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  color: #64748b;
  border-radius: 8px;
  white-space: nowrap;
}
body.entrada .entrada-tab svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
body.entrada .entrada-tab:hover,
body.entrada .entrada-tab:active,
body.entrada .entrada-tab:focus-visible {
  background: transparent;
  color: #0f172a;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}
body.entrada .entrada-tab.is-active {
  color: #0f172a;
  font-weight: 700;
}
body.entrada .entrada-tab.is-active svg { color: #0284c7; }

.entrada-form-panel { display: none; }
.entrada-form-panel.is-active { display: block; }
.entrada-panel-hint {
  margin: 2px 0 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.4;
}

.entrada-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.entrada-field {
  display: grid;
  gap: 6px;
}
.entrada-field[hidden] {
  display: none !important;
}
.entrada-field > label,
.entrada-field-head label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
}
.entrada-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.entrada-field-head a {
  font-size: 12px;
  font-weight: 600;
  color: #0369a1;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}
.entrada-field-head a:hover { text-decoration: underline; }

.entrada-control {
  position: relative;
  display: flex;
  align-items: center;
}
.entrada-ico {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.entrada-ico svg { width: 16px; height: 16px; }
.entrada-control input {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0.7em 1em;
  border: 1px solid #cbd5e1;
  outline: none;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.entrada-control .entrada-ico + input { padding-left: 38px; }
.entrada-control input:has(+ .entrada-reveal),
.entrada-control .entrada-ico + input:has(+ .entrada-reveal) { padding-right: 76px; }
.entrada-control input::placeholder { color: #94a3b8; }
.entrada-control input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

body.entrada .entrada-reveal {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
body.entrada .entrada-reveal:hover,
body.entrada .entrada-reveal:active,
body.entrada .entrada-reveal:focus-visible {
  background: transparent;
  color: #0f172a;
  border: 0;
  box-shadow: none;
  transform: translateY(-50%);
}

body.entrada .entrada-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin-top: 2px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #0284c7;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.25);
  transition: background 0.15s ease, transform 0.15s ease;
}
body.entrada .entrada-cta svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
body.entrada .entrada-cta:hover,
body.entrada .entrada-cta:focus-visible {
  background: #0369a1;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.3);
}
body.entrada .entrada-cta:hover svg { transform: translateX(3px); }
body.entrada .entrada-cta:active { transform: scale(0.98); }

.entrada-msg {
  margin: 0;
  min-height: 1.2em;
  font-size: 13px;
  color: #b91c1c;
}

.entrada-foot {
  margin: 0;
  padding: 14px 26px 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
}
.entrada-foot strong { font-size: 13px; color: #0f172a; }
.entrada-foot span { font-size: 12px; color: #64748b; line-height: 1.4; }

@media (min-width: 960px) {
  body.entrada {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 40px;
    padding: 40px 48px;
  }
  .entrada-top { display: none; }
  .entrada-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 auto;
    max-width: 640px;
    min-width: 0;
    color: #fff;
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.45);
    animation: entradaPanelIn 0.55s ease-out both;
  }
  .entrada-hero-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .entrada-hero-product {
    margin: 0;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }
  .entrada-hero-tag {
    margin: 2px 0 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #e2e8f0;
    letter-spacing: 0;
  }
  .entrada-hero-body { padding: 28px 0; }
  .entrada-hero-org {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 18px;
    padding: 10px 14px;
    max-width: 100%;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(125, 211, 252, 0.28);
    backdrop-filter: blur(8px);
  }
  .entrada-hero-org:has([data-org-brand]:empty) { display: none; }
  .entrada-hero-org span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
  }
  .entrada-hero-org strong {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .entrada-hero-title {
    margin: 0 0 14px;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.7rem, 3.2vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.18;
    color: #fff;
  }
  .entrada-hero-lead {
    margin: 0 0 28px;
    max-width: 36em;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;
    color: #e2e8f0;
  }
  .entrada-hero-puntos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 20px 0 0;
    border-top: 1px solid rgba(226, 232, 240, 0.28);
    list-style: none;
  }
  .entrada-hero-puntos li {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
  }
  .entrada-hero-foot {
    margin: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #cbd5e1;
  }
  .entrada-panel {
    flex: 0 0 428px;
    align-self: center;
  }
  .entrada-shade {
    background:
      linear-gradient(180deg, rgba(9, 13, 22, 0.46) 0%, rgba(9, 21, 34, 0.22) 42%, rgba(9, 13, 22, 0.62) 100%),
      linear-gradient(90deg, rgba(9, 13, 22, 0.52) 0%, rgba(9, 13, 22, 0.18) 52%, rgba(9, 13, 22, 0.4) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .entrada-bg,
  .entrada-top,
  .entrada-hero,
  .entrada-panel,
  .entrada-tab-indicator { animation: none; transition: none; }
  .entrada-bg { transform: none; }
  body.entrada .entrada-cta:hover svg { transform: none; }
}
