/* Rusti.fi — global header + footer.
   Reuses the --rusti-* variable names/values already established by
   rusti-new-styles.css (list/detail/upcoming-wipes pages) so the two
   stylesheets never fight over the same custom property with a different
   color when both load on the same page. --rusti-line-soft and
   --rusti-shell are genuinely new — nothing else already defines them.
*/
:root {
  --rusti-bg: #0a1017;
  --rusti-panel: #111a24;
  --rusti-border: #263443;
  --rusti-line-soft: rgba(255,255,255,.07);
  --rusti-text: #f5f7fa;
  --rusti-muted: #94a0ad;
  --rusti-accent: #ef4c3e;
  --rusti-radius-sm: 7px;
  --rusti-shell: 1480px;
}

.site-shell {
  width: min(calc(100% - 48px), var(--rusti-shell));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: relative;
  z-index: 100;
  color: var(--rusti-text);
  background:
    radial-gradient(circle at 20% -100%, rgba(239,76,62,.08), transparent 38%),
    rgba(10,16,23,.96);
  border-bottom: 1px solid var(--rusti-line-soft);
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
}

.site-header__inner {
  min-height: 84px;
  display: grid;
  grid-template-columns: minmax(220px,1fr) auto minmax(220px,1fr);
  align-items: stretch;
  gap: 28px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  align-self: center;
  width: max-content;
  gap: 11px;
  color: var(--rusti-text);
  text-decoration: none;
}

.site-brand__mark,
.site-brand .custom-logo {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 5px 12px rgba(0,0,0,.35));
}

.site-brand__wordmark {
  font-family: "Arial Narrow","Roboto Condensed",Impact,sans-serif;
  font-size: clamp(1.55rem,2vw,2.05rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-brand__wordmark > span { color: var(--rusti-accent); }

.site-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.site-nav__link {
  position: relative;
  min-width: 118px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c6ccd3;
  font-size: .95rem;
  font-weight: 650;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}

.site-action svg,
.site-footer__support svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.site-nav__link:hover {
  color: var(--rusti-text);
  background: rgba(255,255,255,.025);
}

.site-nav__link--active { color: var(--rusti-text); }

.site-nav__link--active::after {
  content: "";
  position: absolute;
  left: 17px;
  right: 17px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--rusti-accent);
  box-shadow: 0 -3px 14px rgba(239,76,62,.25);
}

.site-header__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.site-action {
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--rusti-border);
  border-radius: 8px;
  color: var(--rusti-text);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
}

.site-action:hover { transform: translateY(-1px); }

.site-action--ghost {
  color: #d7dce2;
  background: rgba(255,255,255,.015);
}

.site-action--ghost:hover {
  border-color: #394453;
  background: rgba(255,255,255,.04);
}

.site-action--primary {
  padding-inline: 18px;
  border-color: #f35b4c;
  background: linear-gradient(180deg,#f45141,#db3e31);
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 7px 20px rgba(205,53,43,.16);
}

.site-action--primary:hover {
  border-color: #ff7466;
  background: linear-gradient(180deg,#fa5949,#e34235);
}

/* Footer */
.site-footer {
  margin-top: 64px;
  color: #c1c8d0;
  background:
    radial-gradient(circle at 5% 0%, rgba(239,76,62,.055), transparent 28%),
    #090e14;
  border-top: 1px solid var(--rusti-line-soft);
}

.site-footer__grid {
  padding: 42px 0 38px;
  display: grid;
  grid-template-columns: minmax(260px,1.7fr) repeat(3,minmax(130px,.7fr));
  gap: 50px;
}

.site-brand--footer .site-brand__mark,
.site-brand--footer .custom-logo {
  width: 48px;
  height: 48px;
}

.site-brand--footer .site-brand__wordmark { font-size: 1.65rem; }

.site-footer__tagline {
  max-width: 350px;
  margin: 17px 0 0;
  color: var(--rusti-muted);
  font-size: .9rem;
  line-height: 1.65;
}

.site-footer__section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.site-footer__section h2 {
  margin: 2px 0 6px;
  color: var(--rusti-text);
  font-size: .82rem;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.site-footer__section a {
  color: #9fa8b3;
  font-size: .9rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color .14s ease;
}

.site-footer__section a:hover { color: var(--rusti-text); }

.site-footer__bottom {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  border-top: 1px solid var(--rusti-line-soft);
  color: #7f8995;
  font-size: .8rem;
}

.site-footer__bottom p { margin: 0; }
.site-footer__legal { max-width: 640px; }

.site-footer__support {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-self: end;
  color: #ff6a5b;
  background: rgba(239,76,62,.07);
  border: 1px solid rgba(239,76,62,.38);
  border-radius: var(--rusti-radius-sm);
  font-weight: 750;
  text-decoration: none;
  transition: background-color .14s ease, border-color .14s ease;
}

.site-footer__support:hover {
  background: rgba(239,76,62,.12);
  border-color: rgba(239,76,62,.62);
}

.site-brand:focus-visible,
.site-nav__link:focus-visible,
.site-action:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--rusti-accent);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .site-brand__wordmark { display: none; }

  .site-nav__link {
    min-width: auto;
    padding-inline: 13px;
  }

  .site-footer__grid {
    grid-template-columns: 1.5fr repeat(2,1fr);
  }

  .site-footer__section:last-child { grid-column: 2; }
}

@media (max-width: 720px) {
  .site-shell { width: min(calc(100% - 28px), var(--rusti-shell)); }

  .site-header__inner { min-height: 68px; }

  .site-brand__mark,
  .site-brand .custom-logo {
    width: 45px;
    height: 45px;
  }

  .site-action--ghost { display: none; }

  .site-action--primary {
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  .site-action--primary span { display: none; }

  .site-nav { justify-content: center; }

  .site-nav__link { padding-inline: 10px; }

  .site-nav__link--active::after {
    left: 8px;
    right: 8px;
  }

  .site-footer { margin-top: 46px; }

  .site-footer__grid {
    padding: 34px 0;
    grid-template-columns: 1fr 1fr;
    gap: 34px 26px;
  }

  .site-footer__brand { grid-column: 1 / -1; }

  .site-footer__section:last-child { grid-column: auto; }

  .site-footer__bottom {
    padding: 24px 0;
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .site-footer__support {
    justify-self: start;
    margin-top: 7px;
  }
}

@media (max-width: 440px) {
  .site-header__inner { gap: 5px; }
  .site-nav__link { padding-inline: 7px; }

  .site-action--primary {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .site-footer__grid { grid-template-columns: 1fr; }
}
