/* ==========================================================================
   Cluster theme - shared chrome
   The look shared by the Maintenance Minder tool and the Tools directory:
   matte black + gunmetal, red accents, Chakra Petch / DM Mono.
   Page-specific parts live in maintenance-minder.css and tools.css.
   ========================================================================== */

:root {
  --red: #e10600;
  --red-bright: #ff2d3f;
  --red-soft: #ff6b78;
  --steel: #2b3038;
  --steel-soft: #191d23;
  --text: #dfe3ea;
  --dim: #7b838f;
  --amber: #ffb648;
}

* {
  box-sizing: border-box;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  padding: 8px 12px;
  background: #fff;
  color: #000;
}

.is-embedded .skip-link {
  display: none;
}

body.cluster {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 500 15px/1.55 "Chakra Petch", system-ui, sans-serif;
  background:
    radial-gradient(50rem 26rem at 50% -18%, rgba(225, 6, 0, 0.08), transparent 60%),
    linear-gradient(180deg, #0a0b0d 0%, #0d0f12 40%, #08090b 100%);
}

body.cluster :focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 2px;
}

.cluster-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header ---------- */
.cluster-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px clamp(14px, 4vw, 42px);
  background: linear-gradient(180deg, rgba(13, 15, 18, 0.97), rgba(13, 15, 18, 0.9));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--steel);
}

.cluster-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid #3a4048;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #22262c, #101317);
  color: #fff;
  font: 700 14px/1 "Chakra Petch", sans-serif;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.cluster-model {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cluster-nav {
  display: flex;
  gap: clamp(12px, 2vw, 24px);
  margin-left: auto;
  flex-wrap: wrap;
}

.cluster-nav a {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.cluster-nav a:hover,
.cluster-nav a.active {
  color: #fff;
}

.cluster-nav a.active {
  color: var(--red-soft);
}

/* Burger (site convention: assets/js/menu.js toggles .active) */
.menu-toggle {
  display: none;
  margin-left: auto;
  padding: 12px;
  border: 1px solid var(--steel);
  background: transparent;
  cursor: pointer;
}

.menu-toggle__icon,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--red-bright);
}

.menu-toggle__icon { position: relative; }
.menu-toggle__icon::before,
.menu-toggle__icon::after { content: ""; position: absolute; left: 0; }
.menu-toggle__icon::before { top: -6px; }
.menu-toggle__icon::after { top: 6px; }

.menu-toggle.active .menu-toggle__icon { background: transparent; }
.menu-toggle.active .menu-toggle__icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle.active .menu-toggle__icon::after { top: 0; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: flex-start;
  padding: 70px 16px 16px;
  background: rgba(5, 6, 8, 0.95);
}

.mobile-menu.active { display: flex; }

.mobile-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--steel);
  background: #0c0e11;
}

.mobile-nav a {
  padding: 13px 16px;
  border-bottom: 1px solid var(--steel-soft);
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fff;
  background: rgba(225, 6, 0, 0.14);
}

/* Links cascade in from the right when the menu opens */
.mobile-menu.active .mobile-nav {
  animation: nav-panel-in 0.18s ease-out both;
}

.mobile-menu.active .mobile-nav a {
  animation: nav-link-in 0.26s ease-out both;
}

.mobile-menu.active .mobile-nav a:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.active .mobile-nav a:nth-child(2) { animation-delay: 0.09s; }
.mobile-menu.active .mobile-nav a:nth-child(3) { animation-delay: 0.13s; }
.mobile-menu.active .mobile-nav a:nth-child(4) { animation-delay: 0.17s; }
.mobile-menu.active .mobile-nav a:nth-child(5) { animation-delay: 0.21s; }
.mobile-menu.active .mobile-nav a:nth-child(6) { animation-delay: 0.25s; }
.mobile-menu.active .mobile-nav a:nth-child(7) { animation-delay: 0.29s; }

@keyframes nav-panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nav-link-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- Footer ---------- */
.cluster-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 14px clamp(14px, 4vw, 42px);
  border-top: 1px solid var(--steel);
  color: var(--dim);
  font-size: 13px;
}

.cluster-footer__links { display: flex; gap: 16px; }

.cluster-footer a {
  color: var(--dim);
  text-decoration: none;
}

.cluster-footer a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .cluster-nav { display: none; }
  .menu-toggle { display: block; }
  .cluster-model { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu.active .mobile-nav,
  .mobile-menu.active .mobile-nav a { animation: none; }
}
