/* ============================================
   BorderLight product page
   Additions only. Everything the site already has — .section, .service-card,
   .faq-item, .btn, .page-hero, .content-body — is used as it stands, so this
   file holds nothing but what the product page needs on top.

   No inline <style> or style="" anywhere: the CSP is style-src 'self', so the
   browser drops both without a word. (terms.html has one on .footer-bottom
   that has never had any effect.)
   ============================================ */

/* ---- Hero ---- */
.bl-hero {
  padding: 9rem 0 var(--space-xl);
  background: var(--c-bg-alt);
  border-bottom: 1px solid var(--c-border);
}

.bl-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-lg);
  align-items: center;
}

/* A grid item's min-width is auto, so one unbreakable child — the badge is a
   long single line — stretches the column past the viewport and the page
   scrolls sideways on a phone. */
.bl-hero-copy,
.bl-hero-art { min-width: 0; }

.bl-hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  margin-bottom: var(--space-sm);
}

.bl-hero .hero-sub { margin-bottom: var(--space-md); }

.bl-hero-art svg {
  width: 100%;
  height: auto;
  max-width: 420px;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55));
}

/* ---- Screenshot gallery ---- */
.bl-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* A fifth screenshot would sit alone in the last row of a two-column grid.
   This one earns the whole width anyway: it is 1.1.0's feature, and it is a
   portrait frame, which a half-width card would show very small. */
.bl-shot-wide { grid-column: 1 / -1; }

.bl-shot {
  margin: 0;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bl-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--c-border);
}

.bl-shot figcaption {
  padding: var(--space-sm);
  font-size: 0.85rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* ---- The demonstration video ----
 *
 * width and height are on the element so the page reserves the right space
 * before the poster loads; the aspect-ratio below keeps that true at every
 * width. Without it the page jumps as the video arrives, which is the same
 * fault check-site.py catches for <img>.
 */
.bl-video {
  margin: var(--space-lg) 0 0;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bl-video video {
  display: block;
  width: 100%;
  height: auto;
  background: #0f0f0f;
  border-bottom: 1px solid var(--c-border);
}

/* The shape is reserved before the file arrives, so the page does not jump.
 *
 * `aspect-ratio: attr(width) / attr(height)` was written here first and is
 * dead: attr() works only for the `content` property, so it computed to
 * `auto` and reserved nothing. It looked right, which is the problem with it.
 * A class per shape is plain and verifiably works. */
.bl-video-806 video { aspect-ratio: 1200 / 806; }   /* BorderLight */
.bl-video-792 video { aspect-ratio: 1200 / 792; }   /* PanoramaSplitLight */
.bl-video-720 video { aspect-ratio: 1200 / 720; }   /* SeriesLight */

/* Replaces style="margin-top:…" on the two places that had it: the CSP is
 * `style-src 'self'`, which blocks a style ATTRIBUTE as well as a <style>
 * block, so those were doing nothing at all. */
.bl-spaced  { margin-top: 1.75rem; }
.bl-spaced-lg { margin-top: 2.5rem; }

.bl-video figcaption {
  padding: var(--space-sm);
  font-size: 0.85rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* ---- Example gallery (borderlight-gallery.html) ----
 *
 * Three across rather than the two of .bl-shots: these are whole framed
 * pictures, not screenshots of a dialog, and they read at a smaller size.
 * The images vary in shape — 1:1, 4:5, 16:9 and the portrait originals — so
 * the grid rows are allowed to differ in height rather than cropping a frame,
 * which would be the one thing a gallery of borders must never do.
 */
.bl-examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
  align-items: start;
}

.bl-example {
  margin: 0;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bl-example a {
  display: block;
  line-height: 0;
}

.bl-example img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--c-border);
  transition: opacity 0.2s ease;
}

.bl-example a:hover img,
.bl-example a:focus-visible img {
  opacity: 0.86;
}

.bl-example figcaption {
  padding: var(--space-sm);
  font-size: 0.85rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}

.bl-example figcaption strong {
  display: block;
  color: var(--c-text);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

/* ---- Specification table ---- */
.bl-specs {
  max-width: 740px;
  margin: var(--space-lg) auto 0;
  border-top: 1px solid var(--c-border);
}

.bl-spec {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-sm);
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.925rem;
}

.bl-spec dt { color: var(--c-text-muted); }
.bl-spec dd { margin: 0; color: var(--c-text); }

/* ---- Buy card ---- */
.bl-buy {
  max-width: 520px;
  margin: var(--space-lg) auto 0;
  padding: var(--space-lg);
  text-align: center;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
}

.bl-price {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1;
  color: var(--c-accent);
  margin-bottom: var(--space-xs);
}

.bl-buy h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.bl-buy p {
  color: var(--c-text-muted);
  font-size: 0.925rem;
  margin-bottom: var(--space-md);
}

.bl-buy .btn { width: 100%; justify-content: center; }

.bl-buy-includes {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0;
  text-align: left;
}

.bl-buy-includes li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--c-text-muted);
}

.bl-buy-includes li::before {
  content: '';
  position: absolute;
  left: 0.35rem;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
}

.bl-note {
  max-width: 740px;
  margin: var(--space-md) auto 0;
  font-size: 0.85rem;
  color: var(--c-text-dim);
  text-align: center;
}

/* ---- Phone ---- */
/* Two across below a laptop, one only on a phone (560px, further down). */
@media (max-width: 1100px) {
  .bl-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .bl-hero-grid { grid-template-columns: 1fr; }
  .bl-hero-art { order: -1; }
  .bl-shots { grid-template-columns: 1fr; }
  .bl-spec { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* Only a phone gets one example per row. 860px is a tablet, and these are
   upright pictures, not the wide screenshots that breakpoint was written for. */
@media (max-width: 560px) {
  .bl-examples { grid-template-columns: 1fr; }
}
