/*
 * Shared site footer (partials/_footer.eta).
 * Dark "TV canvas" surface from the Nordic Warm design system so the footer
 * anchors the page against the cream canvas. All text pairs are >= 4.5:1.
 */

.site-footer {
  --sf-bg: #15201B;
  --sf-heading: #F4EFEB;
  --sf-text: #C9C3B6;       /* links, body */
  --sf-muted: #A3ACA5;      /* copyright, meta */
  --sf-accent: #72A88E;     /* sage: hover + focus */
  --sf-divider: rgba(244, 239, 235, 0.12);

  width: 100%;
  background: var(--sf-bg);
  color: var(--sf-text);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.site-footer a { text-decoration: none; }

.site-footer a:focus-visible,
.site-footer button:focus-visible {
  outline: 2px solid var(--sf-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-footer__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3rem) 0;
}

/* ── Top: brand + link columns ── */
.site-footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

.site-footer__logo {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--sf-heading);
  transition: color 0.15s;
}
.site-footer__logo:hover { color: var(--sf-accent); }

.site-footer__desc {
  margin-top: 0.75rem;
  max-width: 34ch;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--sf-text);
}

/* ── Column headings (label-md) ── */
.site-footer__heading {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sf-heading);
}

.site-footer__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--sf-text);
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
}
.site-footer__link:hover {
  color: var(--sf-heading);
  text-decoration: underline;
  text-decoration-color: var(--sf-accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.site-footer__sep { margin: 0 0.4rem; color: var(--sf-muted); }

/* ── Contact (inside brand column) ── */
.site-footer__contact { margin-top: 1.75rem; }

.site-footer__contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 36px;
  font-size: 0.92rem;
  color: var(--sf-text);
  overflow-wrap: anywhere;
  transition: color 0.15s;
}
.site-footer__contact-link:hover { color: var(--sf-heading); }
.site-footer__contact-link svg {
  flex: none;
  width: 18px; height: 18px;
  fill: none;
  stroke: var(--sf-accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Social icon (brand column) ── */
.site-footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  margin-top: 0.75rem;
  margin-left: -12px;
  color: var(--sf-text);
  transition: color 0.15s;
}
.site-footer__social:hover { color: var(--sf-heading); }
.site-footer__social svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Bottom bar ── */
.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--sf-divider);
  font-size: 0.8rem;
  color: var(--sf-muted);
}

.site-footer__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.site-footer__status::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
}

/* ── Tablet: brand on its own row, 3 link columns ── */
@media (max-width: 1060px) {
  .site-footer__top { grid-template-columns: repeat(3, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* ── Phone: 2 columns, 48px touch targets, 16px margins ── */
@media (max-width: 767px) {
  .site-footer__top { grid-template-columns: repeat(2, 1fr); }
  /* Information gets its own row so Produkter / Udforsk stay side by side */
  .site-footer__col--info { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
  .site-footer__inner { padding-left: 1rem; padding-right: 1rem; }
  .site-footer__link,
  .site-footer__contact-link { min-height: 48px; }
  .site-footer__list { gap: 0; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ── Slim variant (partials/_footer-slim.eta): auth, app and focused pages ── */
.site-footer--slim .site-footer__inner { padding-top: 0; }
.site-footer--slim .site-footer__bottom { border-top: none; padding: 1rem 0; }
.site-footer__slim-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}
.site-footer--slim .site-footer__link { font-size: 0.8rem; }

@media (prefers-reduced-motion: reduce) {
  .site-footer a,
  .site-footer button { transition: none; }
}
