/* ==========================================================================
   Simplex — Base elements, buttons, links, images, placeholders and the page loader.
   ========================================================================== */

/* ---------- Base ---------- */
html {
  scroll-padding-top: calc(var(--sx-header-h) + 1rem);
}
body {
  font-family: var(--sx-font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-wrap: balance;
}
.display-heading {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
}
.lead {
  color: var(--sx-muted);
  font-size: 1.15rem;
}
a {
  text-underline-offset: 0.2em;
}
::selection {
  background: var(--sx-red);
  color: #fff;
}
/* Mobile-first gutters: 16px page edge on phones. Wide (g-5) row gutters only
   from 576px up, where the container no longer touches the screen edge. */
.container {
  --bs-gutter-x: 2rem;
}
@media (max-width: 575.98px) {
  .g-5, .gx-5 {
    --bs-gutter-x: 2rem;
  }
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 2000;
  background: var(--sx-ink);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--sx-radius-sm);
}
.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* ---------- Buttons ---------- */
.btn {
  font-weight: 600;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
}
.btn-primary {
  --bs-btn-bg: var(--sx-red-ink);
  --bs-btn-border-color: var(--sx-red-ink);
  --bs-btn-hover-bg: var(--sx-red-dark);
  --bs-btn-hover-border-color: var(--sx-red-dark);
  --bs-btn-active-bg: var(--sx-red-dark);
  --bs-btn-active-border-color: var(--sx-red-dark);
  --bs-btn-focus-shadow-rgb: 237, 28, 36;
}
.btn-outline-light {
  --bs-btn-hover-color: var(--sx-ink);
}
/* secondary button: ink outline that fills dark on hover (Bootstrap hard-codes its grey here) */
.btn-outline-secondary {
  --bs-btn-color: var(--sx-ink);
  --bs-btn-border-color: var(--sx-ink);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--sx-ink);
  --bs-btn-hover-border-color: var(--sx-ink);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--sx-ink);
  --bs-btn-active-border-color: var(--sx-ink);
  --bs-btn-disabled-color: var(--sx-muted);
  --bs-btn-disabled-border-color: var(--sx-border);
  --bs-btn-focus-shadow-rgb: 237, 28, 36;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--sx-red-ink);
}
.link-arrow .bi {
  transition: transform 0.2s ease;
}
.link-arrow:hover .bi {
  transform: translateX(4px);
}

/* ---------- Image placeholders (replace with <img> when assets arrive) ---------- */
.ph {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #d9d9d6;
  background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0 12px, transparent 12px 24px);
  color: #6b6b66;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  border-radius: var(--sx-radius);
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  padding: 0.5rem;
}
.ph-dark {
  background-color: #34312f;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 12px, transparent 12px 24px);
  color: rgba(255, 255, 255, 0.35);
}
.ph-logo {
  width: 150px;
  height: 40px;
  border-radius: 4px;
  font-size: 0.65rem;
}

/* ---------- Images ---------- */
.site-logo {
  display: block;
  height: 36px;
  width: auto;
}
.site-logo-light {
  filter: brightness(0) invert(1);
}
.media-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--sx-radius);
}
.space-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Page loader ----------
   An inline script in <head> adds .is-loading to <html>; site.js removes it once the header,
   footer and first visible image are ready. Pure CSS, so it shows from the very first paint. */
html::before, html::after {
  content: "";
  position: fixed;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
html::before {
  inset: 0;
  background: var(--sx-white);
}
html::after {
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 3px solid var(--sx-border);
  border-top-color: var(--sx-red);
  border-radius: 50%;
  animation: sx-spin 0.8s linear infinite;
}
html.is-loading::before, html.is-loading::after {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: none;
}
@keyframes sx-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  html::after {
    animation-duration: 2.4s;
  }
}
.container {
  max-width: 1400px !important;
}
