/* Layout chrome — prevent overlapping sticky/fixed UI */

:root {
  --header-h: 72px;
  --chrome-top: var(--header-h);
  --mobile-bar-h: 64px;
  /* Tighter vertical rhythm — was clamp(48px, 8vw, 80px) and often applied 2–3× */
  --space-section-y: clamp(36px, 4.5vw, 56px);
}

html {
  /* Match footer so overscroll never flashes white */
  background: var(--gb-obsidian, #0B1215);
  height: 100%;
}

#header {
  top: 0 !important;
  z-index: 10010 !important;
}

body {
  padding-top: var(--chrome-top);
  padding-bottom: 0 !important;
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--gb-obsidian, #0B1215);
  color: #0B1215;
}

/* Mobile action-bar clearance is absorbed into the footer (below) */
@media (max-width: 900px) {
  body.has-mobile-bar,
  body.page-signup.has-mobile-bar {
    padding-bottom: 0 !important;
  }
}

/* Sticky footer shell */
#wrapper {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #ffffff;
  min-height: calc(100dvh - var(--chrome-top));
  overflow-x: clip;
}

#wrapper::after {
  display: none !important;
  content: none !important;
}

/* Subpages without #wrapper: push footer down with flex children */
body > header,
body > .skip-link {
  flex: 0 0 auto;
}

body > main,
#wrapper > main,
main#content,
.subpage-main {
  flex: 1 0 auto;
  margin-bottom: 0;
  padding-bottom: 0;
  background: #ffffff;
  width: 100%;
}

/* Pages that skip #wrapper still need a white content plane */
body > header.subpage-header,
body > header#site-header {
  background: #ffffff;
}

#landing-footer,
body > #landing-footer,
#wrapper > #landing-footer {
  margin-top: auto;
  margin-bottom: 0;
  flex: 0 0 auto;
  width: 100%;
  padding: 40px 24px 28px !important;
  background: var(--gb-obsidian, #0B1215);
  clear: both;
  position: relative;
  z-index: 1;
  transform: none !important;
  opacity: 1 !important;
}

#landing-footer .footer-container {
  gap: 28px 32px;
}

#landing-footer .footer-tagline {
  margin: 12px 0 16px;
}

#landing-footer .footer-links-group h4 {
  margin-bottom: 12px;
}

#landing-footer .footer-links-group .footer-nav {
  gap: 8px;
}

/* Absorb mobile action-bar clearance into the dark footer (no white strip) */
@media (max-width: 900px) {
  body.has-mobile-bar {
    padding-bottom: 0 !important;
  }

  body.has-mobile-bar #landing-footer {
    padding-bottom: calc(28px + var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.page-signup.has-mobile-bar #landing-footer {
    padding-bottom: 28px !important;
  }
}

/* Fixed UI chrome sits outside the document flow */
body > .mobile-action-bar,
body > .consent-banner,
body > .scroll-top-btn {
  flex: 0 0 auto;
}

.subpage-main {
  padding-top: 32px !important;
}

/* Kill stacked section padding — keep a single rhythm on .row */
.divisions-section,
.ai-section,
.consulting-section,
.solutions-section,
.cta-section,
.process-section,
.social-proof-section,
#pricing,
#services {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0;
}

.divisions-section .row,
.ai-section .row,
.consulting-section .row,
.solutions-section .row,
.cta-section .row,
.process-section .row,
.social-proof-section .row,
#pricing .row,
#services .row {
  padding-top: var(--space-section-y) !important;
  padding-bottom: var(--space-section-y) !important;
  padding-left: 24px;
  padding-right: 24px;
  max-width: var(--gb-max-width, 1200px);
  box-sizing: border-box;
}

body.page-signup .mobile-action-bar {
  display: none !important;
}

.consent-banner {
  z-index: 10030;
}

@media (max-width: 900px) {
  body.has-mobile-bar .consent-banner {
    bottom: calc(var(--mobile-bar-h) + 10px + env(safe-area-inset-bottom, 0px));
  }
}

body.page-signup .consent-banner {
  bottom: 12px;
}

.scroll-top-btn {
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 10005;
}

@media (max-width: 900px) {
  body.has-mobile-bar .scroll-top-btn {
    bottom: calc(var(--mobile-bar-h) + 16px + env(safe-area-inset-bottom, 0px));
  }
}

body.page-signup .scroll-top-btn {
  bottom: 24px;
}

#nav-mobile {
  z-index: 10015;
}

nav#nav-mobile ul {
  max-height: calc(100vh - var(--chrome-top) - 16px);
  overflow-y: auto;
}

.mobile-action-bar {
  z-index: 10000;
}

/* Signup form polish */
.signup-hero {
  padding: 24px 20px 48px;
}

.contact-form-box {
  max-width: 560px;
  padding: 32px 28px;
  border: 1px solid rgba(11, 18, 21, 0.08);
  box-shadow: 0 8px 28px rgba(11, 18, 21, 0.06);
}

.contact-form-box .section-heading {
  margin-bottom: 24px;
}

.contact-form-box .section-heading .section-title {
  margin-bottom: 8px;
}

.form-field select,
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="url"],
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0B1215;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230B1215' d='M1.4 0.6L6 5.2 10.6 0.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  padding-right: 40px;
  cursor: pointer;
}

.form-field select:focus,
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--gb-career-accent, #013e37);
  box-shadow: 0 0 0 3px rgba(1, 62, 55, 0.12);
  outline: none;
}

body:not(.theme-career) .form-field select:focus,
body:not(.theme-career) .form-field input:focus,
body:not(.theme-career) .form-field textarea:focus {
  border-color: var(--gb-consulting-accent, #000055);
  box-shadow: 0 0 0 3px rgba(0, 0, 85, 0.12);
}

.signup-resume-block {
  margin-top: 20px;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.consent-checks {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  margin-bottom: 8px;
  gap: 14px;
}

.consent-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.consent-check input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--gb-career-accent, #013e37);
}

.consent-check:has(input:checked) {
  border-color: rgba(1, 62, 55, 0.35);
  background: rgba(1, 62, 55, 0.05);
}

.button-full {
  margin-top: 16px;
  min-height: 48px;
  border-radius: 10px;
}

.form-error-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #9f1239;
}

.form-success-box {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 28px 24px;
}

.back-to-home {
  color: var(--gb-career-accent, #013e37);
}

body:not(.theme-career) .back-to-home {
  color: var(--gb-consulting-accent, #000055);
}

/* Subpage section headings — less air below title blocks */
.section-heading-centered {
  margin-bottom: 28px;
}

.careers-hero,
.careers-cta {
  padding-top: var(--space-section-y);
  padding-bottom: var(--space-section-y);
}

.careers-cta {
  padding-top: 24px;
}

.jobs-list {
  padding-bottom: 8px;
}

/* Subpages: replace legacy 75px row padding with the shared rhythm */
.subpage-main > section .row,
.subpage-main > .row,
.contact-form-wrapper .row {
  padding-top: var(--space-section-y) !important;
  padding-bottom: var(--space-section-y) !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

.contact-form-wrapper {
  padding-top: var(--space-section-y) !important;
  padding-bottom: var(--space-section-y) !important;
}

.big-padding-top,
.big-padding-bottom {
  padding-top: var(--space-section-y) !important;
  padding-bottom: var(--space-section-y) !important;
}
