/* ---- Landing page (static/index + static/home/*) ----
   Everything bespoke to the landing, prefixed `lh-`. Colours come from the portal
   tokens only (application.css `.portal`), so a reskin there carries through.
   The one loud element is the Play button; the rest stays quiet around the art. */

/* -- The one action. Gold plate, dark ink, a play glyph: same look everywhere. -- */
.lh-play {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: 0.375rem;
  background: linear-gradient(180deg, var(--gold-2), var(--gold-3));
  color: var(--accent-contrast);
  font-weight: 600; font-size: 1rem; line-height: 1.25; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4), 0 1px 0 var(--gold-5), 0 10px 24px rgb(0 0 0 / 0.45);
  transition: filter 0.15s, transform 0.15s;
}
.lh-play:hover { filter: brightness(1.08); }
.lh-play:active { transform: translateY(1px); }
.lh-play:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 3px; }
.lh-play--hero { padding: 1.05rem 2.4rem; font-size: 1.125rem; justify-content: center; }

.lh-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  color: var(--gold-2); font-size: 0.9375rem; font-weight: 500;
  text-decoration: underline; text-decoration-color: rgb(var(--gold-3-rgb) / 0.4); text-underline-offset: 4px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.lh-link:hover { color: var(--gold-1); text-decoration-color: var(--gold-2); }
.lh-link:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 2px; }

.lh-h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 600; line-height: 1.12; letter-spacing: -0.015em;
  color: var(--fg); text-wrap: balance;
}

/* Pixel art stays crisp at any size. */
.lh-pixel { image-rendering: pixelated; }

/* Controls that only make sense once the Stimulus controller is running. */
.lh-js-only { display: none; }
.lh-enhanced .lh-js-only { display: flex; }

/* -- Hero: a title screen. Art at full strength, copy docked at the bottom. -- */
.lh-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: calc(100svh - 4rem);
  border-bottom: 1px solid var(--line);
}
.lh-hero-art { position: absolute; inset: 0; z-index: -2; }
.lh-hero-art img { object-position: 50% 32%; }
/* A short shade under the navbar so the logo and pill read on a bright sky. */
.lh-hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 38%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.62), rgb(0 0 0 / 0.28) 55%, transparent);
}
.lh-hero-top { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 1.5rem 1rem 0; }
.lh-hero-logo { width: min(28rem, 78vw); height: auto; filter: drop-shadow(0 6px 22px rgb(0 0 0 / 0.75)); animation-delay: 80ms; }
.lh-pill {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.95rem; border-radius: 999px;
  border: 1px solid var(--gold-5);
  background: rgb(0 0 0 / 0.78);
  font-size: 0.8125rem; color: var(--fg);
}
.lh-hero-dock {
  margin-top: auto; padding: 9rem 0 1.75rem;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg) 74%, transparent) 34%, color-mix(in srgb, var(--bg) 94%, transparent) 62%, var(--bg));
}
.lh-hero-title {
  font-size: clamp(1.9rem, 1.1rem + 3.4vw, 3.5rem);
  font-weight: 600; line-height: 1.05; letter-spacing: -0.02em;
  color: var(--fg); text-wrap: balance;
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.6);
}
.lh-hero-facts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.75rem;
  width: 100%; max-width: 80rem; margin: 1.75rem auto 0; padding: 1.1rem 1rem 0;
  border-top: 1px solid rgb(var(--gold-3-rgb) / 0.22);
  font-size: 0.875rem; color: color-mix(in srgb, var(--fg) 82%, transparent);
}
.lh-hero-facts li { display: inline-flex; align-items: center; gap: 0.45rem; }
@media (min-width: 1024px) {
  .lh-hero-facts { justify-content: flex-start; padding-inline: 2rem; }
}
/* Short screens (laptops, landscape phones): tighten so the button never falls below the fold. */
@media (max-height: 760px) {
  .lh-hero-top { padding-top: 0.9rem; gap: 0.6rem; }
  .lh-hero-logo { width: min(19rem, 62vw); }
  .lh-hero-dock { padding-top: 5rem; }
  .lh-hero-facts { margin-top: 1.1rem; padding-top: 0.8rem; }
}

/* -- Start: numbered steps + a framed screenshot. -- */
.lh-step-num {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 999px;
  border: 1px solid var(--gold-4); color: var(--gold-2);
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.lh-frame {
  overflow: hidden; border-radius: 0.5rem;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line), 0 30px 60px rgb(0 0 0 / 0.55);
}
.lh-thumb {
  flex: 1 0 5.5rem; overflow: hidden; border-radius: 0.3rem;
  border: 1px solid var(--line); opacity: 0.6;
  transition: opacity 0.15s, border-color 0.15s;
}
.lh-thumb:hover { opacity: 1; }
.lh-thumb[aria-selected="true"] { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lh-thumb:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; opacity: 1; }

/* -- Classes: a character-select screen. -- */
.lh-class-tabs { margin-top: 2rem; gap: 0.6rem; overflow-x: auto; padding: 0.25rem 0.25rem 0.75rem; scroll-snap-type: x proximity; }
.lh-class-tabs [role="tab"] {
  flex: 1 0 4.75rem; max-width: 7.25rem; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.4rem 0.6rem; border-radius: 0.5rem;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--muted); font-size: 0.875rem; font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}
.lh-class-tabs [role="tab"] img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 0.3rem; filter: saturate(0.55) brightness(0.72); transition: filter 0.15s; }
.lh-class-tabs [role="tab"]:hover { color: var(--fg); border-color: var(--line-strong); }
.lh-class-tabs [role="tab"]:hover img { filter: none; }
.lh-class-tabs [role="tab"][aria-selected="true"] { color: var(--gold-1); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 22px rgb(var(--gold-3-rgb) / 0.16); }
.lh-class-tabs [role="tab"][aria-selected="true"] img { filter: none; }
.lh-class-tabs [role="tab"]:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 2px; }

.lh-class-panel { display: grid; gap: 2rem; margin-top: 2rem; align-items: center; }
.lh-class-panel[hidden] { display: none; }
.lh-class-panel + .lh-class-panel { margin-top: 4rem; }
.lh-enhanced .lh-class-panel + .lh-class-panel { margin-top: 2rem; }
.lh-class-art { overflow: hidden; border-radius: 0.5rem; border: 1px solid var(--line-strong); box-shadow: 0 24px 50px rgb(0 0 0 / 0.5); max-width: 21rem; width: 100%; margin-inline: auto; }
@media (min-width: 1024px) {
  .lh-class-panel { grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); gap: 3.5rem; }
}

/* -- World: the monster lineup, standing on one ground line. -- */
.lh-lineup {
  display: flex; align-items: flex-end; gap: 1.5rem;
  overflow-x: auto; padding: 0.5rem 0.25rem 0.25rem;
  scroll-snap-type: x proximity;
}
.lh-lineup li { flex: 1 0 6.5rem; scroll-snap-align: start; text-align: center; }
.lh-lineup-art {
  display: flex; align-items: flex-end; justify-content: center;
  height: 10.5rem; padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--line-strong);
  background: radial-gradient(ellipse 60% 14% at 50% 100%, rgb(0 0 0 / 0.55), transparent 70%);
}
.lh-lineup-art img { max-height: 100%; max-width: 100%; width: auto; height: auto; transition: transform 0.2s; }
.lh-lineup a:hover .lh-lineup-art img { transform: translateY(-4px); }
.lh-lineup a:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; border-radius: 4px; display: block; }

/* -- Castle War: the siege painting, lit from the right, copy on the dark left. -- */
.lh-war { position: relative; isolation: isolate; overflow: hidden; border-block: 1px solid var(--line); }
.lh-war-art { position: absolute; inset: 0; z-index: -2; }
.lh-war-art img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }
.lh-war::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 34%, color-mix(in srgb, var(--bg) 30%, transparent) 68%, transparent 100%),
    linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 22%, transparent 46%);
}
@media (max-width: 1023px) {
  .lh-war-art { bottom: auto; height: 26rem; }
  .lh-war::before { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 38%, transparent), color-mix(in srgb, var(--bg) 82%, transparent) 15rem, var(--bg) 26rem); }
}
.lh-siege {
  display: inline-flex; align-items: center; gap: 0.9rem;
  margin-top: 1.75rem; padding: 0.8rem 1.15rem;
  border-radius: 0.375rem; border: 1px solid var(--gold-4);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

/* -- Factions -- */
.lh-faction {
  position: relative; overflow: hidden;
  padding: 2.25rem 1.5rem; border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at top, rgb(var(--side) / 0.14), transparent 68%), var(--surface);
}
.lh-faction::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, rgb(var(--side) / 0.7), transparent); }
.lh-versus {
  display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 3rem; height: 3rem; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg);
  color: var(--accent); font-size: 0.75rem; font-weight: 600;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.6);
}
@media (min-width: 1024px) { .lh-versus { display: inline-flex; } }

/* -- FAQ -- */
.lh-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 0; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--fg);
}
.lh-faq summary::-webkit-details-marker { display: none; }
.lh-faq summary:hover { color: var(--gold-1); }
.lh-faq summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; border-radius: 2px; }

/* -- Finale -- */
.lh-finale { position: relative; isolation: isolate; overflow: hidden; border-top: 1px solid var(--line); }
.lh-finale-art { position: absolute; inset: 0; z-index: -2; }
.lh-finale-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.lh-finale::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 70% 62% at 50% 50%, rgb(0 0 0 / 0.74), rgb(0 0 0 / 0.38) 62%, rgb(0 0 0 / 0.12)),
              linear-gradient(180deg, var(--bg), transparent 22%, transparent 80%, var(--bg));
}
.lh-finale-title {
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.5rem);
  font-weight: 600; line-height: 1.08; letter-spacing: -0.02em;
  color: var(--fg); text-wrap: balance; text-shadow: 0 2px 20px rgb(0 0 0 / 0.7);
}

/* -- Phone-only sticky action. -- */
.lh-sticky {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: flex; padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.lh-sticky[hidden] { display: none; }
@media (min-width: 1024px) { .lh-sticky { display: none; } }
