/* ═══════════════════════════════════════════════════
   HOME HERO — logged-out lobby hero (Stake-style)
   Artwork fills the box; the slogan + CTA column sits in the dark centre.
   Centre-column metrics measured from Stake's hero: 350px wide, 32/40px
   headline, 44px controls, 16px rhythm, 3 × grey tiles 9px apart.
   ═══════════════════════════════════════════════════ */

.home-hero {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  aspect-ratio: 3.2 / 1;          /* Stake-like proportions (~1280×400); matches the 2000×625 artwork exactly */
  min-height: 340px;
  max-height: 360px;               /* capped so the first game row stays above the fold on laptops */
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-sidebar);   /* shows while the image decodes */
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.home-hero__art,
.home-hero__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.home-hero__art { z-index: -1; }
.home-hero__forest { display: none; }   /* the castle look's forest (theme-castle.css) */
.home-hero__sky { display: none; }      /* the castle look's stars, clouds and hills (theme-castle.css) */
.home-hero__art img {
  object-fit: cover;
  object-position: center;
  display: block;
}

.home-hero__content {
  width: min(350px, 100% - 40px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  text-align: center;
}

.home-hero__title {
  margin: 0 0 2px;
  font-family: "RM Neue", sans-serif;
  font-weight: 700;
  font-size: var(--fs-2xl);        /* 32px */
  line-height: 1.25;               /* 40px lines, like Stake */
  letter-spacing: -0.3px;
  color: #fff;
  text-wrap: balance;
}

/* the two-line headline and the line under it (owner 2026-10-14; the castle look sizes them, theme-castle.css) */
.home-hero__title-line { display: block; }
.home-hero__sub {
  margin: -8px 0 0;
  font-size: 15px;
  line-height: 1.3;
  color: var(--text-muted);
  text-wrap: balance;
}

.home-hero__register {
  height: 44px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--accent-text);
  font-family: "RM Neue", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--dur-fast, 0.16s) var(--ease-out, cubic-bezier(0.33, 1, 0.68, 1)),
    transform var(--dur-fast, 0.16s) var(--ease-out, cubic-bezier(0.33, 1, 0.68, 1)),
    box-shadow 0.25s var(--ease-out, cubic-bezier(0.33, 1, 0.68, 1));
}
@media (hover: hover) {
  .home-hero__register:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  }
}
.home-hero__register:active { transform: scale(0.98); transition-duration: var(--dur-press, 0.08s); }

.home-hero__label {
  margin: 0;
  font-family: "RM Neue", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-muted);
}

.home-hero__tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: -2px;                /* label sits a touch closer to its tiles */
}
.home-hero__tile {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--dur-fast, 0.16s) var(--ease-out, cubic-bezier(0.33, 1, 0.68, 1)),
    transform var(--dur-fast, 0.16s) var(--ease-out, cubic-bezier(0.33, 1, 0.68, 1));
}
.home-hero__tile img { width: 22px; height: 22px; display: block; }
@media (hover: hover) {
  .home-hero__tile:hover { background: var(--bg-elevated-hover); }
}
.home-hero__tile:active { transform: scale(0.97); transition-duration: var(--dur-press, 0.08s); }

.home-hero__register:focus-visible,
.home-hero__tile:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ── Tablet / phone: the box gets taller than 3.2:1, so the artwork is cropped
   to its centre; a scrim keeps the text readable over the characters. ── */
@media (max-width: 900px) {
  .home-hero { aspect-ratio: auto; min-height: 340px; max-height: none; padding: 32px 0; }
}
/* ── Phone: Stake's mobile layout — one card, blue background behind
   everything: the art on top, then the headline, Register and the social tiles. ── */
.home-hero__mobile-art { display: none; }
@media (max-width: 768px) {
  .home-hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 10px 16px 14px;
    /* bright glow behind the characters, darkening to navy under the buttons */
    background:
      radial-gradient(85% 42% at 50% 24%, rgba(110, 185, 255, 0.5) 0%, rgba(110, 185, 255, 0) 72%),
      linear-gradient(180deg, #1a72dc 0%, #135cb8 24%, #0e3f7a 48%, #0b2944 68%, #0a2134 100%);
  }
  .home-hero__art { display: none; }
  /* Keep the existing characters as an introduction, with enough room for the
     playable catalogue on the first screen. Width, rather than browser-bar
     height, sets a stable illustration size while the visitor scrolls. */
  .home-hero__mobile-art {
    display: block;
    position: relative;
    margin: 0 4px;
    height: clamp(88px, 29vw, 132px);
  }
  .home-hero__mobile-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(4, 18, 40, 0.45));
  }
  .home-hero__content { width: 100%; margin-top: 8px; gap: 10px; }
  .home-hero__title { font-size: 22px; line-height: 1.25; }             /* was 24px / 1.3 */
  .home-hero__label { font-size: 12px; }                                 /* was 13px */
  .home-hero:not(.home-hero--compact) .home-hero__tile { height: 40px; } /* was 44px (the compact card keeps 44px, level with its Register) */
}

/* Social tiles while a provider redirect is starting, and the "unavailable" note */
.home-hero__tile:disabled { cursor: progress; opacity: 0.7; }
.home-hero__tile[aria-busy="true"] { opacity: 1; background: var(--bg-elevated-hover); }
.home-hero__note {
  margin: -4px 0 0;
  font-family: "RM Neue", sans-serif;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-muted);
}

/* ── Compact hero on phones (the lobby's tab pages: Slots / Originals / Live Casino) ──
   One short card: the headline, then Register and the three social tiles in one row; no artwork and
   no "Or continue with" label (the tiles say what they are: aria-label / tooltip). The tab's own
   games then start on the first screen (mobile QA 2026-10-08, LG-23). Also on short screens (a phone
   held sideways, ≤500px tall), where the 340px hero filled the whole screen. Otherwise (≥769px wide
   and taller): the normal hero. */
@media (max-width: 768px), (max-height: 500px) {
  .lobby .home-hero.home-hero--compact { /* also beats desktop-density.css min-height (native density) */
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 14px 16px;
    background:
      radial-gradient(90% 120% at 100% 0%, rgba(110, 185, 255, 0.35) 0%, rgba(110, 185, 255, 0) 70%),
      linear-gradient(135deg, #1a72dc 0%, #135cb8 35%, #0e3f7a 70%, #0b2944 100%);
  }
  .home-hero--compact .home-hero__art,
  .home-hero--compact .home-hero__mobile-art,
  .home-hero--compact .home-hero__label { display: none; }
  .home-hero--compact .home-hero__content {
    width: 100%;
    max-width: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 10px;
    margin-top: 0;
  }
  .home-hero--compact .home-hero__title {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    text-align: left;
  }
  .home-hero--compact .home-hero__register { grid-column: 1; }
  .home-hero--compact .home-hero__tiles {
    grid-column: 2;
    grid-template-columns: repeat(3, 44px);
    gap: 8px;
    margin-top: 0;
  }
  .home-hero--compact .home-hero__note { grid-column: 1 / -1; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__register, .home-hero__tile { transition: none; }
  .home-hero__register:active, .home-hero__tile:active { transform: none; }
}

/* Keep the first visit compact on short phones. */
@media (max-width: 768px) and (max-height: 640px) {
  .home-hero__mobile-art { height: 80px; }
}

/* ── The slides' words (owner 2026-10-15: the banner turns to the offers now and then; HomeHero.tsx): every slide's
   headline, line and button share one grid cell, so the banner never changes height; only the shown one is visible
   (the others are inert). The pictures change in the castle look (theme-castle.css "THE HOME BANNER'S OFFERS"). ── */
.home-hero__deck { display: grid; gap: inherit; }
.home-hero__words {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: inherit;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}
.home-hero__words.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.45s ease 0.3s, transform 0.45s ease 0.3s, visibility 0s;
}
.home-hero__scenes, .home-hero__scene { display: none; }
@media (prefers-reduced-motion: reduce) {
  .home-hero__words, .home-hero__words.is-on { transition: none; transform: none; }
}
