/* ==========================================================================
   Aurem — Clients section (animated SVG logo wall).
   Uses brand tokens from hero.css (:root --ah-*) and shared components.
   ========================================================================== */

.ah-clients {
  z-index: 1;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(80px, 12vh, 150px) 0 clamp(100px, 16vh, 180px);
}
.ah-clients > .ah-grain { z-index: 0; opacity: .06; }
.ah-clients__inner { position: relative; z-index: 1; max-width: 1680px; margin: 0 auto; padding: 0 var(--ah-gutter); }

/* ---------- Intro ---------- */
.ah-clients__intro {
  display: grid; grid-template-columns: minmax(0, 1.5fr) auto;
  gap: clamp(32px, 6vw, 120px); align-items: end;
  margin-top: clamp(40px, 8vh, 90px);
}
.ah-clients__title {
  max-width: 14ch;
  font-family: var(--ah-display); font-variation-settings: "opsz" 96;
  font-weight: 600; font-size: clamp(2.4rem, 5.6vw, 6.2rem);
  line-height: .98; letter-spacing: -.05em;
}
.ah-clients__title em { font-family: var(--ah-serif); font-style: italic; font-weight: 400; font-size: 1.06em; color: var(--ah-blush); letter-spacing: -.02em; }
.ah-clients__stats { display: flex; gap: 12px; padding-bottom: .5em; }
.ah-clients__stats li {
  min-width: 160px; padding: 18px 20px;
  border-radius: var(--ah-radius-md);
  border: 1px solid var(--ah-line); background: rgba(255, 255, 255, .03);
}
.ah-clients__stats strong {
  display: block;
  font-family: var(--ah-display); font-weight: 600;
  font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1; letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.ah-clients__stats li > span { display: block; margin-top: 8px; font-size: 13px; color: var(--ah-muted); }

/* ---------- Logo wall ----------
   1px gaps on a glowing background = borders that light up under the cursor. */
.ah-client-wall {
  --mx: -999px; --my: -999px;
  list-style: none; margin: clamp(48px, 9vh, 90px) 0 0; padding: 1px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  border-radius: var(--ah-radius-lg);
  background:
    radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 90, 42, .75), rgba(255, 197, 143, .15) 35%, transparent 60%),
    var(--ah-line);
  perspective: 1400px;
}
.ah-client {
  --cx: -999px; --cy: -999px;
  position: relative;
  min-height: clamp(150px, 16vw, 230px);
  display: grid; place-items: center;
  padding: 28px 28px 52px;
  background: var(--ah-ink);
  overflow: hidden;
  color: rgba(247, 239, 233, .5);
  transition: color .5s var(--ah-ease);
  transform-style: preserve-3d;
}
/* round the four outer corners of the wall */
.ah-client:nth-child(1) { border-top-left-radius: calc(var(--ah-radius-lg) - 1px); }
.ah-client:nth-child(4) { border-top-right-radius: calc(var(--ah-radius-lg) - 1px); }
.ah-client:nth-child(9) { border-bottom-left-radius: calc(var(--ah-radius-lg) - 1px); }
.ah-client:nth-child(12) { border-bottom-right-radius: calc(var(--ah-radius-lg) - 1px); }

/* inner spotlight */
.ah-client::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(300px circle at var(--cx) var(--cy), rgba(255, 90, 42, .13), transparent 60%);
}
/* periodic glint sweep (class toggled by clients.js) */
.ah-client::after {
  content: ""; position: absolute; inset: -50% auto -50% -60%; z-index: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 197, 143, .12), transparent);
  transform: rotate(18deg) translateX(0);
  opacity: 0; pointer-events: none;
}
.ah-client.is-glint::after { animation: ah-glint 1.3s var(--ah-ease) forwards; }
@keyframes ah-glint {
  0% { opacity: 1; transform: rotate(18deg) translateX(0); }
  100% { opacity: 1; transform: rotate(18deg) translateX(520%); }
}

.ah-client svg {
  position: relative; z-index: 1;
  width: min(100%, 260px); height: auto; overflow: visible;
  transition: transform .8s var(--ah-ease);
}
.ah-client:hover { color: var(--ah-text); }
.ah-client:hover svg { transform: scale(1.06); }

/* SVG parts */
.ah-client .d {
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
  transition: stroke .5s;
}
.ah-client .f { fill: var(--ah-ember); }
.ah-client .acc { stroke: currentColor; }
.ah-client:hover .acc { stroke: var(--ah-ember); }
.ah-client .t { fill: currentColor; transition: fill .5s; }
.ah-client .t-display { font-family: var(--ah-display); font-weight: 700; letter-spacing: -.04em; }
.ah-client .t-heavy { font-weight: 800; }
.ah-client .t-sans { font-family: var(--ah-sans); font-weight: 700; }
.ah-client .t-semi { font-weight: 600; }
.ah-client .t-serif { font-family: var(--ah-serif); }
.ah-client .t-serif-i { font-family: var(--ah-serif); font-style: italic; }
.ah-client .t-acc { fill: var(--ah-ember); }

/* rotating parts pivot around the mark centre (24,24) */
.ah-lg-spin, .ah-lg-rays, .ah-lg-hex, .ah-lg-hand, .ah-lg-moon {
  transform-box: view-box; transform-origin: 24px 24px;
  transition: transform 1.1s var(--ah-ease);
}

/* ---------- Per-logo hover micro-animations ---------- */
.ah-client--northwind:hover .ah-lg-spin { transform: rotate(360deg); }
.ah-client--lumen:hover .ah-lg-rays { transform: rotate(90deg) scale(1.12); }
.ah-client--halcyon .ah-lg-wings { transform-box: fill-box; transform-origin: 50% 100%; }
.ah-client--halcyon:hover .ah-lg-wings { animation: ah-flap .5s ease-in-out 3 alternate; }
@keyframes ah-flap { to { transform: scaleY(.45); } }
.ah-client--mirage .ah-lg-sun { transition: transform 1s var(--ah-ease); }
.ah-client--mirage:hover .ah-lg-sun { transform: translateY(9px); }
.ah-client--kova:hover .ah-lg-hex { transform: rotate(60deg); }
.ah-client--vertex .ah-lg-dot { transform-box: fill-box; transform-origin: center; }
.ah-client--vertex:hover .ah-lg-dot { animation: ah-pop .6s var(--ah-ease); }
.ah-client--vertex:hover .ah-lg-dot:nth-of-type(2) { animation-delay: .1s; }
.ah-client--vertex:hover .ah-lg-dot:nth-of-type(3) { animation-delay: .2s; }
@keyframes ah-pop { 50% { transform: scale(1.8); } }
.ah-client--solace:hover .ah-lg-moon { transform: rotate(-24deg); }
.ah-client--solace .ah-lg-star { transform-box: fill-box; transform-origin: center; }
.ah-client--solace:hover .ah-lg-star { animation: ah-twinkle .9s ease-in-out infinite; }
@keyframes ah-twinkle { 50% { transform: scale(.4) rotate(45deg); opacity: .4; } }
.ah-client--sonora .ah-lg-bars path { transform-box: fill-box; transform-origin: center; }
.ah-client--sonora:hover .ah-lg-bars path { animation: ah-eq .7s ease-in-out infinite alternate; }
.ah-client--sonora:hover .ah-lg-bars path:nth-child(2) { animation-delay: -.2s; }
.ah-client--sonora:hover .ah-lg-bars path:nth-child(3) { animation-delay: -.45s; }
.ah-client--sonora:hover .ah-lg-bars path:nth-child(4) { animation-delay: -.1s; }
.ah-client--sonora:hover .ah-lg-bars path:nth-child(5) { animation-delay: -.35s; }
@keyframes ah-eq { from { transform: scaleY(.3); } to { transform: scaleY(1.1); } }
.ah-client--tempo:hover .ah-lg-hand { transform: rotate(720deg); transition-duration: 1.6s; }
.ah-client--voltaic:hover .ah-lg-bolt { animation: ah-flicker .9s steps(1) 1; filter: drop-shadow(0 0 6px rgba(255, 90, 42, .9)); }
@keyframes ah-flicker { 0%, 20%, 45%, 100% { opacity: 1; } 10%, 35% { opacity: .15; } }

/* meta row revealed on hover */
.ah-client__meta {
  position: absolute; left: 22px; right: 22px; bottom: 16px; z-index: 1;
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ah-muted);
  opacity: 0; transform: translateY(12px);
  transition: opacity .5s, transform .7s var(--ah-ease);
}
.ah-client__meta span:last-child { color: var(--ah-ember); }
.ah-client:hover .ah-client__meta { opacity: 1; transform: none; }

/* CTA cell */
.ah-client--cta { padding: 0; }
.ah-client__cta {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  color: var(--ah-text);
  transition: background-color .5s;
}
.ah-client__cta:hover { background: linear-gradient(135deg, rgba(255, 90, 42, .16), rgba(200, 16, 46, .08)); }
.ah-client__cta-plus {
  position: relative; width: 52px; height: 52px; border-radius: 50%;
  border: 1px dashed rgba(255, 197, 143, .45);
  transition: transform .8s var(--ah-ease), background-color .5s, border-color .5s;
}
.ah-client__cta-plus i { position: absolute; left: 50%; top: 50%; width: 16px; height: 1.6px; margin: -.8px 0 0 -8px; background: currentColor; border-radius: 2px; }
.ah-client__cta-plus i:last-child { transform: rotate(90deg); }
.ah-client__cta:hover .ah-client__cta-plus { transform: rotate(90deg); background: var(--ah-ember); border-color: var(--ah-ember); border-style: solid; }
.ah-client__cta-text { font-family: var(--ah-display); font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.ah-client__cta-text em { font-family: var(--ah-serif); font-style: italic; font-weight: 400; color: var(--ah-blush); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .ah-clients__intro { grid-template-columns: 1fr; }
  .ah-client-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ah-client:nth-child(n) { border-radius: 0; }
  .ah-client-wall { overflow: hidden; }
}
@media (max-width: 640px) {
  .ah-clients__head .ah-label:last-child { display: none; }
  .ah-client-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ah-client { min-height: 120px; padding: 20px 16px 20px; }
  .ah-client__meta { display: none; }
  .ah-clients__stats li { min-width: 0; flex: 1; }
}
@media (hover: none) {
  .ah-client { color: rgba(247, 239, 233, .75); }
}
