/* ABS Nexora — premium academic directory footer */

.site-footer {
  margin-top: auto;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  color: rgba(249, 247, 242, 0.78);
  font-size: 0.92rem;
}

.nx-footer {
  --ft-cream: #f9f7f2;
  --ft-gold: #c5a059;
  --ft-gold-soft: #e8d5a8;
  --ft-ink: rgba(249, 247, 242, 0.78);
  --ft-ink-mute: rgba(249, 247, 242, 0.55);
  --ft-ink-faint: rgba(249, 247, 242, 0.42);
  --ft-rule: rgba(249, 247, 242, 0.1);
  --ft-max: 1160px;
  --ft-pad-x: clamp(1.25rem, 3.5vw, 2rem);

  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 50% at 8% 0%, rgba(197, 160, 89, 0.1), transparent 58%),
    radial-gradient(ellipse 40% 40% at 100% 100%, rgba(0, 40, 72, 0.45), transparent 55%),
    linear-gradient(168deg, #00101f 0%, #001a33 46%, #07253f 100%);
  color: var(--ft-ink);
  border-top: 1px solid rgba(197, 160, 89, 0.28);
}

.nx-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -18deg,
      transparent 0,
      transparent 22px,
      rgba(249, 247, 242, 0.012) 22px,
      rgba(249, 247, 242, 0.012) 23px
    );
  pointer-events: none;
  z-index: 0;
}

.nx-footer-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(197, 160, 89, 0.12) 18%,
    var(--ft-gold) 50%,
    rgba(197, 160, 89, 0.12) 82%,
    transparent 100%
  );
  transform-origin: left center;
  animation: nx-footer-rule 1.1s ease-out both;
  z-index: 2;
}

.nx-footer-inner {
  position: relative;
  z-index: 1;
  width: min(var(--ft-max), calc(100% - (var(--ft-pad-x) * 2)));
  margin: 0 auto;
  padding: clamp(2.75rem, 5vw, 3.75rem) 0 2.5rem;
  display: grid;
  grid-template-columns:
    minmax(200px, 1.35fr)
    minmax(120px, 0.85fr)
    minmax(180px, 1.25fr)
    minmax(110px, 0.75fr);
  gap: clamp(1.75rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
  animation: nx-footer-rise 0.85s ease-out both;
}

.nx-footer-brand {
  max-width: 22rem;
  padding-right: 0.5rem;
}

.nx-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--ft-cream);
}

.nx-footer-logo:hover {
  text-decoration: none;
  color: #fff;
}

.nx-footer-mark {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  flex-shrink: 0;
  border: 1px solid rgba(197, 160, 89, 0.5);
  background: linear-gradient(145deg, rgba(197, 160, 89, 0.16), rgba(0, 31, 63, 0.35));
  font-family: "Cinzel", var(--serif), serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ft-gold-soft);
  animation: nx-footer-mark 1s ease-out 0.15s both;
}

.nx-footer-logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.nx-footer-logo-text strong {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ft-cream);
  line-height: 1.15;
}

.nx-footer-logo-text span {
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(197, 160, 89, 0.88);
  line-height: 1.3;
}

.nx-footer-tagline {
  margin: 1.25rem 0 0;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ft-cream);
}

.nx-footer-primary {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ft-ink-mute);
  max-width: 20rem;
}

.nx-footer-primary:empty {
  display: none;
}

.nx-footer-col {
  min-width: 0;
  animation: nx-footer-rise 0.9s ease-out both;
}

.nx-footer-col:nth-child(2) {
  animation-delay: 0.06s;
}
.nx-footer-col:nth-child(3) {
  animation-delay: 0.12s;
}
.nx-footer-col:nth-child(4) {
  animation-delay: 0.18s;
}

.nx-footer-col h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(197, 160, 89, 0.22);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ft-gold);
  line-height: 1.2;
}

.nx-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
}

.nx-footer-col a {
  color: rgba(249, 247, 242, 0.84);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.35;
  transition: color 0.2s ease;
  display: inline-block;
}

.nx-footer-col a:hover {
  color: var(--ft-gold-soft);
  text-decoration: none;
}

.nx-footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(197, 160, 89, 0.4);
  background: rgba(197, 160, 89, 0.08);
  color: var(--ft-gold-soft) !important;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nx-footer-cta:hover {
  background: rgba(197, 160, 89, 0.16);
  border-color: rgba(197, 160, 89, 0.7);
  color: #fff !important;
  text-decoration: none;
}

.nx-footer-note p,
.nx-footer-note .footer-meta {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--ft-ink-mute);
}

.nx-footer-note em {
  font-family: var(--serif);
  font-style: italic;
  color: rgba(249, 247, 242, 0.86);
}

/* Legacy wrapper still used on Journal Rankings pages */
.nx-footer-cols {
  display: contents;
}

.nx-footer-news-slot {
  position: relative;
  z-index: 1;
  width: min(var(--ft-max), calc(100% - (var(--ft-pad-x) * 2)));
  margin: 0 auto;
}

.nx-footer-news-slot:empty {
  display: none;
}

.nx-footer-bar {
  position: relative;
  z-index: 1;
  margin-top: 0.25rem;
  border-top: 1px solid var(--ft-rule);
  background: rgba(0, 8, 16, 0.4);
}

.nx-footer-bar-inner {
  width: min(var(--ft-max), calc(100% - (var(--ft-pad-x) * 2)));
  margin: 0 auto;
  padding: 1.05rem 0 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.75rem;
}

.nx-footer-bar-copy {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--ft-ink-faint);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0;
  margin: 0;
  font-size: 0.76rem;
}

.footer-links a {
  color: rgba(249, 247, 242, 0.58);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: var(--ft-gold-soft);
  text-decoration: none;
}

.footer-links .footer-sep {
  color: rgba(249, 247, 242, 0.18);
  user-select: none;
  padding: 0 0.1rem;
}

#footer-extra-links {
  display: contents;
}

@keyframes nx-footer-rule {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes nx-footer-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nx-footer-mark {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 980px) {
  .nx-footer-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem 1.75rem;
  }

  .nx-footer-brand {
    grid-column: 1 / -1;
    max-width: 32rem;
    padding-right: 0;
  }

  .nx-footer-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .nx-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 1.25rem;
    padding-top: 2.35rem;
    padding-bottom: 2rem;
  }

  .nx-footer-brand {
    grid-column: 1 / -1;
  }

  .nx-footer-note {
    grid-column: 1 / -1;
  }

  .nx-footer-bar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nx-footer-tagline {
    font-size: 1.05rem;
  }

  .nx-footer-col h2 {
    margin-bottom: 0.85rem;
  }
}

@media (max-width: 420px) {
  .nx-footer-inner {
    grid-template-columns: 1fr;
  }

  .nx-footer-col a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 520px) {
  .abs-cookie-banner {
    flex-direction: column;
    align-items: stretch;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    gap: 0.75rem;
  }

  .abs-cookie-accept {
    width: 100%;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-footer-accent,
  .nx-footer-inner,
  .nx-footer-col,
  .nx-footer-mark {
    animation: none;
  }

  .nx-footer-col a,
  .nx-footer-cta {
    transition: none;
  }
}

/* Cookie banner + legal pages (CMS-driven) */
.abs-cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(197, 160, 89, 0.12), transparent 42%),
    #0c1f36;
  color: #f4efe6;
  border: 1px solid rgba(197, 160, 89, 0.45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.abs-cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.abs-cookie-accept {
  flex-shrink: 0;
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  background: #c5a059;
  color: #1a1408;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.legal-page {
  padding: 0;
  min-height: 70vh;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(197, 160, 89, 0.14), transparent 42%),
    linear-gradient(180deg, #f7f2e8 0%, #f3efe6 48%, #ebe4d6 100%);
}

.legal-page-stage {
  padding: 2.75rem 1.25rem 4.5rem;
}

.legal-page-inner {
  max-width: 820px;
  margin: 0 auto;
  background: rgba(252, 251, 248, 0.92);
  border: 1px solid rgba(0, 31, 63, 0.08);
  border-radius: 18px;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  box-shadow: 0 24px 50px rgba(12, 31, 54, 0.08);
}

.legal-page .nx-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a6a28;
  font-weight: 700;
}

.legal-page h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.1rem, 4.5vw, 2.85rem);
  color: #001f3f;
  margin: 0 0 0.85rem;
  line-height: 1.1;
}

.legal-intro {
  margin: 0 0 1.35rem;
  color: #3d4654;
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 42rem;
}

/* ScholarProfile free-website guide + example pages */
.sp-guide-inner {
  max-width: 760px;
}

.sp-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 1.75rem;
}

.sp-guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.55rem 1.15rem;
  border-radius: 2px;
  font-family: "Inter Tight", "Inter", "Source Sans 3", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sp-guide-btn--primary {
  background: #001f3f;
  color: #fbf8f1;
  border: 1px solid #001f3f;
}

.sp-guide-btn--primary:hover {
  background: #0c2a4a;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.sp-guide-btn--ghost {
  background: rgba(255, 254, 251, 0.9);
  color: #001f3f;
  border: 1px solid rgba(0, 31, 63, 0.18);
}

.sp-guide-btn--ghost:hover {
  border-color: rgba(197, 160, 89, 0.7);
  color: #001f3f;
  text-decoration: none;
}

.sp-guide-steps {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.sp-guide-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem 1.1rem;
  align-items: start;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid rgba(0, 31, 63, 0.08);
}

.sp-guide-step:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sp-guide-step__num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #8a6a28;
  line-height: 1.6;
  padding-top: 0.2rem;
}

.sp-guide-step h2 {
  margin: 0 0 0.4rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  color: #001f3f;
  line-height: 1.2;
}

.sp-guide-step p {
  margin: 0 0 0.55rem;
  color: #3d4654;
  line-height: 1.65;
}

.sp-guide-step p:last-child {
  margin-bottom: 0;
}

.sp-guide-step a {
  color: #001f3f;
  font-weight: 600;
}

.sp-guide-step code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86em;
  padding: 0.08em 0.35em;
  background: rgba(0, 31, 63, 0.05);
  border-radius: 3px;
}

.sp-guide-note {
  color: #5c6775 !important;
  font-size: 0.95rem;
}

.sp-guide-example {
  margin: 0.5rem 0 0;
  padding: 1.35rem 1.25rem 1.4rem;
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(197, 160, 89, 0.1) 0%, transparent 55%),
    rgba(255, 254, 251, 0.95);
}

.sp-guide-example__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6a28;
}

.sp-guide-example h2 {
  margin: 0 0 0.55rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  color: #001f3f;
  line-height: 1.2;
}

.sp-guide-example > p {
  margin: 0 0 1rem;
  color: #3d4654;
  line-height: 1.6;
}

.sp-guide-example .sp-guide-actions {
  margin-bottom: 0;
}

.sp-example-hero {
  margin: 0 0 1.75rem;
  padding: 1.5rem 1.35rem 1.55rem;
  border: 1px solid rgba(0, 31, 63, 0.1);
  border-radius: 2px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(197, 160, 89, 0.16), transparent 55%),
    linear-gradient(180deg, #fffefb 0%, #f7f2e8 100%);
}

.sp-example-hero__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6a28;
}

.sp-example-hero__name {
  margin: 0 0 0.55rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 3.5vw, 2.15rem);
  color: #001f3f;
  line-height: 1.15;
}

.sp-example-hero__lead {
  margin: 0 0 1.15rem;
  color: #3d4654;
  line-height: 1.65;
  max-width: 38rem;
}

.sp-example-hero .sp-guide-actions {
  margin-bottom: 0;
}

.sp-example-features {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sp-example-features li {
  margin: 0;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid rgba(0, 31, 63, 0.08);
  color: #3d4654;
  line-height: 1.55;
}

.sp-example-features li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sp-example-features strong {
  display: block;
  margin-bottom: 0.15rem;
  color: #001f3f;
  font-family: "Inter Tight", "Inter", "Source Sans 3", system-ui, sans-serif;
  font-size: 0.92rem;
}

.sp-guide-page .sp-guide-note a {
  color: #001f3f;
  font-weight: 600;
}

@media (max-width: 720px) {
  .sp-guide-step {
    gap: 0.55rem 0.75rem;
  }

  .sp-example-hero,
  .sp-guide-example {
    padding: 1.15rem 1rem 1.25rem;
  }

  .sp-guide-btn {
    flex: 1 1 auto;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-guide-btn,
  .sp-guide-btn--primary:hover {
    transition: none;
    transform: none;
  }
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 0 0 1rem;
  color: #5c6775;
  font-size: 0.88rem;
}

.legal-meta a {
  color: #001f3f;
  font-weight: 600;
}

.legal-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.5rem;
}

.legal-switch a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 31, 63, 0.14);
  background: #fff;
  color: #001f3f;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.legal-switch a:hover {
  border-color: #c5a059;
  background: #fff8e8;
}

.legal-body {
  color: #3d4654;
  line-height: 1.7;
  font-size: 1.02rem;
}

.legal-body h2 {
  margin: 1.85rem 0 0.65rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  color: #001f3f;
  line-height: 1.25;
}

.legal-body h3 {
  margin: 1.25rem 0 0.45rem;
  font-size: 1.02rem;
  color: #0a2342;
}

.legal-body p {
  margin: 0 0 0.9rem;
}

.legal-body ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.legal-body li {
  margin: 0.28rem 0;
}

.legal-body strong {
  color: #152033;
}

.legal-empty {
  color: #5c6775;
  font-style: italic;
}

.legal-back {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 31, 63, 0.08);
}

.legal-back a {
  color: #001f3f;
  font-weight: 600;
}

@media (max-width: 720px) {
  .legal-page-inner {
    padding: 1.25rem 1rem 1.6rem;
    border-radius: 14px;
  }
}

/* Page not found */
.not-found-page .legal-page-inner { text-align: center; max-width: 680px; }
.not-found-search { display: flex; gap: 0.5rem; max-width: 520px; margin: 1.4rem auto 0; }
.not-found-search input { flex: 1; min-width: 0; padding: 0.75rem 1rem; border: 1px solid rgba(0, 31, 63, 0.18); border-radius: 999px; font: inherit; background: #fff; }
.not-found-search input:focus { outline: 2px solid rgba(197, 160, 89, 0.6); outline-offset: 1px; }
.not-found-search button { padding: 0.75rem 1.3rem; border: 0; border-radius: 999px; background: #001f3f; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.not-found-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; padding: 0; margin: 1.4rem 0 0; }
.not-found-links a { display: inline-block; padding: 0.45rem 0.95rem; border: 1px solid rgba(0, 31, 63, 0.14); border-radius: 999px; color: #001f3f; font-weight: 600; text-decoration: none; background: #fff; }
.not-found-links a:hover { border-color: #c5a059; }
.not-found-home { margin: 1.6rem 0 0; }
.not-found-home a { color: #8a6a28; font-weight: 600; }
@media (max-width: 520px) { .not-found-search { flex-direction: column; } }
