/* Zoth Studio — full-bleed footer colophon.
   Loaded after zoth-nav.css / zoth-mobile.css so layout wins. */

footer.site,
.zoth-mega-footer {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  margin-top: auto;
  padding: 0;
  clear: both;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--bg, #050508);
  color: var(--text-subhead, #cbd5e1);
  border-top: 0;
  scroll-margin-top: calc(var(--zoth-header-h, 54px) + 12px);
}

footer.site::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--gold, #fbbf24) 22%,
    var(--cyan, #00f0ff) 50%,
    var(--gold, #fbbf24) 78%,
    transparent 100%
  );
  opacity: 0.85;
  pointer-events: none;
  z-index: 2;
}

footer.site::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 42%;
  height: 100%;
  background:
    radial-gradient(ellipse at 12% 80%, rgba(251, 191, 36, 0.08), transparent 52%),
    radial-gradient(ellipse at 0% 0%, rgba(0, 240, 255, 0.05), transparent 46%);
  pointer-events: none;
  z-index: 0;
}

.foot-wrap {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 72px) clamp(28px, 4vw, 48px);
  padding-bottom: calc(clamp(28px, 4vw, 48px) + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.foot-watermark {
  position: absolute;
  right: clamp(8px, 3vw, 48px);
  bottom: -0.22em;
  left: auto;
  transform: none;
  font-family: var(--font-display, Syne, Fraunces, serif);
  font-size: clamp(7rem, 22vw, 22rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.75;
  color: var(--gold, #fbbf24);
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}

footer.site .foot-grid,
.foot-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(min(18rem, 100%), 1.45fr) repeat(4, minmax(min(9.5rem, 100%), 1fr)) !important;
  gap: clamp(28px, 4vw, 64px) clamp(24px, 3vw, 48px) !important;
  align-items: start;
}

footer.site .foot-brand-col,
.foot-brand-col {
  grid-column: auto !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  text-align: left !important;
  gap: 14px;
  min-width: 0;
}

.foot-kicker {
  margin: 0;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold, #fbbf24);
}

.foot-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.foot-azoth {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  object-position: 50% 12%;
  background: #050508;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.foot-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.foot-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: none;
  margin: 0;
}

.foot-brand-emblem-wrap {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  vertical-align: middle;
  flex-shrink: 0;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.foot-brand-lockup:hover .foot-brand-emblem-wrap {
  transform: scale(1.1);
}

.foot-brand-title {
  display: block;
  font-family: var(--font-display, Syne, sans-serif);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-primary, #fff);
}

.foot-brand-desc {
  display: block;
  max-width: 28rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-subhead, #94a3b8);
}

.foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.foot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-sans, Figtree, sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.foot-btn-on {
  background: var(--gold, #fbbf24);
  color: #111827;
  border: 1px solid var(--gold, #fbbf24);
}

.foot-btn-on:hover {
  filter: brightness(1.06);
  text-decoration: none;
  color: #111827;
}

.foot-btn-ghost {
  background: transparent;
  color: var(--text-primary, #fff);
  border: 1px solid var(--line, rgba(247, 244, 238, 0.18));
}

.foot-btn-ghost:hover {
  border-color: var(--gold, #fbbf24);
  color: var(--gold, #fbbf24);
  text-decoration: none;
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.foot-col h3,
.foot-col .foot-heading {
  margin: 0 0 10px;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold, #fbbf24);
  text-shadow: none;
}

.mega-footer-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 36px;
  padding: 4px 0;
  color: var(--text-subhead, #94a3b8);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transform: none;
  transition: color 0.18s ease;
}

.mega-footer-link span {
  display: none;
}

.mega-footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 6px;
  width: 0;
  height: 1px;
  background: var(--gold, #fbbf24);
  box-shadow: none;
  transition: width 0.18s ease;
}

.mega-footer-link:hover,
.mega-footer-link:focus-visible {
  color: var(--text-primary, #fff);
  transform: none;
  text-decoration: none;
}

.mega-footer-link:hover::after,
.mega-footer-link:focus-visible::after {
  width: 100%;
}

.foot-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  max-width: none;
  margin: clamp(36px, 6vw, 64px) 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line, rgba(247, 244, 238, 0.1));
  text-align: left;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--muted, #64748b);
}

.foot-bottom p {
  margin: 0;
  max-width: 46rem;
  line-height: 1.5;
}

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.foot-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-subhead, #94a3b8);
  text-decoration: none;
}

.foot-meta a:hover,
.foot-meta a:focus-visible {
  color: var(--gold, #fbbf24);
  text-decoration: none;
}

footer.site a:focus-visible,
footer.site .foot-btn:focus-visible {
  outline: 2px solid var(--cyan, #00f0ff);
  outline-offset: 3px;
}

html[data-theme="light"] footer.site,
html[data-theme="light"] .zoth-mega-footer {
  background: var(--bg, #f7f9fc);
  color: #374151;
}

html[data-theme="light"] .foot-kicker,
html[data-theme="light"] .foot-col h3,
html[data-theme="light"] .foot-col .foot-heading {
  color: #b45309 !important;
}

html[data-theme="light"] footer.site::after {
  background:
    radial-gradient(ellipse at 12% 80%, rgba(99, 91, 255, 0.08), transparent 52%),
    radial-gradient(ellipse at 0% 0%, rgba(251, 191, 36, 0.1), transparent 46%);
}

html[data-theme="light"] .foot-watermark {
  color: #111827;
  opacity: 0.05;
}

html[data-theme="light"] .foot-brand-title {
  color: #111827;
}

html[data-theme="light"] .foot-brand-desc,
html[data-theme="light"] .mega-footer-link,
html[data-theme="light"] .foot-bottom,
html[data-theme="light"] .foot-meta a {
  color: #374151;
}

html[data-theme="light"] .mega-footer-link:hover,
html[data-theme="light"] .mega-footer-link:focus-visible,
html[data-theme="light"] .foot-meta a:hover {
  color: #92400e;
}

html[data-theme="light"] .foot-btn-ghost {
  color: #111827;
  border-color: rgba(17, 24, 39, 0.16);
  background: #fff;
}

html[data-theme="light"] .foot-bottom {
  border-top-color: rgba(17, 24, 39, 0.1);
}

html[data-theme="light"] .foot-azoth {
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.12), 0 10px 24px rgba(15, 23, 42, 0.12);
}

html[data-theme="matrix"] footer.site,
html[data-theme="matrix"] .zoth-mega-footer {
  background: #000a00;
  border-top-color: rgba(0, 255, 0, 0.28);
}

html[data-theme="matrix"] .foot-kicker,
html[data-theme="matrix"] .foot-col h3,
html[data-theme="matrix"] .foot-brand-title {
  color: #00ff00;
}

html[data-theme="matrix"] .mega-footer-link {
  color: #86efac;
}

html[data-theme="matrix"] .mega-footer-link::after,
html[data-theme="matrix"] footer.site::before {
  background: #00ff00;
}

html[data-theme="matrix"] .foot-watermark {
  color: #00ff00;
  opacity: 0.07;
  font-family: var(--font-mono, "Share Tech Mono", monospace);
}

html[data-theme="matrix"] .foot-btn-on {
  background: #00ff00;
  border-color: #00ff00;
  color: #001400;
}

html[data-theme="gold"] footer.site,
html[data-theme="gold"] .zoth-mega-footer {
  background: #050300;
}

html[data-theme="gold"] .foot-brand-title {
  font-family: Cinzel, Fraunces, serif;
  color: #ffd700;
}

html[data-theme="gold"] .foot-watermark {
  color: #ffd700;
  opacity: 0.08;
  font-family: Cinzel, Fraunces, serif;
}

html[data-theme="gold"] .mega-footer-link {
  color: #fde68a;
}

@media (max-width: 1100px) {
  footer.site .foot-grid,
  .foot-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 32px 24px !important;
  }

  footer.site .foot-brand-col,
  .foot-brand-col {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 640px) {
  footer.site,
  .zoth-mega-footer {
    padding: 0 !important;
  }

  .foot-wrap {
    padding: 40px 20px calc(28px + env(safe-area-inset-bottom, 0px)) !important;
  }

  footer.site .foot-grid,
  .foot-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .foot-watermark {
    font-size: clamp(5.5rem, 38vw, 9rem);
    right: -4vw;
    opacity: 0.05;
  }

  .mega-footer-link {
    min-height: 44px;
    padding: 10px 0;
  }

  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 32px;
    text-align: left;
  }

  .foot-btn {
    flex: 1 1 calc(50% - 10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mega-footer-link::after,
  .foot-btn {
    transition: none;
  }
}
