/* ==========================================================================
   REALITY-CRAFT FOOTER STYLES
   Modular stylesheet for site footer, office locations, links, & copyright
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Footer Shell & Base Layout
   -------------------------------------------------------------------------- */
.footer {
  padding: clamp(2.5rem, 4vw, 3.5rem) 0 clamp(1.5rem, 2.5vw, 2.25rem);
  background: #06070c;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center top;
}

html[data-theme="light"] .footer {
  background: #fbfbfb !important;
  border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.015) 1px, transparent 1px) !important;
}

.footer__shell {
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   2. Top Row: Offices & Collaborate CTA
   -------------------------------------------------------------------------- */
.footer__top-row {
  display: grid;
  grid-template-columns: 1.2fr 2.8fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: clamp(1.75rem, 3vw, 2.5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .footer__top-row {
  border-bottom-color: rgba(15, 23, 42, 0.06) !important;
}

.footer__offices-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer__office-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer__office-list li {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

html[data-theme="light"] .footer__office-list li {
  color: #64748b !important;
}

.footer__cta-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__cta-headline {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: clamp(1.85rem, 3.1vw, 2.85rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-decoration: none;
  transition: all 240ms ease;
  width: fit-content;
}

.footer__cta-headline:hover {
  background: linear-gradient(90deg, #2972ff 0%, #1de9b6 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

html[data-theme="light"] .footer__cta-headline {
  color: #000000 !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #000000 !important;
}

html[data-theme="light"] .footer__cta-headline:hover {
  background: linear-gradient(90deg, #2972ff 0%, #1de9b6 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

.footer__cta-arrow {
  width: clamp(1.4rem, 2.4vw, 2.1rem);
  height: clamp(1.4rem, 2.4vw, 2.1rem);
  stroke-width: 2.2;
  stroke: currentColor;
  transition: transform 300ms ease, stroke 300ms ease;
}

html[data-theme="light"] .footer__cta-arrow {
  stroke: #000000 !important;
}

.footer__cta-headline:hover .footer__cta-arrow {
  transform: translateX(10px);
  stroke: #1de9b6 !important;
}

html[data-theme="light"] .footer__cta-headline:hover .footer__cta-arrow {
  stroke: #2972ff !important;
}

.footer__cta-subtext {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
}

html[data-theme="light"] .footer__cta-subtext {
  color: #7c7c7c !important;
}

/* --------------------------------------------------------------------------
   3. Middle Row: Navigation Links Grid
   -------------------------------------------------------------------------- */
.footer__middle-row {
  display: grid;
  grid-template-columns: 1.2fr 2.8fr;
  gap: 2rem;
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .footer__middle-row {
  border-bottom-color: rgba(15, 23, 42, 0.06) !important;
}

.footer__links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.footer__column {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer__title {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
}

html[data-theme="light"] .footer__title {
  color: #475569 !important;
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer__link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 240ms ease;
}

.footer__link:hover {
  color: #ffffff;
}

html[data-theme="light"] .footer__link {
  color: #64748b !important;
}

html[data-theme="light"] .footer__link:hover {
  color: #0f172a !important;
}

/* --------------------------------------------------------------------------
   4. Bottom Row: Socials, Copyright, Scroll to Top
   -------------------------------------------------------------------------- */
.footer__bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem 2rem;
  padding-top: clamp(1.25rem, 2vw, 1.75rem);
  flex-wrap: wrap;
}

.footer__socials {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer__social-icon {
  color: rgba(255, 255, 255, 0.6);
  transition: color 240ms ease, transform 240ms ease;
  display: inline-flex;
  align-items: center;
}

.footer__social-icon svg {
  width: 20px;
  height: 20px;
}

.footer__social-icon:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

html[data-theme="light"] .footer__social-icon {
  color: #000000 !important;
}

html[data-theme="light"] .footer__social-icon:hover {
  color: var(--accent-primary) !important;
}

.footer__copyright {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.88rem;
}

html[data-theme="light"] .footer__copyright {
  color: #7c7c7c !important;
}

.footer__brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #ffffff;
  font-size: 1.05rem;
}

html[data-theme="light"] .footer__brand-logo {
  color: #000000 !important;
}

.footer__brand-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.footer__copyright-text {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 1rem;
}

html[data-theme="light"] .footer__copyright-text {
  border-left-color: rgba(15, 23, 42, 0.12) !important;
}

.footer__scroll-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  border-radius: 20px;
  background: #ffffff;
  color: #000000;
  font-size: 0.86rem;
  border: none;
  cursor: pointer;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.footer__scroll-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.footer__scroll-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

html[data-theme="light"] .footer__scroll-btn {
  background: #000000 !important;
  color: #ffffff !important;
}

html[data-theme="light"] .footer__scroll-btn:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

/* --------------------------------------------------------------------------
   5. Footer Brand Logo Helpers
   -------------------------------------------------------------------------- */
.brand--footer {
  display: inline-flex;
  align-items: center;
}

.brand__mark--footer {
  width: clamp(4rem, 7vw, 4.9rem);
  height: clamp(4rem, 7vw, 4.9rem);
}

.brand__image--footer,
.footer .brand__image--footer {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   6. Responsive Layouts (<= 900px, <= 600px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .footer__top-row {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer__middle-row {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer__grid-spacer {
    display: none;
  }

  .footer__links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
  }

  .footer__bottom-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }

  .footer__copyright {
    flex-direction: column;
    gap: 0.6rem;
  }

  .footer__copyright-text {
    border-left: none;
    padding-left: 0;
  }

  .brand__mark--footer {
    width: clamp(3.3rem, 11vw, 4rem);
    height: clamp(3.3rem, 11vw, 4rem);
  }
}

@media (max-width: 600px) {
  .footer__links-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}