/* Site footer — dark 4-column layout, red top accent (day: black bar) */

.site-footer {
  position: relative;
  overflow: hidden;
  background: #000000;
  color: #c8c4bc;
  border-top: 3px solid #c41e3a;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 0.875rem;
  line-height: 1.55;
}

/* Background decoration layer (static star field) */
.site-footer__deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.site-footer__day-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Default (day): yellow stars */
  --star-core-rgb: 255, 245, 190;
  --star-mid-rgb: 255, 214, 88;
  --star-glow-rgb: 255, 214, 88;
}

/* Night: same stars, white */
html[data-theme="dark"] .site-footer__day-stars {
  --star-core-rgb: 255, 255, 255;
  --star-mid-rgb: 210, 226, 255;
  --star-glow-rgb: 255, 255, 255;
}

.site-footer__star {
  position: absolute;
  width: var(--star-size, 2px);
  height: var(--star-size, 2px);
  border-radius: 50%;
  isolation: isolate;
  z-index: 0;
  background: radial-gradient(
    circle,
    rgba(var(--star-core-rgb), 1) 0 46%,
    rgba(var(--star-mid-rgb), 0.75) 47% 72%,
    rgba(var(--star-mid-rgb), 0) 74% 100%
  );
  filter:
    drop-shadow(0 0 calc(var(--star-glow, 10px) * 0.7) rgba(var(--star-glow-rgb), 0.2))
    drop-shadow(0 0 calc(var(--star-glow, 10px) * 1.2) rgba(var(--star-glow-rgb), 0.14));
  opacity: var(--star-alpha, 0.8);
}

/* Ray glow: + and × so peaks read as starbursts (behind core) */
.site-footer__star::before,
.site-footer__star::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
}

.site-footer__star::before {
  /* Short, soft + rays (no hard edges) */
  width: calc(var(--star-glow, 10px) * 2.05);
  height: calc(var(--star-glow, 10px) * 2.05);
  transform: translate(-50%, -50%);
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      transparent 32%,
      rgba(var(--star-glow-rgb), 0.12) 45%,
      rgba(var(--star-glow-rgb), 0.14) 50%,
      rgba(var(--star-glow-rgb), 0.12) 55%,
      transparent 68%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      transparent 32%,
      rgba(var(--star-glow-rgb), 0.12) 45%,
      rgba(var(--star-glow-rgb), 0.14) 50%,
      rgba(var(--star-glow-rgb), 0.12) 55%,
      transparent 68%,
      transparent 100%
    );
  filter: blur(2.1px);
  opacity: 0.48;
}

.site-footer__star::after {
  /* Slightly shorter diagonal × for a subtle 8-point sparkle */
  width: calc(var(--star-glow, 10px) * 1.75);
  height: calc(var(--star-glow, 10px) * 1.75);
  transform: translate(-50%, -50%) rotate(45deg);
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      transparent 34%,
      rgba(var(--star-glow-rgb), 0.08) 46%,
      rgba(var(--star-glow-rgb), 0.1) 50%,
      rgba(var(--star-glow-rgb), 0.08) 54%,
      transparent 66%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      transparent 34%,
      rgba(var(--star-glow-rgb), 0.08) 46%,
      rgba(var(--star-glow-rgb), 0.1) 50%,
      rgba(var(--star-glow-rgb), 0.08) 54%,
      transparent 66%,
      transparent 100%
    );
  filter: blur(2.1px);
  opacity: 0.36;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--layout-max, 1320px);
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.5rem)
    max(var(--layout-gutter, clamp(0.9375rem, 2.85vw, 1.875rem)), env(safe-area-inset-right, 0))
    max(clamp(2rem, 4.5vw, 2.75rem), env(safe-area-inset-bottom, 0))
    max(var(--layout-gutter, clamp(0.9375rem, 2.85vw, 1.875rem)), env(safe-area-inset-left, 0));
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: start;
}

.site-footer__col {
  padding: 0 clamp(1rem, 2.5vw, 1.75rem);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 100%;
}

.site-footer__col:first-child {
  padding-left: 0;
}

.site-footer__col:last-child {
  border-right: none;
  padding-right: 0;
}

.site-footer__title {
  margin: 0 0 1rem;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e8e6e1;
}

.site-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__list li {
  margin: 0 0 0.5rem;
}

.site-footer__list li:last-child {
  margin-bottom: 0;
}

.site-footer__list a {
  color: #b5b1a8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__list a:hover {
  color: #c41e3a;
}

.site-footer__list a:focus-visible {
  color: #c41e3a;
  outline: 2px solid rgba(196, 30, 58, 0.55);
  outline-offset: 2px;
}

.site-footer__text {
  margin: 0 0 0.65rem;
  color: #b5b1a8;
}

.site-footer__text:last-child {
  margin-bottom: 0;
}

.site-footer__text strong {
  color: #e8e6e1;
  font-weight: 700;
}

.site-footer__text a {
  color: #d4cfc4;
  text-decoration: none;
}

.site-footer__text a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer__newsletter {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}

.site-footer__newsletter-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  min-height: 40px;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #e8e6e1;
  font: inherit;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.8125rem;
  box-sizing: border-box;
}

.site-footer__newsletter-input::placeholder {
  color: #8a8680;
}

.site-footer__newsletter-input:focus {
  outline: 2px solid rgba(196, 30, 58, 0.45);
  outline-offset: 2px;
  border-color: rgba(196, 30, 58, 0.55);
}

.site-footer__newsletter-btn {
  flex-shrink: 0;
  align-self: stretch;
  min-height: 40px;
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: 4px;
  background: #c41e3a;
  color: #fff;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}

.site-footer__newsletter-btn:hover {
  background: #a01830;
}

.site-footer__newsletter-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-top: clamp(1.35rem, 3.2vw, 1.85rem);
  padding-top: clamp(1rem, 2.5vw, 1.35rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #8a8680;
}

.site-footer__copyright {
  margin: 0;
  max-width: 42ch;
}

.site-footer__credit {
  margin: 0;
  margin-left: auto;
  text-align: right;
  color: #9a9690;
}

.site-footer__credit a {
  color: #c8c4bc;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.site-footer__credit a:hover {
  color: #c41e3a;
  text-decoration: underline;
  text-decoration-color: rgba(196, 30, 58, 0.5);
}

.site-footer__credit a:focus-visible {
  color: #c41e3a;
  outline: 2px solid rgba(196, 30, 58, 0.55);
  outline-offset: 3px;
}

.site-footer__note {
  margin: clamp(0.85rem, 2vw, 1.1rem) 0 0;
  padding-top: clamp(0.85rem, 2vw, 1.1rem);
  border-top: none;
  font-size: 0.8125rem;
  color: #8a8680;
  text-align: center;
  font-family: "DM Sans", system-ui, sans-serif;
}

.site-footer__note a {
  color: #c41e3a;
  text-decoration: none;
  font-weight: 600;
}

.site-footer__note a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .site-footer__credit {
    margin-left: 0;
    text-align: left;
    width: 100%;
  }

  .site-footer__newsletter-btn {
    flex: 1 1 auto;
    min-width: min(100%, 9rem);
  }
}

@media (max-width: 420px) {
  .site-footer__newsletter {
    flex-direction: column;
  }

  .site-footer__newsletter-btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__col {
    border-right: none;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 0;
  }

  .site-footer__col:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }
}
