/*
 * Shared base for the standalone subsidiary one-pagers
 * (subsidiaries-standalone-handoff.md — Phase 1).
 *
 * These pages are deliberately NOT part of the main site's design-token
 * system (public/assets/css/base/tokens.css) — they have no shared
 * header/footer and are meant to look like their own thing per company.
 * The one deliberate thread kept for brand continuity is the type family
 * (Space Grotesk / IBM Plex Sans, same as the main site) — everything
 * else (palette, spacing scale, radius) is intentionally NOT reused here,
 * so a per-company override file is free to define its own without
 * fighting inherited values.
 *
 * Load order in each company file: _base.css, then that company's own
 * <slug>.css.
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}
h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  margin: 0;
  line-height: 1.08;
}
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.sub-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

/* ---------------------------------------------------------------------
 * Gallery — masonry grid + lightbox. Reads page_gallery_images the same
 * way the main site does (see _gallery.php), but this markup/styling is
 * new and independent of components/gallery.css, which assumes design
 * tokens + .reveal scroll-init this page doesn't have.
 * ------------------------------------------------------------------- */
.sub-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.sub-gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  overflow: hidden;
  border-radius: 4px;
}
.sub-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform .35s ease;
}
.sub-gallery-item:hover img { transform: scale(1.04); }

.sub-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 12, 0.92);
  padding: clamp(16px, 5vw, 48px);
}
.sub-lightbox.is-open { display: flex; }
.sub-lightbox-inner { max-width: 1100px; width: 100%; text-align: center; }
.sub-lightbox-inner img {
  max-height: 78vh;
  width: auto;
  margin: 0 auto;
  border-radius: 4px;
}
.sub-lightbox-caption {
  color: #fff;
  margin-top: 14px;
  font-size: 0.95rem;
  opacity: 0.85;
}
.sub-lightbox-close {
  position: absolute;
  top: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  border: 1px solid rgba(255,255,255,0.25);
}
.sub-lightbox-close:hover { background: rgba(255,255,255,0.2); }
.sub-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.4rem;
  border: 1px solid rgba(255,255,255,0.25);
}
.sub-lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.sub-lightbox-prev { left: clamp(8px, 3vw, 24px); }
.sub-lightbox-next { right: clamp(8px, 3vw, 24px); }

/* ---------------------------------------------------------------------
 * Work-in-progress overlay (2026-08-18) — see _base.js for injection +
 * dismiss logic. One shared switch for all 3 standalone pages: delete
 * this block + the matching _base.js block once a subsidiary's real
 * page ships, no per-company markup to hunt down.
 *
 * Fixed (not absolute) — stays on screen the whole time the visitor is
 * on the page, not just while they're looking at the hero, since the
 * point is a constant "this isn't final yet" notice, not a splash
 * screen that scrolls away. Semi-transparent so the real design
 * underneath is still visible through it — a notice taped ON TOP of the
 * page, not a blocking loading screen. z-index sits above the gallery
 * lightbox (999) since it's meant to cover literally everything.
 * ------------------------------------------------------------------- */
.sub-wip-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  background: rgba(4, 6, 10, 0.72);
  color: #fff;
  padding: 32px;
  cursor: default;
  transition: opacity .4s ease;
}
/* Caution-tape stripe along the top/bottom edge — sells the "taped over
   the page" idea rather than a plain flat tint. Pure CSS, no image
   assets needed. */
.sub-wip-overlay::before,
.sub-wip-overlay::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background: repeating-linear-gradient(45deg, #111 0 14px, #ffb800 14px 28px);
  opacity: .9;
}
.sub-wip-overlay::before { top: 0; }
.sub-wip-overlay::after { bottom: 0; }

.sub-wip-icon {
  font-size: clamp(48px, 8vw, 88px);
  color: #fff;
}
.sub-wip-title {
  font-size: clamp(20px, 3.4vw, 32px);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0;
}
.sub-wip-hint {
  font-size: 13px;
  letter-spacing: .04em;
  opacity: .65;
  margin: 0;
  min-height: 1.2em; /* stable layout when the hint text swaps */
}
/* Not clickable-to-dismiss until _base.js adds this class (page fully
   loaded AND >=5s elapsed — see its docblock for why both). Before
   that, clicks on the overlay are simply ignored by the JS handler;
   this class only changes the cursor/affordance, not the listener. */
.sub-wip-overlay.is-dismissible { cursor: pointer; }
.sub-wip-overlay.is-dismissed {
  opacity: 0;
  pointer-events: none;
}
