/* Criadero JH — Landing con banner fluido ES/EN */
:root {
  --bg: #000000;
  --gold: #c9a227;
  --gold-soft: #e8d48b;
  --gold-deep: #a8861a;
  --ivory: #f4efe6;
  --muted: #8a8680;
  --line: rgba(232, 212, 139, 0.28);
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  /* Logo JH ~250% del tamaño base anterior (~58px) */
  --jh-size: clamp(96px, 12vw, 145px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  color: var(--ivory);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  background: transparent !important;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(0.85rem, 2vw, 1.5rem) clamp(0.85rem, 3.5vw, 2.25rem) 0.85rem;
  background:
    radial-gradient(ellipse 70% 45% at 50% 35%, rgba(201, 162, 39, 0.07), transparent 60%),
    #000;
}

/* Header */
.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex: 0 0 auto;
  width: 100%;
  z-index: 5;
  min-height: var(--jh-size);
  margin-bottom: clamp(0.25rem, 1vh, 0.65rem);
}

.jh-logo {
  width: var(--jh-size);
  height: var(--jh-size);
  max-width: min(145px, 28vw);
  object-fit: contain;
  flex-shrink: 0;
  background: transparent !important;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  transition: 0.2s ease;
}

.lang-btn.is-active {
  background: rgba(201, 162, 39, 0.18);
  color: var(--gold-soft);
}

.lang-btn:hover {
  color: var(--ivory);
}

/* Main: el banner usa el espacio disponible y crece con la ventana */
.main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.5vh, 1.75rem);
  padding: 0.25rem 0 0.5rem;
  min-height: 0;
  position: relative;
  z-index: 1;
  width: 100%;
}

/*
  Banner fluido:
  - crece con el ancho de la ventana
  - usa casi todo el alto libre (sin pisar logo / botones / footer)
  - se reajusta al redimensionar (desktop, tablet, iPhone)
*/
.banner {
  display: block;
  width: auto;
  max-width: min(1280px, 100%);
  height: auto;
  /* Alto grande: deja ~ logo + botones + footer */
  max-height: clamp(280px, calc(100svh - var(--jh-size) - 11.5rem), 820px);
  object-fit: contain;
  object-position: center;
  background: transparent !important;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.55));
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  flex: 0 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.55rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, #d6b44a, var(--gold) 48%, var(--gold-deep));
  color: #1a1405;
}

.btn-outline {
  border-color: var(--line);
  color: var(--ivory);
  background: rgba(255, 255, 255, 0.03);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
}

.btn-sm {
  padding: 0.65rem 1.1rem;
  font-size: 0.8rem;
}

/* Footer */
.foot {
  flex: 0 0 auto;
  text-align: center;
  padding-top: 0.35rem;
}

.foot p {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(154, 149, 140, 0.75);
}

/* Rules page */
.rules-body {
  background: #000;
}

.rules-page {
  max-width: 1200px;
  margin: 0 auto;
}

.rules-top {
  margin-bottom: 1rem;
}

.back {
  font-size: 0.92rem;
  color: var(--gold-soft);
  letter-spacing: 0.04em;
}

.back:hover {
  color: #fff;
}

.rules-actions {
  display: flex;
  gap: 0.5rem;
}

.rules-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0.6rem;
}

.rules-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.rules-sub {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.pdf-frame {
  flex: 1 1 auto;
  min-height: min(70vh, 820px);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #111;
}

.pdf-frame object {
  width: 100%;
  height: min(70vh, 820px);
  border: 0;
  display: block;
}

.pdf-fallback {
  padding: 2rem;
  color: var(--muted);
  text-align: center;
}

.pdf-fallback a {
  color: var(--gold-soft);
  text-decoration: underline;
}

/* Escritorio grande: banner aún más amplio */
@media (min-width: 1200px) {
  .banner {
    max-width: min(1400px, 96vw);
    max-height: clamp(420px, calc(100svh - var(--jh-size) - 11rem), 900px);
  }
}

/* Tablet */
@media (max-width: 900px) {
  :root {
    --jh-size: clamp(100px, 16vw, 130px);
  }

  .jh-logo {
    max-width: min(130px, 30vw);
  }

  .banner {
    max-width: 100%;
    max-height: clamp(300px, calc(100svh - var(--jh-size) - 12rem), 620px);
  }
}

/* Celular */
@media (max-width: 720px) {
  :root {
    --jh-size: clamp(88px, 22vw, 120px);
  }

  .page {
    padding: 0.75rem 0.75rem 0.7rem;
  }

  .top {
    align-items: center;
    margin-bottom: 0.35rem;
  }

  .jh-logo {
    max-width: min(120px, 32vw);
  }

  .lang-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.72rem;
  }

  .banner {
    width: 100%;
    max-width: 100%;
    max-height: clamp(240px, calc(100svh - var(--jh-size) - 12.5rem), 520px);
  }

  .btn {
    width: 100%;
    max-width: 320px;
  }

  .actions {
    width: 100%;
  }
}

/* Pantallas bajas */
@media (max-height: 700px) {
  :root {
    --jh-size: clamp(72px, 12vh, 100px);
  }

  .banner {
    max-height: clamp(200px, calc(100svh - var(--jh-size) - 10.5rem), 420px);
  }

  .jh-logo {
    max-width: min(100px, 24vw);
  }

  .top {
    margin-bottom: 0.2rem;
  }

  .main {
    gap: 0.85rem;
  }

  .btn {
    padding: 0.8rem 1.2rem;
    font-size: 0.8rem;
  }
}

/* Muy estrecho */
@media (max-width: 380px) {
  :root {
    --jh-size: 88px;
  }

  .jh-logo {
    max-width: 88px;
  }
}
