/* Shared page rhythm. Loaded after page styles so all routes use one spacing system. */
body.site-page {
  --page-gutter: 56px;
  --page-width: 1232px;
  --section-space: 64px;
  --hero-space: 64px;
  --content-start: 32px;
  --footer-space: 32px;
}

body.site-page .wrap,
body.site-page #home-content .wrap,
body.site-page .cinematic-content > section > .wrap,
body.site-page #home-content > section > .wrap,
body.site-page .cinematic-content > .ownership {
  width: min(var(--page-width), calc(100% - var(--page-gutter) * 2));
  margin-inline: auto;
  padding-inline: 0;
}

body.site-page .hero,
body.site-page .mast {
  min-height: max(780px, 100svh);
  padding: 0;
}
body.site-page .hero > .wrap,
body.site-page .mast > .wrap {
  min-height: inherit;
  display: flex;
  flex-direction: column;
}
body.site-page .hero-copy {
  margin-block: 0;
  padding: var(--hero-space) 0;
}
body.site-page .hero-bottom {
  margin-top: auto;
  padding-block: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

/* Keep the motion control in the hero flow, clear of links while scrolling. */
body.site-page .hero-bottom :is(.motion-toggle, .cinematic-motion-toggle) {
  position: static;
  margin-left: auto;
  flex: none;
  font-size: 12px;
}

body.site-page .footer a,
.legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

body.site-page #home-content,
body.site-page .cinematic-content {
  padding-block: var(--content-start) 96px;
}
/* Direct section links and no-JavaScript visits need contrast before hydration. */
body.site-page:not([data-veil-ready]) :is(#home-content, .cinematic-content) {
  background: rgba(5, 9, 11, 0.77);
}
body.site-page #home-content > section,
body.site-page .cinematic-content > section {
  padding-block: 0;
}
body.site-page #home-content > section > .wrap,
body.site-page .cinematic-content > section > .wrap,
body.site-page .cinematic-content > .ownership {
  padding-block: var(--section-space);
}
body.site-page #home-content > footer,
body.site-page .cinematic-content > footer {
  padding: 0;
}
body.site-page #home-content .footer,
body.site-page .cinematic-content .footer {
  width: min(var(--page-width), calc(100% - var(--page-gutter) * 2));
  margin-inline: auto;
  padding: var(--footer-space) 0;
  border-top: 1px solid #eac37b52;
}

body.site-page :is(.secondary, .secondary-link, .text-cta) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 1050px) {
  body.site-page {
    --page-gutter: 32px;
  }
}
@media (max-width: 700px) {
  body.site-page {
    --page-gutter: 20px;
    --section-space: 40px;
    --hero-space: 40px;
    --content-start: 24px;
    --footer-space: 24px;
  }
  /* Keep the compact hero ending focused on its label and motion control. */
  body.site-page .hero-bottom .last,
  body.site-page .hero-bottom > a {
    display: none;
  }
}
