/* Global Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-normal);
  font-size: 1rem;
  line-height: var(--line-height-base);
  color: var(--brand-graphite);
  background-color: var(--brand-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body, p, a, input, select, textarea, button, li, label {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-normal);
}

b, strong, th {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
}

/* Accessibility */
.sr-only, .a11y-menu a:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.a11y-menu a:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  background: #000;
  color: #fff;
  padding: 10px 15px;
  border-radius: 4px;
}

/* Containers - applies to subpage content while preserving AEM responsivegrid layouts */
.subpage-content {
  display: block !important;
  width: 100% !important;
  min-height: 50vh;
}

.subpage-content .container,
.container:not(.responsivegrid):not(.root):not(.meganav):not(.banner-bar) {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.subpage-content .container.styleLarge,
.container.styleLarge:not(.responsivegrid) {
  max-width: var(--container-max-width);
}

.subpage-content .container.styleSmall,
.container.styleSmall:not(.responsivegrid) {
  max-width: var(--container-small-max-width);
}

.container.styleFull {
  max-width: 100%;
  padding-inline: 0;
}

/* Style Background Classes (Original AEM Parity) */
.styleBGWhite { background-color: var(--brand-white) !important; }
.styleBGCream { background-color: var(--brand-linen) !important; }
.styleBGLinen { background-color: var(--brand-linen-dark) !important; }
.styleBGGraphite { background-color: var(--brand-graphite) !important; color: var(--brand-white) !important; }
.styleBGBlue { background-color: var(--brand-navy) !important; color: var(--brand-white) !important; }
.styleBGBrandGradient { background-image: var(--brand-gradient) !important; color: var(--brand-white) !important; }

/* Rounded Utility Classes */
.styleRoundedCorners, .styleRoundedCorners > div {
  border-radius: var(--border-radius-rounded) !important;
}

.styleRoundedCornersLarge, .styleRoundedCornersLarge > div {
  border-radius: var(--border-radius-rounded-lg) !important;
}

/* Typography Hierarchy */
h1, .h1 {
  font-family: var(--font-family-heading);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  color: var(--brand-graphite);
  margin-top: 0;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-family: var(--font-family-heading);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--brand-graphite);
  margin-top: 0;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

h3, .h3 {
  font-family: var(--font-family-heading);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  color: var(--brand-graphite);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

h4, .h4 {
  font-family: var(--font-family-heading);
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  color: var(--brand-graphite);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
  line-height: var(--line-height-relaxed);
}

.lead {
  font-size: 1.2rem;
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  color: var(--brand-graphite-light);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-orange);
  margin-bottom: 0.75rem;
}

/* Links */
a {
  color: var(--brand-orange);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-red);
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-base);
  font-size: 0.9375rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  padding: 0.75rem 1.75rem;
  border-radius: var(--border-radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-gradient);
  background-color: var(--brand-orange);
  color: var(--brand-white) !important;
  border: none;
  box-shadow: 0 4px 12px rgba(237, 32, 36, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(237, 32, 36, 0.35);
  filter: brightness(1.05);
}

.btn-secondary {
  background-color: var(--brand-graphite);
  color: var(--brand-white) !important;
  border: none;
}

.btn-secondary:hover {
  background-color: var(--brand-graphite-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--brand-graphite);
  color: var(--brand-graphite) !important;
}

.btn-outline:hover {
  background-color: var(--brand-graphite);
  color: var(--brand-white) !important;
}

.btn-outline-white {
  background-color: transparent;
  border: 2px solid var(--brand-white);
  color: var(--brand-white) !important;
}

.btn-outline-white:hover {
  background-color: var(--brand-white);
  color: var(--brand-graphite) !important;
}

.btn-outline-orange {
  background-color: transparent;
  border: 2px solid var(--brand-orange);
  color: var(--brand-orange) !important;
}

.btn-outline-orange:hover {
  background-color: var(--brand-orange);
  color: var(--brand-white) !important;
}

/* Color & Alignment Utility Classes (AEM Parity) */
.text-danger, .cmp-title--red h2, .cmp-title--red h3, .cmp-title--red {
  color: var(--brand-red) !important;
}

.text-orange, .cmp-title--orange h2, .cmp-title--orange h3, .cmp-title--orange {
  color: var(--brand-orange) !important;
}

.text-graphite, .cmp-title--graphite h2, .cmp-title--graphite h3, .cmp-title--graphite {
  color: var(--brand-graphite) !important;
}

.cmp-title--center, .text-center {
  text-align: center !important;
}

/* Grid & Flex Utilities */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 991.98px) {
  .grid-cols-3, .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Image helper */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* High Contrast Mode (AEM Parity) */
body.styleHighContrast {
  background-color: #000 !important;
  color: #fff !important;
}

body.styleHighContrast h1, 
body.styleHighContrast h2, 
body.styleHighContrast h3, 
body.styleHighContrast h4, 
body.styleHighContrast h5, 
body.styleHighContrast h6,
body.styleHighContrast p,
body.styleHighContrast span,
body.styleHighContrast li {
  color: #fff !important;
}

body.styleHighContrast a {
  color: #ff8f1c !important;
}

body.styleHighContrast .cmp-teaser-card,
body.styleHighContrast .company-size-card,
body.styleHighContrast .different-card,
body.styleHighContrast .form-card,
body.styleHighContrast .cmp-megamenu-panel,
body.styleHighContrast .cmp-dropdown-menu,
body.styleHighContrast .quote-wrapper {
  background-color: #1a1a1a !important;
  border-color: #fff !important;
  color: #fff !important;
}

/* High Contrast Header / Nav Overrides */
body.styleHighContrast .cmp-meganav {
  background-color: #000 !important;
  border-bottom: 1px solid #444 !important;
}

body.styleHighContrast .cmp-meganav .cmp-nav-btn {
  color: #fff !important;
}

body.styleHighContrast .cmp-meganav__eyebrow {
  background-color: #111 !important;
  border-bottom: 1px solid #333 !important;
}

body.styleHighContrast .cmp-mobile-drawer {
  background-color: #000 !important;
  color: #fff !important;
  border-left: 1px solid #444 !important;
}

body.styleHighContrast .mobile-nav-btn {
  color: #fff !important;
}

/* Sofia Pro Typekit Font Fallbacks and Weight Mapping */
@font-face {
  font-family: 'sofia-pro';
  font-style: normal;
  font-weight: 300;
  src: local('Sofia Pro Light'), local('SofiaPro-Light'), local('Sofia Pro Medium'), local('SofiaPro-Medium');
}

@font-face {
  font-family: 'sofia-pro';
  font-style: normal;
  font-weight: 400;
  src: local('Sofia Pro Regular'), local('SofiaPro-Regular'), local('Sofia Pro Medium'), local('SofiaPro-Medium');
}

@font-face {
  font-family: 'sofia-pro';
  font-style: normal;
  font-weight: 500;
  src: local('Sofia Pro Medium'), local('SofiaPro-Medium');
}

@font-face {
  font-family: 'sofia-pro';
  font-style: normal;
  font-weight: 700;
  src: local('Sofia Pro Bold'), local('SofiaPro-Bold'), local('Sofia Pro Black'), local('SofiaPro-Black');
}

@font-face {
  font-family: 'sofia-pro';
  font-style: normal;
  font-weight: 800;
  src: local('Sofia Pro Extra Bold'), local('SofiaPro-ExtraBold'), local('Sofia Pro Black'), local('SofiaPro-Black');
}

@font-face {
  font-family: 'sofia-pro';
  font-style: normal;
  font-weight: 900;
  src: local('Sofia Pro Black'), local('SofiaPro-Black');
}


