/* Site-wide color palette, shadow, and corner-radius variables reused everywhere below. */
:root {
  --teal: #0a4a3b;
  --teal-strong: #072d25;
  --mint: #9fe1cb;
  --sage: #7fc4ac;
  --mist: #f3f8f6;
  --white: #ffffff;
  --black: #0b1110;
  --ink: #122922;
  --muted: #587a71;
  --line: rgba(10, 74, 59, 0.12);
  --shadow: 0 18px 42px rgba(14, 47, 39, 0.12);
  --radius: 22px;
}

/* Makes padding/border count toward an element's width instead of adding to it. */
* {
  box-sizing: border-box;
}

/* Smooth-scrolls to in-page anchors (e.g. nav links to #services). */
html {
  scroll-behavior: smooth;
}

/* Base page font, background gradient, and text color. */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(180deg, #f8fbfa 0%, #edf4f3 100%);
  color: var(--ink);
}

/* Links inherit text color and drop the underline by default. */
a {
  color: inherit;
  text-decoration: none;
}

/* Images never overflow their container and drop the inline-element gap. */
img {
  max-width: 100%;
  display: block;
}

/* Form controls use the page font instead of the browser default. */
button,
input,
textarea {
  font: inherit;
}

/* Centered content wrapper with a max width and a 20px side gutter — used on every section. */
.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* Standard vertical padding for a full-width page section. */
.section-space {
  padding: 110px 0;
}

/* Small uppercase teal label used above section headings (e.g. "ABOUT US"). */
.eyebrow {
  display: inline-block;
  color: var(--teal);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 18px;
}

/* Spacing below a section's heading block. */
.section-heading {
  margin-bottom: 42px;
}

/* Shared h1/h2 sizing and color for section headings. */
.section-heading h1,
.section-heading h2 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(2.2rem, 2vw + 1.4rem, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.07em;
  color: var(--ink);
}

/* Narrower heading variant for sections with tighter copy. */
.section-heading.narrow h1,
.section-heading.narrow h2 {
  max-width: 620px;
}

/* Supporting paragraph under a section heading. */
.section-heading p {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--muted);
  line-height: 1.8;
}

/* Centered, max-width wrapper for long-form article/body copy (e.g. blog post text). */
.article-body {
  max-width: 680px;
  margin: 40px auto 0;
}

.article-body p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.9;
}

.article-body p:last-child {
  margin-bottom: 0;
}

/* Center-aligned variant of .section-heading (heading, subtext, and children all centered). */
.section-heading.center {
  text-align: center;
}

.section-heading.center h1,
.section-heading.center h2,
.section-heading.center p {
  margin-left: auto;
  margin-right: auto;
}

/* Sticky, frosted-glass site header that stays pinned to the top while scrolling. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(248, 251, 250, 0.8);
  border-bottom: 1px solid rgba(10, 74, 59, 0.08);
}

/* Header row layout: logo on the left, nav in the middle, CTA button on the right. */
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  gap: 20px;
}

/* Logo link container. */
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 220px;
}

/* Logo image sizing — scales with viewport width, capped at 310px. */
.brand-mark {
  width: min(310px, 52vw);
  height: auto;
}

/* Smaller logo variant used in the footer. */
.brand-mark.small {
  width: 220px;
}

/* Horizontal list of top-level nav links. */
.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--ink);
  font-weight: 500;
}

.main-nav > a,
.nav-item > a,
.nav-item > .nav-trigger {
  position: relative;
}

/* "Industries" nav label that opens a dropdown but isn't itself a link. */
.nav-item > .nav-trigger {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  outline: none;
}

/* Animated underline (hidden by default, scales in on hover/focus below) for nav links. */
.main-nav > a::after,
.nav-item > a::after,
.nav-item > .nav-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--teal);
  transition: transform 0.2s ease;
}

/* Reveals the underline above on hover/keyboard focus. */
.main-nav > a:hover::after,
.main-nav > a:focus-visible::after,
.nav-item > a:hover::after,
.nav-item > a:focus-visible::after,
.nav-item > .nav-trigger:hover::after,
.nav-item > .nav-trigger:focus-visible::after {
  transform: scaleX(1);
}

/* Positioning context so its .dropdown child can be placed relative to it. */
.nav-item {
  position: relative;
}

/* Small dropdown arrow (▾) next to "Services"/"Industries". */
.nav-caret {
  display: inline-block;
  margin-left: 3px;
  font-size: 0.65em;
}

/* Flips the arrow upside down while its dropdown is open. */
.nav-item:hover .nav-caret,
.nav-item:focus-within .nav-caret {
  transform: rotate(180deg);
}

/* Dropdown panel: positioned below and centered under its trigger, hidden until hovered/focused. */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 230px;
  padding: 16px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 60;
}

/* Shows the dropdown when hovering or tabbing into its parent .nav-item. */
.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dropdown a {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.dropdown a:hover,
.dropdown a:focus-visible {
  background: var(--mist);
  color: var(--teal);
}

/* Base pill-shaped button shared by primary/secondary variants. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  transition: 0.2s ease;
  cursor: pointer;
}

/* Slight lift on hover/focus for any button. */
.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

/* Solid teal-gradient "main action" button (e.g. "Book a Consultation"). */
.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--teal) 0%, #0e6d59 100%);
  box-shadow: var(--shadow);
}

/* Outlined, transparent "secondary action" button. */
.btn-secondary {
  background: transparent;
  color: var(--teal);
  border-color: rgba(10, 74, 59, 0.24);
}

/* Homepage hero section vertical padding. */
.hero {
  padding: 48px 0 64px;
}

/* Centered, max-width text column used by hero and CTA-style sections. */
.hero-centered {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
}

.hero-centered h1 {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 2.8vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.07em;
  color: var(--ink);
}

/* Small teal tagline shown above/below a hero heading. */
.hero-subheading {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--teal);
}

.hero-centered > p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

/* Row of CTA buttons under the hero heading, wraps on small screens. */
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* Row of short trust badges under the hero CTAs (e.g. "24/7 monitoring"). */
.trust-list {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 0;
  margin: 20px 0 0;
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 600;
}

.trust-list li {
  position: relative;
  padding-left: 18px;
}

/* Small mint dot bullet before each trust-list item. */
.trust-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
}

/* 3-column row of small service preview cards inside the hero. */
.hero-services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.hero-service-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(18, 41, 34, 0.04);
}

.hero-service-card h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.05em;
}

/* "Explore Services →" link below the hero service cards. */
.hero-services-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-weight: 600;
  color: var(--teal);
}

/* Width cap for the hero's decorative dashboard/status panel graphic. */
.panel-main {
  width: min(100%, 540px);
  padding: 28px 28px 22px;
}

.panel-topline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

/* Small glowing status dot in the dashboard panel. */
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2ad49d, var(--teal));
  box-shadow: 0 0 0 5px rgba(34, 212, 157, 0.18);
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-top: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

/* Small uppercase muted labels used across the dashboard panel. */
.status-row small,
.mini-block span,
.muted-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* Large stat number in the dashboard panel. */
.status-row strong {
  display: block;
  font-size: clamp(2.1rem, 2vw, 3rem);
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--ink);
}

/* Rounded status/label pill (e.g. a green "Secure" badge). */
.pill {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(22, 194, 128, 0.12);
  color: #0b7a59;
}

/* 2-column grid of small stat blocks inside the dashboard panel. */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.mini-block {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 18px;
}

.mini-block strong {
  display: block;
  margin-top: 8px;
  font-size: 1.6rem;
  letter-spacing: -0.05em;
  color: var(--ink);
}

/* "Trusted by..." strip directly under the hero. */
.partners {
  padding: 18px 0 0;
}

.partners-inner {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 500;
}

/* Row of plain-text "logos" in the partners strip. */
.partner-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

/* 2-column grid of pain-point items on the homepage "Challenges" section. */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 48px;
  max-width: 920px;
  margin: 0 auto;
}

.pain-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

/* Makes the summary paragraph span both grid columns and adds space above it, since it sits as
   an extra item inside .pain-grid rather than its own row. */
.pain-grid .hero-centered {
  grid-column: 1 / -1;
  margin-top: 20px;
}

/* Circular "!" icon badge on each pain-point item. */
.pain-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(10, 74, 59, 0.1);
  color: var(--teal);
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
}

.pain-item p {
  margin: 0;
  padding-top: 4px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.7;
}

/* Faint green-tinted background wash used on alternating sections for visual rhythm. */
.accent-block {
  background: linear-gradient(180deg, rgba(159, 225, 203, 0.18), rgba(255, 255, 255, 0.2));
}

/* 3-column grid of homepage "What we do" service cards. */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.service-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 12px 32px rgba(18, 41, 34, 0.04);
}

/* Numbered square icon badge (e.g. "01") on service/feature cards. */
.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(10, 74, 59, 0.08);
  color: var(--teal);
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
}

.service-card h3 {
  margin: 18px 0 12px;
  font-size: 1.45rem;
  letter-spacing: -0.05em;
}

/* Shared muted body-text styling reused across several different card types. */
.service-card p,
.feature-item p,
.timeline-step p,
.contact p {
  color: var(--muted);
  line-height: 1.8;
}

/* 4-column grid of "Why ConfigWorld" feature cards. */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.feature-item {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 22px;
}

.feature-item h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  letter-spacing: -0.05em;
}

/* 4-column grid of numbered process steps (e.g. Assess/Plan/Implement/Optimize). */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.timeline-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 22px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 20px;
}

/* Numbered square badge (1, 2, 3…) on each timeline step. */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(10, 74, 59, 0.08);
  color: var(--teal);
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
}

.timeline-step h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

/* 3-column grid of blog post preview cards. */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 18px rgba(15, 35, 31, 0.04);
}

.blog-date {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.blog-card h3 {
  margin: 12px 0 10px;
  font-size: 1.3rem;
  letter-spacing: -0.05em;
}

.blog-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.blog-card-link {
  margin-top: 18px;
  font-weight: 700;
  color: var(--teal);
}

/* Two-column layout for the "About Us" section: copy on the left, photo on the right. */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.about-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 1.6vw + 1.4rem, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.06em;
  color: var(--ink);
}

.about-copy p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
}

.about-copy p:last-of-type {
  margin-bottom: 26px;
}

/* Fixed-size rounded frame that crops the About Us photo to a consistent box. */
.about-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  max-width: 360px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Fills its frame and crops (rather than stretching) via object-fit: cover. */
.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Two-column layout for the Contact section: info on the left, form on the right. */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  align-items: center;
}

.contact h2 {
  margin: 0 0 14px;
  font-size: clamp(2.3rem, 2vw + 1.2rem, 3.3rem);
  line-height: 1.07;
  letter-spacing: -0.07em;
}

/* Bullet-less list of short contact/reassurance points. */
.contact-points {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 10px;
  color: var(--ink);
  font-weight: 500;
}

/* Card wrapper around the contact form. */
.contact-form {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
}

/* Side-by-side layout for paired form fields (e.g. Name + Business name). */
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 18px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(10, 74, 59, 0.14);
  border-radius: 14px;
  background: #f7fbfa;
  padding: 16px 14px;
  color: var(--ink);
  resize: vertical;
}

/* Focus ring/border on form fields. */
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(10, 74, 59, 0.15);
  border-color: rgba(10, 74, 59, 0.24);
}

/* Dark teal footer background and default (semi-transparent white) text color. */
.site-footer {
  background: var(--teal-strong);
  color: rgba(255, 255, 255, 0.68);
  padding-top: 64px;
}

/* Top footer row: logo on the left, blurb on the right, wraps on narrow screens. */
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 44px;
}

/* Recolors the (dark-drawn) logo SVG to solid white for the dark footer background. */
.footer-top .brand-mark {
  filter: brightness(0) invert(1);
}

.footer-top p {
  margin: 0;
  max-width: 560px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.68);
}

/* Thin translucent divider line between footer bands. */
.footer-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin: 0;
}

/* 4-column layout for the footer's link columns (Quick Links / Services / Industries / Contact). */
.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  padding: 44px 0;
}

.footer-col h3 {
  margin: 0 0 18px;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--white);
}

.footer-col a,
.footer-col span {
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.68);
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--mint);
}

/* Bold label line above a value in the footer Contact column (e.g. "Phone"). */
.footer-col .footer-label {
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--white);
}

/* Bottom copyright bar. */
.footer-bottom {
  padding: 26px 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Tablet breakpoint: collapse most 3/4-column grids to 2 columns, some to 1, and hide the
   desktop nav (no mobile menu is built yet, so links are simply hidden below this width). */
@media (max-width: 980px) {
  .contact-grid,
  .about-grid,
  .service-grid,
  .timeline,
  .blog-grid,
  .feature-grid,
  .pain-grid,
  .hero-services {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
  }

  .main-nav {
    display: none;
  }
}

/* Phone breakpoint: reduce section padding, stack grids to a single column, and full-width
   buttons/footer columns. */
@media (max-width: 680px) {
  .section-space {
    padding: 82px 0;
  }

  .nav-wrap {
    min-height: 74px;
  }

  .btn {
    width: 100%;
  }

  .hero-actions,
  .field-row,
  .service-grid,
  .feature-grid,
  .timeline,
  .blog-grid,
  .pain-grid,
  .hero-services {
    grid-template-columns: 1fr;
    display: grid;
  }

  .partner-logos {
    justify-content: center;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-columns {
    grid-template-columns: 1fr;
  }
}
