/* ════════════════════════════════════════════════════════════════════════════
   LANDING PAGE  (/)
   The public face of Essolis: what it is, what it does, what it costs, and a
   way in. Shown only to signed-out visitors — index.astro sends everyone else
   straight to /campaigns.

   It runs OUTSIDE the app shell (Layout showNav={false}), so none of the app
   chrome is here. What it does inherit is base.css, including three globals
   that fight a marketing page and are reset below:
     • section { padding:40px; margin:auto; text-align:center }
     • nav { background: … ; border-bottom: … }   — avoided by using <header>
     • a { color: var(--text) }
   Everything else is built from the design tokens so the page is unmistakably
   the same product as the screenshots it is showing.
   ════════════════════════════════════════════════════════════════════════════ */

.lp {
  --lp-max: 1180px;
  --lp-gutter: clamp(18px, 5vw, 40px);
  --lp-rule: rgba(var(--bronze-rgb), 0.14);
  /* Height of the bar from site-nav.css, so the hero and the anchor targets
     clear it. The fallback is only for the page rendering without that file. */
  --lp-nav-h: var(--sitenav-h, 64px);
}

/* base.css styles every <section>; this page lays its own out. */
.lp section {
  padding: 0;
  margin: 0;
  max-width: none;
  text-align: left;
}

.lp-wrap {
  width: 100%;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding-inline: var(--lp-gutter);
}

html:has(.lp) { scroll-behavior: smooth; scroll-padding-top: calc(var(--lp-nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html:has(.lp) { scroll-behavior: auto; } }

/* base.css dresses every bare <nav> as the app's old top bar — gradient fill,
   bottom border, drop shadow, padding, sticky, z-index 100. The footer's nav
   is a plain link group, so undo the lot. (The top bar does the same for
   itself in site-nav.css.) */
.lp nav {
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
  position: static;
  z-index: auto;
}

/* ── Hero ───────────────────────────────────────────────────────────────────
   Campaign artwork, darkened enough that gold type stays legible over it.
   The art establishes place; the gradient keeps it subordinate. */
.lp .lp-hero {
  position: relative;
  padding-top: calc(var(--lp-nav-h) + clamp(48px, 9vw, 104px));
  padding-bottom: clamp(20px, 5vw, 48px);
  background-size: cover;
  background-position: center top;
  overflow: hidden;
}
.lp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(12, 11, 9, 0.52) 0%, rgba(12, 11, 9, 0.78) 44%, rgba(12, 11, 9, 0.94) 72%, var(--bg) 100%),
    radial-gradient(120% 70% at 50% 0%, rgba(var(--bronze-rgb), 0.16) 0%, transparent 62%);
  pointer-events: none;
}
.lp-hero > * { position: relative; z-index: 1; }

.lp-hero-copy { max-width: 760px; margin: 0 auto; text-align: center; }

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: var(--rounded-pill);
  border: 1px solid rgba(var(--bronze-rgb), 0.3);
  background: rgba(var(--bronze-rgb), 0.1);
  color: var(--accent);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}
.lp-eyebrow iconify-icon { font-size: 13px; }

.lp-h1 {
  font-family: var(--title);
  font-weight: 400;
  font-size: clamp(2.25rem, 6.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: var(--text);
  margin: var(--space-lg) 0 0;
  text-wrap: balance;
}
.lp-h1 em {
  font-style: normal;
  color: var(--logo-gold);
  text-shadow: 0 0 26px rgba(var(--accent-rgb), 0.22);
}

.lp-lede {
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: var(--line-height-normal);
  color: var(--smoke);
  margin: var(--space-md) auto 0;
  max-width: 620px;
  text-wrap: pretty;
}
.lp-lede strong { color: var(--ivory); font-weight: var(--font-weight-medium); }

.lp-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: var(--space-xl);
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 28px;
  min-height: 48px;
  border-radius: var(--rounded-md);
  font-size: var(--font-size-base);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast),
              color var(--duration-fast), transform var(--duration-fast) var(--easing-out);
}
.lp-btn:active { transform: translateY(1px); }
.lp-btn-primary {
  background: var(--logo-gold);
  color: #1c1913;
  font-weight: var(--font-weight-semibold);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.18);
}
.lp-btn-primary:hover { background: #ffd97a; color: #1c1913; }
.lp-btn-ghost {
  border-color: rgba(var(--bronze-rgb), 0.38);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.lp-btn-ghost:hover { border-color: rgba(var(--bronze-rgb), 0.7); background: rgba(var(--bronze-rgb), 0.12); color: var(--accent); }

.lp-cta-note {
  margin: var(--space-md) 0 0;
  font-size: var(--font-size-xs);
  color: var(--deep-smoke);
}

/* The hero screenshot. Bleeds down into the next section and fades out, so it
   reads as the app continuing past the fold rather than a framed picture. */
.lp-hero-shot {
  margin: clamp(36px, 6vw, 64px) auto 0;
  max-width: 1040px;
  border-radius: var(--rounded-lg) var(--rounded-lg) 0 0;
  border: 1px solid rgba(var(--bronze-rgb), 0.22);
  border-bottom: 0;
  overflow: hidden;
  box-shadow: 0 -2px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 70px rgba(0, 0, 0, 0.6);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.lp-hero-shot img { display: block; width: 100%; height: auto; }

/* ── Section furniture ──────────────────────────────────────────────────────*/
.lp .lp-section { padding-block: clamp(56px, 9vw, 104px); }
/* Fixed-length stops, not percentages: a percentage fade is as tall as the
   section, so the short band and the tall one tinted over wildly different
   distances and read as inconsistent spacing. */
.lp-section-alt {
  --lp-fade: clamp(40px, 6vw, 72px);
  background: linear-gradient(180deg,
    transparent 0,
    rgba(0, 0, 0, 0.3) var(--lp-fade),
    rgba(0, 0, 0, 0.3) calc(100% - var(--lp-fade)),
    transparent 100%);
}

.lp-head { max-width: 640px; margin: 0 0 clamp(32px, 5vw, 52px); }
.lp-head.center { margin-inline: auto; text-align: center; }

.lp-kicker {
  display: block;
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 12px;
}
.lp-h2 {
  font-family: var(--title);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: var(--line-height-tight);
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}
.lp-sub {
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--smoke);
  margin: var(--space-md) 0 0;
  text-wrap: pretty;
}

/* ── Proof strip ────────────────────────────────────────────────────────────*/
.lp .lp-strip-section { padding-block: clamp(8px, 2vw, 20px); }
/* Explicit counts rather than auto-fit: the 1px gaps show the rule colour, so
   a trailing empty cell reads as a stray panel. Four facts always divide
   evenly into 4, 2 or 1. */
.lp-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--lp-rule);
  border-block: 1px solid var(--lp-rule);
}
@media (max-width: 940px) { .lp-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .lp-strip { grid-template-columns: 1fr; } }
.lp-strip div { background: var(--bg); padding: 22px 24px; }
.lp-strip dt {
  font-family: var(--title);
  font-size: 1.55rem;
  color: var(--logo-gold);
  line-height: 1;
}
.lp-strip dd {
  margin: 8px 0 0;
  font-size: var(--font-size-sm);
  color: var(--smoke);
  line-height: 1.45;
}

/* ── The two modes ──────────────────────────────────────────────────────────
   The product's actual differentiator, so it gets a block of its own rather
   than a bullet in a list. Two cards, deliberately NOT identical: the offline
   one carries the accent because it is the claim nobody else makes. */
.lp-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--space-lg);
}
.lp-mode {
  margin: 0;                                   /* base.css section{margin:auto} */
  position: relative;
  padding: 28px 26px;
  border-radius: var(--rounded-lg);
  border: 1px solid var(--lp-rule);
  background: linear-gradient(170deg, rgba(36, 36, 34, 0.7), rgba(22, 22, 21, 0.86));
}
.lp-mode.featured {
  border-color: rgba(var(--bronze-rgb), 0.42);
  box-shadow: 0 0 0 1px rgba(var(--bronze-rgb), 0.08), 0 18px 48px rgba(0, 0, 0, 0.45);
}
.lp-mode-icon {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--rounded-md);
  background: rgba(var(--bronze-rgb), 0.12);
  border: 1px solid rgba(var(--bronze-rgb), 0.26);
  color: var(--accent);
  font-size: 20px;
  margin-bottom: var(--space-md);
}
.lp-mode h3 {
  font-family: var(--title);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--text);
  margin: 0 0 8px;
}
.lp-mode p { margin: 0 0 var(--space-md); color: var(--smoke); font-size: var(--font-size-base); line-height: var(--line-height-normal); }
.lp-mode ul { list-style: none; padding: 0; margin: 0; }
.lp-mode li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  font-size: var(--font-size-sm);
  color: var(--smoke);
  line-height: 1.5;
}
.lp-mode li iconify-icon { flex-shrink: 0; margin-top: 2px; font-size: 15px; color: var(--health-green); }

.lp-mode-note {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px dashed var(--lp-rule);
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  line-height: 1.55;
}
.lp-mode-note strong { color: var(--accent); font-weight: var(--font-weight-normal); }

/* ── Showcase rows ──────────────────────────────────────────────────────────
   Big alternating screenshot + copy. Three of them, for the three things
   someone actually buys this for. */
.lp-show { display: grid; gap: clamp(28px, 5vw, 64px); }
.lp-show + .lp-show { margin-top: clamp(56px, 8vw, 96px); }

@media (min-width: 900px) {
  /* Copy column, then the wider screenshot column. A flipped row swaps the
     ORDER of the two children — so its track sizes have to swap with them, or
     the picture lands in the narrow track and that row comes out visibly
     smaller than the ones above and below it. */
  .lp-show { grid-template-columns: 1fr 1.32fr; align-items: center; }
  .lp-show.flip { grid-template-columns: 1.32fr 1fr; }
  .lp-show.flip .lp-show-copy { order: 2; }
  .lp-show.flip .lp-show-shot { order: 1; }
}

.lp-show-copy h3 {
  font-family: var(--title);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  line-height: var(--line-height-tight);
  color: var(--text);
  margin: 10px 0 0;
}
.lp-show-copy > p {
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--smoke);
  margin: var(--space-md) 0 0;
  text-wrap: pretty;
}
.lp-points { list-style: none; padding: 0; margin: var(--space-lg) 0 0; }
.lp-points li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 7px 0;
  font-size: var(--font-size-base);
  color: var(--smoke);
  line-height: 1.5;
}
.lp-points iconify-icon { flex-shrink: 0; margin-top: 3px; font-size: 15px; color: var(--bronze); }

/* ── Screenshot frames ──────────────────────────────────────────────────────
   A hairline bronze rim and a real shadow — enough to seat the image on the
   page without dressing it up as a fake browser window. */
.lp-frame {
  position: relative;
  margin: 0;
  border-radius: var(--rounded-lg);
  border: 1px solid rgba(var(--bronze-rgb), 0.2);
  background: var(--crypt-surface);
  overflow: hidden;
  box-shadow: var(--shadow-card-hover);
}
.lp-frame img { display: block; width: 100%; height: auto; }
.lp-frame figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--lp-rule);
  font-size: var(--font-size-xs);
  color: var(--deep-smoke);
  background: rgba(0, 0, 0, 0.3);
}

/* Cropped variant for the grid: shows the top of a page, which is where a
   screen says what it is. */
.lp-frame.crop img { aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; }

/* ── Screenshot carousel ────────────────────────────────────────────────────
   One frame, several screens. The track is a plain scroll-snap scroller, so a
   phone swipes it and a page with no JavaScript still shows the first shot and
   can scroll to the rest; the labels under it are a convenience on top. */
.lp-carousel {
  position: relative;
  border-radius: var(--rounded-lg);
  border: 1px solid rgba(var(--bronze-rgb), 0.2);
  background: var(--crypt-surface);
  overflow: hidden;
  box-shadow: var(--shadow-card-hover);
}
.lp-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* The reveal animation and the snap scroller both want the same gesture on
     a trackpad; hiding the bar keeps the frame clean, the labels do the rest. */
}
.lp-carousel-track::-webkit-scrollbar { display: none; }
.lp-carousel-track:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lp-carousel-slide {
  margin: 0;
  flex: 0 0 100%;
  scroll-snap-align: start;
}
.lp-carousel-slide img { display: block; width: 100%; height: auto; }

.lp-carousel-tabs {
  display: flex;
  gap: 2px;
  padding: 7px;
  border-top: 1px solid var(--lp-rule);
  background: rgba(0, 0, 0, 0.34);
}
.lp-carousel-tabs button {
  flex: 1;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--rounded-sm);
  background: none;
  font-family: var(--font-ui);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--deep-smoke);
  cursor: pointer;
  transition: color var(--duration-fast), background var(--duration-fast);
}
.lp-carousel-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.lp-carousel-tabs button[aria-selected='true'] {
  color: var(--accent);
  background: rgba(var(--bronze-rgb), 0.14);
}
.lp-carousel-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ── Feature grid ───────────────────────────────────────────────────────────*/
.lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--space-lg);
}
.lp-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--rounded-lg);
  border: 1px solid var(--lp-rule);
  background: rgba(28, 28, 26, 0.72);
  overflow: hidden;
  transition: border-color var(--duration-normal), transform var(--duration-normal) var(--easing-out);
}
.lp-card:hover { border-color: rgba(var(--bronze-rgb), 0.34); transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .lp-card:hover { transform: none; } }
/* A card with no screenshot should not stretch to match one that has: left
   stretched it ends in a pit of empty panel. Sized to its own content, it
   reads as a deliberately different card. */
.lp-card.no-shot { align-self: start; }

.lp-card .lp-frame { border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--lp-rule); }
.lp-card-body { padding: 20px 22px 24px; }
.lp-card h3 {
  font-family: var(--title);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--text);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.lp-card h3 iconify-icon { font-size: 17px; color: var(--bronze); }
.lp-card p { margin: 0; font-size: var(--font-size-sm); color: var(--smoke); line-height: var(--line-height-normal); }

/* ── Everything-else list ───────────────────────────────────────────────────*/
.lp-more {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2px 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.lp-more li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid rgba(var(--bronze-rgb), 0.08);
  font-size: var(--font-size-sm);
  color: var(--smoke);
  line-height: 1.5;
}
.lp-more iconify-icon { flex-shrink: 0; margin-top: 2px; font-size: 15px; color: var(--bronze); }
.lp-more b { color: var(--ivory); font-weight: var(--font-weight-medium); display: block; }

/* ── FAQ ────────────────────────────────────────────────────────────────────*/
.lp-faq { max-width: 780px; margin-inline: auto; }
.lp-faq details {
  border-bottom: 1px solid var(--lp-rule);
}
.lp-faq summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 4px;
  cursor: pointer;
  list-style: none;
  font-size: var(--font-size-md);
  color: var(--text);
  transition: color var(--duration-fast);
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary:hover { color: var(--accent); }
.lp-faq summary::after {
  content: '';
  margin-left: auto;
  flex-shrink: 0;
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--bronze);
  border-bottom: 1.5px solid var(--bronze);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--duration-normal) var(--easing-default);
}
.lp-faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.lp-faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--rounded-sm); }
.lp-faq-a {
  margin: 0;
  padding: 0 4px 22px;
  max-width: 64ch;
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--smoke);
}
.lp-faq-a a { color: var(--accent); }

/* ── Closing call to action ─────────────────────────────────────────────────*/
.lp .lp-close {
  position: relative;
  text-align: center;
  padding-block: clamp(64px, 10vw, 120px);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.lp-close::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(12, 11, 9, 0.82) 40%, rgba(12, 11, 9, 0.9) 100%);
}
.lp-close > * { position: relative; z-index: 1; }

/* ── Footer ─────────────────────────────────────────────────────────────────*/
/* ── Scroll reveal ──────────────────────────────────────────────────────────
   base.js (and its reveal animation) does not load outside the app shell, so
   this page brings its own: a short, once-only fade-up driven by an observer
   in index.astro. Opacity is set by the observer, never by `animation … both`,
   which would composite the layer permanently and break the nav's backdrop
   filter. */
.lp-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--easing-default), transform 0.6s var(--easing-default);
}
.lp-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .lp-reveal { opacity: 1; transform: none; transition: none; }
}
/* No script, no observer, no reveal — see the <noscript> block in index.astro,
   which covers engines that do not know this query. */
@media (scripting: none) {
  .lp-reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 600px) {
  /* The artwork stays on a phone — it is most of what makes the page feel like
     the product. What changes is the framing: the hero is cropped to its
     left-hand third (where the castle is) rather than scaled to nothing, and
     both overlays get darker, because type over art has less room to breathe
     at this width. */
  .lp .lp-hero { background-position: 28% top; }
  .lp-hero::after {
    background:
      radial-gradient(120% 60% at 50% 0%, rgba(var(--bronze-rgb), 0.16) 0%, transparent 60%),
      linear-gradient(to bottom, rgba(10, 8, 6, 0.62) 0%, rgba(10, 8, 6, 0.88) 62%, var(--bg) 100%);
  }
  .lp-hero-shot { border-radius: var(--rounded-md) var(--rounded-md) 0 0; }
  .lp-strip div { padding: 18px 20px; }
  .lp-mode { padding: 24px 20px; }
  .lp .lp-close { background-position: 40% center; }
  .lp-close::after { background: linear-gradient(to bottom, rgba(10, 8, 6, 0.74), rgba(10, 8, 6, 0.9)); }
  .lp-band { --band-h: clamp(170px, 42vw, 220px) !important; }
}

/* ── Phone alignment ────────────────────────────────────────────────────────
   Centred section headings read well on a wide page, where they sit over a
   symmetrical block of cards. On a phone everything below them is a single
   left-aligned column, and a centred heading above it looks like a different
   page. Below 700px every heading lines up with its content — including the
   closing call to action, whose buttons stack to the left edge anyway. */
@media (max-width: 700px) {
  .lp-head.center {
    margin-inline: 0;
    text-align: left;
  }
  .lp-h2 { text-wrap: pretty; }
  /* Inline-styled to centre on desktop; the phone wants them in the column. */
  .lp .lp-close { text-align: left; }
  .lp .lp-close .lp-h2,
  .lp .lp-close .lp-sub,
  .lp .lp-mode-note { margin-inline: 0 !important; text-align: left !important; }
  .lp-cta-row { justify-content: flex-start; }
}

/* ── Interactive map (src/components/MapDemo.astro) ─────────────────────────
   The one thing on the page you can actually operate, and the only band whose
   artwork is also a control surface. Edge to edge like the image bands, and
   cropped into the middle of the world so the map reads as a place rather than
   a thumbnail.

   The crop is done by SIZING THE STAGE, never by object-fit. Pins and biomes
   are percentages of the stage, so as long as the stage keeps the image's own
   aspect ratio they land exactly where the campaign put them; object-fit would
   scale the picture inside a box of a different shape and every coordinate
   would drift. The stage is therefore as wide as it needs to be to cover the
   strip (plus a little, for the zoom), and whatever falls outside is clipped.

   overflow: clip, not hidden: hidden makes a scroll container, and focusing a
   pin that is outside the crop would scroll the whole world sideways. */
.lp .lp-mapband {
  --band-h: max(260px, min(52vw, 820px));
  --map-zoom: 1.08;
  position: relative;
  width: 100%;
  height: var(--band-h);
  padding: 0;
  overflow: clip;
  isolation: isolate;
  background: #0b0a09;
  border-block: 1px solid rgba(var(--bronze-rgb), 0.16);
}
/* The crop ends in a hard edge against the page. A corner vignette seats the
   strip into the dark around it, the way the image bands' scrim does. */
.lp .lp-mapband::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(125% 105% at 50% 50%, transparent 52%, rgba(10, 8, 6, 0.6) 100%);
}

.lp-mapband-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: calc(max(100%, var(--band-h) * var(--map-ar)) * var(--map-zoom));
  aspect-ratio: var(--map-ar);
  line-height: 0;
}
.lp-mapband-stage picture { display: contents; }
.lp-mapband-stage img { display: block; width: 100%; height: 100%; }
.lp-mapband-pins { position: absolute; inset: 0; }

/* Biomes: the campaign's own region polygons, in the pins' coordinate space.
   Fills this faint are the point — the map underneath has to stay readable,
   and a saturated overlay would turn a hand-drawn world into a heat map. */
.lp-biomes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* The map is light parchment. Screen blending bleached the regions out
     entirely; multiply tints the paper, which is what a region overlay does on
     paper anyway. */
  mix-blend-mode: multiply;
  opacity: 0.8;
}
.lp-biomes polygon {
  fill: color-mix(in srgb, var(--bc) 30%, transparent);
  stroke: color-mix(in srgb, var(--bc) 70%, transparent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

/* Copy and legend ride above the art, like the image bands. Both are inert so
   that a pin underneath either of them is still hoverable. */
.lp-mapband-copy,
.lp-biome-key { position: absolute; z-index: 4; pointer-events: none; }
.lp-mapband-copy {
  top: 0;
  left: 0;
  right: 0;
  padding: clamp(22px, 3.4vw, 46px) var(--lp-gutter) clamp(42px, 6vw, 80px);
  text-align: center;
  background: linear-gradient(to bottom, rgba(10, 8, 6, 0.92) 0%, rgba(10, 8, 6, 0.72) 45%, transparent 100%);
}
.lp-mapband-note {
  margin: 8px auto 0;
  max-width: 44ch;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  color: var(--smoke);
}
.lp-biome-key {
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 0;
  padding: clamp(32px, 5vw, 58px) var(--lp-gutter) clamp(12px, 1.6vw, 18px);
  list-style: none;
  background: linear-gradient(to top, rgba(10, 8, 6, 0.9) 0%, rgba(10, 8, 6, 0.6) 50%, transparent 100%);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-wide);
  color: var(--smoke);
}
.lp-biome-key li { display: flex; align-items: center; gap: 7px; }
.lp-biome-key li::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--bc) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--bc) 80%, transparent);
}

.lp-pin {
  position: absolute;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--pc) 70%, #000);
  border-radius: 50%;
  background: color-mix(in srgb, var(--pc) 82%, #15110c);
  color: #fff;
  line-height: 0;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  transition: transform var(--duration-fast) var(--easing-default),
              box-shadow var(--duration-fast) var(--easing-default);
}
.lp-pin:hover,
.lp-pin.on { transform: scale(1.28); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc) 35%, transparent), 0 3px 10px rgba(0, 0, 0, 0.6); z-index: 2; }
.lp-pin:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* A quiet heartbeat on the pins until someone touches one, so it reads as
   something to try rather than decoration. Stops for good on first hover. */
@media (prefers-reduced-motion: no-preference) {
  .lp-mapband-pins:not(:hover) .lp-pin { animation: lp-pin-beat 3.2s var(--easing-default) infinite; }
  .lp-pin:nth-child(3n)   { animation-delay: 0.5s; }
  .lp-pin:nth-child(3n+1) { animation-delay: 1.1s; }
}
@keyframes lp-pin-beat {
  0%, 86%, 100% { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55); }
  92%           { box-shadow: 0 0 0 7px color-mix(in srgb, var(--pc) 0%, transparent), 0 2px 6px rgba(0, 0, 0, 0.55); }
}

.lp-pin-card {
  position: absolute;
  translate: -50% calc(-100% - 20px);
  z-index: 3;
  min-width: 150px;
  max-width: 240px;
  padding: 10px 13px;
  border-radius: var(--rounded-md);
  border: 1px solid rgba(var(--bronze-rgb), 0.3);
  background: rgba(16, 14, 11, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
  line-height: var(--line-height-normal);
  text-align: left;
  pointer-events: none;
}
.lp-pin-card.below { translate: -50% 20px; }
.lp-pin-card-type {
  display: block;
  font-size: 10px;
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  color: var(--pc, var(--bronze));
}
.lp-pin-card-name {
  display: block;
  font-family: var(--title);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--text);
  margin-top: 2px;
}
.lp-pin-card-meta { display: block; font-size: var(--font-size-xs); color: var(--smoke); margin-top: 3px; }
.lp-pin-card-meta:empty { display: none; }

/* Cities, towns and dungeons at full size; hamlets, caves and ruins as
   smaller dots, so a hundred pins read as a populated world and not as a wall
   of icons. */
.lp-pin { width: 21px; height: 21px; font-size: 11px; }
.lp-pin.major { width: 27px; height: 27px; font-size: 14px; }

/* Density tiers — see the comment in MapDemo.astro. */
.lp-pin[data-t='2'], .lp-pin[data-t='3'] { display: none; }
@media (min-width: 700px)  { .lp-pin[data-t='2'] { display: grid; } }
@media (min-width: 1000px) { .lp-pin[data-t='3'] { display: grid; } }

@media (max-width: 700px) {
  /* Fingers are blunter than a cursor, and the map is a quarter of the width. */
  .lp-pin { width: 19px; height: 19px; font-size: 10px; }
  .lp-pin.major { width: 24px; height: 24px; font-size: 12px; }
  .lp-pin-card { min-width: 130px; max-width: 190px; padding: 8px 11px; }

  /* Heading above, map at full width, key below. No crop, so every pin the
     phone tier keeps is actually on screen. */
  .lp .lp-mapband {
    --map-zoom: 1;
    display: flex;
    flex-direction: column;
    height: auto;
    padding-block: 26px 4px;
    background: rgba(0, 0, 0, 0.22);
  }
  .lp-mapband-stage {
    position: relative;
    top: auto;
    left: auto;
    translate: none;
    width: 100%;
  }
  .lp-mapband-copy,
  .lp-biome-key {
    position: static;
    background: none;
    padding: 0 var(--lp-gutter);
  }
  .lp .lp-mapband::after { display: none; }
  .lp-mapband-copy { order: -1; padding-bottom: 18px; }
  .lp-biome-key { gap: 5px 14px; padding-top: 16px; padding-bottom: 20px; }
}

/* ── Full-bleed bands (src/components/ImageBand.astro) ──────────────────────
   Edge-to-edge artwork with one line over it, between the framed sections.
   The art is oversized and slowly drifts, which reads as depth rather than as
   an animation; it holds still for anyone who asked for less motion. */
.lp .lp-band {
  position: relative;
  padding: 0;
  height: var(--band-h);
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}
/* <picture> is a grid item too, and it was taking rows of its own — which is
   what pushed the copy below the middle of the band. Take it out of flow and
   the copy is the only item left to centre. (display: contents does not do it:
   that promotes the <source> elements to grid items instead.) */
.lp-band picture {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.lp-band img {
  position: absolute;
  inset: 0;
  width: 112%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}
@media (prefers-reduced-motion: no-preference) {
  .lp-band[data-drift='left']  img { animation: lp-drift-l 34s var(--easing-default) infinite alternate; }
  .lp-band[data-drift='right'] img { animation: lp-drift-r 34s var(--easing-default) infinite alternate; }
}
@keyframes lp-drift-l { from { transform: translateX(0); }     to { transform: translateX(-10.7%); } }
@keyframes lp-drift-r { from { transform: translateX(-10.7%); } to { transform: translateX(0); } }

/* Readability over whatever the art happens to be doing underneath. */
.lp-band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(10, 8, 6, 0.86), rgba(10, 8, 6, 0.4) 45%, rgba(10, 8, 6, 0.88)),
    radial-gradient(70% 90% at 50% 50%, rgba(var(--bronze-rgb), 0.16), transparent 70%);
}
.lp-band-copy {
  max-width: 760px;
  padding-inline: var(--lp-gutter);
  text-align: center;
}
.lp-band-title {
  margin: 0;
  font-family: var(--title);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.9vw, 2rem);
  line-height: var(--line-height-tight);
  color: var(--text);
  text-wrap: balance;
}

/* ── One size for every showcase frame ──────────────────────────────────────
   The rows alternate between a plain frame and a tabbed one, and a tab bar is
   ~46px of extra height — enough that two rows side by side in memory read as
   different sizes. Pinning the IMAGE area to the screenshots' own 16:10 makes
   every row's media block identical, whatever is wrapped around it. */
.lp-show-shot picture,
.lp-show-shot img {
  display: block;
  width: 100%;
}
.lp-show-shot img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}
