/* ==========================================================================
   S&S FACILITIES — PAGE COMPONENTS
   Layered on top of theme.css (the design system).
   ========================================================================== */

/* ---------- Compact inner-page hero ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  background: var(--grad-hero);
  color: #fff;
  overflow: hidden;
}
.page-hero__inner { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); }
.page-hero__grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(85% 95% at 28% 40%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(85% 95% at 28% 40%, #000 10%, transparent 78%);
}
.page-hero h1 { color: #fff; max-width: 22ch; }
.page-hero__lead {
  color: rgba(255,255,255,.78);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  max-width: 58ch;
  margin-top: var(--sp-5);
  text-wrap: pretty;
}

.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,.64);
  margin-bottom: var(--sp-5);
}
.breadcrumb a { transition: color var(--dur-2) var(--ease-smooth); }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb svg { width: 14px; height: 14px; opacity: .5; }
.breadcrumb [aria-current] { color: #fff; }

/* ---------- Mobile drawer ---------- */
.drawer-scrim {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: rgba(0,17,34,.58);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-3) var(--ease-smooth), visibility var(--dur-3);
}
.drawer-scrim.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-modal);
  width: min(360px, 88vw);
  display: flex; flex-direction: column;
  padding: var(--sp-6) var(--sp-6) var(--sp-8);
  background: var(--c-surface);
  border-left: 1px solid var(--c-border);
  box-shadow: var(--e-4);
  transform: translateX(100%);
  transition: transform var(--dur-4) var(--ease-out);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.drawer__close {
  display: grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border-radius: var(--r-sm);
  color: var(--c-fg-muted);
  transition: background var(--dur-2) var(--ease-smooth), color var(--dur-2) var(--ease-smooth);
}
.drawer__close:hover { background: var(--c-bg-sunken); color: var(--c-fg); }
.drawer__close svg { width: 22px; height: 22px; }
.drawer__links { display: flex; flex-direction: column; }
.drawer__link {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px;
  font-family: var(--font-display);
  font-size: var(--text-lg); font-weight: 500;
  color: var(--c-fg);
  border-bottom: 1px solid var(--c-border);
  transition: color var(--dur-2) var(--ease-smooth), padding-left var(--dur-2) var(--ease-out);
}
.drawer__link:hover { color: var(--c-primary); padding-left: var(--sp-2); }
.drawer__link[aria-current="page"] { color: var(--c-accent); font-weight: 600; }
.drawer__link svg { width: 16px; height: 16px; opacity: .4; }
.drawer__foot { margin-top: auto; padding-top: var(--sp-8); display: flex; flex-direction: column; gap: var(--sp-3); }
body.is-locked { overflow: hidden; }

/* ---------- Icon-led supply / capability card ---------- */
.supply-card {
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: transform var(--dur-3) var(--ease-out),
              box-shadow var(--dur-3) var(--ease-out),
              border-color var(--dur-3) var(--ease-smooth);
}
.supply-card:hover { transform: translateY(-4px); box-shadow: var(--e-3); border-color: var(--c-accent); }
.supply-card__title { font-family: var(--font-display); font-size: var(--text-md); font-weight: 600; line-height: var(--leading-snug); }
.supply-card__text { font-size: var(--text-sm); line-height: var(--leading-relaxed); color: var(--c-fg-muted); }

/* ---------- Alternating service detail rows ---------- */
.svc-row { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) {
  .svc-row { grid-template-columns: 1fr 1fr; }
  .svc-row:nth-child(even) .svc-row__media { order: -1; }
}
.svc-row__media { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--e-3); aspect-ratio: 4/3; }
.svc-row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-5) var(--ease-out); }
.svc-row:hover .svc-row__media img { transform: scale(1.04); }
.svc-row__num {
  position: absolute; top: var(--sp-5); left: var(--sp-5); z-index: 2;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.26);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600;
}
.svc-row__list { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-6); }
.svc-row__list li { display: flex; gap: var(--sp-3); font-size: var(--text-sm); color: var(--c-fg-muted); line-height: var(--leading-normal); }
.svc-row__list svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--c-secondary-ink); }

/* ---------- Contact info tiles ---------- */
.info-tile {
  display: flex; gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--c-bg-subtle);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: border-color var(--dur-3) var(--ease-smooth), transform var(--dur-3) var(--ease-out);
}
.info-tile:hover { border-color: var(--c-accent); transform: translateY(-3px); }
.info-tile__label { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600; color: var(--c-fg); }
.info-tile__value { font-size: var(--text-sm); line-height: var(--leading-relaxed); color: var(--c-fg-muted); margin-top: var(--sp-1); }
.info-tile__value a { display: inline-flex; align-items: center; min-height: 40px; transition: color var(--dur-2) var(--ease-smooth); }
.info-tile__value a:hover { color: var(--c-primary); text-decoration: underline; }

.map-frame { border: 0; width: 100%; height: 420px; display: block; filter: saturate(.92); }
[data-theme="dark"] .map-frame { filter: invert(.92) hue-rotate(180deg) saturate(.65); }

/* ---------- Form feedback ---------- */
.form-status {
  display: none;
  align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}
.form-status.is-shown { display: flex; }
.form-status--ok  { background: var(--c-success-soft); color: var(--c-success); border: 1px solid color-mix(in srgb, var(--c-success) 32%, transparent); }
.form-status--err { background: var(--c-danger-soft);  color: var(--c-danger);  border: 1px solid color-mix(in srgb, var(--c-danger) 32%, transparent); }
.form-status svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* ---------- Prose (legal / long-form) ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: var(--text-xl); margin-top: var(--sp-10); }
.prose h3 { font-size: var(--text-lg); margin-top: var(--sp-8); }
.prose p, .prose li { font-size: var(--text-base); line-height: var(--leading-relaxed); color: var(--c-fg-muted); }
.prose p { margin-top: var(--sp-4); }
.prose ul { list-style: disc; padding-left: var(--sp-6); margin-top: var(--sp-4); }
.prose li { margin-top: var(--sp-2); }
.prose a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: var(--sp-5); bottom: var(--sp-5); z-index: var(--z-sticky);
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-on-primary);
  box-shadow: var(--e-3);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--dur-3) var(--ease-out), visibility var(--dur-3),
              transform var(--dur-3) var(--ease-out), background var(--dur-2) var(--ease-smooth);
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--c-accent); color: var(--c-on-accent); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border-radius: var(--r-sm);
  color: currentColor;
  transition: background var(--dur-2) var(--ease-smooth);
}
.theme-toggle:hover { background: var(--c-bg-sunken); }
.nav--on-dark .theme-toggle:hover { background: rgba(255,255,255,.14); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ---------- Nav over a dark hero, before it sticks ---------- */
.nav--on-dark .nav__link { color: rgba(255,255,255,.76); }
.nav--on-dark .nav__link:hover { color: #fff; background: rgba(255,255,255,.12); }
.nav--on-dark .nav__link[aria-current="page"] { color: #fff; font-weight: 600; }
.nav--on-dark .logo__name { color: #fff; }
.nav--on-dark .logo__tag  { color: rgba(255,255,255,.62); }
.nav--on-dark .nav__toggle, .nav--on-dark .theme-toggle { color: #fff; }
/* Once stuck it becomes a light surface, so revert to normal tokens */
.nav--on-dark.is-stuck .nav__link { color: var(--c-fg-muted); }
.nav--on-dark.is-stuck .nav__link:hover { color: var(--c-fg); background: var(--c-bg-sunken); }
.nav--on-dark.is-stuck .nav__link[aria-current="page"] { color: var(--c-primary); }
.nav--on-dark.is-stuck .logo__name { color: var(--c-fg); }
.nav--on-dark.is-stuck .logo__tag  { color: var(--c-fg-subtle); }
.nav--on-dark.is-stuck .nav__toggle,
.nav--on-dark.is-stuck .theme-toggle { color: var(--c-fg); }

/* ---------- Value / credential strip ---------- */
.cred {
  display: flex; gap: var(--sp-4);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out);
}
.cred:hover { transform: translateY(-4px); box-shadow: var(--e-3); }
.cred__title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; line-height: var(--leading-snug); }
.cred__text { font-size: var(--text-sm); line-height: var(--leading-relaxed); color: var(--c-fg-muted); margin-top: var(--sp-2); }

/* ---------- Director / leadership card ---------- */
.person {
  display: grid; gap: var(--sp-6);
  align-items: center;
  padding: var(--sp-6);
  background: var(--c-bg-subtle);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
}
@media (min-width: 560px) { .person { grid-template-columns: 160px 1fr; } }
.person__photo { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1; background: var(--c-bg-sunken); }
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__name { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; }
/* --c-accent (amber) is only 1.75:1 on the subtle surface; the darker
   warning tone is the readable equivalent. */
.person__role { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--c-warning); margin-top: var(--sp-1); }

/* ---------- Notice band (for flagged / placeholder content) ---------- */
.notice {
  display: flex; gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-left: 3px solid var(--c-secondary);
  background: var(--c-bg-subtle);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.notice svg { width: 20px; height: 20px; flex: none; color: var(--c-secondary-ink); margin-top: 2px; }
.notice p { font-size: var(--text-sm); line-height: var(--leading-relaxed); color: var(--c-fg-muted); }
.notice strong { color: var(--c-fg); }
