/* footer */
#site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: var(--sp-64) 0 var(--sp-32);
  margin-top: var(--sp-80);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-48);
  margin-bottom: var(--sp-48);
}
.footer-brand { flex: 0 0 240px; }
.footer-brand-desc {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  line-height: 1.65;
  margin-top: var(--sp-16);
}
.footer-col { flex: 1 1 140px; min-width: 120px; }
.footer-col-title {
  font-family: var(--ff-head);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: var(--sp-16);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-12); }
.footer-col ul li a {
  font-size: var(--fs-sm);
  color: var(--c-dim);
  transition: color var(--tr-fast);
}
.footer-col ul li a:hover { color: var(--c-accent); }
.footer-bottom {
  padding-top: var(--sp-24);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-16);
}
.footer-copy {
  font-size: var(--fs-xs);
  color: var(--c-dim);
}
.footer-legal {
  display: flex;
  align-items: center;
  gap: var(--sp-20);
}
.footer-legal a {
  font-size: var(--fs-xs);
  color: var(--c-dim);
  transition: color var(--tr-fast);
}
.footer-legal a:hover { color: var(--c-accent); }

/* cookie */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: var(--sp-20) var(--sp-24);
  z-index: var(--z-top);
  transform: translateY(100%);
  transition: transform var(--tr-slow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-16);
}
#cookie-banner.visible { transform: translateY(0); }
.cookie-text { font-size: var(--fs-sm); color: var(--c-muted); flex: 1; min-width: 240px; }
.cookie-text a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: var(--sp-12); flex-shrink: 0; }

/* back to top */
#back-to-top {
  position: fixed;
  bottom: var(--sp-32);
  right: var(--sp-32);
  width: 44px; height: 44px;
  background: var(--c-accent);
  color: var(--c-bg);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-base), transform var(--tr-base), background var(--tr-fast);
  z-index: var(--z-sticky);
  border: none;
}
#back-to-top.visible { opacity: 1; pointer-events: all; }
#back-to-top:hover { background: var(--c-accent-d); transform: translateY(-2px); }
#back-to-top svg { width: 18px; height: 18px; }

/* reading progress */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--c-accent);
  z-index: calc(var(--z-sticky) + 1);
  width: 0%;
  transition: width 50ms linear;
}

/* animations */
@keyframes s4cni-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes s4cni-fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes s4cni-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.s4cni-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--tr-slow), transform var(--tr-slow);
}
.s4cni-reveal.revealed {
  opacity: 1;
  transform: none;
}

/* responsive */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
@media (min-width: 1025px) {
  .nav-links { display: flex; }
  .hamburger { display: none; }
}
@media (max-width: 768px) {
  :root {
    --sp-80: 3rem;
    --sp-64: 2.5rem;
    --sp-48: 2rem;
    --container-p: 1rem;
  }
  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }
  .section { padding: var(--sp-48) 0; }
  .footer-brand { flex: 0 0 100%; }
  .article-nav { flex-direction: column; }
  .newsletter-form { flex-direction: column; }
  .stats-row { gap: var(--sp-24); }
  .grid-2 > *, .grid-3 > * { flex: 1 1 100%; }
  .coverage-item { flex: 1 1 100%; }
  .related-grid > * { flex: 1 1 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  #back-to-top { bottom: var(--sp-16); right: var(--sp-16); }
}
@media (max-width: 480px) {
  :root { --fs-3xl: 2.25rem; --fs-2xl: 1.75rem; }
  .signal-board { border-radius: var(--r-lg); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .s4cni-reveal { opacity: 1; transform: none; }
}
