/* ==========================================================================
   FOOTER — Original Watermark Gradient + Top-Only Rounded Shell
   ========================================================================== */

/* --- Base Variables (theme-aware) --- */
.site-footer {
  --footer-bg: #030305;
  --footer-shell-bg: linear-gradient(180deg, #0c0d14 0%, #06060a 100%);
  --footer-shell-border: rgba(255, 255, 255, 0.08);
  --footer-text: #94a3b8;
  --footer-heading: #64748b;
  --footer-link: #cbd5e1;
  --footer-link-hover: #ffffff;
  --footer-watermark-start: rgba(255, 255, 255, 0.08);
  --footer-watermark-end: rgba(255, 255, 255, 0.01);
  --footer-social: #64748b;
  --footer-social-hover: #ffffff;
  --footer-copy: #64748b;
  --footer-logo-title: #ffffff;
  --footer-logo-mark: #3b82f6;

  background-color: transparent; /* ← was var(--footer-bg), now transparent */
  color: var(--footer-text);
  padding: 2rem 0 0; /* ← removed left/right padding, kept top */
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: color 0.4s ease;
}

body.light-mode .site-footer {
  --footer-bg: #f8fafc;
  --footer-shell-bg: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  --footer-shell-border: rgba(0, 0, 0, 0.08);
  --footer-text: #4b5563;
  --footer-heading: #64748b;
  --footer-link: #1e293b;
  --footer-link-hover: #09090b;
  --footer-watermark-start: rgba(0, 0, 0, 0.08);
  --footer-watermark-end: rgba(0, 0, 0, 0.01);
  --footer-social: #94a3b8;
  --footer-social-hover: #09090b;
  --footer-copy: #94a3b8;
  --footer-logo-title: #09090b;
  --footer-logo-mark: #2563eb;
}

/* --- Shared --- */
.site-footer *, .site-footer *::before, .site-footer *::after {
  box-sizing: inherit;
}

.footer-wrapper {
  max-width: 1080px;
  margin: 0 auto;
}

/* Outer Shell — Round on top, flat on bottom */
.footer-shell {
  background: var(--footer-shell-bg);
  border: 1px solid var(--footer-shell-border);
  border-radius: 20px 20px 0 0; /* top rounded, bottom flat */
  padding: 3.5rem 3rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  transition: background 0.4s ease, border-color 0.4s ease;
}

/* Grid: brand + columns */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  position: relative;
  z-index: 2;
}

@media (min-width: 850px) {
  .footer-grid {
    grid-template-columns: 320px 1fr;
  }
}

/* Brand Column */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.logo-mark {
  color: var(--footer-logo-mark);
  font-weight: 800;
  font-size: 1.35rem;
  transition: color 0.3s ease;
}

.logo-mark-img {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}

.logo-title {
  color: var(--footer-logo-title);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
  transition: color 0.3s ease;
}

.brand-text {
  font-size: 0.875rem;
  color: var(--footer-text);
  line-height: 1.625;
  margin: 0;
  font-weight: 400;
  transition: color 0.3s ease;
}

/* Links Columns */
.links-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 2.5rem;
}

.col-title {
  color: var(--footer-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1.25rem 0;
  transition: color 0.3s ease;
}

.link-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.link-col a {
  color: var(--footer-link);
  font-size: 0.875rem;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color 0.2s ease, transform 0.2s ease;
  width: fit-content;
}

.link-col a:hover {
  color: var(--footer-link-hover);
  transform: translateX(3px);
}

/* --- Integrated Bottom Bar (copyright + social) --- */
.footer-bottom-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 2rem 0 0.5rem;
  border-top: 1px solid var(--footer-shell-border);
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .footer-bottom-bar {
    flex-direction: row;
  }
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--footer-copy);
  letter-spacing: -0.005em;
  transition: color 0.3s ease;
}

.footer-social {
  display: flex;
  gap: 1.25rem;
}

.footer-social a {
  color: var(--footer-social);
  transition: color 0.15s ease;
  display: flex;
}

.footer-social a:hover {
  color: var(--footer-social-hover);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}



/* Watermark — pushed to bottom, faded, and bleeding out */
.footer-watermark {
  margin-top: auto; /* pushes to bottom of shell */
  padding: 0;
  text-align: center;
  user-select: none;
  line-height: 0;
  overflow: visible;
  transform: translateY(10%); /* pushes bottom 10% outside the shell */
}

.footer-watermark span {
  display: block;
  font-size: clamp(2.8rem, 11vw, 7.5rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 0.9;
  background: linear-gradient(180deg, var(--footer-watermark-start) 0%, var(--footer-watermark-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Fade from solid (top) to transparent (bottom) — top 60% visible, bottom fades */
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  transition: background 0.4s ease;
}

/* Tablet: center logo + title, hide description */
@media (max-width: 1023px) and (min-width: 600px) {
  .brand-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .brand-col .brand-text {
    display: none;
  }
}

/* ==========================================
   MOBILE FOOTER — Screens under 600px (Centered)
   ========================================== */
@media (max-width: 600px) {
  .footer-shell {
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
  }

  .footer-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  /* Brand: centered, description hidden */
  .brand-col {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .brand-col .brand-text {
    display: none;
  }

  .brand-logo {
    justify-content: center;
  }

  /* Links: two centered columns */
  .links-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem 2rem;
    text-align: center;
    justify-items: center;
  }

  /* Hide the third column (Community) */
  .link-col:nth-child(3) {
    display: none;
  }

  .link-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
  }

  .link-col a {
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0;
    text-align: center;
  }

  .col-title {
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
    letter-spacing: 0.06em;
    font-weight: 600;
  }

  /* Bottom bar: stacked */
  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-copy {
    font-size: 0.7rem;
  }

  /* Watermark: smaller */
  .footer-watermark {
    padding: 1rem 0 0.25rem;
    margin-top: 0.5rem;
  }

  .footer-watermark span {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
    letter-spacing: 0.06em;
  }
}