/* Critical above-the-fold CSS */
:root {
  --navy: #0f172a;
  --navy-mid: #172033;
  --navy-soft: #1e293b;
  --ink: #0b1220;
  --white: #ffffff;
  --paper: #f7f6f3;
  --gray: #f0efec;
  --gray-mid: #ddd9d2;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-glow: #14b8a6;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --text: #3d4553;
  --text-muted: #4b5563;
  --font-display: "Outfit", system-ui, sans-serif;
  --font: "Source Sans 3", system-ui, sans-serif;
  --radius: 0.35rem;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.08);
  --max: 70rem;
  --measure: 65ch;
  --measure-wide: min(70ch, 100%);
  --text-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --lead-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --text-leading: 1.65;
  --h1-size: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  --h2-size: clamp(1.5rem, 1.25rem + 1.2vw, 2.35rem);
  --h3-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.35rem);
  --h4-size: clamp(1.05rem, 1rem + 0.2vw, 1.2rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  -webkit-hyphens: none;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-size);
  color: var(--text);
  background: var(--paper);
  line-height: var(--text-leading);
  text-align: start;
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Comfortable reading length + wrapping on phone → laptop → desktop */
p,
li,
dd,
blockquote,
.lead,
.prose,
.faq-item .faq-body,
.service-card p,
.team-card p,
.panel p,
.step p,
.testimonial blockquote p,
.footer-brand p,
.cta-band p {
  overflow-wrap: break-word;
  word-break: normal;
  word-wrap: break-word;
  text-wrap: pretty;
  hyphens: none;
  -webkit-hyphens: none;
}

p {
  max-width: var(--measure);
  margin-top: 0;
  margin-bottom: 1.25rem;
  line-height: var(--text-leading);
  hyphens: none;
  -webkit-hyphens: none;
}

p:last-child {
  margin-bottom: 0;
}

main p,
.split p,
.section-head p,
.panel p,
.prose p,
.faq-item .faq-body p,
.check-list {
  max-width: var(--measure);
}

/* Cards / CTA / footer / hero stay full-width so layouts don't look skinny */
.service-card p,
.team-card p,
.cta-band p,
.footer-brand p,
.hero .lead,
.page-hero .lead,
.form-note,
.download-note {
  max-width: none;
}

/* Typography utilities */
.no-wrap {
  white-space: nowrap;
}

.text-balance {
  text-wrap: balance;
}

body::before { display: none; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal-dark);
  transition: opacity 0.15s var(--ease);
}

a:hover {
  color: var(--teal);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* -- Header (same pattern as Endpoint Tech Blog) -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 4.25rem;
}

.navbar {
  position: relative;
  background: #0b1220;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header.is-scrolled .navbar,
.site-header.is-nav-open .navbar {
  background: #0b1220;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--white);
  line-height: 1.15;
}

.logo-mark {
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  border-radius: 0.3rem;
  background: linear-gradient(145deg, #0d9488 0%, #0f766e 55%, #134e4a 100%);
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: -0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.logo-img {
  width: 2.65rem;
  height: 2.65rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  background: transparent;
}

.logo-img-footer {
  width: 3.1rem;
  height: 3.1rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.logo-tag {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.05rem;
}

.nav-desktop > a,
.nav-dropdown-toggle {
  color: #b8c0cc;
  text-decoration: none;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-desktop > a:hover,
.nav-desktop > a[aria-current="page"],
.nav-dropdown.is-active > .nav-dropdown-toggle,
.nav-dropdown-toggle:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  min-width: 14rem;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  background: #141c2b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.45rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  z-index: 60;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
  animation: menuIn 0.2s var(--ease);
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-dropdown-menu a {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border-radius: 0.3rem;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current="page"] {
  color: var(--white);
  background: rgba(13, 148, 136, 0.18);
}

.header-cta {
  display: none;
  align-items: center;
  gap: 0.85rem;
}

.header-phone {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.header-phone:hover {
  color: var(--teal-glow);
}

.btn-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 70;
  width: 2.85rem;
  height: 2.85rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  color: var(--white);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-menu:hover,
.btn-menu:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.btn-menu:focus-visible {
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.45);
}

.btn-menu-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 1.2rem;
  pointer-events: none;
}

.btn-menu-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.22s var(--ease), opacity 0.18s ease;
  transform-origin: center;
}

.btn-menu[aria-expanded="true"] .btn-menu-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.btn-menu[aria-expanded="true"] .btn-menu-bars span:nth-child(2) {
  opacity: 0;
}

.btn-menu[aria-expanded="true"] .btn-menu-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0b1220;
  max-height: min(70vh, 28rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile-inner {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.15rem 1.35rem;
  gap: 0.15rem;
  width: 100%;
}

.nav-mobile a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.85rem 0.65rem;
  border-radius: 0.35rem;
  border-bottom: none;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-mobile a:hover,
.nav-mobile a[aria-current="page"] {
  color: var(--teal-glow);
  background: rgba(20, 184, 166, 0.1);
}

.mobile-nav-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0.15rem 0;
}

.mobile-nav-group summary {
  list-style: none;
  cursor: pointer;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.85rem 0.65rem;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 0.35rem;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-group summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-group summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
  margin-top: -0.2rem;
}

.mobile-nav-group[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.mobile-nav-group summary:hover,
.mobile-nav-group[open] summary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav-sub {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0 0.35rem 0.35rem;
}

.mobile-nav-sub a {
  font-size: 0.98rem;
  font-weight: 600;
  color: #cbd5e1;
  justify-content: center;
  padding: 0.7rem 0.65rem;
}

.nav-mobile-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-mobile-cta .btn {
  width: 100%;
  max-width: 18rem;
  justify-content: center;
}

.nav-mobile .mobile-phone {
  margin-top: 0;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--teal-glow);
  border: none;
  justify-content: center;
}

body.nav-open {
  overflow: hidden;
}

/* Mobile / tablet — match Endpoint Tech Blog navbar behavior */
@media (max-width: 1099px) {
  .navbar {
    background: #0b1220;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-header.is-scrolled .navbar,
  .site-header.is-nav-open .navbar {
    background: #0b1220;
  }

  .header-inner {
    flex-wrap: nowrap;
  }

  .btn-menu {
    margin-left: auto;
    flex-shrink: 0;
  }

  .nav-mobile.is-open {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #0b1220;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 60;
    max-height: min(70vh, 28rem);
  }

  .hero-media img {
    transform: none !important;
    animation: none !important;
  }
}

@media (min-width: 1100px) {
  .nav-desktop {
    display: flex;
  }
  .header-cta {
    display: flex;
  }
  .btn-menu {
    display: none;
  }
  .nav-mobile {
    display: none !important;
  }
}

/* -- Buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.45rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.15s, box-shadow 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--orange-dark);
  color: var(--white);
  border-color: var(--orange-dark);
  box-shadow: 0 8px 24px rgba(194, 65, 12, 0.28);
}

.btn-primary:hover {
  background: #9a3412;
  border-color: #9a3412;
  color: var(--white);
  box-shadow: 0 10px 28px rgba(154, 52, 18, 0.35);
}

.btn-teal {
  background: var(--teal-dark);
  color: var(--white);
  border-color: var(--teal-dark);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.28);
}

.btn-teal:hover {
  background: #115e59;
  border-color: #115e59;
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* -- Layout -- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: clamp(1.1rem, 3.5vw, 1.5rem);
  padding-right: clamp(1.1rem, 3.5vw, 1.5rem);
}

.section {
  padding: clamp(3.25rem, 6vw, 4.75rem) 0;
}

.section-lg {
  padding: clamp(3.75rem, 7vw, 5.75rem) 0;
}

.section-gray {
  background: var(--gray);
}

.section-navy {
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(13, 148, 136, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(234, 88, 12, 0.08), transparent),
    var(--navy);
  color: #d4dae3;
}

.section-ridge {
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--gray) 100%);
  position: relative;
  overflow: hidden;
}

.section-ridge::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 4.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath fill='%230f172a' d='M0 48c120-28 240-48 360-40 180 12 240 56 420 52 140-3 220-40 360-48 100-5 200 8 300 28v40H0z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
  opacity: 0.06;
  pointer-events: none;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 0.85rem;
}

.section-navy .eyebrow {
  color: #5eead4;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 1.18;
  margin: 0 0 0.9rem;
  font-weight: 700;
  text-wrap: balance;
  overflow-wrap: break-word;
  word-break: break-word;
}

.section-navy h1,
.section-navy h2,
.section-navy h3,
.section-navy h4 {
  color: var(--white);
}

h1 {
  font-size: var(--h1-size);
  font-weight: 800;
  line-height: 1.14;
}

h2 {
  font-size: var(--h2-size);
  line-height: 1.2;
}

h3 {
  font-size: var(--h3-size);
  letter-spacing: -0.025em;
  line-height: 1.3;
}

h4 {
  font-size: var(--h4-size);
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.lead {
  font-size: var(--lead-size);
  color: var(--text-muted);
  max-width: var(--measure);
  margin: 0 0 1.35rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  word-break: break-word;
  text-wrap: pretty;
}

.section-navy .lead {
  color: #94a3b8;
}

.text-center {
  text-align: center;
}

.text-center .lead {
  margin-left: auto;
  margin-right: auto;
}

.text-center > p {
  margin-left: auto;
  margin-right: auto;
}

.text-center > p:not(.lead) {
  max-width: none;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

/* -- Hero -- */
.hero {
  position: relative;
  z-index: 0;
  min-height: min(92vh, 780px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  background: var(--ink);
  overflow: hidden;
  contain: layout style;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media picture,
.hero-media img {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-media img {
  object-fit: cover;
  object-position: center 45%;
  transform: none;
  animation: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(11, 18, 32, 0.94) 0%, rgba(11, 18, 32, 0.78) 42%, rgba(11, 18, 32, 0.35) 100%),
    linear-gradient(to top, rgba(11, 18, 32, 0.9) 0%, transparent 42%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 3.5rem 0 3rem;
  contain: layout style;
}

@media (min-width: 769px) {
  section.hero {
    height: 780px;
    min-height: 780px;
    max-height: 780px;
  }

  .hero-content {
    padding: 4.25rem 0 3rem;
  }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 800;
  color: #5eead4;
  margin: 0 0 1.1rem;
  letter-spacing: -0.04em;
}

.hero h1 {
  color: var(--white);
  max-width: 14ch;
  margin-bottom: 1.15rem;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.hero h1 .no-break {
  white-space: nowrap;
}

.hero .lead {
  color: #c5ced9;
  max-width: min(32rem, 100%);
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.18rem);
  line-height: 1.65;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.85rem;
}

.hero-locale {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.page-hero {
  background:
    radial-gradient(ellipse 70% 80% at 90% -10%, rgba(13, 148, 136, 0.28), transparent 50%),
    radial-gradient(ellipse 45% 50% at -5% 110%, rgba(234, 88, 12, 0.12), transparent 45%),
    linear-gradient(145deg, #0b1220 0%, #172033 55%, #0f3d3a 120%);
  padding: 3.75rem 0 3.25rem;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.35), transparent);
}

.page-hero .container {
  position: relative;
}

.page-hero h1 {
  color: var(--white);
  max-width: 18ch;
}

.page-hero .lead {
  color: #9aa6b5;
  max-width: min(36rem, 100%);
  line-height: 1.65;
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .hero {
    justify-content: flex-end;
    min-height: calc(100vh - 4.25rem);
    min-height: calc(100svh - 4.25rem);
    height: calc(100vh - 4.25rem);
    height: calc(100svh - 4.25rem);
    max-height: calc(100vh - 4.25rem);
    max-height: calc(100svh - 4.25rem);
  }

  .hero-content {
    padding: 1.15rem 0 1.35rem;
  }

  .hero-content,
  .hero-content .container {
    text-align: center;
  }

  .hero-brand {
    font-size: 1.2rem;
    margin: 0 0 0.45rem;
  }

  .hero h1,
  .hero .lead {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(1.35rem, 6.2vw, 1.75rem);
    line-height: 1.18;
    margin-bottom: 0.55rem;
    hyphens: none;
    -webkit-hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
  }

  .hero .lead {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .hero-ctas {
    justify-content: center;
    margin-top: 0.9rem;
    gap: 0.5rem;
  }

  .hero .btn {
    padding: 0.7rem 1.05rem;
    font-size: 0.88rem;
  }

  .hero-locale {
    margin-top: 0.85rem;
    font-size: 0.75rem;
    line-height: 1.35;
    letter-spacing: 0.01em;
    hyphens: none;
    -webkit-hyphens: none;
  }
}
