/* ==========================================================================
   GCFM Global CSS Design System & Base Layout Rules
   ========================================================================== */

/* GCFM Global CSS — design tokens + fonts are enqueued separately by WordPress (see functions.php). */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--gcfm-font);
  color: var(--gcfm-text);
  background-color: var(--gcfm-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

/* Header & Navigation */
.gcfm-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  height: 84px;
  border-bottom: 1px solid rgba(7, 26, 69, 0.08);
  display: flex;
  align-items: center;
  box-shadow: 0 4px 20px rgba(7, 26, 69, 0.04);
  padding-inline: 40px;
  transition: all 0.3s ease;
}

.gcfm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.gcfm-logo-link {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.gcfm-logo-link:hover {
  opacity: 0.9;
}

.gcfm-header-logo {
  height: 90px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
}

.gcfm-header-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.gcfm-nav {
  display: flex;
  align-items: center;
}

.gcfm-nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gcfm-nav-link {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gcfm-heading);
  padding: 8px 0;
  transition: color 0.25s ease;
}

.gcfm-nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  right: 50%;
  height: 3px;
  background-color: var(--gcfm-blue);
  border-radius: 2px;
  opacity: 0;
  transition: left 0.25s ease, right 0.25s ease, opacity 0.25s ease;
}

.gcfm-nav-link:hover {
  color: var(--gcfm-blue);
}

.gcfm-nav-link:hover::after {
  left: 0;
  right: 0;
  opacity: 0.5;
}

.gcfm-nav-link.active {
  color: var(--gcfm-blue);
}

.gcfm-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--gcfm-blue);
  border-radius: 2px;
  opacity: 1;
  box-shadow: 0 1px 4px rgba(0, 86, 210, 0.3);
}

.gcfm-mobile-cta-wrapper {
  display: none;
}

.gcfm-header-cta {
  display: flex;
  align-items: center;
}

.gcfm-header-cta .gcfm-button {
  min-height: 42px;
  height: 42px;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.gcfm-header-cta .gcfm-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 86, 210, 0.25);
}

.gcfm-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--gcfm-heading);
}

.gcfm-prefooter-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.gcfm-prefooter-title {
  border-left: 1px solid #D6DAE3;
  padding-left: 20px;
  margin: 0;
}

/* Shared pre-footer strip — team design reused on home/about/portfolio */
.gcfm-prefooter-strip-section {
  background-color: #F4F7FC;
  padding-block: 40px;
}

.gcfm-prefooter-strip {
  background: var(--gcfm-white);
  border: 2.5px solid #FFFFFF;
  border-radius: var(--gcfm-radius-lg);
  padding: 28px 40px;
  box-shadow: 0 8px 30px rgba(7, 26, 69, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.gcfm-prefooter-strip-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.gcfm-prefooter-logo-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gcfm-prefooter-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.gcfm-prefooter-strip-divider {
  width: 1px;
  height: 48px;
  background-color: #E2E8F0;
}

.gcfm-prefooter-strip-eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--gcfm-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.gcfm-prefooter-strip-title {
  font-size: clamp(1.45rem, 2.3vw, 1.95rem);
  font-weight: 800;
  color: var(--gcfm-heading);
  margin: 0;
  letter-spacing: -0.015em;
}

.gcfm-prefooter-strip-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Footer */
.gcfm-footer {
  background-color: var(--gcfm-navy-900);
  color: var(--gcfm-white);
  padding-block: 46px 36px;
}

.gcfm-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.1fr 1fr 1.4fr;
  gap: 40px;
  align-items: start;
}

.gcfm-footer-logo {
  height: 90px;
  width: auto;
  object-fit: contain;
  border-radius: var(--gcfm-radius-sm);
  display: inline-block;
}

.gcfm-footer-copyright {
  font-size: 13px;
  color: #99A7C7;
  line-height: 1.6;
  margin: 0;
}

.gcfm-footer-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gcfm-white);
  margin: 0 0 20px 0;
}

.gcfm-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gcfm-footer-link {
  font-size: 14px;
  color: #99A7C7;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.gcfm-footer-link:hover {
  color: var(--gcfm-white);
  transform: translateX(4px);
  text-decoration: none;
}

.gcfm-footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.gcfm-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #D9E3FF;
}

.gcfm-contact-icon {
  width: 18px;
  height: 18px;
  stroke: var(--gcfm-blue);
  flex-shrink: 0;
}

.gcfm-social-links {
  display: flex;
  gap: 12px;
}

.gcfm-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gcfm-white);
  transition: all 0.25s ease;
}

.gcfm-social-btn:hover {
  background-color: var(--gcfm-blue);
  border-color: var(--gcfm-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 86, 210, 0.4);
}

.gcfm-footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 28px;
}

.gcfm-legal-link {
  font-size: 13px;
  color: #99A7C7;
  transition: color 0.2s ease;
}

.gcfm-legal-link:hover {
  color: var(--gcfm-white);
}

/* Responsive Footer Grid Breakdown */
@media (max-width: 1099px) and (min-width: 880px) {
  .gcfm-footer-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 32px 24px;
  }
  .gcfm-footer-grid > div:nth-child(1) { grid-column: span 2; }
  .gcfm-footer-grid > div:nth-child(2) { grid-column: span 1; }
  .gcfm-footer-grid > div:nth-child(3) { grid-column: span 1; }
  .gcfm-footer-grid > div:nth-child(4) { grid-column: span 1; }
  .gcfm-footer-grid > div:nth-child(5) { grid-column: span 1; }
}

@media (max-width: 879px) {
  .gcfm-footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 24px;
  }

  /* Full-width Top Brand Header */
  .gcfm-footer-grid > div:nth-child(1) {
    grid-column: 1 / -1;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
  }

  .gcfm-footer-logo {
    margin: 0 auto 12px auto;
    display: block;
  }

  /* 2x2 Grid Layout for Content Blocks */
  .gcfm-footer-grid > div:nth-child(2) { grid-column: span 1; } /* COMPANY (Top Left) */
  .gcfm-footer-grid > div:nth-child(3) { grid-column: span 1; } /* PORTFOLIO (Top Right) */
  .gcfm-footer-grid > div:nth-child(4) { grid-column: span 1; } /* CONNECT (Bottom Left) */
  .gcfm-footer-grid > div:nth-child(5) { grid-column: span 1; } /* GET IN TOUCH (Bottom Right) */

  .gcfm-footer-grid > div:nth-child(5)::before {
    content: "GET IN TOUCH";
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gcfm-white);
    margin-bottom: 20px;
  }

  .gcfm-footer-bottom {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    text-align: center;
  }
}

@media (max-width: 830px) {
  .gcfm-prefooter-left {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .gcfm-prefooter-title {
    border-left: none;
    padding-left: 0;
  }

  .gcfm-prefooter-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
  }

  .gcfm-prefooter-strip-actions {
    width: 100%;
  }

  .gcfm-prefooter-strip-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .gcfm-prefooter-strip-divider {
    display: none;
  }

  .gcfm-header {
    height: 72px;
    position: sticky;
    padding-inline: 20px;
  }

  .gcfm-header-logo {
    height: 44px;
  }

  .gcfm-header-right {
    gap: 16px;
  }

  .gcfm-nav {
    display: none;
  }

  .gcfm-nav.is-open {
    display: flex !important;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px 28px 32px 28px;
    border-bottom: 1px solid rgba(7, 26, 69, 0.12);
    box-shadow: 0 16px 36px rgba(7, 26, 69, 0.12);
    z-index: 9999;
    animation: gcfmSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .gcfm-nav.is-open .gcfm-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .gcfm-nav.is-open .gcfm-nav-link {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 14px 0;
    border-bottom: 1px solid rgba(7, 26, 69, 0.06);
    color: var(--gcfm-heading);
  }

  .gcfm-nav.is-open .gcfm-nav-link:last-child {
    border-bottom: none;
  }

  .gcfm-mobile-cta-wrapper {
    display: none;
  }

  .gcfm-nav.is-open .gcfm-mobile-cta-wrapper {
    display: block;
    margin-top: 20px;
    width: 100%;
  }

  .gcfm-nav.is-open .gcfm-mobile-cta-wrapper .gcfm-button {
    width: 100%;
    justify-content: center;
    height: 44px;
    display: flex;
  }

  .gcfm-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--gcfm-heading);
    transition: transform 0.2s ease, color 0.2s ease;
  }

  .gcfm-mobile-toggle.is-active {
    transform: rotate(90deg);
    color: var(--gcfm-blue);
  }

  .gcfm-header-cta {
    display: none;
  }
}

@keyframes gcfmSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Legal & Generic Page Hero */
.gcfm-legal-hero {
  background: var(--gcfm-navy-950, #02143F);
  color: var(--gcfm-white, #FFFFFF);
  padding: 48px 0 44px;
  position: relative;
}

.gcfm-legal-hero .gcfm-hero-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gcfm-blue, #2E6BFF);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.gcfm-legal-hero .gcfm-hero-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--gcfm-white, #FFFFFF);
  line-height: 1.2;
  margin: 0 0 12px;
}

.gcfm-legal-hero .gcfm-hero-divider {
  width: 44px;
  height: 3px;
  background: var(--gcfm-blue, #2E6BFF);
  margin-bottom: 12px;
}

.gcfm-legal-hero .gcfm-hero-desc {
  color: var(--gcfm-text-soft-on-dark, #D9E3FF);
  font-size: 16px;
  line-height: 1.6;
  max-width: 640px;
  margin: 0;
}

/* Generic Page Section */
.gcfm-page-section {
  padding: 40px 0 60px;
  background: var(--gcfm-white, #FFFFFF);
}

/* Generic Page Content / Prose (Privacy Policy, Accessibility, etc.) */
.gcfm-page-content {
  color: var(--gcfm-text);
  font-size: 16px;
  line-height: 1.75;
}

.gcfm-page-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gcfm-heading);
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gcfm-border-alt);
}

.gcfm-page-content h2:first-child {
  margin-top: 0;
}

.gcfm-page-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gcfm-heading);
  margin-top: 24px;
  margin-bottom: 12px;
}

.gcfm-page-content p {
  margin-bottom: 16px;
}

.gcfm-page-content ul,
.gcfm-page-content ol {
  margin: 0 0 20px 24px;
  padding: 0;
}

.gcfm-page-content li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.gcfm-page-content a {
  color: var(--gcfm-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.gcfm-page-content a:hover {
  color: var(--gcfm-blue-hover);
}

.gcfm-page-content strong {
  color: var(--gcfm-heading);
  font-weight: 600;
}
