/* ============================================================
   BLINDSPOT REDESIGN — Phase 2: Landing (chapter zero / the stranger)
   Vein-style illuminated layout: framed corners, portrait carousel,
   drop-cap verse, CTA row, ledger footer.
   All classes prefixed `blindspot-` to coexist with legacy `bs-*`.
   Depends on tokens from blindspot-tokens.css.
   ============================================================ */

/* Button component lives in blindspot-buttons.css (shared across screens). */

/* ---------- LANDING SHELL ---------- */
.blindspot-landing {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  position: relative;
  z-index: 1;
  font-family: var(--blindspot-font-body);
  color: var(--blindspot-text);
  background: var(--blindspot-bg);
  background-image: var(--blindspot-bg-pattern);
}

/* ---------- ILLUMINATED FRAME ---------- */
.blindspot-landing__frame {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem;
  border: 1px solid var(--blindspot-border-2);
  background: linear-gradient(180deg, transparent, rgba(245, 192, 120, 0.02));
}
.blindspot-landing__corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 2px solid var(--blindspot-accent-gold);
  pointer-events: none;
}
.blindspot-landing__corner--tl { top: -1px; left: -1px;  border-right: 0; border-bottom: 0; }
.blindspot-landing__corner--tr { top: -1px; right: -1px; border-left: 0;  border-bottom: 0; }
.blindspot-landing__corner--bl { bottom: -1px; left: -1px;  border-right: 0; border-top: 0; }
.blindspot-landing__corner--br { bottom: -1px; right: -1px; border-left: 0;  border-top: 0; }

/* ---------- CHAPTER EYEBROW ---------- */
.blindspot-landing__chapter {
  font-family: var(--blindspot-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  text-align: center;
  color: var(--blindspot-accent-gold);
  margin-bottom: 2rem;
}

/* ---------- LAYOUT GRID ---------- */
.blindspot-landing__layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

/* ---------- LEFT: PORTRAIT + SIGIL ---------- */
.blindspot-landing__art {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--blindspot-bg-2);
  border: 1px solid var(--blindspot-border-2);
  overflow: hidden;
}
.blindspot-landing__portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: sepia(0.3) saturate(0.85) contrast(1.1);
}
.blindspot-landing__portrait-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(13, 8, 7, 0.85));
}

/* Hero carousel — sits above the static portrait, below the veil. JS
   populates with up to 5 most-recently-published gallery cards. If the
   fetch fails or returns nothing the stack stays empty and the static
   portrait shows through unchanged. */
.bs-hero-stack {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.bs-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: sepia(0.3) saturate(0.85) contrast(1.1);
  opacity: 0;
  transition: opacity 600ms ease;
}
.bs-hero-slide--active {
  opacity: 1;
}
.bs-hero-slide--landed {
  animation: bs-hero-land-pulse 1.4s ease-out;
}

/* Hover-play video overlay. Static avatar (background-image on
   .bs-hero-slide) is the poster; this <video> fades in over it on hover
   when the cardId has an entry in /blindspot/data/hero-card-videos.json.
   Inherits the same sepia tint as the static slide so the transition
   from poster to video doesn't read as a colour shift. */
.bs-hero-slide__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: sepia(0.3) saturate(0.85) contrast(1.1);
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}
.bs-hero-slide--video-active .bs-hero-slide__video {
  opacity: 1;
}
/* Restore pointer events on slides that actually have a video so the
   mouseenter/leave handlers fire. Parent .bs-hero-stack stays
   pointer-events: none so non-video slides remain click-through. */
.bs-hero-slide--has-video {
  pointer-events: auto;
  cursor: pointer;
}

/* Slot-machine reel — overlays the hero stack during a roll. Strip
   slides left and lands the chosen tile centered under the gold
   pointer. Mirrors the loot crate ceremony idiom (bs-crates.js). */
.bs-hero-reel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: rgba(13, 8, 7, 0.45);
  z-index: 10;
}
.bs-hero-reel__strip {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  transform: translateX(0);
  will-change: transform;
}
.bs-hero-reel__tile {
  /* width set inline by JS to match runtime stage width */
  height: 100%;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: sepia(0.3) saturate(0.85) contrast(1.1);
}
.bs-hero-reel__tile--winner {
  filter: sepia(0) saturate(1.2) contrast(1.18) brightness(1.4);
  transition: filter 220ms ease-out;
}
.bs-hero-reel--fade {
  transition: opacity 600ms ease;
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .bs-hero-reel__strip { transition: none !important; }
}
@keyframes bs-hero-land-pulse {
  0%   { filter: sepia(0.3) saturate(0.85) contrast(1.1) brightness(1); }
  18%  { filter: sepia(0)   saturate(1.2)  contrast(1.18) brightness(1.45); }
  60%  { filter: sepia(0.15) saturate(1.05) contrast(1.12) brightness(1.1); }
  100% { filter: sepia(0.3) saturate(0.85) contrast(1.1) brightness(1); }
}
@media (prefers-reduced-motion: reduce) {
  .bs-hero-slide--landed { animation: none; }
}
.blindspot-landing__card-tag {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: var(--blindspot-font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blindspot-text-muted);
}
/* Creator attribution under the card name — quieter still, italic
   non-uppercase so it reads as flavor metadata, not a label. */
.blindspot-landing__card-tag__by {
  display: inline;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--blindspot-text-muted);
  opacity: 0.75;
  margin-left: 0.4em;
}

/* ---------- RIGHT: VERSE ---------- */
.blindspot-landing__title {
  font-family: var(--blindspot-font-display);
  font-weight: 700;
  letter-spacing: var(--blindspot-display-tracking);
  text-transform: var(--blindspot-display-case);
  font-size: clamp(3rem, 7vw, 5.5rem);
  margin: 0 0 1.5rem;
  color: var(--blindspot-accent-gold);
  line-height: 0.95;
  text-shadow: 0 0 80px rgba(245, 192, 120, 0.25);
}

.blindspot-landing__verse {
  font-family: var(--blindspot-font-body);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--blindspot-text);
  font-weight: 400;
  margin: 0 0 1.25rem;
}
.blindspot-landing__verse--small {
  font-size: 1rem;
  color: var(--blindspot-text-dim);
  font-style: italic;
}
.blindspot-landing__drop {
  font-family: var(--blindspot-font-display);
  font-size: 4rem;
  float: left;
  line-height: 0.85;
  margin: 0.2rem 0.6rem 0 0;
  color: var(--blindspot-accent);
}

/* ---------- CTA ROW ---------- */
.blindspot-landing__cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2rem;
}

/* Reroll button — gold-tinted ghost style with the body mono font (not
   the wide-tracked uppercase display serif used by primary CTAs) so
   the compound label "Reroll (2 left)" stays scannable. Subordinate
   emphasis to Begin without the legibility hit. */
#bs-reroll-btn {
  font-family: var(--blindspot-font-body);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  color: var(--blindspot-accent);
  border-color: rgba(245, 192, 120, 0.45);
  background: rgba(245, 192, 120, 0.04);
}
#bs-reroll-btn:hover:not(:disabled) {
  color: #FFF6E8;
  border-color: var(--blindspot-accent);
  background: rgba(245, 192, 120, 0.18);
  box-shadow: 0 0 12px rgba(245, 192, 120, 0.25);
}
#bs-reroll-btn .fa-dice-d20 {
  color: var(--blindspot-accent);
}
#bs-reroll-btn:hover:not(:disabled) .fa-dice-d20 {
  color: #FFF6E8;
}

/* ---------- FOOTER LEDGER ---------- */
.blindspot-landing__footer {
  border-top: 1px solid var(--blindspot-border-2);
  padding-top: 1rem;
}
/* Splash stats strip — same component as the in-game lobby's stats
   row (blindspot-lobby.css). Rules duplicated here because index.html
   doesn't load the lobby stylesheet. Tile component is generic and
   could move to a shared file later. */
.blindspot-stats-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  background: transparent;
  border: 0;
}
.blindspot-stat-tile {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.5rem 0.85rem 0.55rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font: inherit;
  color: inherit;
}
.blindspot-stat-tile + .blindspot-stat-tile {
  border-left: 1px solid var(--blindspot-border-2, rgba(245, 192, 120, 0.18));
}
.blindspot-stat-tile__label {
  font-family: var(--blindspot-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blindspot-text-dim, var(--blindspot-text-muted));
}
.blindspot-stat-tile__value {
  font-family: var(--blindspot-font-numeric, 'Inter', system-ui, sans-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blindspot-accent-gold, #F5C078);
  line-height: 1;
  letter-spacing: 0;
  font-feature-settings: "tnum" on, "lnum" on;
  font-variant-numeric: tabular-nums;
}
/* Splash tiles are decorative — non-clickable, no hover flash. */
.blindspot-landing__stats .blindspot-stat-tile {
  cursor: default;
}
@media (max-width: 600px) {
  .blindspot-stat-tile { flex: 1 1 50%; }
  .blindspot-stat-tile + .blindspot-stat-tile { border-left: 0; }
  .blindspot-stat-tile:nth-child(2n) { border-left: 1px solid var(--blindspot-border-2, rgba(245, 192, 120, 0.18)); }
}

/* ---------- SIGN-IN LINE ---------- */
.blindspot-landing__signin-row {
  margin-top: 1.5rem;
  font-family: var(--blindspot-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--blindspot-text-dim);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}
.blindspot-landing__signin-row a {
  color: var(--blindspot-accent-gold);
  text-decoration: none;
  border-bottom: 1px dotted var(--blindspot-accent-gold-dim);
  transition: color var(--blindspot-transition-fast),
              border-color var(--blindspot-transition-fast);
}
.blindspot-landing__signin-row a:hover {
  color: var(--blindspot-accent-gold-2);
  border-bottom-color: var(--blindspot-accent-gold);
}
.blindspot-landing__signin-row .blindspot-landing__signin-or {
  color: var(--blindspot-text-muted);
}

/* ---------- ENTRANCE ANIMATIONS ---------- */
@keyframes blindspot-fade-up {
  from { opacity: 0.001; transform: translateY(12px); }
  to   { opacity: 1;     transform: translateY(0); }
}
.blindspot-fade-up {
  animation: blindspot-fade-up 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .blindspot-fade-up {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 800px) {
  .blindspot-landing { padding: 1.5rem 1rem; }
  .blindspot-landing__frame { padding: 2rem 1.5rem; }
  .blindspot-landing__chapter { letter-spacing: 0.3em; margin-bottom: 1.5rem; }
  .blindspot-landing__layout { grid-template-columns: 1fr; gap: 2rem; }
  .blindspot-landing__title { font-size: clamp(2.5rem, 12vw, 4rem); }
  .blindspot-landing__verse { font-size: 1rem; }
  .blindspot-landing__drop { font-size: 3rem; }
  .blindspot-landing__cta-row .blindspot-btn { flex: 1; }
}
