/* ============================================================
   Al-Hamd Traders — Homepage
   "The Quiet Foundry" design system. Tokens in tokens.css.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; margin: 0; text-wrap: balance; text-transform: uppercase; letter-spacing: 0.01em; }
p { margin: 0; }
p.prose { text-wrap: pretty; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-4); top: -60px;
  background: var(--gold); color: var(--navy-900);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-sm);
  font-weight: 600; z-index: var(--z-toast);
  transition: top var(--duration-base) var(--ease-out-quart);
}
.skip-link:focus { top: var(--space-4); }

/* ---------- Scroll reveal (Intersection Observer driven) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease-out-quart), transform 0.7s var(--ease-out-quart); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Custom cursor: glowing gold ember (fine-pointer only; enabled via JS) ---------- */
.cursor-ember {
  position: fixed; top: 0; left: 0; z-index: var(--z-tooltip, 600);
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 42%, #fff4cf 0%, var(--gold) 48%, rgba(227, 167, 18, 0) 72%);
  box-shadow: 0 0 10px 2px rgba(227, 167, 18, 0.6), 0 0 22px 4px rgba(227, 167, 18, 0.28);
  transition: opacity 0.25s var(--ease-standard),
              width 0.18s var(--ease-out-quart),
              height 0.18s var(--ease-out-quart),
              margin 0.18s var(--ease-out-quart);
  will-change: transform;
  animation: ember-pulse 2.4s ease-in-out infinite;
}
@keyframes ember-pulse {
  0%, 100% { box-shadow: 0 0 10px 2px rgba(227, 167, 18, 0.55), 0 0 22px 4px rgba(227, 167, 18, 0.25); }
  50%      { box-shadow: 0 0 13px 3px rgba(227, 167, 18, 0.75), 0 0 30px 7px rgba(227, 167, 18, 0.35); }
}
body.has-custom-cursor .cursor-ember { opacity: 1; }
body.has-custom-cursor.cursor-hover-target .cursor-ember {
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
}
body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor [data-tilt-card] { cursor: none; }
@media (pointer: coarse) {
  .cursor-ember { display: none; }
}

/* Tiny spark left in the ember's wake as it moves */
.cursor-spark {
  position: absolute;
  width: var(--spark-size, 6px); height: var(--spark-size, 6px);
  margin: calc(var(--spark-size, 6px) / -2) 0 0 calc(var(--spark-size, 6px) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 231, 160, 0.9) 0%, rgba(227, 167, 18, 0) 70%);
  opacity: 0;
  will-change: transform, opacity;
  animation: spark-fade var(--spark-dur, 620ms) var(--ease-out-quart) forwards;
}
@keyframes spark-fade {
  0%   { opacity: 0.8; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--spark-dx, 0), var(--spark-dy, 10px)) scale(0.3); }
}

/* ---------- Smoke particles (click bursts + loader) ---------- */
.smoke-layer {
  position: fixed; inset: 0; z-index: var(--z-overlay, 300);
  pointer-events: none; overflow: hidden;
}
.smoke-puff {
  position: absolute;
  width: var(--puff-size, 46px); height: var(--puff-size, 46px);
  margin: calc(var(--puff-size, 46px) / -2) 0 0 calc(var(--puff-size, 46px) / -2);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(226, 232, 240, 0.55) 0%,
    rgba(148, 163, 184, 0.35) 42%,
    rgba(100, 116, 139, 0) 72%);
  opacity: 0;
  will-change: transform, opacity;
  animation: smoke-rise var(--puff-dur, 1100ms) var(--ease-out-quart) forwards;
}
@keyframes smoke-rise {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.35) rotate(0deg); }
  18%  { opacity: var(--puff-opacity, 0.7); }
  100% { opacity: 0; transform: translate(var(--puff-dx, 0), var(--puff-dy, -60px)) scale(1.9) rotate(var(--puff-rot, 24deg)); }
}

/* ---------- Page loader (smoke until the page is ready) ---------- */
.page-loader {
  position: fixed; inset: 0; z-index: var(--z-toast, 500);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-5);
  background: var(--navy-900);
  transition: opacity 0.6s var(--ease-out-quart), visibility 0.6s var(--ease-out-quart);
  /* Failsafe: if JS never hides it (disabled/error), auto-clear so it never traps the page. */
  animation: loader-failsafe 0s linear 6s forwards;
}
.page-loader.is-hidden { opacity: 0; visibility: hidden; }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }

.page-loader-gear {
  width: 58px; height: 58px; color: var(--gold);
  animation: loader-spin 2.6s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .page-loader-gear { animation: none; }
}
@keyframes loader-spin { to { transform: rotate(360deg); } }
.page-loader-label {
  font-family: var(--font-heading); font-size: 22px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.7);
}
.page-loader-label span { color: var(--gold); }

section { padding-block: var(--space-9); }
section.section-tight { padding-block: var(--space-8); }
@media (max-width: 640px) {
  section { padding-block: var(--space-7); }
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-8);
}
.section-head h2 {
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: var(--space-3);
}
.section-head p { color: var(--gray); font-size: 17px; }

.bg-off-white { background: var(--off-white); }
.bg-navy { background: var(--navy-900); color: var(--white); }
.bg-navy .section-head p { color: rgba(255,255,255,0.68); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-standard),
              color var(--duration-base) var(--ease-standard),
              border-color var(--duration-base) var(--ease-standard);
  white-space: nowrap;
}
.btn {
  transition: background var(--duration-base) var(--ease-standard),
              color var(--duration-base) var(--ease-standard),
              border-color var(--duration-base) var(--ease-standard),
              transform 0.3s var(--ease-out-quart),
              box-shadow 0.3s var(--ease-out-quart);
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--gold); color: var(--navy-900); }
.btn-primary:hover { background: var(--gold-dark); box-shadow: 0 8px 24px var(--gold-glow); }
.btn-primary:focus-visible { outline: 2px solid var(--navy-900); outline-offset: 2px; }

.btn-secondary { background: transparent; color: var(--navy-900); border-color: var(--navy-900); }
.btn-secondary:hover { background: var(--navy-900); color: var(--white); box-shadow: 0 8px 24px rgba(11,21,34,0.25); }
.btn-secondary:focus-visible { outline: 2px solid var(--navy-900); outline-offset: 2px; }

.btn-on-dark.btn-secondary { color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-on-dark.btn-secondary:hover { background: var(--white); color: var(--navy-900); box-shadow: 0 8px 24px var(--gold-glow); }
.btn-on-dark.btn-secondary:focus-visible { outline-color: var(--white); }

.btn-whatsapp {
  width: 100%; background: #25D366; color: #fff;
  transition: background 0.3s var(--ease-standard), transform 0.3s var(--ease-out-quart), box-shadow 0.3s var(--ease-out-quart);
}
.btn-whatsapp:hover { background: #1eb958; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,211,102,0.35); }
.btn-whatsapp svg { width: 16px; height: 16px; }

/* ============================================================
   Header
   ============================================================ */
.site-header-group {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-sticky);
  background: transparent;
  transition: background 0.35s var(--ease-standard), backdrop-filter 0.35s var(--ease-standard), border-color 0.35s var(--ease-standard), transform 0.35s var(--ease-standard);
  border-bottom: 1px solid transparent;
}
/* Auto-hide: slide the whole bar up out of view when scrolling down (toggled
   by main.js). Kept off-screen fully so no sliver remains. */
.site-header-group.is-hidden {
  transform: translateY(-100%);
}
/* Home page, once scrolled off the hero: frosted-glass bar. */
.site-header-group.is-scrolled {
  background: rgba(11,21,34,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border-dark);
}
/* Inner pages have no hero for the header to float over — make it a fully
   opaque solid bar so scrolled content passes completely behind it (no
   see-through "hovering" look). */
body:not(.home):not(.front-page) .site-header-group {
  background: var(--navy-900);
  border-bottom-color: var(--border-dark);
}
.site-header-group .site-logo,
.site-header-group .site-nav-links a,
.site-header-group .utility-bar a {
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.utility-bar {
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: var(--text-small);
}
.utility-bar .container {
  display: flex; justify-content: space-between; align-items: center;
  padding-block: var(--space-2);
  gap: var(--space-5);
}
.utility-bar a { text-decoration: none; color: inherit; }
.utility-bar a:hover { color: var(--gold); }
.utility-links { display: flex; gap: var(--space-5); }
.utility-social { display: flex; gap: var(--space-4); }
@media (max-width: 768px) { .utility-social { display: none; } }
@media (max-width: 560px) { .utility-links > *:nth-child(n+2) { display: none; } }

.site-header {
  background: transparent;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}
.site-logo {
  display: inline-flex; align-items: center;
  color: var(--white); text-decoration: none;
  white-space: nowrap;
}
.site-logo img { display: block; height: 48px; width: auto; }
.site-logo-full img { height: 96px; }

.site-nav { display: flex; align-items: center; gap: var(--space-6); }
.site-nav-links { display: flex; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.site-nav-links a {
  text-decoration: none; color: var(--white); font-weight: 500; font-size: 15px;
  transition: color var(--duration-base) var(--ease-standard);
  padding-block: var(--space-2);
}
.site-nav-links a:hover { color: var(--gold); }
.site-nav-links a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 2px; }

.nav-toggle {
  display: none;
  background: none; border: none; color: var(--white); cursor: pointer;
  padding: var(--space-2);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .site-nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav .btn-primary { padding: 10px 18px; font-size: 14px; }
}

/* Mobile menu panel */
.mobile-menu {
  display: none;
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: var(--navy-900);
}
.mobile-menu.is-open { display: block; }
.mobile-menu .container { padding-top: var(--space-6); }
.mobile-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-8); }
.mobile-menu-close { background: none; border: none; color: var(--white); cursor: pointer; padding: var(--space-2); }
.mobile-menu-close svg { width: 26px; height: 26px; }
.mobile-menu-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-6); }
.mobile-menu-links a {
  text-decoration: none; color: var(--white); font-family: var(--font-heading);
  font-size: 26px; font-weight: 700;
}
.mobile-menu-links a:hover { color: var(--gold); }
.mobile-menu .btn-primary { margin-top: var(--space-8); width: 100%; }

/* ============================================================
   Hero — interactive industry switcher
   ============================================================ */
.hero {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--navy-900);
}

.hero-bg-layer {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transform-origin: center center;
  will-change: transform, opacity;
  /* Linear, not eased. The two images cross-dissolve, so the outgoing one's
     opacity has to fall at the same rate the incoming one's rises or the
     midpoint doesn't hold. An ease-out curve put the new image at ~94% opacity
     by the halfway mark, which read as a jump cut with a long lazy tail. */
  transition: opacity 1.2s linear;
}
.hero-bg-img.is-active { opacity: 1; z-index: 1; }

.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(105deg, rgba(11,21,34,0.82) 0%, rgba(11,21,34,0.62) 30%, rgba(11,21,34,0.28) 55%, rgba(11,21,34,0.12) 100%),
              linear-gradient(0deg, rgba(11,21,34,0.55) 0%, rgba(11,21,34,0) 35%);
}

/* Subtle animated diagonal-line texture over the hero photo, for industrial atmosphere */
.hero-lines {
  position: absolute; inset: -10% -10%; z-index: 2;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.05) 0px,
    rgba(255,255,255,0.05) 1px,
    transparent 1px,
    transparent 26px
  );
  opacity: 0.5;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-lines { display: none; }
}

.hero-inner {
  position: relative; z-index: 3;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
  padding-block: var(--space-9) var(--space-8);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-content: center;
}

.hero-content { max-width: 640px; }

.hero-logo {
  display: block;
  height: 108px;
  width: auto;
  margin-bottom: var(--space-6);
}

.hero-headline {
  font-size: var(--text-display);
  line-height: 1.05;
  color: var(--white);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.55);
}
.hero-headline-industry {
  color: var(--gold);
  display: inline-block;
}

.hero-punchline {
  margin-top: var(--space-5);
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255,255,255,0.88);
  max-width: 52ch;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.hero-cta-row { display: flex; gap: var(--space-4); margin-top: var(--space-7); flex-wrap: wrap; }

/* ---------- Site search (template-parts/search-bar.php) ---------- */
.site-search { position: relative; max-width: 460px; margin-top: var(--space-6); }
.site-search-form {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.96); border-radius: 999px;
  padding: 4px 6px 4px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.site-search-icon { flex: none; color: var(--gray); }
.site-search-input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  padding: 10px 0; outline: none;
}
.site-search-input::placeholder { color: var(--gray); }
.site-search-submit {
  flex: none; border: 0; background: var(--navy-900); color: var(--white);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  font-size: 0; display: flex; align-items: center; justify-content: center;
  transition: background var(--duration-base);
}
.site-search-submit::before {
  content: ""; width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.site-search-submit:hover { background: var(--gold-dark); }

.site-search-dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 60;
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3); max-height: 70vh; overflow-y: auto;
  padding: var(--space-3) 0;
  opacity: 0; transform: translateY(-6px) scale(0.98);
  transition: opacity 0.16s var(--ease-out-quart), transform 0.16s var(--ease-out-quart);
}
.site-search-dropdown.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.ss-group { padding: var(--space-2) 0; }
.ss-group + .ss-group { border-top: 1px solid var(--border); }
.ss-group-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--gray); padding: 6px var(--space-5);
}
.ss-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 8px var(--space-5); text-decoration: none; color: inherit;
  transition: background var(--duration-fast, 0.12s);
}
.ss-item:hover, .ss-item.is-active { background: var(--off-white); }
.ss-thumb { flex: none; width: 36px; height: 36px; border-radius: var(--radius-sm); overflow: hidden; background: var(--navy-900); }
.ss-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ss-thumb-icon {
  display: flex; align-items: center; justify-content: center;
  background: rgba(227,167,18,0.1); color: var(--gold-dark); border: 1px solid rgba(227,167,18,0.2);
}
.ss-item-text { display: flex; flex-direction: column; min-width: 0; }
.ss-item-text strong { font-size: 14px; color: var(--navy-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-item-text span { font-size: 12px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-mark { background: rgba(227,167,18,0.28); color: inherit; border-radius: 2px; padding: 0 1px; }
.ss-view-all {
  display: block; text-align: center; padding: 10px var(--space-5) 4px;
  font-size: 13px; font-weight: 600; color: var(--gold-dark); text-decoration: none;
}
.ss-view-all:hover { text-decoration: underline; }
.ss-empty { padding: var(--space-4) var(--space-5); font-size: 13.5px; color: var(--gray); }
.ss-empty a { color: var(--gold-dark); }

@media (max-width: 560px) {
  .site-search { max-width: 100%; }
}

/* ---------- Compact nav search (icon that expands into the panel) ---------- */
.nav-search { position: relative; display: flex; align-items: center; }
.nav-search-toggle {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: transparent; color: var(--white); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--duration-base);
}
.nav-search-toggle:hover { background: rgba(255,255,255,0.1); }
.nav-search.is-open .nav-search-toggle { background: rgba(255,255,255,0.14); color: var(--gold); }
.nav-search-panel {
  position: absolute; top: calc(100% + 14px); right: 0; z-index: 60;
  width: 0; opacity: 0; pointer-events: none; overflow: hidden;
  transition: width 0.25s var(--ease-out-quart), opacity 0.2s var(--ease-out-quart);
}
.nav-search.is-open .nav-search-panel { width: 320px; opacity: 1; pointer-events: auto; }
.nav-search-panel .site-search { max-width: none; margin-top: 0; width: 320px; }
@media (max-width: 900px) {
  .nav-search { display: none; } /* mobile menu carries its own always-visible search instead */
}

/* ---------- Mobile menu search ---------- */
.mobile-menu .site-search { margin: 0 0 var(--space-6); max-width: none; }

.hero-industries {
  margin-top: var(--space-9);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.16);
  padding-top: var(--space-5);
}
.hero-industry-tab {
  background: none; border: none; padding: var(--space-2) 0;
  font-family: var(--font-heading); font-weight: 600; font-size: 17px;
  color: rgba(255,255,255,0.62);
  cursor: pointer;
  position: relative;
  transition: color var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-out-quart);
}
.hero-industry-tab::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -1px; height: 2px;
  background: var(--gold);
  transition: right var(--duration-base) var(--ease-out-quart);
}
.hero-industry-tab:hover,
.hero-industry-tab:focus-visible {
  color: var(--white);
  transform: translateY(-1px);
}
.hero-industry-tab:hover::after,
.hero-industry-tab:focus-visible::after { right: 0; background: rgba(227,167,18,0.55); }
.hero-industry-tab.is-active { color: var(--gold); }
.hero-industry-tab.is-active::after { right: 0; background: var(--gold); }
.hero-industry-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 2px; }

/* ---------- Product circles: 2x2 grid, right side of hero ---------- */
.hero-products {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  width: max-content;
  margin-inline: auto;
}
/* Now an <a> to the product's details page. Reset the link chrome and give it a
   quiet hover lift so it reads as clickable without adding a second accent. */
.hero-product-circle {
  display: block;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.hero-product-circle-img {
  position: relative;
  width: 148px; height: 148px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.28);
  background: var(--navy-700);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  transition: transform var(--duration-fast) var(--ease-out-quart),
              border-color var(--duration-fast) var(--ease-out-quart),
              box-shadow var(--duration-fast) var(--ease-out-quart);
}
.hero-product-circle:hover .hero-product-circle-img,
.hero-product-circle:focus-visible .hero-product-circle-img {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}
.hero-product-circle:hover .hero-product-label,
.hero-product-circle:focus-visible .hero-product-label {
  color: #fff;
}
.hero-product-circle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
  border-radius: var(--radius-md, 8px);
}
.hero-circle-layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out-quart);
}
.hero-circle-layer.is-active { opacity: 1; }
.hero-product-label {
  display: block; margin-top: var(--space-3);
  font-size: 12.5px; color: rgba(255,255,255,0.75);
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

@media (min-width: 860px) {
  .hero-inner {
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    column-gap: var(--space-9);
  }
  .hero-products { margin-inline: 0 0 0 auto; }
}

@media (max-width: 640px) {
  .hero { min-height: 0; }
  .hero-inner { padding-block: var(--space-8) var(--space-7); }
  .hero-logo { height: 76px; }
  .hero-cta-row .btn { flex: 1 1 auto; }
  .hero-products { gap: var(--space-4); }
  .hero-product-circle-img { width: 100px; height: 100px; }
}

/* Pending-photo placeholder treatment (used until real photography lands) */
.pending-photo {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: rgba(255,255,255,0.45);
}
.pending-photo svg { width: 28px; height: 28px; opacity: 0.6; }
.pending-photo span { font-size: 11px; letter-spacing: 0.04em; text-align: center; padding-inline: var(--space-2); }
.hero-product-circle .pending-photo svg { width: 20px; height: 20px; }
.hero-product-circle .pending-photo span { font-size: 9px; }

/* ============================================================
   Stats counter
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-7);
  text-align: center;
}
.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 1.6rem + 2.5vw, 3rem);
  color: var(--gold);
  letter-spacing: 0.01em;
}
.stat-label {
  display: block; margin-top: var(--space-2);
  font-size: 13.5px; color: rgba(255,255,255,0.7);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ============================================================
   Why Choose
   ============================================================ */
.why-choose-grid {
  display: grid; grid-template-columns: 1fr; gap: var(--space-8);
}
@media (min-width: 860px) {
  .why-choose-grid { grid-template-columns: 0.85fr 1fr; gap: var(--space-9); }
}
.why-choose-intro h2 { font-size: var(--text-h2); color: var(--navy-900); margin-bottom: var(--space-4); }
.why-choose-intro p { color: var(--gray); font-size: 17px; line-height: 1.7; max-width: 46ch; }

.why-choose-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-7) var(--space-6);
}
.why-choose-item { display: flex; gap: var(--space-4); }
.why-choose-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--off-white); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-900);
}
.why-choose-icon svg { width: 20px; height: 20px; }
.why-choose-item h3 { font-size: var(--text-h3); font-weight: 600; color: var(--navy-900); margin-bottom: var(--space-2); }
.why-choose-item p { color: var(--gray); font-size: 14.5px; line-height: 1.6; }

/* ============================================================
   Product cards / Featured products
   ============================================================ */
.section-foot-link {
  margin-top: var(--space-7);
  display: flex; justify-content: center;
}

.product-grid {
  display: grid;
  /* auto-FILL (not auto-fit): keeps the empty tracks so a lone product on the
     last page of a category stays one column wide instead of stretching full
     width. Full pages are unaffected. */
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-6);
}
/* When only a few cards remain, cap the row so they don't balloon on wide
   screens — they align left at a natural card width. Scoped to exclude the 3D
   showcase grid (.product-grid-3d), whose preserve-3d tilt cards must not be
   constrained here. */
.product-grid:not(.product-grid-3d) > * { min-width: 0; max-width: 420px; }
/* 3D Products section: caps column width so a small number of 3D-eligible
   products (currently just one) doesn't stretch a lone card full-width. */
.product-grid-3d { grid-template-columns: repeat(auto-fit, minmax(240px, 340px)); justify-content: center; }

/* ---------- Client Logos (slow auto-scrolling marquee) ---------- */
.client-logos { padding-block: var(--space-7); background: var(--off-white); overflow: hidden; }
.client-logos-label {
  text-align: center; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gray); margin-bottom: var(--space-6);
}
.client-logos-marquee {
  position: relative; width: 100%; overflow: hidden;
  /* Fade the logos in/out at the edges for a premium, endless feel. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.client-logos-track {
  display: flex; width: max-content;
  /* Duration is long so it glides slowly; 22 logos x 2 passes. */
  animation: clientLogosScroll 80s linear infinite;
}
.client-logos-marquee:hover .client-logos-track { animation-play-state: paused; }
@keyframes clientLogosScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); } /* exactly one full set — seamless because the set is duplicated */
}
.client-logo-item {
  flex: none; width: 160px; height: 88px; margin-inline: var(--space-4);
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-4);
}
.client-logo-item img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  /* Desaturate at rest so the strip reads as one calm band; full colour on hover. */
  filter: grayscale(1); opacity: 0.72;
  transition: filter var(--duration-base) var(--ease-standard), opacity var(--duration-base) var(--ease-standard);
}
.client-logo-item:hover img { filter: grayscale(0); opacity: 1; }

/* ---------- Video Testimonials (placeholder grid, awaiting real videos) ---------- */
.video-testimonial-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-6);
}
.video-testimonial-placeholder {
  aspect-ratio: 16/10; border-radius: var(--radius-md);
  background: var(--steel); border: 1px dashed var(--border-dark);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.25);
}

.product-tilt-card {
  position: relative;
  height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--steel);
  border: 1px solid var(--border-dark);
  transition: border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}
.product-tilt-card:hover,
.product-tilt-card:focus-within {
  border-color: var(--gold);
  box-shadow: 0 20px 48px rgba(0,0,0,0.4), 0 0 0 1px var(--gold-glow);
}

.product-tilt-face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
}
.product-tilt-img { height: 60%; overflow: hidden; }
.product-tilt-img img { width: 100%; height: 100%; object-fit: cover; }
.product-tilt-body { padding: var(--space-5); }
.product-tilt-body h3 { font-size: 20px; color: var(--white); margin-bottom: var(--space-2); }
.product-tilt-body p {
  font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.5;
  /* Clamp regardless of source content length so a long tagline can never
     overflow the card and push the product photo out of view. */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.product-tilt-panel {
  position: absolute; inset: 0; top: 15%;
  display: grid; grid-template-columns: 1fr 1.1fr;
  background: var(--navy-900);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-tilt-card:hover .product-tilt-panel,
.product-tilt-card:focus-within .product-tilt-panel { transform: translateY(0); }

.product-tilt-panel-img { overflow: hidden; }
.product-tilt-panel-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); }
.product-tilt-panel-specs { padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; }
.product-tilt-panel-specs h4 { font-size: 15px; color: var(--gold); margin-bottom: var(--space-3); }
.product-tilt-panel-specs ul { list-style: none; margin: 0 0 var(--space-4); padding: 0; flex: 1; }
.product-tilt-panel-specs li {
  display: flex; justify-content: space-between; gap: var(--space-3);
  font-size: 12px; padding-block: 6px;
  border-bottom: 1px solid var(--border-dark);
  color: rgba(255,255,255,0.6);
}
.product-tilt-panel-specs li b { color: var(--white); font-weight: 600; text-align: right; }
.product-tilt-hint { font-size: 12px; color: var(--gold); margin-bottom: var(--space-3); }
.product-tilt-card[data-card-link] { cursor: pointer; }

/* Mobile: the hover-driven 3D flip panel is never usable on touch, and
   transform-style:preserve-3d can render blank on some mobile browsers. On
   small screens, flatten the card and show just the product face (image +
   title). Tapping still opens the full 3D viewer. Robust everywhere. */
@media (max-width: 700px) {
  .product-tilt-card { transform-style: flat; }
  .product-tilt-panel { display: none; }
}

/* ---------- Resource Center teaser cards (homepage) ----------
   Same tilt + slide-up-reveal interaction as .product-tilt-card above,
   adapted for icon-led category cards instead of product photography. */
.resource-teaser-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}
.resource-tilt-card {
  position: relative; display: block; height: 320px;
  border-radius: var(--radius-md); overflow: hidden;
  background: var(--steel); border: 1px solid var(--border-dark);
  text-decoration: none;
  transition: border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}
.resource-tilt-card:hover,
.resource-tilt-card:focus,
.resource-tilt-card:focus-within {
  border-color: var(--gold);
  box-shadow: 0 20px 48px rgba(0,0,0,0.4), 0 0 0 1px var(--gold-glow);
}
.resource-tilt-face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--space-6);
}
.resource-tilt-icon { width: 52px; height: 52px; color: var(--gold-dark); margin-bottom: var(--space-4); }
.resource-tilt-icon svg { width: 100%; height: 100%; }
.resource-tilt-face h3 { font-family: var(--font-heading); font-size: 20px; color: var(--white); margin-bottom: var(--space-2); letter-spacing: 0.01em; }
.resource-tilt-face p { font-size: 13.5px; color: rgba(255,255,255,0.6); line-height: 1.5; max-width: 26ch; }

.resource-tilt-panel {
  position: absolute; inset: 0; top: 15%;
  background: var(--navy-900);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  padding: var(--space-5) var(--space-6);
  display: flex; flex-direction: column;
}
.resource-tilt-card:hover .resource-tilt-panel,
.resource-tilt-card:focus .resource-tilt-panel,
.resource-tilt-card:focus-within .resource-tilt-panel { transform: translateY(0); }
.resource-tilt-panel h4 { font-size: 12.5px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--space-3); }
.resource-tilt-panel ul { list-style: none; margin: 0 0 var(--space-4); padding: 0; flex: 1; }
.resource-tilt-panel li {
  font-size: 13px; padding-block: 7px; border-bottom: 1px solid var(--border-dark);
  color: rgba(255,255,255,0.75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.resource-tilt-panel li:last-child { border-bottom: 0; }
.resource-tilt-panel .btn { align-self: flex-start; pointer-events: none; }

@media (max-width: 640px) {
  .product-tilt-panel { grid-template-columns: 1fr; }
  .product-tilt-panel-img { display: none; }
}

/* ============================================================
   Industries served (icon grid)
   ============================================================ */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-5);
}
.industry-chip {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
  text-align: center;
  padding: var(--space-6) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-dark);
  background: var(--navy-700);
  overflow: hidden;
  isolation: isolate;
  transition: border-color var(--duration-base) var(--ease-standard);
}
.industry-chip::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--chip-bg) center / cover;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out-quart);
}
.industry-chip::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11,21,34,0.55) 0%, rgba(11,21,34,0.88) 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out-quart);
}
.industry-chip:hover { border-color: var(--gold); }
.industry-chip:hover::before,
.industry-chip:hover::after { opacity: 1; }
.industry-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(227,167,18,0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  transition: transform 0.35s var(--ease-out-quart);
}
.industry-chip:hover .industry-icon { transform: scale(1.08); }
.industry-icon svg { width: 22px; height: 22px; }
.industry-chip span { font-family: var(--font-heading); font-size: 16px; letter-spacing: 0.02em; color: var(--white); }

/* ============================================================
   Trust strip — industries we supply (horizontal scroll)
   ============================================================ */
.trust-scroll {
  display: flex; gap: var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-3);
  margin: 0 calc(var(--space-5) * -1);
  padding-inline: var(--space-5);
}
.trust-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}
.trust-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-900); margin-bottom: var(--space-4);
}
.trust-icon svg { width: 22px; height: 22px; }
.trust-card h3 { font-size: 19px; color: var(--navy-900); margin-bottom: var(--space-2); }
.trust-card p { color: var(--gray); font-size: 14.5px; line-height: 1.6; }

/* ============================================================
   CTA band
   ============================================================ */
.cta-band { text-align: center; }
.cta-band h2 { font-size: var(--text-h1); color: var(--white); margin-bottom: var(--space-4); max-width: 26ch; margin-inline: auto; }
.cta-band p { color: rgba(255,255,255,0.72); font-size: 17px; max-width: 52ch; margin-inline: auto; margin-bottom: var(--space-7); }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: center; }

/* ---------- Supply category chips (About page) ---------- */
.supply-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-5); border-radius: var(--radius-md);
  background: var(--navy-700); border: 1px solid var(--border-dark);
  text-decoration: none; transition: border-color var(--duration-base), transform var(--duration-base);
}
.supply-chip:hover { border-color: var(--gold); transform: translateY(-3px); }
.supply-chip .industry-icon { background: rgba(227,167,18,0.1); color: var(--gold); }
.supply-chip span { font-family: var(--font-heading); font-size: 16px; letter-spacing: 0.02em; color: var(--white); }
.supply-chip p { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.5; margin: 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.7); padding-block: var(--space-9) var(--space-6); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-dark);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .site-logo { display: inline-block; margin-bottom: var(--space-4); }
.footer-brand p { max-width: 34ch; font-size: 14.5px; line-height: 1.7; }
.footer-social { display: flex; gap: var(--space-4); margin-top: var(--space-5); }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-dark);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); transition: border-color var(--duration-base), color var(--duration-base);
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); }
.footer-social svg { width: 16px; height: 16px; }

.footer-col h3 {
  font-family: var(--font-heading); font-size: 14px; font-weight: 600;
  color: var(--white); margin-bottom: var(--space-5); letter-spacing: 0.02em;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { text-decoration: none; font-size: 14.5px; transition: color var(--duration-base); }
.footer-col a:hover { color: var(--gold); }
.footer-col address { font-style: normal; font-size: 14.5px; line-height: 1.8; }

.footer-bottom {
  padding-top: var(--space-6);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3);
  font-size: 13px; color: rgba(255,255,255,0.6);
}
.footer-disclaimer { max-width: 60ch; }

/* ============================================================
   WhatsApp docked widget
   ============================================================ */
.whatsapp-dock-wrap {
  position: fixed; right: var(--space-5); bottom: var(--space-5); z-index: var(--z-toast);
  display: flex; align-items: center; gap: var(--space-3);
}
.whatsapp-dock {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  text-decoration: none;
  transition: transform var(--duration-base) var(--ease-out-quart);
  animation: whatsapp-pulse 3s ease-out infinite;
}
.whatsapp-dock:hover { transform: scale(1.08); animation-play-state: paused; }
.whatsapp-dock:focus-visible { outline: 2px solid var(--navy-900); outline-offset: 3px; }
.whatsapp-dock svg { width: 28px; height: 28px; }

.whatsapp-tooltip {
  order: -1;
  background: var(--navy-900); color: var(--white);
  font-size: 13px; font-weight: 500;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0; transform: translateX(8px);
  transition: opacity 0.25s var(--ease-standard), transform 0.25s var(--ease-out-quart);
  pointer-events: none;
}
.whatsapp-dock-wrap:hover .whatsapp-tooltip,
.whatsapp-dock:focus-visible ~ .whatsapp-tooltip { opacity: 1; transform: translateX(0); }

@keyframes whatsapp-pulse {
  0% { box-shadow: 0 6px 20px rgba(0,0,0,0.25), 0 0 0 0 rgba(37,211,102,0.55); }
  70% { box-shadow: 0 6px 20px rgba(0,0,0,0.25), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 6px 20px rgba(0,0,0,0.25), 0 0 0 0 rgba(37,211,102,0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-bg-img, .hero-circle-layer, .hero-industry-tab::after,
  .product-tilt-card, .product-tilt-panel, .whatsapp-dock, .skip-link, .reveal, .industry-chip::before, .industry-chip::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
  /* Stop the client-logo marquee from moving; let it wrap into a static row. */
  .client-logos-track { animation: none !important; flex-wrap: wrap; justify-content: center; width: 100%; }
}

/* Industry chips on the homepage are now links to their Industry Solutions
   page (front-page.php). Keep the anchor visually identical to the div. */
a.industry-chip { text-decoration: none; }

/* ---------- Testimonials (CPT-driven; see front-page.php + wp-admin → Testimonials) ---------- */
.testimonial-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-6); margin-top: var(--space-7); }
.testimonial-card { background: #fff; border: 1px solid var(--border-light, #e7e9ee); border-radius: var(--radius-md, 10px); padding: var(--space-6); box-shadow: 0 8px 24px rgba(11,21,34,0.05); display: flex; flex-direction: column; gap: var(--space-5); }
.testimonial-card blockquote { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--navy-900, #0B1522); position: relative; }
.testimonial-card blockquote::before { content: "\201C"; color: var(--gold, #E3A712); font-size: 40px; line-height: 0; position: absolute; top: 12px; left: -4px; opacity: 0.25; }
.testimonial-card figcaption { display: flex; align-items: center; gap: var(--space-3); margin-top: auto; }
.testimonial-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.testimonial-meta { display: flex; flex-direction: column; line-height: 1.3; }
.testimonial-meta b { font-size: 14px; color: var(--navy-900, #0B1522); }
.testimonial-meta span { font-size: 12.5px; color: var(--muted, #5b6472); }
