@import url("variables.css?v=20260817a");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--dc-navy);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background-color: var(--dc-paper);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--dc-paper);
  background-image: var(--dc-fondo-img);
  background-position: top center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: var(--dc-fondo-img-opacidad, 1);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--dc-paper) 55%, transparent) 0%,
    color-mix(in srgb, var(--dc-paper) 82%, transparent) 100%
  );
}

html:not(.has-fondo-img) body::after {
  opacity: 0;
}

html.has-home-scene body::before,
html.has-home-scene body::after {
  opacity: 0;
}

.home-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--dc-paper);
}

.home-scene[hidden] {
  display: none !important;
}

.home-scene__stage {
  position: absolute;
  inset: -10%;
}

.home-scene__slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  filter: saturate(0.78) contrast(0.92) brightness(1.08);
  transform: scale(1.04);
  transition: opacity 1.6s ease;
}

.home-scene__slide.is-on {
  opacity: 1;
  animation: homeKen 28s ease-in-out infinite alternate;
}

.home-scene__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 18%, rgba(42, 157, 143, 0.1), transparent 62%),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--dc-paper) 70%, transparent) 0%,
      color-mix(in srgb, var(--dc-paper) 80%, transparent) 45%,
      color-mix(in srgb, var(--dc-paper) 88%, transparent) 100%
    );
}

@keyframes homeKen {
  from {
    transform: scale(1.04) translate(0, 0);
  }
  to {
    transform: scale(1.12) translate(-1.6%, 1.2%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-scene__slide.is-on {
    animation: none;
  }
}

.home {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  text-align: center;
  animation: homeIn 0.55s ease both;
}

.home__brand {
  margin: 0;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(2.6rem, 10vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--dc-teal);
}

.home__brand a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.home__brand img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--dc-shadow);
}

.home__brand img[hidden] {
  display: none !important;
}

.home__tag {
  margin: 8px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dc-navy);
  font-weight: 600;
}

.home__tag[hidden] {
  display: none !important;
}

.home__lead {
  margin: 14px 0 28px;
  color: var(--dc-muted);
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 500;
}

.home__lead--compact {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.home__group {
  margin-bottom: 18px;
}

.home__rule {
  display: block;
  width: 100%;
  height: 1px;
  margin: 8px 0 22px;
  border: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(15, 61, 58, 0.22) 18%,
    rgba(15, 61, 58, 0.22) 82%,
    transparent 100%
  );
}

.home__label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dc-muted);
  font-weight: 700;
}

.home__links {
  display: grid;
  gap: 10px;
}

.home__link {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: var(--dc-surface);
  border: 1px solid var(--dc-line);
  box-shadow: var(--dc-shadow);
  text-decoration: none;
  color: var(--dc-navy);
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.home__link:hover {
  transform: translateY(-1px);
  border-color: rgba(42, 157, 143, 0.35);
  box-shadow: var(--dc-shadow-lg);
}

.home__link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home__link-text > span {
  font-weight: 700;
  font-size: 1.05rem;
}

.home__link small {
  color: var(--dc-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.home__live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.home__live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e03131;
  box-shadow: 0 0 0 2px rgba(224, 49, 49, 0.22);
  animation: homeLiveBlink 1.15s ease-in-out infinite;
}

@keyframes homeLiveBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home__live-dot {
    animation: none;
    opacity: 1;
  }
}

.home__link-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--dc-teal-deep);
  opacity: 0.9;
}

.home__link-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.home__link--primary {
  background: linear-gradient(135deg, #2a9d8f 0%, #1f7a70 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 28px rgba(42, 157, 143, 0.28);
}

.home__link--primary small {
  color: rgba(255, 255, 255, 0.85);
}

.home__link--primary .home__link-icon {
  color: #fff;
  opacity: 0.95;
}

.home__link--takeaway {
  background: linear-gradient(135deg, #e8b86d 0%, #c56a1a 100%);
  border-color: transparent;
  color: #3d220c;
  box-shadow: 0 12px 28px rgba(197, 106, 26, 0.28);
}

.home__link--takeaway small {
  color: rgba(61, 34, 12, 0.78);
}

.home__link--takeaway .home__link-icon {
  color: #3d220c;
  opacity: 0.9;
}

.home__foot {
  margin: 28px 0 0;
  color: var(--dc-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

[hidden] {
  display: none !important;
}

.home__acceso {
  appearance: none;
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 30;
  width: 36px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dc-muted);
  opacity: 0.38;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.home__acceso svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.home__acceso:hover,
.home__acceso:focus-visible {
  opacity: 0.72;
  outline: none;
}

body.is-staff .home__acceso {
  opacity: 0.55;
}

.home__acceso-menu {
  position: fixed;
  top: 40px;
  right: 12px;
  z-index: 31;
  min-width: 168px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--dc-line);
  border-radius: 14px;
  box-shadow: var(--dc-shadow);
  text-align: left;
}

.home__acceso-menu p {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dc-muted);
  text-transform: capitalize;
}

.home__acceso-menu button {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0 0 4px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: var(--dc-surface);
  color: var(--dc-navy);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.home__acceso-menu button:last-child {
  margin-bottom: 0;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(42, 157, 143, 0.18), transparent 55%),
    var(--dc-paper);
}

.auth-card {
  width: min(360px, calc(100% - 32px));
  background: var(--dc-white);
  border: 1px solid var(--dc-line);
  border-radius: var(--radius-card);
  box-shadow: var(--dc-shadow-lg);
  padding: 24px;
  display: grid;
  gap: 12px;
  text-align: left;
}

.auth-card h2 {
  margin: 0;
  font-family: var(--font-brand);
  color: var(--dc-teal);
}

.auth-hint,
.auth-error {
  margin: 0;
  font-size: 0.9rem;
  color: var(--dc-muted);
}

.auth-error {
  color: #b42318;
  min-height: 1.2em;
}

.auth-card label {
  display: grid;
  gap: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dc-muted);
}

.auth-card select,
.auth-card input {
  border: 1px solid var(--dc-line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
}

.auth-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--dc-line);
  background: var(--dc-surface, #f4f7f6);
  color: var(--dc-navy);
  text-decoration: none;
  text-align: center;
  font-weight: 700;
}

.auth-home:hover {
  border-color: var(--dc-teal);
  color: var(--dc-teal-deep, #1f7a70);
}

.auth-home small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dc-muted);
}

.btn-desk {
  border: 0;
  border-radius: 25px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-desk--primary {
  background: var(--dc-btn);
  color: var(--dc-btn-text);
}

.btn-desk--ghost {
  background: var(--dc-surface);
  color: var(--dc-navy);
}

@keyframes homeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  body {
    padding: 14px 24px;
    align-content: center;
  }

  .home {
    width: min(680px, 100%);
  }

  .home__brand {
    font-size: clamp(1.9rem, 7vh, 2.7rem);
  }

  .home__lead {
    margin: 8px 0 16px;
    font-size: 0.95rem;
  }

  #homeCliente .home__links {
    grid-template-columns: 1fr 1fr;
  }

  .home__link small {
    font-size: 0.8rem;
    font-weight: 600;
  }

  .home__foot {
    margin-top: 16px;
  }
}
