/* Unified content widths so prose, screenshots, cards, and video
 * all share a consistent column. Override per-block only when a
 * block is deliberately smaller (e.g. the hero video and 2x2 grid). */
:root {
  --scrutin-content-width: 40rem;
  --scrutin-content-narrow: 28rem;
}

/* Hide site name text in navbar — logo is sufficient */
.md-header__topic .md-ellipsis {
  visibility: hidden;
}

/* Extra header link (Docs) injected by overrides/partials/header.html.
 * Color / hover come from nord.css; only the link-specific layout
 * (sizing, padding, rounded corners) lives here. */
.md-header__nav-link {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 0.2rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.md-header__nav-link:hover {
  opacity: 1;
}

/* Hide the page title on the home page */
h1#__skip {
  display: none;
}

/* Hide the auto-generated home page entry in the sidebar */
.md-nav--primary > .md-nav__list > .md-nav__item:first-child {
  display: none;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 0 1rem 1rem;
  margin-bottom: 1rem;
}

.hero p {
  max-width: var(--scrutin-content-width);
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

.hero p:has(.md-button) {
  text-align: center;
}

.hero-examples {
  text-align: center !important;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: -0.25rem;
  margin-bottom: 1rem;
}


.hero-logo {
  display: block;
  width: 22em;
  max-width: 80%;
  height: auto;
  margin: 0 auto 1.5rem;
}

/* Section headings */
.feature-section {
  text-align: center;
  max-width: var(--scrutin-content-width);
  margin: 0 auto;
}

.feature-section h2 {
  margin-bottom: 0.5rem;
}

.feature-section p {
  opacity: 0.85;
  text-align: justify;
}

/* Screenshot rows — 2 side by side */
.screenshot-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 1.5rem auto 2rem;
  max-width: var(--scrutin-content-width);
  padding: 0 1rem;
}

.screenshot-row p {
  flex: 1;
  margin: 0;
}

/* Screenshot rows — 3 side by side */
.screenshot-row.three p {
  flex: 1;
}

/* Single centered screenshot */
.screenshot-full {
  text-align: center;
  margin: 1.5rem auto;
  max-width: var(--scrutin-content-width);
  padding: 0 1rem;
}

/* All screenshots */
.screenshot {
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

/* Medium-zoom overlay: use the deepest Polar Night tone for the backdrop
 * so the lightbox feels part of the theme rather than a black modal. */
.medium-zoom-overlay {
  background: var(--nord-polar0) !important;
}

/* Cap zoomed screenshots so they don't fill the entire viewport on
 * wide monitors. medium-zoom otherwise scales to 90% of viewport,
 * which is oversized for wide screenshots. */
.medium-zoom-image--opened {
  max-width: 70vw !important;
  max-height: 80vh !important;
}

/* Screenshot card (image + label stacked) */
.screenshot-card {
  flex: 1;
  text-align: center;
}

/* Screenshot labels (editor names under screenshots) */
.screenshot-label {
  text-align: center;
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
}

/* Hero video poster: click-to-play thumbnail */
.hero-video-poster {
  display: block;
  position: relative;
  width: 100%;
  max-width: 28rem;
  margin: 1.5rem auto 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hero-video-poster img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.hero-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(15, 17, 21, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  padding-left: 0.25rem;
  transition: background 0.2s, transform 0.2s;
}

.hero-video-poster:hover .hero-video-play {
  background: rgba(15, 17, 21, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: var(--nord-polar0, rgba(15, 17, 21, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
}

.video-zoomed {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 0.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* 2x2 responsive screenshot grid */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 1.5rem auto 2rem;
  max-width: var(--scrutin-content-width);
  padding: 0 1rem;
}

@media (max-width: 40rem) {
  .screenshot-grid {
    grid-template-columns: 1fr;
  }
}

/* Caption text below screenshots */
.feature-caption {
  text-align: center;
  max-width: 36rem;
  margin: 0.5rem auto 2rem;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* 2-column wide cards. Material's `.grid.cards > ul` is `display:
   contents`, so the grid template lives on `.grid` itself — target that
   (with `.md-typeset` for specificity over the theme's default). */
.md-typeset .grid.cards.wide {
  grid-template-columns: repeat(2, 1fr);
}

.md-typeset .grid.cards {
  max-width: var(--scrutin-content-width);
  margin-left: auto;
  margin-right: auto;
}

/* Feature grid cards */
.grid.cards > ul > li {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.4rem;
  padding: 1.2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.grid.cards > ul > li:hover {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.grid.cards > ul > li hr {
  margin: 0.6rem 0;
}

/* Color the hero logo with the theme primary */
.hero-logo {
  color: var(--md-primary-fg-color);
}

.hero-check {
  stroke: var(--md-default-bg-color);
}

/* Responsive: stack screenshots on narrow screens */
@media (max-width: 40rem) {
  .screenshot-row {
    flex-direction: column;
  }

  .md-typeset .grid.cards.wide {
    grid-template-columns: 1fr;
  }
}
