/* Xerovi theme: layout layer (S7 A1). Loads after base.css.
   Container, section rhythm, grids, heroes. Breakpoints (DESIGN.md Layout): 600, 1024, 1180,
   plus the header collapse point 1230 (English). Media queries cannot read tokens, so the
   numbers are repeated here and in components.css. Mobile order equals source order: nothing
   here reorders content (page specs §0.7). */

.xv-wrap { width: var(--xv-wrap); margin-inline: auto; }

.xv-section { padding-block: var(--xv-space-section); }
.xv-section--tight { padding-block: var(--xv-space-12); }
.xv-section-heading { max-width: 1040px; margin-bottom: var(--xv-space-heading); }
.xv-section-heading > .xv-label { margin-bottom: var(--xv-space-5); }
.xv-section-heading > .xv-lead { margin-top: var(--xv-space-4); }

/* Vertical rhythm helper: children spaced by --xv-stack-gap. */
.xv-stack { display: flex; flex-direction: column; gap: var(--xv-stack-gap, var(--xv-space-6)); }
.xv-stack > * { min-width: 0; }

/* Inline cluster: wraps, never forces a single line. */
.xv-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--xv-cluster-gap, var(--xv-space-3)); }
.xv-cluster > * { min-width: 0; }

/* Action row under a heading or in a hero. Buttons go full width under 600px (components.css). */
.xv-actions { display: flex; flex-wrap: wrap; gap: var(--xv-space-3); margin-top: var(--xv-space-8); }

/* Card grid: 4 columns from 1180px (first and sixth span 2), 2 from 700px, 1 below. */
.xv-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--xv-space-4); }
@media (min-width: 700px) { .xv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) {
  .xv-grid--capabilities { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .xv-grid--capabilities > :nth-child(1), .xv-grid--capabilities > :nth-child(6) { grid-column: span 2; }
}
/* Products: 2 columns from 1024px, 1 below. */
@media (max-width: 1023px) { .xv-grid--products { grid-template-columns: minmax(0, 1fr); } }

/* Split: text and a side column; stacks text first below 1024px. */
.xv-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--xv-space-10); align-items: start; }
@media (min-width: 1024px) { .xv-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 104px); } }
@media (min-width: 1024px) { .xv-split--aside { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); } }

/* ------------------------------------------------------------------ hero (compact, inner pages)
   Sizes to content (DESIGN.md C16); no min-height: 100svh. The hero is always ink. */
.xv-hero {
  position: relative;
  isolation: isolate;
  background: var(--xv-hero-bg);
  color: var(--xv-hero-text);
  padding: calc(var(--xv-header-height) + var(--xv-space-14)) 0 var(--xv-space-hero-end);
}
.xv-hero__inner { width: var(--xv-wrap); margin-inline: auto; }
.xv-hero .xv-breadcrumbs { margin-bottom: var(--xv-space-8); }
.xv-hero__eyebrow { margin-bottom: var(--xv-space-6); }
.xv-hero__title { max-width: 17ch; margin-bottom: .3em; }
.xv-hero__lead { color: var(--xv-hero-lead); }
/* The hero corner keeps the second "Pause motion" button where the caustics run (D42). */
.xv-hero__corner { position: absolute; right: var(--xv-space-gutter); bottom: var(--xv-space-6); }
@media (max-width: 600px) { .xv-hero__corner { position: static; margin-top: var(--xv-space-6); width: var(--xv-wrap); margin-inline: auto; } }
