/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background-color: var(--bg-elev);
  border-top: 1px solid var(--line);
  font-family: var(--font-sans);
}

/* ── Main grid ── */
.footer-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 80px var(--container-padding) 64px;
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 48px 40px;
  align-items: start;
}

/* ── Brand column ── */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand .nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.footer-brand .nav-logo img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.footer-brand .nav-logo span {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 280px;
}

/* ── Link columns ── */
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col ul li a:hover {
  color: var(--green-dim);
}

.footer-col ul li a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Featured links (accent) ── */
.footer-link-accent {
  color: var(--green-dim) !important;
  font-weight: 600;
}

.footer-link-accent:hover {
  color: var(--green) !important;
}

/* ── Bottom bar ── */
.footer-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px var(--container-padding);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.footer-bottom a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom a:hover {
  color: var(--green-dim);
}

.footer-bottom a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Social buttons ── */
.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg-card);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-btn:hover {
  color: var(--green-dim);
  border-color: var(--green-dim);
  background: var(--green-tint);
}

.social-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ── Back to top ── */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.2s ease, border-color 0.2s ease;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#back-to-top:hover {
  color: var(--green-dim);
  border-color: var(--green-dim);
}

#back-to-top:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ── Guide modal overlay ── */
#guide-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 13, 16, 0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#guide-overlay.open {
  display: flex;
}

.guide-modal {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px 40px;
  max-width: 520px;
  width: 100%;
  position: relative;
}

.guide-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s ease;
}

.guide-modal-close:hover {
  color: var(--ink);
}

.guide-modal-close:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.modal-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.guide-modal h3 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}

.modal-sub {
  font-size: 0.925rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.form-input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.form-input::placeholder {
  color: var(--muted-soft);
}

.form-input:focus {
  outline: none;
  border-color: var(--green);
}

.form-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.form-submit:hover {
  opacity: 0.88;
}

.form-submit:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#guide-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 8px 0;
}

.success-icon {
  font-size: 2.5rem;
}

#guide-success h3 {
  font-size: 1.4rem;
}

#guide-success p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
    padding: 64px var(--container-padding) 48px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand p {
    max-width: 460px;
  }
}

@media (max-width: 700px) {
  .footer-grid {
    /* Changed to 2 columns on mobile */
    grid-template-columns: 1fr 1fr;
    gap: 40px 16px;
    padding: 48px 20px 40px;
  }

  .footer-brand {
    /* Brand spans across both columns */
    grid-column: 1 / -1; 
  }

  .footer-brand p {
    max-width: 100%;
  }

  /* Make the Industries column span full width at the bottom so it doesn't look empty on the right */
  .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    padding: 20px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .form-row {
    flex-direction: column;
  }

  .guide-modal {
    padding: 36px 24px 28px;
  }

  #back-to-top {
    bottom: 20px;
    right: 20px;
  }
}


