/**
 * Tema Despedida Carlos Tevez — azul profundo Boca + oro.
 * Se aplica siempre en este ticketshop (proyecto Tevez-branded).
 */

:root {
  /* Alias marca Tevez (hex para CSS legacy / header) */
  --tevez-blue: #1a2744;
  --tevez-blue-deep: #0f1830;
  --tevez-gold: #f2c230;
  --tevez-gold-soft: #e8b84a;
  --tevez-apache: #e86a4b;
  --tevez-surface: #243352;
  --tevez-border: #3a4d72;

  --motogp-red: var(--tevez-gold);
  --motogp-red-dark: #c9a01e;

  --font-display: "Anton", "Archivo", system-ui, sans-serif;
  --font-sans: "Archivo", system-ui, sans-serif;
  --shadow-glow: 0 20px 60px -20px rgba(242, 194, 48, 0.45);
  --shadow-panel: 0 24px 60px -30px rgba(15, 24, 48, 0.9);
}

html,
body {
  font-family: var(--font-sans);
}

body {
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(52, 72, 120, 0.55), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(242, 194, 48, 0.12), transparent 65%);
  background-attachment: fixed;
}

h1,
h2,
h3,
.font-display {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

/* Utilities (plain CSS — no @utility) */
.text-display {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.95;
}

.gold-gradient-text {
  background-image: linear-gradient(100deg, #f7e08a, #f2c230, #d4a017);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.surface-panel {
  background-color: hsl(var(--surface, 225 40% 18%));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius, 0.75rem) + 4px);
  box-shadow: var(--shadow-panel);
}

.stripe-gold {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(242, 194, 48, 0.18) 0 8px,
    transparent 8px 16px
  );
}

/* Home layout */
.tevez-home {
  color: hsl(var(--foreground));
  background-color: var(--bg-primary, hsl(var(--background)));
}

.tevez-home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: calc(100svh - 68px);
  height: calc(100dvh - 68px);
  min-height: calc(100svh - 68px);
}

.tevez-home-hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center 28%;
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 48%,
    rgba(0, 0, 0, 0.45) 70%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 48%,
    rgba(0, 0, 0, 0.45) 70%,
    transparent 100%
  );
}

.tevez-home-hero-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--bg-primary, #1a1a1a) 38%, transparent) 0%,
      color-mix(in srgb, var(--bg-primary, #1a1a1a) 10%, transparent) 28%,
      color-mix(in srgb, var(--bg-primary, #1a1a1a) 42%, transparent) 58%,
      color-mix(in srgb, var(--bg-primary, #1a1a1a) 88%, transparent) 82%,
      var(--bg-primary, #1a1a1a) 100%
    );
}

.tevez-home-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.1rem;
  padding: 1.25rem 1rem 1.75rem;
  text-align: center;
}

.tevez-home-hero-copy {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.tevez-home-hero-copy h1,
.tevez-home-hero-copy > p {
  margin-left: auto;
  margin-right: auto;
}

.tevez-home-hero-copy [aria-label="Cuenta regresiva para el partido"] {
  width: 100%;
}

.tevez-home-hero-copy [aria-label="Cuenta regresiva para el partido"] > div {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.tevez-home-hero-copy [aria-label="Cuenta regresiva para el partido"] .text-display {
  font-size: clamp(1.35rem, 3.2vw, 2.25rem);
}

.tevez-home-hero-meta {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.tevez-home-hero-countdown {
  width: 100%;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.tevez-home-hero-countdown [aria-label="Cuenta regresiva para el partido"] {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}

.tevez-home-hero-countdown [aria-label="Cuenta regresiva para el partido"] > div {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.tevez-home-hero-copy .flex.flex-wrap {
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.tevez-home-hero-stats {
  display: grid;
  width: 100%;
  flex-shrink: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.tevez-home-hero .tevez-home-hero-glass {
  background-color: color-mix(in srgb, hsl(var(--surface, 225 40% 18%)) 58%, transparent) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: none;
}

@media (min-width: 640px) {
  .tevez-home-hero-inner {
    padding: 1.5rem 1rem 1.75rem;
  }

  .tevez-home-hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-height: 820px) {
  .tevez-home-hero-copy .text-display {
    font-size: clamp(1.85rem, 5vw, 3.25rem);
  }

  .tevez-home-hero-stats .surface-panel {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}

@media (max-height: 640px) {
  .tevez-home-hero-inner {
    padding-top: 0.75rem;
    padding-bottom: 0.85rem;
    gap: 0.65rem;
  }
}

.tevez-home .surface-panel {
  backdrop-filter: blur(8px);
}

/* Header brand mark */
.header-logo {
  max-width: min(220px, 58vw);
  height: 64px;
  max-height: 64px;
}

.header-logo a,
.header-logo-static {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  height: 100%;
  line-height: 1.1;
}

.header-logo .header-logo-img,
.header-logo img.header-logo-img {
  height: 64px !important;
  max-height: 64px !important;
  max-width: 190px !important;
  width: auto;
  object-fit: contain;
}

.header-tevez-mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.5rem;
  border-radius: 0.5rem;
  background: var(--tevez-gold);
  color: var(--tevez-blue-deep);
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1;
  flex-shrink: 0;
}

.header-tevez-brand {
  display: none;
  flex-direction: column;
  line-height: 1.15;
  margin-right: 0.75rem;
}

.header-tevez-brand-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: inherit;
}

.header-tevez-brand-sub {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}

@media (min-width: 640px) {
  .header-tevez-brand {
    display: flex;
  }
}

.header-cta-motogp {
  background: var(--tevez-gold) !important;
  color: var(--tevez-blue-deep) !important;
}

.header-cta-motogp:hover {
  filter: brightness(1.05);
}

.footer-tevez-event {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.45;
  opacity: 0.85;
}

/* Header nav (diseño ZIP) */
.header-tevez-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.25rem;
  flex: 1;
}

.header-tevez-nav-link {
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: inherit;
  opacity: 0.72;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.header-tevez-nav-link:hover,
.header-tevez-nav-link.is-active {
  opacity: 1;
  color: var(--tevez-gold);
  background: rgba(242, 194, 48, 0.08);
}

.header-seg-toggle,
.header-lang-toggle {
  display: inline-flex;
  align-items: stretch;
  gap: 2px;
  height: 36px;
  padding: 3px;
  border: 1px solid var(--border-color, hsl(var(--border)));
  border-radius: 0.5rem;
  background: hsl(var(--background) / 0.35);
  box-sizing: border-box;
}

.header-right-desktop #loginButton,
.header-right-desktop #userMenuButton {
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
}

.header-seg-toggle button,
.header-lang-toggle button,
.header-right-desktop #loginButton,
.header-right-desktop #userMenuButton,
.mobile-menu-section .header-seg-toggle button,
.mobile-menu-section .header-lang-toggle button {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.header-seg-toggle > button,
.header-lang-toggle > button {
  height: auto;
  min-height: 0;
  min-width: 2.35rem;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0.375rem;
}

.mobile-menu-section .header-seg-toggle,
.mobile-menu-section .header-lang-toggle {
  width: 100%;
  height: auto;
  min-height: 44px;
}

.mobile-menu-section .header-seg-toggle button,
.mobile-menu-section .header-lang-toggle button {
  flex: 1;
  min-height: 36px;
}

@media (min-width: 1024px) {
  .header-tevez-nav {
    display: flex;
  }
}

/* Footer ZIP */
.tevez-footer {
  margin-top: 4rem;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--surface) / 0.6);
}

/* Páginas sueltas: el margen dejaba ver el fondo negro del body como una franja. */
.tevez-footer--flush {
  margin-top: 0;
}

.tevez-footer-brand {
  display: flex;
  justify-content: center;
  padding: 2.5rem 1rem 2rem;
}

.tevez-footer-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  height: 40px;
  max-width: 180px;
}

/* Clases propias del footer: no reutilizar header-logo-* (sin tamaño los PNG
   de ~4000px se muestran enteros y, si fallan las reglas de tema, aparecen dos). */
.tevez-footer-logo-img {
  display: none !important;
  height: 40px !important;
  max-height: 40px !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain !important;
}

.tevez-footer-logo-img--light {
  display: block !important;
}

html.dark .tevez-footer-logo-img--light,
html[data-theme="dark"] .tevez-footer-logo-img--light,
body[data-theme="dark"] .tevez-footer-logo-img--light {
  display: none !important;
}

html.dark .tevez-footer-logo-img--dark,
html[data-theme="dark"] .tevez-footer-logo-img--dark,
body[data-theme="dark"] .tevez-footer-logo-img--dark {
  display: block !important;
}

html[data-theme="light"] .tevez-footer-logo-img--dark,
body[data-theme="light"] .tevez-footer-logo-img--dark,
body:not([data-theme]) .tevez-footer-logo-img--dark {
  display: none !important;
}

.tevez-footer-grid {
  margin: 0 auto;
  display: grid;
  max-width: 72rem;
  gap: 2.5rem;
  padding: 2.25rem 1rem 3rem;
}

@media (min-width: 640px) {
  .tevez-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .tevez-footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tevez-footer-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tevez-gold);
}

.tevez-footer-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.tevez-footer-list a,
.tevez-footer-btn {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.tevez-footer-list a:hover,
.tevez-footer-btn:hover {
  color: hsl(var(--foreground));
}

.tevez-footer-social {
  margin-top: 1rem;
}

.tevez-footer-apps {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tevez-footer-apps img {
  height: 36px;
  width: auto;
}

.tevez-footer-copy {
  border-top: 1px solid hsl(var(--border));
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

/* Buy promos ZIP */
.tevez-buy-promos {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 1.25rem;
}

@media (min-width: 640px) {
  .tevez-buy-promos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tevez-buy-promo {
  border-radius: 0.75rem;
  border: 1px solid rgba(242, 194, 48, 0.25);
  background: hsl(var(--surface) / 0.7);
  padding: 1rem;
}

.tevez-buy-promo-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tevez-gold);
}

.tevez-buy-promo-text {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.motogp-buy-page .motogp-buy-title,
.motogp-buy-page .motogp-buy-section-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Sala de espera */
.tevez-espera-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1.1rem;
  border-radius: 0.65rem;
  background: var(--tevez-gold);
  color: var(--tevez-blue-deep);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}

.motogp-espera-wrap {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(52, 72, 120, 0.55), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(242, 194, 48, 0.14), transparent 65%),
    #0f1830 !important;
  font-family: var(--font-sans);
}

.motogp-espera-wrap::before {
  background: repeating-linear-gradient(
    -45deg,
    rgba(242, 194, 48, 0.08) 0 8px,
    transparent 8px 16px
  ) !important;
}

.motogp-espera-card {
  border-top-color: var(--tevez-gold) !important;
  background: rgba(26, 39, 68, 0.82) !important;
}

.tevez-login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.tevez-login-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.tevez-login-sub {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}

.tevez-preloader-mark {
  margin-bottom: 1.25rem;
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.75rem;
}
