/* ============================================================
   Bono Hostaleria 2026 — Login hero (misma secuencia que la web)
   ============================================================ */

@import url('https://fonts.bunny.net/css?family=barlow-condensed:700,800|source-sans-3:400,500,600,700&display=swap');

:root {
  --bh-red: #e83010;
  --bh-red-deep: #c4280d;
  --bh-green: #008840;
  --bh-green-deep: #006b33;
  --bh-yellow: #f7c948;
  --bh-ink: #0a0a0a;
  --bh-ink-soft: #3a3a3a;
  --bh-ink-muted: #6b6b6b;
  --bh-paper: #fafaf7;
  --bh-white: #ffffff;
  --bh-font-display: 'Barlow Condensed', ui-sans-serif, sans-serif;
  --bh-font-body: 'Source Sans 3', ui-sans-serif, system-ui, sans-serif;
  --bh-container-pad: clamp(1rem, 4vw, 2.5rem);
  --bh-ticket-w: clamp(200px, 18vw, 248px);
  --mx: 0;
  --my: 0;
}

/* —— Shell: sin scroll, a viewport —— */
html:has(.bh-hero),
body:has(.bh-hero),
.fi-body:has(.bh-hero) {
  height: 100%;
  overflow: hidden;
  background: var(--bh-white) !important;
  color-scheme: light;
}

/* Evitar que dark mode de Filament deje labels/inputs en blanco */
html.dark:has(.bh-hero) {
  color-scheme: light;
}

html.dark:has(.bh-hero) .bh-login-page .fi-fo-field-label-content,
html.dark:has(.bh-hero) .bh-login-page .fi-input,
html.dark:has(.bh-hero) .bh-login-page input {
  color: var(--bh-ink) !important;
  -webkit-text-fill-color: var(--bh-ink) !important;
}

.fi-body:has(.bh-hero) > * {
  background: transparent;
}

.bh-hero {
  --hero-yellow: var(--bh-yellow);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100svh;
  max-height: 100svh;
  padding: clamp(0.75rem, 2svh, 1.5rem) var(--bh-container-pad) clamp(0.75rem, 2svh, 1.25rem);
  background: var(--bh-white);
  color: var(--bh-ink);
  font-family: var(--bh-font-body);
}

.bh-hero-inner {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
}

/* —— Copy + form —— */
.bh-hero-copy {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: clamp(0.4rem, 1.2svh, 0.85rem);
  max-width: 34rem;
  min-width: 0;
}

.bh-hero-copy > * {
  max-width: 100%;
}

.bh-hero-logo {
  height: clamp(48px, 7.5svh, 78px);
  width: auto;
  object-fit: contain;
}

.bh-hero-slogan {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2em 0.4em;
  margin: 0;
  font-family: var(--bh-font-display);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--bh-ink);
}

.bh-hero-sticker {
  display: inline-block;
  padding: 0.14em 0.42em 0.18em;
  background: var(--bh-green);
  color: var(--bh-white);
  border-radius: 2px;
  transform: rotate(-4deg);
  transform-origin: 50% 60%;
  box-shadow: 0 6px 14px -6px rgba(0, 107, 51, 0.6);
}

.bh-hero-h1 {
  display: grid;
  margin: 0.05rem 0 0.15rem;
  font-family: var(--bh-font-display);
  font-size: clamp(2.75rem, min(7.2vw, 11svh), 6.25rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.028em;
  text-transform: uppercase;
  color: var(--bh-ink);
}

.bh-hero-h1-line {
  display: block;
  padding: 0.02em 0;
}

.bh-hero-h1-word {
  position: relative;
  display: inline-block;
  isolation: isolate;
  padding-right: 0.06em;
}

.bh-hero-h1-word--mark::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0.16em -0.14em 0.08em -0.1em;
  background: var(--hero-yellow);
  border-radius: 48% 52% 46% 54% / 62% 40% 60% 38%;
  transform: rotate(-1.4deg);
  transform-origin: 0 60%;
}

.bh-hero-h1-word--year {
  color: transparent;
  -webkit-text-stroke: 0.028em var(--bh-ink);
  paint-order: stroke fill;
}

.bh-hero-lead {
  margin: 0;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.35;
  color: var(--bh-ink-soft);
  max-width: min(40ch, 100%);
}

/* Form integrado (sin card flotante) */
.bh-hero-form {
  width: min(100%, 22.5rem);
  margin-top: 0.15rem;
}

.bh-login-page {
  display: grid;
  gap: 0.65rem;
  width: 100%;
  color: var(--bh-ink);
}

.bh-login-page .fi-sc,
.bh-login-page .fi-fo,
.bh-login-page .fi-fieldset {
  gap: 0.65rem;
}

/* Filament fuerza texto claro en algunos spans/inputs: forzar tinta */
.bh-login-page,
.bh-login-page .fi-fo-field-label,
.bh-login-page .fi-fo-field-label-content,
.bh-login-page .fi-fo-field-wrp-label,
.bh-login-page .fi-fo-field-wrp-label span,
.bh-login-page .fi-checkbox-label,
.bh-login-page .fi-fo-checkbox-label,
.bh-login-page label,
.bh-login-page label span,
.bh-login-page .fi-input,
.bh-login-page input,
.bh-login-page textarea,
.bh-login-page .fi-input-wrp,
.bh-login-page .fi-btn-icon,
.bh-login-page .fi-icon-btn,
.bh-login-page .fi-link {
  color: var(--bh-ink) !important;
}

.bh-login-page .fi-fo-field-label-required-mark {
  color: var(--bh-red) !important;
}

.bh-login-page .fi-input-wrp {
  background: var(--bh-paper) !important;
  border: 1.5px solid color-mix(in srgb, var(--bh-ink) 28%, transparent) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  color: var(--bh-ink) !important;
}

.bh-login-page .fi-input-wrp:focus-within {
  background: var(--bh-white) !important;
  border-color: var(--bh-red) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bh-red) 18%, transparent) !important;
}

.bh-login-page .fi-input {
  font-size: 0.95rem !important;
  color: var(--bh-ink) !important;
  -webkit-text-fill-color: var(--bh-ink) !important;
  caret-color: var(--bh-ink);
}

.bh-login-page .fi-input::placeholder {
  color: var(--bh-ink-muted) !important;
  -webkit-text-fill-color: var(--bh-ink-muted) !important;
  opacity: 1;
}

.bh-login-page .fi-fo-field-label,
.bh-login-page .fi-fo-field-label-content {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--bh-ink-soft) !important;
}

.bh-login-page .fi-checkbox-btn,
.bh-login-page .fi-fo-checkbox input {
  border-color: color-mix(in srgb, var(--bh-ink) 40%, transparent) !important;
  background: var(--bh-white) !important;
}

.bh-login-page .fi-icon-btn svg,
.bh-login-page .fi-input-wrp svg {
  color: var(--bh-ink-soft) !important;
  stroke: var(--bh-ink-soft) !important;
}

.bh-login-page .fi-btn-color-primary {
  background-color: var(--bh-red) !important;
  border-color: var(--bh-red-deep) !important;
  color: var(--bh-white) !important;
  font-family: var(--bh-font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px -10px rgba(232, 48, 16, 0.55);
}

.bh-login-page .fi-btn-color-primary:hover {
  background-color: var(--bh-red-deep) !important;
  color: var(--bh-white) !important;
}

.bh-login-page .fi-btn-color-primary span,
.bh-login-page .fi-btn-color-primary .fi-btn-label {
  color: var(--bh-white) !important;
}

.bh-login-mfa-head {
  margin-bottom: 0.25rem;
}

.bh-login-mfa-title {
  margin: 0;
  font-family: var(--bh-font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
}

.bh-login-mfa-sub {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--bh-ink-soft);
}

/* MFA 6 dígitos: no aplicar el wrp de input de texto (flex:1 + min-width:0 lo aplasta). */
.bh-login-page .fi-fo-field:has(.fi-one-time-code-input-ctn) .fi-input-wrp {
  display: block !important;
  width: max-content !important;
  max-width: 100% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.bh-login-page .fi-one-time-code-input-ctn {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.5rem !important;
  width: max-content !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
  min-width: max-content !important;
}

.bh-login-page .fi-one-time-code-input-digit {
  box-sizing: border-box !important;
  width: 2.5rem !important;
  min-width: 2.5rem !important;
  max-width: 2.5rem !important;
  height: 2.75rem !important;
  flex: 0 0 2.5rem !important;
  padding: 0 !important;
  text-align: center !important;
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  border: 1.5px solid color-mix(in srgb, var(--bh-ink) 28%, transparent) !important;
  border-radius: 4px !important;
  background: var(--bh-paper) !important;
  color: var(--bh-ink) !important;
  -webkit-text-fill-color: var(--bh-ink) !important;
  caret-color: var(--bh-ink);
  box-shadow: none !important;
}

.bh-login-page .fi-one-time-code-input-digit:focus {
  outline: none !important;
  border-color: var(--bh-red) !important;
  background: var(--bh-white) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bh-red) 18%, transparent) !important;
}

@media (max-width: 480px) {
  .bh-login-page .fi-one-time-code-input-digit {
    width: 2.15rem !important;
    min-width: 2.15rem !important;
    max-width: 2.15rem !important;
    height: 2.5rem !important;
    flex-basis: 2.15rem !important;
  }

  .bh-login-page .fi-one-time-code-input-ctn {
    gap: 0.35rem !important;
  }
}

/* —— Visual: ilustración + ticket —— */
.bh-hero-visual {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 0;
  min-width: 0;
}

.bh-hero-art {
  width: calc(100% + var(--bh-container-pad));
  margin-right: calc(-1 * var(--bh-container-pad));
  max-height: calc(100svh - 6.5rem);
  aspect-ratio: 1;
  transform: translate(calc(var(--mx, 0) * 14px), calc(var(--my, 0) * 10px));
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.bh-hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right top;
  background: transparent;
  -webkit-mask-image: linear-gradient(100deg, #000 44%, transparent 56%);
  mask-image: linear-gradient(100deg, #000 44%, transparent 56%);
  -webkit-mask-size: 250% 100%;
  mask-size: 250% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0% 0;
  mask-position: 0% 0;
}

.bh-hero-ticket {
  position: absolute;
  left: clamp(-3rem, -2.5vw, -0.75rem);
  bottom: clamp(0.5rem, 4svh, 2rem);
  z-index: 2;
  width: var(--bh-ticket-w);
  padding: 1.05rem 0.95rem 1.2rem;
  background: #fff;
  color: var(--bh-ink);
  font-family: var(--bh-font-body);
  font-variant-numeric: tabular-nums;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 24px 48px -22px rgba(0, 0, 0, 0.45);
  transform: rotate(-5deg) translate(calc(var(--mx, 0) * -9px), calc(var(--my, 0) * -7px));
  transform-origin: 50% 0;
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bh-hero-ticket::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 12px;
  background:
    linear-gradient(135deg, #fff 8px, transparent 0) 0 0 / 16px 12px repeat-x,
    linear-gradient(-135deg, #fff 8px, transparent 0) 0 0 / 16px 12px repeat-x;
}

.bh-hero-ticket-tape {
  position: absolute;
  top: -11px;
  left: 50%;
  width: 78px;
  height: 22px;
  background: rgba(247, 201, 72, 0.55);
  border-left: 1px dashed rgba(0, 0, 0, 0.08);
  border-right: 1px dashed rgba(0, 0, 0, 0.08);
  transform: translateX(-50%) rotate(3deg);
  backdrop-filter: blur(1px);
}

.bh-hero-ticket-head {
  display: grid;
  gap: 0.15rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.22);
  text-align: center;
}

.bh-hero-ticket-head strong {
  font-family: var(--bh-font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bh-hero-ticket-head span {
  font-size: 0.68rem;
  color: var(--bh-ink-muted);
}

.bh-hero-ticket-lines {
  display: grid;
  gap: 0.4rem;
  margin: 0;
}

.bh-hero-ticket-line {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--bh-ink-soft);
}

.bh-hero-ticket-line dt {
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}

.bh-hero-ticket-line dt::after {
  content: '';
  flex: 1 1 0;
  min-width: 0.75rem;
  border-bottom: 2px dotted rgba(0, 0, 0, 0.28);
  transform: translateY(-0.2em);
}

.bh-hero-ticket-line dd {
  margin: 0;
  font-family: var(--bh-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--bh-ink);
  white-space: nowrap;
}

.bh-hero-ticket-line--total {
  margin-top: 0.3rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.22);
  font-family: var(--bh-font-display);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bh-ink);
}

.bh-hero-ticket-line--total dd {
  font-size: 1.85rem;
  line-height: 0.9;
  color: var(--bh-green);
}

.bh-hero-ticket-notes {
  display: grid;
  gap: 0.12rem;
  margin: 0.75rem 0 0;
  padding: 0.6rem 3.5rem 0 0;
  border-top: 1px dashed rgba(0, 0, 0, 0.22);
  list-style: none;
  font-size: 0.66rem;
  line-height: 1.35;
  color: var(--bh-ink-muted);
}

.bh-hero-ticket-stamp {
  position: absolute;
  right: -0.65rem;
  bottom: 1.2rem;
  padding: 0.28em 0.5em 0.3em;
  font-family: var(--bh-font-display);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bh-red);
  border: 3px solid var(--bh-red);
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px var(--bh-red);
  transform: rotate(-12deg);
  mix-blend-mode: multiply;
  opacity: 0.92;
  pointer-events: none;
}

.bh-hero-partners {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  flex: 0 0 auto;
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid color-mix(in srgb, var(--bh-ink) 8%, transparent);
}

.bh-hero-partners img {
  height: 28px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
}

/* —— Misma secuencia de animación que la web —— */
@media (prefers-reduced-motion: no-preference) {
  .bh-hero-in {
    animation: bh-hero-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s) both;
  }

  @keyframes bh-hero-rise {
    from {
      opacity: 0;
      transform: translateY(26px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .bh-hero-sticker {
    animation: bh-hero-slap 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.12) 0.5s both;
  }

  @keyframes bh-hero-slap {
    from {
      opacity: 0;
      transform: rotate(-16deg) scale(1.7);
    }
    to {
      opacity: 1;
      transform: rotate(-4deg) scale(1);
    }
  }

  .bh-hero-h1-word--mark::before {
    animation: bh-hero-mark 0.7s cubic-bezier(0.65, 0, 0.2, 1) 0.62s both;
  }

  @keyframes bh-hero-mark {
    from { transform: rotate(-1.4deg) scaleX(0); }
    to { transform: rotate(-1.4deg) scaleX(1); }
  }

  .bh-hero-art img {
    animation: bh-hero-paint 1.4s cubic-bezier(0.6, 0, 0.3, 1) 0.4s both;
  }

  @keyframes bh-hero-paint {
    from {
      -webkit-mask-position: 100% 0;
      mask-position: 100% 0;
    }
    to {
      -webkit-mask-position: 0% 0;
      mask-position: 0% 0;
    }
  }

  .bh-hero-ticket {
    animation:
      bh-hero-print 1.05s cubic-bezier(0.3, 0.7, 0.2, 1) 1.7s both,
      bh-hero-thud 0.42s ease-out 2.85s;
  }

  @keyframes bh-hero-print {
    from { clip-path: inset(0 -40px 100% -40px); }
    to { clip-path: inset(-40px -40px -70px -40px); }
  }

  .bh-hero-ticket-tape {
    animation: bh-hero-tape 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.1) 2.85s both;
  }

  @keyframes bh-hero-tape {
    from {
      opacity: 0;
      transform: translateX(-50%) rotate(3deg) scale(1.4);
    }
    to {
      opacity: 1;
      transform: translateX(-50%) rotate(3deg) scale(1);
    }
  }

  @keyframes bh-hero-thud {
    0% { transform: rotate(-5deg) translateY(0); }
    35% { transform: rotate(-5.6deg) translateY(4px); }
    100% { transform: rotate(-5deg) translateY(0); }
  }

  .bh-hero-ticket-stamp {
    animation: bh-hero-stamp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.1) 2.95s both;
  }

  @keyframes bh-hero-stamp {
    from {
      opacity: 0;
      transform: rotate(-22deg) scale(2.1);
    }
    to {
      opacity: 0.92;
      transform: rotate(-12deg) scale(1);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .bh-hero-in,
  .bh-hero-sticker,
  .bh-hero-h1-word--mark::before,
  .bh-hero-art img,
  .bh-hero-ticket,
  .bh-hero-ticket-tape,
  .bh-hero-ticket-stamp {
    animation: none !important;
  }
}

/* —— Responsive —— */
@media (max-width: 960px) {
  html:has(.bh-hero),
  body:has(.bh-hero),
  .fi-body:has(.bh-hero) {
    height: auto;
    overflow: auto;
  }

  .bh-hero {
    height: auto;
    max-height: none;
    overflow: visible;
    min-height: 100svh;
  }

  .bh-hero-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .bh-hero-copy {
    max-width: none;
  }

  .bh-hero-h1 {
    font-size: clamp(2.8rem, 13vw, 5rem);
  }

  .bh-hero-form {
    width: min(100%, 26rem);
  }

  .bh-hero-visual {
    display: grid;
    justify-items: center;
    max-width: 420px;
    margin-inline: auto;
    width: 100%;
  }

  .bh-hero-art {
    width: 100%;
    margin-right: 0;
    max-height: 52vw;
    transform: none;
  }

  .bh-hero-art img {
    object-position: center bottom;
  }

  .bh-hero-ticket {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(280px, 88%);
    margin-top: -2.5rem;
    margin-left: -20%;
    transform: rotate(-4deg);
  }

  @media (prefers-reduced-motion: no-preference) {
    .bh-hero-ticket {
      animation-name: bh-hero-print;
    }
  }
}

@media (max-width: 480px) {
  .bh-hero-ticket {
    margin-left: 0;
    margin-top: -1.5rem;
  }

  .bh-hero-partners img {
    height: 24px;
  }
}

/* Panel autenticado */
.fi-topbar .fi-logo,
.fi-sidebar-header .fi-logo {
  max-height: 2.35rem;
}
