/* =========================================================
   APEX MANUFACTURING COMPANY — CORE STYLESHEET
   Design tokens derived from the Apex logo (navy / slate / steel).
   ========================================================= */

:root {
  --primary: #1E3A52;
  --primary-dark: #142838;
  --secondary: #56697D;
  --accent: #8FA0AD;
  --accent-light: #C7D0D8;
  --text: #1B2733;
  --muted: #5C6B78;
  --light: #F4F6F8;
  --border: #E2E6EA;
  --background: #FFFFFF;

  --font-body: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;

  --container: 1280px;
  --radius: 4px;
  --shadow-sm: 0 1px 3px rgba(20, 40, 56, 0.08);
  --shadow-md: 0 8px 24px rgba(20, 40, 56, 0.10);
  --shadow-lg: 0 20px 48px rgba(20, 40, 56, 0.16);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 180ms;
  --dur-med: 320ms;
  --dur-slow: 560ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 800; line-height: 1.2; color: var(--primary); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

h1 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.6rem); }
h2 { font-size: clamp(1.6rem, 1.35rem + 1.2vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 10000;
  border-radius: var(--radius);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

section { padding: clamp(48px, 6vw, 96px) 0; }
.section-light { background: var(--light); }
.section-dark { background: var(--primary); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.75em;
}
.section-dark .eyebrow { color: var(--accent-light); }

.section-head {
  max-width: 720px;
  margin: 0 0 3rem;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-dark .section-head p { color: #C7D3DB; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.9em 1.8em;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: #fff; color: var(--primary); }
.btn-accent:hover { background: var(--light); }
.btn-outline { border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-outline-dark { border-color: var(--primary); color: var(--primary); }
.btn-outline-dark:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 0.6em 1.3em; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background var(--dur-med) var(--ease), padding var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}
.site-header.is-overlay { background: linear-gradient(to bottom, rgba(10,20,30,0.55), rgba(10,20,30,0)); }
.site-header.is-solid,
.site-header.is-scrolled {
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; }
.brand img {   /* height: 42px; */height: 60px;   width: auto; transition: opacity var(--dur-fast); }
.site-header.is-overlay:not(.is-scrolled) .brand .logo-dark { display: none; }
.site-header.is-overlay:not(.is-scrolled) .brand .logo-light { display: block; }
.brand .logo-light { display: none; }
.site-header.is-solid .brand .logo-light,
.site-header.is-scrolled .brand .logo-light { display: none; }
.site-header.is-solid .brand .logo-dark,
.site-header.is-scrolled .brand .logo-dark { display: block; }

.main-nav { display: none; }
@media (min-width: 1024px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: 2.1rem;
  }
}
.main-nav > ul { display: flex; align-items: center; gap: 2.1rem; }
.main-nav a.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
  padding: 8px 0;
  position: relative;
}
.site-header.is-overlay:not(.is-scrolled) .main-nav a.nav-link { color: #fff; }
.main-nav a.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: right var(--dur-fast) var(--ease);
}
.main-nav a.nav-link:hover::after,
.main-nav a.nav-link.active::after,
.main-nav li:hover > a.nav-link::after,
.main-nav li.open > a.nav-link::after { right: 0; }
.main-nav a.nav-link.active { color: var(--primary); }
.site-header.is-overlay:not(.is-scrolled) .main-nav a.nav-link.active { color: #fff; }

.nav-item-products { position: static; }
.nav-caret { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); display: inline-block; margin-left: 6px; transition: transform var(--dur-fast) var(--ease); vertical-align: 2px; }
.nav-item-products.open .nav-caret { transform: rotate(-135deg); }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-actions .btn-primary { background: var(--accent-light); color: var(--primary-dark); }
.header-actions .btn-primary:hover { background: #fff; }
.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(140,150,160,0.4);
  border-radius: var(--radius);
  align-items: center;
}
@media (min-width: 1024px) { .hamburger { display: none; } }
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.site-header.is-overlay:not(.is-scrolled) .hamburger span { background: #fff; }
.site-header.is-overlay:not(.is-scrolled) .hamburger { border-color: rgba(255,255,255,0.4); }
.mobile-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-open .hamburger span:nth-child(2) { opacity: 0; }
.mobile-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mega menu ---------- */
.mega-panel {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  box-shadow: var(--shadow-lg);
  border-top: 3px solid var(--primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease), visibility var(--dur-med);
}
.nav-item-products.open .mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.mega-col .mega-title {
  font-weight: 800;
  line-height: 1.2;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.mega-col ul li { margin-bottom: 4px; }
.mega-col ul li a {
  display: block;
  padding: 7px 8px;
  margin: 0 -8px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--text);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), padding-left var(--dur-fast) var(--ease);
}
.mega-col ul li a:hover, .mega-col ul li a:focus-visible {
  background: var(--light);
  color: var(--primary);
  padding-left: 14px;
}
.mega-footer {
  border-top: 1px solid var(--border);
  background: var(--light);
  padding: 18px 24px;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.mega-footer a {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mega-footer a:hover { color: var(--secondary); }

/* ---------- Mobile nav drawer ---------- */
.mobile-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(360px, 88vw);
  background: #fff;
  z-index: 1100;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform var(--dur-med) var(--ease);
  overflow-y: auto;
  padding: 20px;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.mobile-drawer-close { background: none; border: none; font-size: 1.6rem; line-height: 1; color: var(--primary); padding: 8px; }
.mobile-nav-list > li { border-bottom: 1px solid var(--border); }
.mobile-nav-list > li > a, .mobile-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  width: 100%;
  background: none;
  border: none;
  text-align: left;
}
.mobile-accordion-trigger .nav-caret { transition: transform var(--dur-fast) var(--ease); }
.mobile-accordion-trigger[aria-expanded="true"] .nav-caret { transform: rotate(-135deg); }
.mobile-accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-med) var(--ease);
}
.mobile-accordion-panel .mega-sub { padding: 4px 4px 18px 12px; }
.mobile-accordion-panel .mega-title {
  font-weight: 800;
  line-height: 1.2;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 14px 0 6px;
}
.mobile-accordion-panel ul li a {
  display: block;
  padding: 9px 0;
  font-size: 0.94rem;
  color: var(--text);
  border-bottom: 1px dashed var(--border);
}
.mobile-drawer .cta-row { margin-top: 24px; flex-direction: column; }
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,18,26,0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease), visibility var(--dur-med);
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }

/* ---------- Hero slider ---------- */
.hero-slider {
  position: relative;
  height: clamp(560px, 92vh, 800px);
  overflow: hidden;
  background: var(--primary-dark);
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 900ms var(--ease);
  display: flex;
  align-items: center;
}
.hero-slide.active { opacity: 1; visibility: visible; z-index: 2; }
.hero-slide-bg {
  position: absolute; inset: 0;
  /* background-size: cover; */background-size: cover !important;
  background-position: center;
  transform: scale(1.08);
  transition: transform 7s linear;
}
.hero-bg-1 {
  background:
    repeating-linear-gradient(115deg, rgba(143,160,173,0.10) 0px, rgba(143,160,173,0.10) 2px, transparent 2px, transparent 64px),
    radial-gradient(circle at 82% 22%, rgba(143,160,173,0.22), transparent 46%),
    linear-gradient(120deg, #0F2334 0%, #1E3A52 55%, #2C4A64 100%);
}
.hero-bg-2 {
  background:
    radial-gradient(1.6px 1.6px at center, rgba(199,208,216,0.35) 1.2px, transparent 1.3px) 0 0/26px 26px,
    linear-gradient(135deg, #14283A 0%, #1E3A52 50%, #17303F 100%);
}
.hero-bg-3 {
  background:
    repeating-linear-gradient(-60deg, rgba(255,255,255,0.05) 0 3px, transparent 3px 46px),
    radial-gradient(circle at 18% 78%, rgba(143,160,173,0.20), transparent 50%),
    linear-gradient(100deg, #17303F 0%, #23425C 60%, #0F2334 100%);
}
.hero-slide.active .hero-slide-bg { transform: scale(1); }
.hero-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,20,30,0.82) 0%, rgba(10,20,30,0.55) 55%, rgba(10,20,30,0.4) 100%);
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 680px;
  color: #fff;
  padding: 0 24px;
  margin: 0 auto;
  width: 100%;
  max-width: var(--container);
}
.hero-content-inner { max-width: 640px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1.2em;
  opacity: 0;
  transform: translateY(16px);
}
.hero-eyebrow::before { content:""; width: 32px; height: 2px; background: var(--accent-light); }
.hero-slide.active .hero-eyebrow { animation: heroUp 700ms var(--ease) 200ms forwards; }
.hero-content h1, .hero-content .hero-title-alt {
  color: #fff;
  margin: 0 0 0.5em;
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(20px);
}
.hero-slide.active h1,
.hero-slide.active .hero-title-alt { animation: heroUp 800ms var(--ease) 380ms forwards; }
.hero-content .hero-sub {
  font-size: 1.1rem;
  color: #DCE3E9;
  max-width: 560px;
  margin-bottom: 2em;
  opacity: 0;
  transform: translateY(20px);
}
.hero-slide.active .hero-sub { animation: heroUp 800ms var(--ease) 520ms forwards; }
.hero-content .cta-row {
  opacity: 0;
  transform: translateY(20px);
}
.hero-slide.active .cta-row { animation: heroUp 800ms var(--ease) 660ms forwards; }
@keyframes heroUp { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero-content h1, .hero-sub, .hero-content .cta-row { opacity: 1; transform: none; animation: none; }
  .hero-slide-bg { transform: none; transition: none; }
}

.hero-controls {
  position: absolute;
  z-index: 4;
  bottom: 32px;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.hero-arrow {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.hero-arrow:hover { background: rgba(255,255,255,0.22); transform: scale(1.06); }
.hero-dots { display: flex; gap: 10px; }
.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  padding: 0;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.hero-dot.active { background: #fff; transform: scale(1.25); }
.hero-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.15); z-index: 4; }
.hero-progress-bar { height: 100%; width: 0; background: var(--accent-light); }
.hero-slide.active .hero-progress-bar { animation: heroProgress 6500ms linear forwards; }
@keyframes heroProgress { from { width: 0; } to { width: 100%; } }
.hero-slider.is-paused .hero-progress-bar { animation-play-state: paused; }

/* ---------- Product cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.product-card-media {
  background: var(--light);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.product-card-media img { 
  /* width: 58%; height: 58%; object-fit: contain; */ width: 100%; height: 100%;
   transition: transform var(--dur-med) var(--ease); }
.product-card:hover .product-card-media img { transform: scale(1.08) rotate(-2deg); }
.product-card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.product-card-body h3 { margin-bottom: 0.5em; font-size: 1.15rem; }
.product-card-body p { color: var(--muted); font-size: 0.94rem; flex: 1; }
.product-card-link {
  margin-top: 1em;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.product-card-link .arrow { transition: transform var(--dur-fast) var(--ease); }
.product-card:hover .product-card-link .arrow { transform: translateX(4px); }

/* ---------- About / feature grid ---------- */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-media { position: relative; }
.about-media-frame {
  background: var(--primary);
  border-radius: var(--radius);
  /* aspect-ratio: 4/3; */
  position: relative;
  overflow: hidden;
  /* display: flex; align-items: center; justify-content: center; */
}
/* .about-media-frame svg { width: 55%; opacity: 0.9; } */
.about-media-frame img { width: 100%; height: 100%; }
.about-media-badge {
  position: absolute;
  bottom: -24px; left: -24px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 18px 22px;
  border-radius: var(--radius);
  max-width: 240px;
}
.about-media-badge strong { display: block; color: var(--primary); font-size: 1.5rem; }
.about-media-badge span { font-size: 0.85rem; color: var(--muted); }
.about-list { margin: 1.5em 0; }
.about-list li { display: flex; gap: 12px; padding: 8px 0; }
.about-list li::before {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
}

.feature-grid {
  display: grid;
  /* grid-template-columns: repeat(3, 1fr); */grid-template-columns:repeat(4,1fr);
  gap: 24px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 32px 26px;
  border-radius: var(--radius);
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2em;
  font-weight: 800;
  color: var(--primary);
  font-size: 1.1rem;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.5em; }
.feature-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.section-dark .feature-card { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.14); }
.section-dark .feature-card p { color: #C7D3DB; }
.section-dark .feature-icon { background: rgba(255,255,255,0.1); color: #fff; }

/* ---------- Industries ---------- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.industry-card {
  text-align: center;
  padding: 30px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
  background: #fff;
}
.industry-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.industry-card img { width: 46px; height: 46px; margin: 0 auto 14px; }
.industry-card h3 { font-size: 0.98rem; margin-bottom: 0.4em; }
.industry-card p { font-size: 0.86rem; color: var(--muted); margin: 0; }

/* ---------- Materials ---------- */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.material-chip {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: #fff;
}
.material-chip h3 { font-size: 0.98rem; margin-bottom: 0.35em; }
.material-chip p { font-size: 0.86rem; color: var(--muted); margin: 0; }

/* ---------- Manufacturing/engineering split ---------- */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.process-step { position: relative; padding-top: 16px; }
.process-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4em;
}
.process-step h3 { font-size: 1rem; }
.process-step p { color: var(--muted); font-size: 0.9rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(36px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
}
.cta-band h2 { color: #fff; margin-bottom: 0.3em; }
.cta-band p { color: #C7D3DB; margin: 0; max-width: 480px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #C7D3DB; }
.footer-top { padding: 64px 0 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand img {   /* height: 40px; */ height: 60px;   margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; color: #A9B7C1; max-width: 280px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.footer-social a:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.4); }
.site-footer .footer-title { font-weight: 800; line-height: 1.2; color: #fff; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.2em; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer ul li a { font-size: 0.92rem; color: #C7D3DB; transition: color var(--dur-fast) var(--ease); }
.site-footer ul li span.arrow {     padding-right: 4px; }
.site-footer ul li a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
  color: #93A2AE;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a:hover { color: #fff; }

/* ---------- Breadcrumb ---------- */
.breadcrumb-bar { background: var(--light); border-bottom: 1px solid var(--border); padding: 10px 0; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--muted); }
.breadcrumb a { color: var(--secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--primary); font-weight: 600; }

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
  background: var(--primary);
  color: #fff;
  padding: clamp(70px, 10vw, 120px) 0 clamp(48px, 6vw, 72px);
  margin-top: 0;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1.4px, transparent 1.4px);
  background-size: 18px 18px;
  opacity: 0.5;
}
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; max-width: 780px; }
.page-hero p { color: #C7D3DB; max-width: 640px; font-size: 1.05rem; }

.products-page {
    padding: 50px 0;
}
@media (max-width: 768px)
  {
.products-page {
    padding: 39px 0 !important; 
}
  }
/* ---------- Product detail ---------- */
.product-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.product-hero-media {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  /* padding: 40px; */
}
.product-hero-media img { 
  /* width: 62%; */ width: 100%; height: 100%;
 }
.product-intro { max-width: 760px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.check-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: "✓";
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: #fff; }
.spec-table th, .spec-table td { text-align: left; padding: 16px 22px; }
.spec-table th {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--primary);
}
.spec-table th:first-child { border-top-left-radius: var(--radius); }
.spec-table th:last-child { border-top-right-radius: var(--radius); }
.spec-table td { border-bottom: 1px solid var(--border); transition: background var(--dur-fast) var(--ease); }
.spec-table td:first-child { font-weight: 700; color: var(--primary); white-space: nowrap; }
.spec-table tbody tr:nth-child(even) td { background: var(--light); }
.spec-table tbody tr:last-child td { border-bottom: none; }
.spec-table tbody tr:hover td { background: rgba(30, 58, 82, 0.06); }
.table-scroll { overflow: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); max-width: 820px; margin: 0 auto; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  padding: 20px 4px;
  text-align: left;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.faq-question .nav-caret { flex: none; transition: transform var(--dur-fast) var(--ease); }
.faq-question[aria-expanded="true"] .nav-caret { transform: rotate(-135deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--dur-med) var(--ease); }
.faq-answer-inner { padding: 0 4px 20px; color: var(--muted); }

.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.quote-banner {
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(32px, 4vw, 48px);
  text-align: center;
}
.quote-banner h2 { color: #fff; }
.quote-banner p { color: #C7D3DB; max-width: 560px; margin: 0 auto 1.6em; }

.quote-form-section{
    margin: 0 auto;
    align-items: center;
    max-width: 800px;
}
.quote-form-section form .btn-block{
  width: auto;
}
.quote-form .btn-block{
  width: auto;
}

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; font-size: 0.88rem; color: var(--text); }
.form-field .req { color: #B0413E; }
.form-field input, .form-field select, .form-field textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85em 1em;
  background: #fff;
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,82,0.12);
  outline: none;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field .file-input {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.4em;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.form-field .file-input:hover { border-color: var(--accent); background: var(--light); }
.field-error { font-size: 0.82rem; color: #B0413E; min-height: 1.2em; }
.form-field.invalid input, .form-field.invalid select, .form-field.invalid textarea { border-color: #B0413E; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: -8px; }
.form-success {
  display: none;
  background: #EAF4EC;
  border: 1px solid #BFDCC4;
  color: #1F5B2C;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-weight: 600;
}
.form-success.show { display: block; }

.contact-info-card {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 34px;
}
.contact-info-card h3 { color: #fff; }
.contact-info-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.contact-info-list li:last-child { border-bottom: none; }
.contact-info-list .ci-label { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: #9FB0BB; display: block; }
.contact-info-list .ci-value { font-weight: 700; }
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
  margin-top: 24px;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Clients page ---------- */
.trust-banner {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  font-size: 1.05rem;
}
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.gallery-card-media {
  aspect-ratio: 4/3;
  background: var(--light);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.gallery-card-media img { 
  /* width: 45%;  */ width: 100%;
  opacity: 0.85; }
.gallery-card-body { padding: 18px 20px; }
.gallery-card-body h3 { font-size: 1rem; margin-bottom: 0.3em; }
.gallery-card-body p { font-size: 0.86rem; color: var(--muted); margin: 0; }

/* ---------- 404 ---------- */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 80px;
  background: var(--light);
}
.error-page .code {
  font-size: clamp(5rem, 8vw, 9rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1.in-view { transition-delay: 90ms; }
.reveal-delay-2.in-view { transition-delay: 180ms; }
.reveal-delay-3.in-view { transition-delay: 270ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Misc utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.divider { height: 1px; background: var(--border); border: none; margin: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  color: var(--secondary);
  background: var(--light);
}
.stat-row { display: flex; gap: 40px; flex-wrap: wrap; }
.stat-row .stat strong { display: block; font-size: 2rem; color: var(--primary); }
.stat-row .stat span { font-size: 0.85rem; color: var(--muted); }

/* ==========================================
   MOBILE OVERFLOW FIX
========================================== */

/* Allow grid items to shrink properly */
.two-col { min-width: 0; }
.two-col > *,
.form-grid,
.form-grid > *,
.form-field {
    min-width: 0;
    max-width: 100%;
}

/* Form controls must stay inside their grid cell */
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* File upload area */
.form-field .file-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Map */
.map-frame {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.map-frame iframe {
    width: 100%;
    max-width: 100%;
    display: block;
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 767.98px) {

    /* Your two-column section becomes one column */
    .two-col {
        width: 100%;
        min-width: 0;
    }

    /* Form becomes one column */
    .form-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
    }

    .form-field {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .form-field.full {
        grid-column: auto;
    }

    /* Prevent long text from forcing width */
    .contact-info-card,
    .map-frame {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

}


/* ==========================================
   FORMS — REFINED LAYOUT & ALIGNMENT
   (contact.php, request-quote.php)
========================================== */

/* Form card */
.quote-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: clamp(22px, 3.5vw, 40px);
  box-shadow: var(--shadow-sm);
}
.quote-form .form-title {
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem);
  margin: 0 0 1.25rem;
}

/* One consistent rhythm: grid gap only (no per-field margins) */
.form-grid { gap: 22px 24px; align-items: start; }
.form-field { position: relative; gap: 8px; margin-bottom: 0; }
.form-field label { font-size: 0.86rem; line-height: 1.3; }

/* Equal-height controls */
.form-field input,
.form-field select {
  height: 50px;
  padding: 0 16px;
  font-size: 0.97rem;
  line-height: normal;
}
.form-field textarea {
  padding: 14px 16px;
  min-height: 150px;
  font-size: 0.97rem;
  line-height: 1.5;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: #8A96A2; }

/* Custom select arrow so it matches the inputs */
.form-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231E3A52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 12px 8px;
}
.form-field select:invalid { color: #8A96A2; }
.form-field select option { color: var(--text); }

/* Errors only take space when they have text */
.field-error { min-height: 0; }
.field-error:empty { display: none; }

/* File upload dropzone */
.form-field .file-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 26px 20px;
  background: var(--light);
  border: 2px dashed var(--accent);
  border-radius: 6px;
  text-align: center;
}
.form-field .file-input:hover { border-color: var(--primary); background: #fff; }
.form-field:focus-within .file-input { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,58,82,0.12); }
.file-input svg { width: 30px; height: 30px; color: var(--primary); margin-bottom: 4px; }
.file-input .file-input-text { font-weight: 700; color: var(--primary); font-size: 0.95rem; word-break: break-word; }
.file-input .file-input-hint { font-size: 0.8rem; color: var(--muted); }
.file-input-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Submit row */
.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.quote-form .btn-block { width: auto; min-width: 220px; justify-content: center; }

/* request-quote.php: centred heading above the form card */
.quote-form-section { max-width: 880px; }
.quote-form-section > h2 { text-align: center; margin-bottom: 0.4em; }
.quote-form-section > p { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 1.8rem; }

@media (max-width: 480px) {
  .quote-form .btn-block,
  .quote-form-section form .btn-block { width: 100%; }
  .form-actions { margin-top: 22px; }
}

/* contact.php: form card matches the height of the info + map column on desktop */
@media (min-width: 901px) {
  .two-col > .reveal:has(> .quote-form) { display: flex; flex-direction: column; }
  .two-col > .reveal > .quote-form.form-fill { flex: 1; display: flex; flex-direction: column; }
  .quote-form.form-fill .form-grid { flex: 1; grid-template-rows: auto auto 1fr; align-items: stretch; }
  .quote-form.form-fill .form-field.full { align-self: stretch; }
  .quote-form.form-fill .form-field.full textarea { flex: 1; }
}


/* ==========================================
   FITTINGS & ACCESSORIES — single catalogue page
========================================== */
.fitting-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 920px;
  margin: 0 auto 44px;
}
.fitting-nav a {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--secondary);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.fitting-nav a:hover,
.fitting-nav a:focus-visible { background: var(--primary); border-color: var(--primary); color: #fff; }

.fitting-list { display: grid; gap: 24px; }
.fitting-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: clamp(16px, 2.5vw, 28px);
  scroll-margin-top: 100px;
  transition: box-shadow var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
}
.fitting-row:hover { box-shadow: var(--shadow-md); border-color: transparent; }
.fitting-row:nth-child(even) { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.fitting-row:nth-child(even) .fitting-media { order: 2; }
.fitting-row [id] { scroll-margin-top: 110px; }

.fitting-media {
  background: var(--light);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.fitting-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fitting-label {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.6em;
}
.fitting-body h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); margin-bottom: 0.5em; }
.fitting-body p { color: var(--muted); max-width: 520px; }

@media (max-width: 767.98px) {
  .fitting-row,
  .fitting-row:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .fitting-row:nth-child(even) .fitting-media { order: 0; }
  .fitting-nav { margin-bottom: 32px; }
}

/* Product cards: View Product (left) + Get Quote (right) */
.product-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 1em;
}
.product-card-actions .product-card-link { margin-top: 0; }
.product-card-quote {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: 7px 16px;
  line-height: 1.2;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.product-card-quote:hover,
.product-card-quote:focus-visible { background: var(--primary); color: #fff; }
