/* ==========================================================================
   1. CSS VARIABLES (a.k.a. "custom properties")
   These live on :root (the <html> element) so every element on the page
   can read them. This is your brand palette from the style guide.
   Change a hex code here once, and it updates across all 5 pages.
   ========================================================================== */
:root {
  --color-navy: #00153f;     /* primary - trust, technology */
  --color-gold: #fcc201;     /* primary - confidence */
  --color-black: #000000;    /* secondary - strength */
  --color-white: #ffffff;    /* secondary - clarity */
  --color-grey-light: #f5f6f8;  /* a soft background, not in the brief but needed for section contrast */
  --color-grey-text: #4a5568;   /* muted text color for body copy on white */

  --font-heading: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;

  --max-width: 1180px;
  --radius: 4px; /* small, sharp radius - fits an industrial/technical brand better than rounded */
}

/* ==========================================================================
   2. RESET
   Browsers apply their own default margins/padding/fonts. We zero these
   out so our own CSS is the only thing controlling spacing - otherwise
   you get inconsistent gaps between browsers.
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* padding/border no longer add to an element's width */
}

body {
  font-family: var(--font-body);
  color: var(--color-black);
  line-height: 1.6;
  background: var(--color-white);
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-navy);
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); } /* clamp = responsive font size without media queries */
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p {
  color: var(--color-grey-text);
  max-width: 65ch; /* keeps body text from stretching too wide to read comfortably */
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   4. HEADER / NAV
   ========================================================================== */
.site-header {
  border-bottom: 1px solid #e5e7eb;
  background: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo img {
  height: 56px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 600;
  color: var(--color-navy);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  border-bottom-color: var(--color-gold);
}

.nav-toggle {
  display: none; /* only shown on mobile - see media query below */
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--color-navy);
}

/* ==========================================================================
   5. BUTTONS
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-navy);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-navy);
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.site-footer {
  background: var(--color-navy);
  color: var(--color-white);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.site-footer p {
  color: #b8c2d6;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 2rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: #8fa0bf;
}

/* ==========================================================================
   7. PRODUCT GRID (CSS Grid)

   repeat(auto-fit, minmax(260px, 1fr)) reads as:
   "fit as many columns as will comfortably hold 260px each, and stretch
   them evenly to fill the row." This is what makes the grid responsive
   WITHOUT writing a single media query - shrink the browser and watch
   columns drop from 3 to 2 to 1 automatically.
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.product-card {
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 21, 63, 0.08);
  transform: translateY(-3px);
}

.product-card .tag {
  display: inline-block;
  background: var(--color-grey-light);
  color: var(--color-navy);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius);
  margin-bottom: 0.9rem;
}

.product-card h3 {
  margin-bottom: 0.5rem;
}

.product-card p {
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   8. RESPONSIVE - mobile nav
   ========================================================================== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #e5e7eb;
    display: none; /* toggled by JS - see main.js */
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 1rem 1.5rem;
    width: 100%;
    border-bottom: 1px solid #f1f1f1;
  }
}

/* ==========================================================================
   9. POLISH + NEW SECTIONS
   ========================================================================== */
html { scroll-behavior: smooth; }
:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 3px; }

.section { padding: 5rem 0; }
.section-alt { background: var(--color-grey-light); }

.eyebrow {
  display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: #a67c00; margin-bottom: 0.8rem;
}

.hero, .page-hero {
  position: relative; overflow: hidden; color: var(--color-white);
  background: linear-gradient(135deg, #00153f 0%, #0b2c72 100%);
}
.hero { padding: 6.5rem 0 5.5rem; }
.page-hero { padding: 4rem 0 3.5rem; }
.hero::after, .page-hero::after {
  content: ""; position: absolute; right: -90px; top: -70px; width: 440px; height: 440px;
  background: rgba(252, 194, 1, 0.09);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.hero .container, .page-hero .container { position: relative; z-index: 1; }
.hero h1, .page-hero h1 { color: var(--color-white); max-width: 18ch; }
.hero .eyebrow, .page-hero .eyebrow { color: var(--color-gold); }
.hero p, .page-hero p { color: #c7d2e3; margin-top: 1.2rem; }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.product-card { border-top: 3px solid var(--color-gold); background: var(--color-white); }
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.85rem; }

.section-head { max-width: 640px; }
.section-head p { margin-top: 0.8rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.chip {
  padding: 0.6rem 1.2rem; border: 1px solid #d5d9e2; border-radius: 999px; font-weight: 600;
  color: var(--color-navy); background: var(--color-white);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.chip:hover { background: var(--color-gold); border-color: var(--color-gold); }

.cta { background: var(--color-gold); padding: 3.5rem 0; }
.cta .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta p { color: var(--color-navy); }
.cta .btn { background: var(--color-navy); color: var(--color-white); }

.contact-layout { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 3rem; align-items: start; }
.contact-info { background: var(--color-navy); padding: 2rem; border-radius: var(--radius); }
.contact-info h3 { color: var(--color-white); margin-bottom: 1rem; }
.contact-info p { color: #c7d2e3; margin-bottom: 0.8rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; color: var(--color-navy); margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.8rem 1rem; font: inherit; border: 1.5px solid #cfd5e1;
  border-radius: var(--radius); background: var(--color-white);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--color-navy); box-shadow: 0 0 0 3px rgba(252, 194, 1, 0.5);
}
.form-group .invalid { border-color: #c53030; }
.error-msg { display: block; min-height: 1.2rem; margin-top: 0.3rem; font-size: 0.85rem; color: #c53030; }
.form-success { padding: 1.25rem; border-left: 4px solid var(--color-gold); background: var(--color-grey-light); color: var(--color-navy); font-weight: 600; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   10. RESPONSIVE: tablet and phone
   ========================================================================== */
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
  .hero::after, .page-hero::after { width: 300px; height: 300px; right: -100px; }
}
@media (max-width: 768px) {
  .logo img { height: 44px; }
  .section { padding: 3.5rem 0; }
  .hero { padding: 4.5rem 0 4rem; }
  .page-hero { padding: 3rem 0 2.5rem; }
  .cta .container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; text-align: center; }
  .product-grid { gap: 1.25rem; }
}
.contact-person {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.contact-person strong { display: block; color: var(--color-white); font-size: 1.05rem; }
.contact-person span { display: block; color: var(--color-gold); font-size: 0.85rem; margin-bottom: 0.5rem; }
.contact-person a { display: block; color: #c7d2e3; padding: 0.15rem 0; }
.contact-person a:hover { color: var(--color-gold); }
.site-footer a { transition: color 0.2s ease; }
.site-footer a:hover { color: var(--color-gold); }

/* ==========================================================================
   11. PROFESSIONAL POLISH
   ========================================================================== */
::selection { background: var(--color-gold); color: var(--color-navy); }
body { -webkit-font-smoothing: antialiased; }

/* Header: soft shadow appears once you scroll (class toggled by JS) */
.site-header { transition: box-shadow 0.25s ease; }
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0, 21, 63, 0.08); }
.nav-links { align-items: center; }
.nav-links a.btn { padding: 0.6rem 1.3rem; font-size: 0.9rem; border-bottom: 2px solid transparent; }

/* Hero: subtle dot texture + bolder headline */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.02em; }

/* Section headings get a short gold bar */
.section-head h2::after {
  content: ""; display: block; width: 56px; height: 4px;
  background: var(--color-gold); margin-top: 1rem;
}

.product-card { box-shadow: 0 2px 10px rgba(0, 21, 63, 0.04); }
.site-footer { border-top: 4px solid var(--color-gold); }
.site-footer a { transition: color 0.2s ease; }
.site-footer a:hover { color: var(--color-gold); }

/* CONTACT CARDS */
.contact-cards { display: grid; gap: 1.25rem; }
.person-card {
  display: flex; gap: 1.1rem; padding: 1.5rem; background: var(--color-white);
  border: 1px solid #e5e7eb; border-top: 3px solid var(--color-gold);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 21, 63, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.person-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0, 21, 63, 0.12); }

.avatar {
  flex: none; width: 64px; height: 72px; display: grid; place-items: center;
  background: var(--color-navy); color: var(--color-gold);
  font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.person-body h3 { font-size: 1.15rem; }
.role {
  display: block; margin: 0.2rem 0 0.9rem; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: #a67c00;
}
.person-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.action {
  padding: 0.4rem 0.85rem; font: 600 0.8rem var(--font-body); color: var(--color-navy);
  background: var(--color-white); border: 1px solid #d5d9e2; border-radius: 999px; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.action:hover { background: var(--color-navy); border-color: var(--color-navy); color: var(--color-white); }
.action.copied { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-navy); }

.address-card { padding: 1.25rem 1.5rem; background: var(--color-navy); border-radius: var(--radius); }
.address-card strong { color: var(--color-gold); }
.address-card p { color: #c7d2e3; margin-top: 0.3rem; }

/* @media (max-width: 768px) {
  .nav-links a.btn { display: block; width: auto; margin: 1rem 1.5rem; text-align: center; }
}
@media (max-width: 480px) {
  .person-card { flex-direction: column; }
} */
 /* ==========================================================================
   12. ANIMATIONS + UI UPGRADE
   ========================================================================== */

/* Keyframes are named animations. With only a "from" step, the browser
   animates from that state to whatever the element normally looks like. */
@keyframes fade-up   { from { opacity: 0; transform: translateY(28px); } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-14px); } }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-18px) rotate(6deg); }
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* Scroll reveal. "backwards" holds the starting look during the delay,
   then hands control back to the element, so hover effects still work. */
.reveal { opacity: 0; }
.reveal.visible {
  opacity: 1;
  animation: fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: var(--delay, 0ms);
}

/* Header drops in once it's injected */
.site-header { animation: fade-down 0.6s ease backwards; }

/* Hero: drifting gradient + staggered text entrance */
.hero, .page-hero {
  background: linear-gradient(135deg, #00153f, #0b2c72, #00153f);
  background-size: 200% 200%;
  animation: gradient-shift 16s ease infinite;
}
:is(.hero, .page-hero) .container > * {
  animation: fade-up 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
:is(.hero, .page-hero) .container > :nth-child(1) { animation-delay: 0.1s; }
:is(.hero, .page-hero) .container > :nth-child(2) { animation-delay: 0.25s; }
:is(.hero, .page-hero) .container > :nth-child(3) { animation-delay: 0.4s; }
:is(.hero, .page-hero) .container > :nth-child(4) { animation-delay: 0.55s; }
.hero::after, .page-hero::after { animation: float 12s ease-in-out infinite; }

/* Floating hexagons, same shape as your logo mark */
.hex {
  position: absolute;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
  animation: float 8s ease-in-out infinite;
}
.hex-a { width: 96px; height: 96px; right: 20%; top: 18%; background: rgba(252, 194, 1, 0.22); }
.hex-b { width: 48px; height: 48px; right: 34%; bottom: 22%; background: rgba(255, 255, 255, 0.1); animation-duration: 6s; animation-delay: -2s; }
.hex-c { width: 30px; height: 30px; right: 9%; bottom: 28%; background: rgba(252, 194, 1, 0.35); animation-duration: 5s; animation-delay: -1s; }

/* Industries marquee */
.marquee { background: var(--color-gold); overflow: hidden; padding: 1.1rem 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; flex-shrink: 0; will-change: transform;}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  display: flex; align-items: center; gap: 2.5rem; padding-right: 2.5rem;
  font: 600 0.85rem var(--font-heading); letter-spacing: 0.12em;
  text-transform: uppercase; white-space: nowrap; color: var(--color-navy);
}
.marquee-track span::after {
  content: ""; width: 10px; height: 10px; background: var(--color-navy);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}

/* Nav: gold underline slides in (desktop only) */
@media (min-width: 769px) {
  .nav-links a:not(.btn) {
    border-bottom: none;
    background: linear-gradient(var(--color-gold), var(--color-gold)) left bottom / 0% 2px no-repeat;
    transition: background-size 0.3s ease;
  }
  .nav-links a:not(.btn):hover,
  .nav-links a:not(.btn).active { background-size: 100% 2px; }
}

/* Buttons: lift, glow, and a shine sweep */
.btn {
  position: relative; overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(252, 194, 1, 0.4); }
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg); transition: left 0.6s ease; pointer-events: none;
}
.btn-primary:hover::before { left: 140%; }

/* Cards: a gold bar fills across the bottom on hover */
.product-card { position: relative; overflow: hidden; }
.product-card::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
  background: var(--color-gold); transition: width 0.35s ease;
}
.product-card:hover::after { width: 100%; }

/* Section heading bar grows when the heading is revealed */
.section-head h2::after { transition: width 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s; }
.section-head.reveal h2::after { width: 0; }
.section-head.reveal.visible h2::after { width: 56px; }

/* Form polish */
.form-group input, .form-group select, .form-group textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-success { animation: fade-up 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }

/* Scroll progress bar + back-to-top button (both created by JS) */
.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 200;
  background: var(--color-gold); transform: scaleX(0); transform-origin: left; pointer-events: none;
}
.back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90;
  width: 46px; height: 46px; border: none; border-radius: 50%; cursor: pointer;
  background: var(--color-navy); color: var(--color-gold); font-size: 1.3rem;
  box-shadow: 0 8px 20px rgba(0, 21, 63, 0.25);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: #0b2c72; }

@media (max-width: 768px) {
  .hex-b, .hex-c { display: none; }
  .hex-a { width: 64px; height: 64px; right: 8%; top: 10%; }
}

/* Respect people who turn animations off in their OS settings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
  .section-head.reveal h2::after { width: 56px; }
}
.address-card strong { display: block; }
.address-card p + strong,
.address-card .copy-btn + strong { margin-top: 1.25rem; }
.address-card .copy-btn { margin-top: 0.6rem; }
.address-card a:hover { color: var(--color-gold); }
.topic-picker { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0 2rem; }
.topic {
  padding: 0.6rem 1.1rem; font: 600 0.9rem var(--font-body); cursor: pointer;
  color: var(--color-navy); background: var(--color-white);
  border: 1.5px solid #d5d9e2; border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.topic:hover { border-color: var(--color-navy); }
.topic[aria-pressed="true"] { background: var(--color-navy); border-color: var(--color-navy); color: var(--color-white); }

.contact-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.contact-big {
  display: block; padding: 1.5rem; border-radius: var(--radius);
  background: var(--color-white); border: 1px solid #e5e7eb; border-left: 4px solid var(--color-gold);
  box-shadow: 0 10px 30px rgba(0, 21, 63, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-big:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0, 21, 63, 0.12); }
.contact-big strong { display: block; font: 700 1.1rem var(--font-heading); color: var(--color-navy); }
.contact-big span { color: var(--color-grey-text); font-size: 0.9rem; }
/* ==========================================================================
   13. SERVICES SECTION
   ========================================================================== */
.services {
  background:
    radial-gradient(rgba(0, 21, 63, 0.06) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--color-white);
}
.service-grid { margin-top: 3rem; gap: 1.75rem; }

.service-card {
  --mx: 50%; --my: 0%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem 1.75rem;
  background: var(--color-white);
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 21, 63, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: transparent;
  box-shadow: 0 22px 44px rgba(0, 21, 63, 0.14);
}

/* Glow that follows the cursor (position set by JS via --mx / --my) */
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(252, 194, 1, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }

/* Gold bar fills along the bottom edge */
.service-card::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 4px; width: 0;
  background: var(--color-gold);
  transition: width 0.45s ease;
}
.service-card:hover::after { width: 100%; }

.service-card > * { position: relative; }   /* keep content above the glow */

.service-num {
  position: absolute;
  top: 1rem; right: 1.25rem;
  font: 700 3.5rem/1 var(--font-heading);
  color: rgba(0, 21, 63, 0.06);
  transition: color 0.3s ease, transform 0.3s ease;
}
.service-card:hover .service-num { color: rgba(252, 194, 1, 0.45); transform: translateY(-4px); }

/* Hexagon icon, same shape as the logo mark */
.service-icon {
  width: 68px; height: 76px;
  display: grid; place-items: center;
  margin-bottom: 1.5rem;
  background: var(--color-navy);
  color: var(--color-gold);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
  transition: background 0.3s ease, color 0.3s ease, transform 0.4s ease;
}
.service-card:hover .service-icon {
  background: var(--color-gold);
  color: var(--color-navy);
  transform: rotate(-6deg) scale(1.06);
}

.service-card h3 { margin-bottom: 0.6rem; }
.service-card p { font-size: 0.95rem; }

.service-list { margin: 1.25rem 0 1.75rem; display: grid; gap: 0.55rem; }
.service-list li {
  display: flex; align-items: center; gap: 0.7rem;
  font-weight: 600; font-size: 0.92rem; color: var(--color-navy);
}
.service-list li::before {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  background: var(--color-gold);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}

.service-link {
  margin-top: auto;               /* pushes the link to the card's bottom edge */
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; color: var(--color-navy);
}
.service-link span { display: inline-block; transition: transform 0.25s ease; }
.service-card:hover .service-link span { transform: translateX(6px); }

@media (max-width: 480px) {
  .service-card { padding: 1.75rem 1.4rem 1.5rem; }
}
 /* ==========================================================================
   14. TOUCH SCREENS: no hover, so scrolling drives the effect instead
   (hover: none) is true on phones and tablets. JS adds .in-focus to the
   card that is crossing the middle of the screen.
   ========================================================================== */
@media (hover: none) {
  .service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  }
  .service-card.in-focus {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 18px 40px rgba(0, 21, 63, 0.14);
  }
  .service-card.in-focus::after { width: 100%; }
  .service-card.in-focus .service-icon {
    background: var(--color-gold);
    color: var(--color-navy);
    transform: rotate(-6deg) scale(1.06);
  }
  .service-card.in-focus .service-num {
    color: rgba(252, 194, 1, 0.45);
    transform: translateY(-4px);
  }
  .service-card.in-focus .service-link span { transform: translateX(6px); }

  /* Instant feedback when a finger actually presses the card */
  .service-card:active { transform: scale(0.98); }
}
/* ==========================================================================
   15. MOBILE MENU (professional version)
   ========================================================================== */
@media (max-width: 768px) {

  /* Hamburger button: three bars that morph into an X */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 0;
    border: none;
    border-radius: var(--radius);
    background: var(--color-grey-light);
    cursor: pointer;
    transition: background 0.25s ease;
  }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-navy);
    transition: transform 0.3s ease, opacity 0.2s ease, background 0.25s ease;
  }
  .nav-toggle[aria-expanded="true"] { background: var(--color-navy); }
  .nav-toggle[aria-expanded="true"] span { background: var(--color-gold); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* The panel: always rendered, so it can animate in and out */
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.5rem 0 1.5rem;
    background: var(--color-white);
    border-top: 3px solid var(--color-gold);
    box-shadow: 0 24px 40px rgba(0, 21, 63, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  /* Links fade in one after another */
  .nav-links li {
    opacity: 0;
    transform: translateX(-14px);
    transition: opacity 0.35s ease, transform 0.35s ease;
  }
  .nav-links.open li { opacity: 1; transform: none; }
  .nav-links.open li:nth-child(1) { transition-delay: 0.05s; }
  .nav-links.open li:nth-child(2) { transition-delay: 0.10s; }
  .nav-links.open li:nth-child(3) { transition-delay: 0.15s; }
  .nav-links.open li:nth-child(4) { transition-delay: 0.20s; }
  .nav-links.open li:nth-child(5) { transition-delay: 0.25s; }
  .nav-links.open li:nth-child(6) { transition-delay: 0.30s; }

  .nav-links a:not(.btn) {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    border-bottom: 1px solid #eef0f4;
    border-left: 4px solid transparent;
  }
  .nav-links a:not(.btn).active {
    border-left-color: var(--color-gold);
    background: var(--color-grey-light);
  }

  /* Get a Quote: full-width button at the bottom */
  .nav-links li:last-child { padding: 1.25rem 1.5rem 0; }
  .nav-links a.btn {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.9rem;
    text-align: center;
    border: 2px solid transparent;
  }
}
/* ==========================================================================
   16. QUOTE BUILDER POPUP
   ========================================================================== */
.no-scroll { overflow: hidden; }

.quote-modal {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: 1rem;
  visibility: hidden; pointer-events: none;
  transition: visibility 0.3s;
}
.quote-modal.open { visibility: visible; pointer-events: auto; }

.quote-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 21, 63, 0.62);
  backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.3s ease;
}
.quote-modal.open .quote-backdrop { opacity: 1; }

.quote-dialog {
  position: relative; overflow: auto;
  width: min(520px, 100%); max-height: 92vh;
  padding: 2rem 1.75rem 1.5rem;
  background: var(--color-white);
  border-top: 4px solid var(--color-gold);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0, 21, 63, 0.35);
  opacity: 0; transform: translateY(28px) scale(0.97);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  outline: none;
}
.quote-modal.open .quote-dialog { opacity: 1; transform: none; }

/* Hexagon watermark, echoing the logo */
.quote-dialog::after {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; pointer-events: none;
  background: rgba(252, 194, 1, 0.12);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.quote-dialog > * { position: relative; z-index: 1; }

.quote-close {
  position: absolute; top: 0.9rem; right: 1rem;
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: var(--color-grey-light); color: var(--color-navy);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.quote-close:hover { background: var(--color-navy); color: var(--color-gold); }

.quote-progress { height: 4px; margin: 0 2.8rem 1.4rem 0; background: #eef0f4; border-radius: 4px; overflow: hidden; }
.quote-progress span { display: block; width: 0; height: 100%; background: var(--color-gold); transition: width 0.4s ease; }

.quote-step { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #a67c00; }
.quote-dialog h2 { margin: 0.4rem 0 1.4rem; font-size: 1.6rem; }

@keyframes quote-swap { from { opacity: 0; transform: translateX(20px); } }
#quoteContent.swap { animation: quote-swap 0.35s ease; }

/* Step 1 options */
.quote-option {
  display: block; width: 100%; margin-bottom: 0.75rem; padding: 1rem 1.2rem;
  text-align: left; font: inherit; cursor: pointer;
  background: var(--color-white); border: 1.5px solid #d5d9e2; border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.quote-option strong { display: block; color: var(--color-navy); font-family: var(--font-heading); }
.quote-option span { font-size: 0.88rem; color: var(--color-grey-text); }
.quote-option:hover, .quote-option:focus-visible {
  transform: translateX(6px); border-color: var(--color-navy);
  box-shadow: -4px 0 0 var(--color-gold), 0 8px 20px rgba(0, 21, 63, 0.08);
}

/* Step 2 chips */
.quote-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.quote-chip {
  padding: 0.7rem 1.2rem; font: 600 0.92rem var(--font-body); cursor: pointer;
  color: var(--color-navy); background: var(--color-white);
  border: 1.5px solid #d5d9e2; border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.quote-chip:hover { background: var(--color-gold); border-color: var(--color-gold); transform: translateY(-2px); }
.quote-skip { margin-top: 1.25rem; background: none; border: none; font: 600 0.9rem var(--font-body); color: var(--color-grey-text); text-decoration: underline; cursor: pointer; }

/* Step 3 */
.quote-summary {
  margin-bottom: 1.25rem; padding: 0.8rem 1rem;
  background: var(--color-grey-light); border-left: 4px solid var(--color-gold);
  font-weight: 600; color: var(--color-navy);
}
.quote-field { margin-bottom: 1rem; }
.quote-field label { display: block; margin-bottom: 0.35rem; font-weight: 600; color: var(--color-navy); }
.quote-field small { font-weight: 400; color: var(--color-grey-text); }
.quote-field input {
  width: 100%; padding: 0.8rem 1rem; font: inherit;
  border: 1.5px solid #cfd5e1; border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.quote-field input:focus { outline: none; border-color: var(--color-navy); box-shadow: 0 0 0 3px rgba(252, 194, 1, 0.5); }
.quote-send { display: grid; gap: 0.75rem; margin-top: 1.4rem; }
.quote-send .btn { text-align: center; }
.quote-mail { background: var(--color-white); color: var(--color-navy); border-color: var(--color-navy); }
.quote-mail:hover { background: var(--color-navy); color: var(--color-white); }
.quote-note { margin-top: 0.9rem; font-size: 0.82rem; text-align: center; }

.quote-back { margin-top: 1.25rem; background: none; border: none; font: 600 0.9rem var(--font-body); color: var(--color-navy); cursor: pointer; }
.quote-back:hover { color: #a67c00; }
.quote-back[hidden] { display: none; }

/* Phones: becomes a sheet that slides up from the bottom */
@media (max-width: 560px) {
  .quote-modal { align-items: end; padding: 0; }
  .quote-dialog {
    width: 100%; max-height: 90vh;
    padding: 1.75rem 1.4rem 1.5rem;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .quote-modal.open .quote-dialog { transform: none; }
}
/* ==========================================================================
   17. HERO DECOR ON EVERY PAGE + CONTACT PAGE
   ========================================================================== */

/* Dot texture, previously only on the home hero */
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Tiles that overlap the bottom of the hero */
.ct-tiles-wrap { position: relative; z-index: 2; margin-top: -2.5rem; }
.ct-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }

.ct-tile {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.4rem;
  background: var(--color-white);
  border: 1px solid #e5e7eb; border-bottom: 3px solid var(--color-gold);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(0, 21, 63, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ct-tile:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(0, 21, 63, 0.16); }

.ct-ico {
  flex: none; width: 50px; height: 56px; display: grid; place-items: center;
  background: var(--color-navy); color: var(--color-gold);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.ct-tile:hover .ct-ico { background: var(--color-gold); color: var(--color-navy); transform: rotate(-6deg); }

.ct-tile small {
  display: block; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: #a67c00;
}
.ct-tile strong { display: block; font: 700 0.95rem/1.3 var(--font-heading); color: var(--color-navy); overflow: hidden; }

/* Main two-column area */
.ct-main { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 3rem; align-items: start; }
.ct-compose h2::after {
  content: ""; display: block; width: 56px; height: 4px;
  background: var(--color-gold); margin-top: 1rem;
}
.contact-cards > .eyebrow { margin-bottom: 0; }

/* Live message preview */
.ct-preview {
  margin: 0 0 1.5rem; padding: 1rem 1.2rem;
  background: var(--color-grey-light);
  border-left: 4px solid var(--color-gold); border-radius: var(--radius);
  font-size: 0.92rem; color: var(--color-grey-text);
}
.ct-preview small {
  display: block; margin-bottom: 0.35rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-navy);
}
.ct-preview span { white-space: pre-line; }

/* FAQ accordion (native <details>) */
.faq-list { max-width: 780px; margin-top: 2rem; display: grid; gap: 0.8rem; }
.faq {
  background: var(--color-white);
  border: 1px solid #e5e7eb; border-left: 4px solid transparent; border-radius: var(--radius);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.faq[open] { border-left-color: var(--color-gold); box-shadow: 0 10px 26px rgba(0, 21, 63, 0.08); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.4rem; font-weight: 600; color: var(--color-navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; font-size: 1.5rem; line-height: 1; color: #a67c00;
  transition: transform 0.3s ease;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 1.4rem 1.2rem; }
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } }
.faq[open] p { animation: faq-open 0.35s ease; }

@media (max-width: 900px) {
  .ct-main { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 768px) {
  .ct-tiles-wrap { margin-top: -1.5rem; }
}
/* ==========================================================================
   18. PRODUCTS PAGE
   ========================================================================== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.filter-count { margin-top: 1rem; font-size: 0.88rem; color: var(--color-grey-text); }
#productGrid { margin-top: 1.5rem; }

@keyframes card-pop { from { opacity: 0; transform: translateY(22px) scale(0.97); } }

.p-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: card-pop 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: var(--delay, 0ms);
}

.p-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 1.25rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f5f6f8, #e8ecf4);
  color: var(--color-navy);
}
   .p-media img { width: 100%; height: 100%; object-fit: contain; padding: 0.75rem; mix-blend-mode: multiply; transition: transform 0.5s ease; }
.p-card:hover .p-media img { transform: scale(1.06); }
.p-media svg { opacity: 0.55; transition: transform 0.4s ease, opacity 0.3s ease; }
.p-card:hover .p-media svg { transform: scale(1.12) rotate(-4deg); opacity: 0.9; }

.p-points { margin: 0 0 1.5rem; display: grid; gap: 0.45rem; }
.p-points li {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.88rem; font-weight: 600; color: var(--color-navy);
}
.p-points li::before {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  background: var(--color-gold);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.p-card .btn { margin-top: auto; }
/* Show the WHOLE product photo instead of cropping it */
.p-media img {
  object-fit: contain;
  padding: 0.75rem;
  mix-blend-mode: multiply; /* a white photo background blends into the card instead of showing as a white box */
}
/* Pin the photo inside the box so it can't stretch it */
.p-media { position: relative; }
.p-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* ==========================================================================
   19. INDUSTRIES PAGE
   ========================================================================== */
.ind-card { display: flex; flex-direction: column; align-items: flex-start; }
.ind-card .p-points { margin-bottom: 1.5rem; }
.ind-card .service-link { margin-top: auto; }
.ind-card:hover .service-link span { transform: translateX(6px); }

/* When you add a real photo, show it filling the box (not shrunk inside it) */
.ind-card .p-media img {
  object-fit: cover;
  padding: 0;
  mix-blend-mode: normal;
}/* ==========================================================================
   20. RESOURCES PAGE
   ========================================================================== */
.res-card .tag { margin-bottom: 1rem; }
.res-card .p-points { margin-bottom: 0; }

.res-request {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.res-request-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.res-request .quote-mail { background: var(--color-white); color: var(--color-navy); border-color: var(--color-navy); }
.res-request .quote-mail:hover { background: var(--color-navy); color: var(--color-white); }

@media (max-width: 480px) {
  .res-request-actions .btn { width: 100%; text-align: center; }
}

/* HOMEPAGE HERO BACKGROUND */
.hero {
  background-color: var(--color-navy);
  background-image:
    linear-gradient(
      90deg,
     rgba(0, 21, 63, 0.78)
rgba(0, 21, 63, 0.58)
rgba(0, 21, 63, 0.30)
    ),
    url("/assets/marcprotech-hero.png");

  background-size: cover, 90% auto;
  background-position: center, right center;
  background-repeat: no-repeat;

  min-height: calc(100vh - 94px);
  min-height: calc(100svh - 94px);

  display: flex;
  align-items: center;
  padding: 5rem 0;
}

/* MOBILE HERO */
@media (max-width: 768px) {
  .hero {
    background-image:
      linear-gradient(
        90deg,
        rgba(0, 21, 63, 0.78)
rgba(0, 21, 63, 0.60)
      ),
      url("/assets/marcprotech-hero.png");

    background-size: cover;
    background-position: center;
  }
}
/* Fix text overflowing inside contact tiles */
.ct-tile {
    min-width: 0;
}

.ct-tile > * {
    min-width: 0;
}

.ct-tile a,
.ct-tile p,
.ct-tile span {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.developer-credit {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: #b8c2d6;
}

.developer-credit a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.developer-credit a:hover {
  color: #e32636;
}
