/* ==========================================================================
   Sections — layout unique to a single section of the page: hero,
   use-cases, compatibility banner, download, and the shared page-intro /
   cta-banner / teaser-grid blocks used across the site's separate pages.
   ========================================================================== */

/* ---------------- hero ---------------- */
/* .glow-band carries the shared padding/overflow so other sections (like the
   download page) can reuse the ambient glow without also inheriting `.hero
   h1` sizing rules further down — keeps specificity from leaking across
   pages that don't actually want hero-scale type. */
.hero,
.glow-band {
  padding-top: clamp(56px, 9vw, 96px);
  padding-bottom: clamp(64px, 8vw, 110px);
  overflow: clip;
}
/* ---------------- video-bg: optional background video ----------------
   The gradient below is the real background — it's what renders the moment
   the section paints, with or without JS, and it's what stays if the video
   never arrives (blocked, slow connection, file missing, autoplay refused).
   The <video> is a pure enhancement layered on top; see js/videoBg.js. */
.video-bg {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 640px;
  overflow: hidden;
  background: radial-gradient(40% 55% at 20% 20%, rgba(111, 211, 45, 0.18), transparent 70%),
    radial-gradient(34% 50% at 82% 18%, rgba(76, 187, 23, 0.16), transparent 70%),
    radial-gradient(30% 45% at 55% 60%, rgba(76, 187, 23, 0.1), transparent 70%),
    var(--bg);
  pointer-events: none;
  z-index: 0;
}
.video-bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.video-bg-media.is-playing {
  opacity: 0.42;
}
/* If the video errors out or autoplay is refused, js/videoBg.js adds this
   class and the element is removed from flow — the gradient (and the
   poster, briefly, via the native `poster` attribute) is the fallback. */
.video-bg.video-bg-unavailable .video-bg-media {
  display: none;
}
.video-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.25) 0%, rgba(18, 18, 18, 0.6) 65%, var(--bg) 100%);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 940px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  margin-block: 0.55em 0.5em;
  font-size: clamp(2.4rem, 1.55rem + 3.4vw, 4.1rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero-sub {
  max-width: 46ch;
  color: var(--text-muted);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  margin-bottom: 2.1em;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.6em;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6em 2.2em;
}
.trust-row .stat {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}
.trust-row .stat b {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
}
.trust-row .stat span {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------------- use cases ---------------- */
.usecase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(48px, 7vw, 80px);
}
.usecase:nth-of-type(even) .usecase-copy {
  order: 2;
}
@media (max-width: 860px) {
  .usecase {
    grid-template-columns: 1fr;
  }
  .usecase:nth-of-type(even) .usecase-copy {
    order: 0;
  }
}
.usecase-copy h3 {
  font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.7rem);
  margin-block: 0.5em 0.45em;
  font-weight: 700;
}
.usecase-copy p {
  color: var(--text-muted);
  max-width: 46ch;
}
.usecase-copy ul {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.usecase-copy li {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.usecase-copy li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--gradient);
  flex: none;
  transform: translateY(-0.15em);
}
.usecase-visual .stage {
  min-height: 280px;
}
.usecase-visual .overlay-mock {
  width: min(92%, 380px);
  animation-duration: 7s;
}

/* ---------------- compatibility ---------------- */
.compat-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding-bottom: clamp(20px, 3vw, 28px);
  margin-bottom: clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
}
.compat-banner p {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 600;
  max-width: 34ch;
}
.compat-logos {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.compat-logos span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--text-dim);
}

/* ---------------- download ---------------- */
.download-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 860px) {
  .download-grid {
    grid-template-columns: 1fr;
  }
}
.download-heading {
  font-size: clamp(1.8rem, 1.5rem + 1.4vw, 2.5rem);
  margin-top: 0.5em;
  font-weight: 700;
}
.download-lede {
  color: var(--text-muted);
  margin-top: 0.8em;
  max-width: 44ch;
}
.download-panel-visual .overlay-mock {
  width: 100%;
  animation-duration: 8s;
}

/* ---------------- shared: page intro band (non-home pages) ---------------- */
/* .page-intro-section only wraps pages that layer a video-bg behind the
   intro (e.g. compatibility.html) — it zeroes the generic `section`
   padding-block so .page-intro's own padding is the only spacing, and clips
   the video-bg's oversized inset. */
.page-intro-section {
  padding-block: 0;
  overflow: clip;
}
.page-intro-section .video-bg {
  height: 100%;
  inset: 0;
}
.page-intro {
  position: relative;
  z-index: 1;
  padding-top: clamp(48px, 7vw, 80px);
  padding-bottom: clamp(8px, 2vw, 16px);
}
.page-intro h1 {
  margin-top: 0.5em;
  font-size: clamp(2.1rem, 1.6rem + 2.2vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.page-intro p {
  margin-top: 0.8em;
  max-width: 60ch;
  color: var(--text-muted);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1rem);
}

/* ---------------- shared: bottom-of-page CTA banner ---------------- */
.cta-banner {
  position: relative;
  overflow: clip;
}
.cta-banner .video-bg {
  height: 100%;
  inset: 0;
}
.cta-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  padding-block: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--border);
}
.cta-banner h2 {
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  font-weight: 700;
  max-width: 26ch;
}
.cta-banner p {
  margin-top: 0.5em;
  color: var(--text-muted);
  max-width: 42ch;
}

/* ---------------- home: screenshot gallery ---------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 28px);
}
@media (max-width: 760px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
.gallery-item {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  grid-column: span 1;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.gallery-item:last-child {
  grid-column: span 2;
}
@media (max-width: 760px) {
  .gallery-item:last-child {
    grid-column: span 1;
  }
}
.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* ---------------- home: teaser links to the other pages ---------------- */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 40px);
}
@media (max-width: 760px) {
  .teaser-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }
}
.teaser-item h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5em;
}
.teaser-item p {
  color: var(--text-muted);
  font-size: 0.94rem;
  max-width: 34ch;
}
.teaser-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand);
  transition: gap 0.25s var(--ease);
}
.teaser-link:hover {
  gap: 0.65em;
}

/* ---------------- legal pages: privacy / terms ---------------- */
.legal-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.8em;
}
.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em 1.4em;
  padding: 1.1rem 1.3rem;
  margin-bottom: clamp(36px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.legal-toc a {
  font-size: 0.86rem;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}
.legal-toc a:hover {
  color: var(--brand);
}
.legal-body {
  max-width: 74ch;
}
.legal-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 2.6em;
  scroll-margin-top: 100px;
}
.legal-body h2:first-child {
  margin-top: 0;
}
.legal-body p {
  margin-top: 1em;
  color: var(--text-muted);
  line-height: 1.75;
}
.legal-body ul {
  margin-top: 1em;
  padding-left: 1.3em;
}
.legal-body li {
  list-style: disc;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 0.5em;
}
.legal-body a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-body strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------------- contact page ---------------- */
.contact-lede {
  max-width: 62ch;
  color: var(--text-muted);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1rem);
  margin-bottom: clamp(36px, 5vw, 56px);
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
.contact-card {
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.contact-card .feature-icon {
  margin-bottom: 1.1rem;
}
.contact-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.5em;
}
.contact-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}
.contact-card .contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 1rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--brand);
  transition: gap 0.25s var(--ease);
}
.contact-card .contact-link:hover {
  gap: 0.65em;
}
.contact-note {
  display: flex;
  gap: 1em;
  align-items: flex-start;
  margin-top: clamp(28px, 4vw, 40px);
  padding-left: 1.1rem;
  border-left: 2px solid var(--brand);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.contact-note .eyebrow {
  flex: none;
  margin-top: 0.15em;
}
