/* ==========================================================================
   PMB Informatics — AI theme (home page)
   Modern CSS: nesting, @property, oklch / color-mix, container queries,
   scroll-driven animations (with JS fallback in pmb-ai.js).
   Palette sampled from the PMB logo: red, crimson, orange, violet, sky blue, navy.
   ========================================================================== */

@property --ai-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --ai-num {
  syntax: "<integer>";
  initial-value: 0;
  inherits: false;
}

:root {
  /* brand (from logo.jpg) */
  --pmb-red: #F7022B;
  --pmb-crimson: #EA0D52;
  --pmb-orange: #F18934;
  --pmb-violet: #5055F1;
  --pmb-blue: #19A0FA;
  --pmb-navy: #06006E;

  --ai-cyan: var(--pmb-blue);
  --ai-violet: var(--pmb-violet);
  --ai-coral: var(--pmb-crimson);
  --ai-orange: var(--pmb-orange);

  /* full logo spectrum for text & accents, contrast-safe pair for buttons */
  --ai-gradient: linear-gradient(100deg, var(--pmb-blue), var(--pmb-violet) 35%, var(--pmb-crimson) 70%, var(--pmb-orange));
  --ai-gradient-btn: linear-gradient(100deg, var(--pmb-violet), var(--pmb-crimson));
  --ai-radius: 20px;
  --ai-font: "Space Grotesk", "Red Hat Text", system-ui, sans-serif;
  --ai-mono: "JetBrains Mono", ui-monospace, monospace;
  --ai-ease: cubic-bezier(.2, .7, .2, 1);
}

/* Surface tokens — dark (default, built on logo navy) and light sections */
:root,
.ai-dark {
  --ai-bg: #070428;
  --ai-bg-2: #0d0a3c;
  --ai-surface: oklch(100% 0 0 / 0.04);
  --ai-surface-2: oklch(100% 0 0 / 0.08);
  --ai-border: oklch(80% 0.06 280 / 0.16);
  --ai-text: oklch(96% 0.01 280);
  --ai-muted: oklch(76% 0.03 280);
  --ai-accent-text: var(--pmb-blue);
  --ai-shadow: 0 24px 60px -30px oklch(0% 0 0 / .8);
  color-scheme: dark;
}

.ai-light {
  --ai-bg: #ffffff;
  --ai-bg-2: #f4f5ff;
  --ai-surface: color-mix(in srgb, var(--pmb-navy) 3%, transparent);
  --ai-surface-2: color-mix(in srgb, var(--pmb-navy) 6%, transparent);
  --ai-border: color-mix(in srgb, var(--pmb-navy) 11%, transparent);
  --ai-text: var(--pmb-navy);
  --ai-muted: #4a4d70;
  --ai-accent-text: #0a74c4;
  --ai-shadow: 0 24px 50px -28px color-mix(in srgb, var(--pmb-navy) 35%, transparent);
  color-scheme: light;
  background: var(--ai-bg);
}

/* ==========================================================================
   Base
   ========================================================================== */
.ai-home {
  background: var(--ai-bg);
  color: var(--ai-text);
  font-family: var(--ai-font);
  overflow-x: clip;

  & :where(h1, h2, h3) {
    font-family: var(--ai-font);
    color: var(--ai-text);
    text-wrap: balance;
    margin: 0;
  }

  & :where(p) {
    color: var(--ai-muted);
    font-family: var(--ai-font);
    text-wrap: pretty;
  }

  & :where(a) { text-decoration: none; }
  & :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
}

.ai-gradient-text {
  background: var(--ai-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ai-shimmer 6s linear infinite;
}

.ai-mono {
  font-family: var(--ai-mono);
  font-size: .85em;
  letter-spacing: .02em;
}

.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem 1rem;
  border: 1px solid var(--ai-border);
  border-radius: 999px;
  background: var(--ai-surface);
  backdrop-filter: blur(8px);
  font-family: var(--ai-mono);
  font-size: .8rem;
  color: var(--ai-muted);

  & .ai-chip__dot {
    width: 8px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--ai-cyan);
    box-shadow: 0 0 0 0 var(--ai-cyan);
    animation: ai-ping 2s infinite;
  }
}

.ai-eyebrow {
  display: inline-block;
  font-family: var(--ai-mono);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--ai-accent-text);
  margin-bottom: 1rem;

  &::before { content: "// "; color: var(--ai-violet); }
}

.ai-heading {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
}

/* ----- Buttons ----- */
.ai-btn {
  --_glow: color-mix(in oklch, var(--ai-violet) 55%, transparent);
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .95rem 1.6rem;
  border-radius: 14px;
  font-family: var(--ai-font);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  transition: transform .3s var(--ai-ease), box-shadow .3s var(--ai-ease), background .3s;

  & i { transition: transform .3s var(--ai-ease); }
  &:hover { transform: translateY(-2px); }
  &:hover i.fa-arrow-right { transform: translateX(4px); }
  &:focus-visible { outline: 2px solid var(--ai-cyan); outline-offset: 3px; }
}

.ai-btn--primary {
  color: #fff;
  background: var(--ai-gradient-btn);
  background-size: 160% auto;
  box-shadow: 0 10px 30px -10px var(--_glow);

  &:hover { color: #fff; background-position: right center; box-shadow: 0 16px 40px -10px var(--_glow); }
}

.ai-btn--ghost {
  color: var(--ai-text);
  background: var(--ai-surface);
  border: 1px solid var(--ai-border);
  backdrop-filter: blur(8px);

  &:hover { color: var(--ai-text); background: var(--ai-surface-2); border-color: color-mix(in oklch, var(--ai-cyan) 50%, transparent); }
}

.ai-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  color: var(--ai-accent-text);

  & i { transition: transform .3s var(--ai-ease); }
  &:hover { color: var(--ai-accent-text); }
  &:hover i { transform: translateX(4px); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.ai-hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(4rem, 8vw, 7.5rem) clamp(4rem, 7vw, 6rem);
  background:
    radial-gradient(60% 50% at 80% 10%, color-mix(in oklch, var(--ai-violet) 28%, transparent), transparent 70%),
    radial-gradient(50% 50% at 0% 100%, color-mix(in oklch, var(--ai-cyan) 18%, transparent), transparent 70%),
    var(--ai-bg);
  overflow: hidden;
}

.ai-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--ai-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--ai-border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  animation: ai-grid 20s linear infinite;
}

.ai-hero__orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  animation: ai-float 14s ease-in-out infinite;

  &.ai-hero__orb--one { width: 380px; aspect-ratio: 1; background: var(--ai-violet); top: -120px; right: 8%; }
  &.ai-hero__orb--two { width: 300px; aspect-ratio: 1; background: var(--ai-cyan); bottom: -140px; left: -80px; animation-delay: -7s; opacity: .35; }
}

.ai-hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.ai-hero__content > * + * { margin-top: 1.5rem; }

.ai-hero__title {
  font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4.6rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.035em;
}

.ai-hero__rotator {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: clamp(1.1rem, 1rem + .6vw, 1.45rem);
  font-weight: 600;
  color: var(--ai-text) !important;

  & .ai-mono { color: var(--ai-accent-text); font-size: .9em; }
}

.ai-rotator {
  --_h: 1.35em;
  display: inline-block;
  height: var(--_h);
  overflow: hidden;

  & .ai-rotator__track {
    display: flex;
    flex-direction: column;
    animation: ai-rotate 12s var(--ai-ease) infinite;
  }

  & span span { height: var(--_h); line-height: var(--_h); white-space: nowrap; }
}

.ai-caret {
  width: 3px;
  height: 1.2em;
  background: var(--ai-cyan);
  border-radius: 2px;
  animation: ai-blink 1s steps(1) infinite;
}

.ai-hero__text {
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.75;
}

.ai-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.ai-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  padding-top: .5rem;
  color: var(--ai-muted);
  font-size: .92rem;

  & strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ai-text);
  }

  & li + li { padding-left: 2rem; border-left: 1px solid var(--ai-border); }
}

/* ----- Hero visual ----- */
.ai-hero__visual {
  position: relative;
  min-height: 460px;
  display: grid;
  place-items: center;
}

.ai-hero__neural {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .9;
  mask-image: radial-gradient(closest-side, #000 60%, transparent);
}

.ai-console {
  position: relative;
  width: min(100%, 420px);
  border-radius: var(--ai-radius);
  background: color-mix(in oklch, var(--ai-bg-2) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--ai-border);
  box-shadow: 0 30px 80px -30px oklch(0% 0 0 / .8), 0 0 0 1px oklch(100% 0 0 / .03) inset;
  animation: ai-bob 7s ease-in-out infinite;

  /* rotating gradient border */
  &::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--ai-angle), transparent 60%, var(--ai-cyan), var(--ai-violet), transparent 90%);
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: ai-spin 5s linear infinite;
    pointer-events: none;
  }
}

.ai-console__bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--ai-border);

  & span { width: 10px; aspect-ratio: 1; border-radius: 50%; background: var(--ai-coral); }
  & span:nth-child(2) { background: var(--ai-orange); }
  & span:nth-child(3) { background: oklch(78% 0.17 150); }
  & em { margin-left: auto; font-style: normal; color: var(--ai-muted); }
}

.ai-console__body {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
}

.ai-msg {
  margin: 0;
  font-size: .92rem;
  line-height: 1.55;
  opacity: 0;
  animation: ai-pop .6s var(--ai-ease) forwards;
}

.ai-msg--user {
  justify-self: end;
  max-width: 85%;
  padding: .75rem 1rem;
  border-radius: 14px 14px 4px 14px;
  background: var(--ai-gradient-btn);
  color: #fff !important;
  animation-delay: .4s;
}

.ai-msg--bot {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .25rem .8rem;
  padding: 1rem;
  border-radius: 14px 14px 14px 4px;
  background: var(--ai-surface-2);
  animation-delay: 1.2s;
}

.ai-msg__avatar {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border-radius: 10px;
  background: color-mix(in oklch, var(--ai-violet) 35%, transparent);
  color: var(--ai-accent-text);
}

.ai-steps {
  display: grid;
  gap: .45rem;
  font-family: var(--ai-mono);
  font-size: .78rem;
  color: var(--ai-text);

  & li {
    display: flex;
    align-items: center;
    gap: .55rem;
    opacity: 0;
    animation: ai-pop .4s var(--ai-ease) forwards;

    &::before {
      content: "\2713";
      display: grid;
      place-items: center;
      width: 16px;
      aspect-ratio: 1;
      border-radius: 50%;
      font-size: .65rem;
      color: var(--ai-bg);
      background: var(--ai-cyan);
    }
  }

  & li:nth-child(1) { animation-delay: 1.8s; }
  & li:nth-child(2) { animation-delay: 2.5s; }
  & li:nth-child(3) { animation-delay: 3.2s; }
  & li:nth-child(4) { animation-delay: 3.9s; }
  & li:nth-child(5) { animation-delay: 4.6s; }

  & .ai-steps__run { color: var(--ai-accent-text); }
  & .ai-steps__run::before {
    content: "";
    background: none;
    border: 2px solid var(--ai-cyan);
    border-right-color: transparent;
    animation: ai-spin-r .8s linear infinite;
  }
}

.ai-progress {
  grid-column: 2;
  height: 6px;
  margin-top: .6rem;
  border-radius: 99px;
  background: var(--ai-surface-2);
  overflow: hidden;

  & span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--ai-gradient);
    animation: ai-fill 4.2s 1.8s var(--ai-ease) forwards;
  }
}

.ai-float {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .95rem;
  border-radius: 12px;
  border: 1px solid var(--ai-border);
  background: color-mix(in oklch, var(--ai-bg-2) 70%, transparent);
  backdrop-filter: blur(10px);
  font-size: .82rem;
  font-weight: 600;
  color: var(--ai-text);
  box-shadow: 0 12px 30px -12px oklch(0% 0 0 / .7);
  animation: ai-bob 6s ease-in-out infinite;

  & i { color: var(--ai-accent-text); }

  &.ai-float--one   { top: 6%;  left: -2%; }
  &.ai-float--two   { top: 18%; right: -4%; animation-delay: -2s; }
  &.ai-float--three { bottom: 6%; left: 8%;  animation-delay: -4s; }
}

/* ==========================================================================
   Ticker
   ========================================================================== */
.ai-ticker {
  display: flex;
  overflow: hidden;
  padding-block: 1.1rem;
  border-block: 1px solid var(--ai-border);
  background: var(--ai-bg-2);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);

  &:hover .ai-ticker__track { animation-play-state: paused; }
}

.ai-ticker__track {
  display: flex;
  flex-shrink: 0;
  animation: ai-marquee 45s linear infinite;
}

.ai-ticker__list {
  display: flex;
  flex-shrink: 0;

  & li { display: flex; align-items: center; }
  & li::after { content: "\2726"; margin-inline: 2rem; color: var(--ai-violet); font-size: .8rem; }
  & a {
    font-family: var(--ai-font);
    font-size: 1.05rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--ai-muted);
    transition: color .3s;
  }
  & a:hover { color: var(--ai-text); }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.ai-section {
  position: relative;
  padding-block: clamp(4rem, 8vw, 7rem);
}

.ai-section__head {
  max-width: 46rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;

  & p { margin: 1rem auto 0; font-size: 1.05rem; line-height: 1.7; }
}

/* ----- About ----- */
.ai-about__inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.ai-about__content {
  & p { line-height: 1.8; margin: 1.1rem 0 0; }
  & .ai-btn { margin-top: 2rem; }
}

.ai-ticks {
  display: grid;
  gap: .75rem;
  margin-top: 1.5rem !important;

  & li { display: flex; gap: .75rem; align-items: center; color: var(--ai-text); }
  & li::before {
    content: "\2713";
    display: grid;
    place-items: center;
    flex: none;
    width: 22px;
    aspect-ratio: 1;
    border-radius: 7px;
    font-size: .75rem;
    color: #fff;
    background: var(--ai-gradient-btn);
  }
}

.ai-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.ai-stat {
  position: relative;
  padding: 1.8rem 1.5rem;
  border-radius: var(--ai-radius);
  border: 1px solid var(--ai-border);
  background: linear-gradient(160deg, var(--ai-surface-2), var(--ai-surface));
  overflow: hidden;

  &::after {
    content: "";
    position: absolute;
    inset: auto -30% -60% auto;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--ai-violet);
    filter: blur(50px);
    opacity: .25;
  }

  &:nth-child(even) { top: 1.5rem; }

  & p { margin: .4rem 0 0; font-size: .95rem; }
}

.ai-stat__num,
.ai-stat__unit {
  font-size: clamp(2.4rem, 1.8rem + 2vw, 3.3rem);
  font-weight: 700;
  line-height: 1;
  background: var(--ai-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* CSS-only counter: --ai-num animates from 0 to --to */
.ai-stat__num {
  counter-reset: ai-num var(--ai-num);
  animation: ai-count 2.2s var(--ai-ease) forwards;

  &::after { content: counter(ai-num); }
}

/* ----- Solutions cards ----- */
.ai-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}

.ai-card {
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  padding: 2rem;
  border-radius: var(--ai-radius);
  border: 1px solid var(--ai-border);
  background: var(--ai-surface);
  transition: transform .4s var(--ai-ease), background .4s;

  /* rotating gradient border on hover */
  &::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--ai-angle), var(--ai-cyan), var(--ai-violet), var(--ai-coral), var(--ai-cyan));
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: 0;
    transition: opacity .4s;
    animation: ai-spin 4s linear infinite;
  }

  &:hover {
    transform: translateY(-6px);
    background-color: var(--ai-surface-2);

    &::before { opacity: 1; }
    & .ai-card__icon { scale: 1.08; rotate: -6deg; }
  }

  & h3 { font-size: 1.3rem; font-weight: 600; margin-top: 1.4rem; }
  & p { margin: .7rem 0 0; line-height: 1.7; }
}

.ai-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  aspect-ratio: 1;
  border-radius: 16px;
  font-size: 1.35rem;
  color: #fff;
  background: var(--ai-icon-grad, var(--ai-gradient-btn));
  box-shadow: 0 12px 30px -10px color-mix(in oklch, var(--ai-violet) 70%, transparent);
  transition: scale .4s var(--ai-ease), rotate .4s var(--ai-ease);
}

/* ----- Services ----- */
.ai-services {
  background:
    radial-gradient(50% 60% at 100% 50%, color-mix(in oklch, var(--ai-violet) 14%, transparent), transparent 70%),
    var(--ai-bg-2);
}

.ai-services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 1.25rem;
}

.ai-service {
  display: flex;
  flex-direction: column;
  padding: 1.9rem;
  border-radius: var(--ai-radius);
  border: 1px solid var(--ai-border);
  background: var(--ai-bg);
  transition: border-color .4s, transform .4s var(--ai-ease), box-shadow .4s;

  &:hover {
    transform: translateY(-4px);
    border-color: color-mix(in oklch, var(--ai-cyan) 45%, transparent);
    box-shadow: 0 20px 50px -25px color-mix(in oklch, var(--ai-cyan) 60%, transparent);
  }

  & h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.3rem; }
  & p { flex: 1; margin: .7rem 0 1.4rem; line-height: 1.7; }
}

.ai-service__top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  & > i { font-size: 1.6rem; color: var(--ai-accent-text); }
}

.ai-tag {
  padding: .3rem .7rem;
  border-radius: 99px;
  font-family: var(--ai-mono);
  font-size: .7rem;
  color: var(--ai-accent-text);
  background: color-mix(in oklch, var(--ai-cyan) 12%, transparent);
  border: 1px solid color-mix(in oklch, var(--ai-cyan) 30%, transparent);

  &::before { content: "\2726  "; }
}

/* ----- Responsible AI standards ----- */
.ai-standards__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius);
  overflow: hidden;
  background: var(--ai-border);
  gap: 1px;
}

.ai-pillar {
  padding: 2rem;
  background: var(--ai-bg);
  transition: background .4s;

  &:hover { background-color: var(--ai-bg-2); }

  & > i {
    font-size: 1.4rem;
    background: var(--ai-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  & h3 { font-size: 1.15rem; font-weight: 600; margin-top: 1rem; }
  & p { margin: .6rem 0 0; line-height: 1.7; font-size: .95rem; }
}

.ai-frameworks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.25rem;
  margin-top: 2.5rem;

  & > .ai-mono { color: var(--ai-muted); text-transform: uppercase; letter-spacing: .15em; font-size: .75rem; }
  & ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
  & li {
    padding: .55rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--ai-border);
    background: var(--ai-surface);
    font-family: var(--ai-mono);
    font-size: .8rem;
    color: var(--ai-text);
  }
}

/* ----- Process ----- */
.ai-process__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  counter-reset: none;

  /* connecting line with travelling pulse */
  &::before {
    content: "";
    position: absolute;
    top: 27px;
    inset-inline: 10%;
    height: 2px;
    background:
      linear-gradient(90deg, transparent, var(--ai-cyan), transparent) 0 0 / 30% 100% no-repeat,
      var(--ai-border);
    animation: ai-pulse-line 4s linear infinite;
  }

  & li { position: relative; text-align: center; }

  & .ai-mono {
    display: grid;
    place-items: center;
    width: 56px;
    aspect-ratio: 1;
    margin-inline: auto;
    border-radius: 50%;
    font-size: .9rem;
    color: var(--ai-text);
    background: var(--ai-bg);
    border: 1px solid var(--ai-border);
    box-shadow: 0 0 0 6px var(--ai-bg), 0 0 24px -4px color-mix(in oklch, var(--ai-violet) 70%, transparent);
  }

  & h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.2rem; }
  & p { margin: .5rem 0 0; font-size: .92rem; line-height: 1.6; }
}

/* ----- Industries ----- */
.ai-industries {
  background: var(--ai-bg-2);
}

.ai-industries__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 1rem;

  & li {
    position: relative;
    padding: 1.3rem 1.4rem;
    border-radius: 16px;
    border: 1px solid var(--ai-border);
    background: var(--ai-bg);
    overflow: hidden;
    transition: border-color .3s, transform .3s var(--ai-ease);

    &::before {
      content: "";
      position: absolute;
      inset: 0 auto 0 0;
      width: 3px;
      background: var(--ai-gradient);
      scale: 1 0;
      transition: scale .35s var(--ai-ease);
    }

    &:hover { transform: translateY(-3px); border-color: color-mix(in oklch, var(--ai-violet) 50%, transparent); }
    &:hover::before { scale: 1 1; }
  }

  & h3 { font-size: 1.05rem; font-weight: 600; }
  & p { margin: .35rem 0 0; font-family: var(--ai-mono); font-size: .75rem; color: var(--ai-accent-text); }
}

/* ----- Client logos ----- */
.ai-clients { padding-bottom: clamp(3rem, 6vw, 5rem); }

.ai-logos {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);

  &:hover .ai-logos__track { animation-play-state: paused; }
}

.ai-logos__track {
  display: flex;
  gap: 1.25rem;
  padding-right: 1.25rem;
  flex-shrink: 0;
  animation: ai-marquee 50s linear infinite;
}

.ai-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 190px;
  height: 96px;
  padding: 1rem 1.4rem;
  border-radius: 16px;
  background: #fff;
  transition: transform .3s var(--ai-ease);

  /* client logos are shown exactly as supplied — no filters or tints */
  &:hover { transform: translateY(-3px); }

  & img { max-width: 100%; max-height: 100%; object-fit: contain; }
}

/* ----- CTA ----- */
.ai-cta { padding-block: 0 clamp(4rem, 8vw, 6.5rem); }

.ai-cta__box {
  position: relative;
  isolation: isolate;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  border-radius: 28px;
  text-align: center;
  overflow: hidden;
  border: 1px solid var(--ai-border);
  background:
    radial-gradient(60% 120% at 0% 0%, color-mix(in oklch, var(--ai-cyan) 25%, transparent), transparent 60%),
    radial-gradient(60% 120% at 100% 100%, color-mix(in oklch, var(--ai-coral) 22%, transparent), transparent 60%),
    var(--ai-bg-2);

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(var(--ai-border) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(closest-side, #000, transparent);
  }

  & h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.9rem); font-weight: 700; letter-spacing: -.02em; }
  & p { max-width: 36rem; margin: 1rem auto 2rem; font-size: 1.08rem; }
  & .ai-hero__actions { justify-content: center; }
}

/* ==========================================================================
   Scroll-driven reveal (CSS). Browsers without support use pmb-ai.js.
   ========================================================================== */
@supports (animation-timeline: view()) {
  .ai-reveal {
    animation: ai-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }

  .ai-stat__num {
    animation: ai-count linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 45%;
  }
}

/* JS fallback states (class added by pmb-ai.js only when needed) */
.ai-js-reveal .ai-reveal {
  opacity: 0;
  translate: 0 40px;
  transition: opacity .8s var(--ai-ease), translate .8s var(--ai-ease);

  &.is-visible { opacity: 1; translate: 0 0; }
}

.ai-js-reveal .ai-stat__num { animation: none; }
.ai-js-reveal .ai-stat.is-visible .ai-stat__num { animation: ai-count 2.2s var(--ai-ease) forwards; }

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes ai-shimmer { to { background-position: 200% center; } }
@keyframes ai-spin { to { --ai-angle: 360deg; } }
@keyframes ai-spin-r { to { rotate: 360deg; } }
@keyframes ai-blink { 50% { opacity: 0; } }
@keyframes ai-ping { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes ai-grid { to { background-position: 56px 56px; } }
@keyframes ai-float { 50% { translate: 40px 30px; scale: 1.1; } }
@keyframes ai-bob { 50% { translate: 0 -12px; } }
@keyframes ai-pop { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes ai-fill { to { width: 88%; } }
@keyframes ai-marquee { to { translate: -50% 0; } }
@keyframes ai-pulse-line { from { background-position: -30% 0, 0 0; } to { background-position: 130% 0, 0 0; } }
@keyframes ai-count { from { --ai-num: 0; } to { --ai-num: var(--to); } }
@keyframes ai-reveal { from { opacity: 0; translate: 0 50px; filter: blur(6px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }

/* 6 slides, the 6th repeats the 1st for a seamless loop */
@keyframes ai-rotate {
  0%, 16%   { translate: 0 0; }
  20%, 36%  { translate: 0 calc(var(--_h) * -1); }
  40%, 56%  { translate: 0 calc(var(--_h) * -2); }
  60%, 76%  { translate: 0 calc(var(--_h) * -3); }
  80%, 96%  { translate: 0 calc(var(--_h) * -4); }
  100%      { translate: 0 calc(var(--_h) * -5); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199px) {
  .ai-process__steps { grid-template-columns: repeat(3, 1fr); row-gap: 2.5rem; }
  .ai-process__steps::before { display: none; }
}

@media (max-width: 991px) {
  .ai-hero__inner,
  .ai-about__inner { grid-template-columns: 1fr; }

  .ai-hero__content { text-align: center; }
  .ai-hero__content .ai-hero__rotator,
  .ai-hero__actions,
  .ai-hero__trust { justify-content: center; }
  .ai-hero__text { margin-inline: auto; }

  .ai-hero__visual { min-height: 420px; }
  .ai-standards__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
  .ai-hero__trust li + li { padding-left: 0; border-left: 0; }
  .ai-hero__rotator { flex-wrap: wrap; }
  .ai-float { display: none; }
  .ai-hero__visual { min-height: 0; padding-block: 1rem; }
  .ai-stats { gap: .8rem; }
  .ai-stat { padding: 1.4rem 1.1rem; }
  .ai-stat:nth-child(even) { top: 0; }
  .ai-standards__grid { grid-template-columns: 1fr; }
  .ai-process__steps { grid-template-columns: 1fr 1fr; }
  .ai-logo { width: 150px; height: 80px; }
}

/* Cards adapt to their own width (container query) */
@container (max-width: 300px) {
  .ai-card h3 { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-home *,
  .ai-home *::before,
  .ai-home *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .ai-reveal { opacity: 1 !important; translate: none !important; filter: none !important; }
}

/* ==========================================================================
   Brand polish (v2)
   ========================================================================== */

/* Template accent (nav hover, Enquiry button) -> logo orange */
.ai-theme {
  --tolak-base: var(--pmb-orange);
  --tolak-base-rgb: 241, 137, 52;
}

/* ----- Reading progress bar (scroll-driven) ----- */
.ai-progressbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10000;
  height: 3px;
  background: var(--ai-gradient);
  transform-origin: 0 50%;
  scale: 0 1;
  pointer-events: none;
}

@supports (animation-timeline: scroll()) {
  .ai-progressbar {
    animation: ai-progress linear both;
    animation-timeline: scroll(root);
  }
}

@keyframes ai-progress { to { scale: 1 1; } }

/* ----- Logo ring behind the hero console (3 segments like the logo mark) ----- */
.ai-hero__ring {
  --_seg: conic-gradient(from -58deg,
      var(--pmb-red) 0deg, var(--pmb-crimson) 108deg, transparent 108deg 124deg,
      var(--pmb-orange) 124deg 228deg, transparent 228deg 244deg,
      var(--pmb-violet) 244deg, var(--pmb-blue) 344deg, transparent 344deg 360deg);
  position: absolute;
  width: min(88%, 470px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--_seg);
  mask: radial-gradient(closest-side, transparent calc(100% - 26px), #000 calc(100% - 25px));
  opacity: .9;
  animation: ai-spin-r 40s linear infinite;
}

.ai-hero__ring-glow {
  position: absolute;
  width: min(80%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--pmb-red), var(--pmb-orange), var(--pmb-violet), var(--pmb-blue), var(--pmb-red));
  filter: blur(70px);
  opacity: .3;
  animation: ai-spin-r 18s linear infinite reverse;
}

/* ----- Per-card brand colour pairs ----- */
.ai-cards > :nth-child(6n + 1) { --ai-icon-grad: linear-gradient(135deg, var(--pmb-red), var(--pmb-orange)); }
.ai-cards > :nth-child(6n + 2) { --ai-icon-grad: linear-gradient(135deg, var(--pmb-violet), var(--pmb-blue)); }
.ai-cards > :nth-child(6n + 3) { --ai-icon-grad: linear-gradient(135deg, var(--pmb-crimson), var(--pmb-violet)); }
.ai-cards > :nth-child(6n + 4) { --ai-icon-grad: linear-gradient(135deg, var(--pmb-blue), var(--pmb-violet)); }
.ai-cards > :nth-child(6n + 5) { --ai-icon-grad: linear-gradient(135deg, var(--pmb-orange), var(--pmb-crimson)); }
.ai-cards > :nth-child(6n + 6) { --ai-icon-grad: linear-gradient(135deg, var(--pmb-violet), var(--pmb-crimson)); }

.ai-services__grid > :nth-child(4n + 1) { --ai-accent: var(--pmb-crimson); }
.ai-services__grid > :nth-child(4n + 2) { --ai-accent: var(--pmb-violet); }
.ai-services__grid > :nth-child(4n + 3) { --ai-accent: var(--pmb-orange); }
.ai-services__grid > :nth-child(4n + 4) { --ai-accent: var(--pmb-blue); }

.ai-service {
  position: relative;
  overflow: hidden;

  /* coloured top edge that grows on hover */
  &::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--ai-accent, var(--pmb-violet)), transparent);
    scale: .25 1;
    transform-origin: 0 0;
    transition: scale .5s var(--ai-ease);
  }

  &:hover::before { scale: 1 1; }

  & .ai-service__top > i {
    display: grid;
    place-items: center;
    width: 52px;
    aspect-ratio: 1;
    border-radius: 14px;
    font-size: 1.3rem;
    color: var(--ai-accent, var(--pmb-violet));
    background: color-mix(in srgb, var(--ai-accent, var(--pmb-violet)) 12%, transparent);
  }
}

/* ----- Cursor spotlight (position set by pmb-ai.js) ----- */
.ai-card,
.ai-service,
.ai-pillar {
  background-image: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px),
      color-mix(in srgb, var(--pmb-violet) 14%, transparent), transparent 60%);
}

/* ----- Light sections ----- */
.ai-light {
  & .ai-card,
  & .ai-service,
  & .ai-stat {
    box-shadow: var(--ai-shadow);
  }

  & .ai-service:hover {
    box-shadow: 0 28px 60px -28px color-mix(in srgb, var(--ai-accent, var(--pmb-violet)) 55%, transparent);
    border-color: color-mix(in srgb, var(--ai-accent, var(--pmb-violet)) 40%, transparent);
  }

  & .ai-stat { background-color: var(--ai-bg); }

  & .ai-logo {
    background: #fff;
    border: 1px solid var(--ai-border);
    box-shadow: var(--ai-shadow);
  }

  & .ai-process__steps .ai-mono { box-shadow: 0 0 0 6px var(--ai-bg), var(--ai-shadow); }
}

/* ----- Industries with icons ----- */
.ai-industries__grid li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 1rem;

  & > i {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 46px;
    aspect-ratio: 1;
    border-radius: 12px;
    font-size: 1.1rem;
    color: #fff;
    background: var(--ai-gradient-btn);
    transition: rotate .4s var(--ai-ease), scale .4s var(--ai-ease);
  }

  &:nth-child(4n + 2) > i { background: linear-gradient(135deg, var(--pmb-red), var(--pmb-orange)); }
  &:nth-child(4n + 3) > i { background: linear-gradient(135deg, var(--pmb-blue), var(--pmb-violet)); }
  &:nth-child(4n + 4) > i { background: linear-gradient(135deg, var(--pmb-orange), var(--pmb-crimson)); }
  &:hover > i { rotate: -8deg; scale: 1.08; }
}

/* ----- Logo-spectrum hairline on top of the ticker ----- */
.ai-ticker { position: relative; border-top: 0; }
.ai-ticker::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--ai-gradient);
  opacity: .8;
}

/* ----- CTA box uses the brand colours on logo navy ----- */
.ai-cta__box {
  background:
    radial-gradient(70% 140% at 0% 0%, color-mix(in srgb, var(--pmb-violet) 55%, transparent), transparent 60%),
    radial-gradient(60% 140% at 100% 100%, color-mix(in srgb, var(--pmb-crimson) 45%, transparent), transparent 60%),
    radial-gradient(40% 80% at 100% 0%, color-mix(in srgb, var(--pmb-orange) 30%, transparent), transparent 60%),
    var(--pmb-navy);
}

/* ----- Quick actions: floating (desktop) / bottom bar (mobile) ----- */
.ai-quick {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 98;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  font-family: var(--ai-font);

  & a {
    display: grid;
    place-items: center;
    width: 54px;
    aspect-ratio: 1;
    border-radius: 50%;
    color: #fff;
    font-size: 1.35rem;
    text-decoration: none;
    box-shadow: 0 12px 30px -10px oklch(0% 0 0 / .5);
    transition: transform .3s var(--ai-ease);

    &:hover { color: #fff; transform: translateY(-3px) scale(1.05); }
    &:focus-visible { outline: 2px solid var(--pmb-blue); outline-offset: 3px; }
    & span { display: none; }
  }

  & .ai-quick__wa { background: #25D366; animation: ai-ring-pulse 2.6s infinite; }
  & .ai-quick__call { background: var(--ai-gradient-btn); }
  & .ai-quick__enquire { display: none; }
}

@keyframes ai-ring-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, #25D366 60%, transparent); }
  70%, 100% { box-shadow: 0 0 0 16px transparent; }
}

@media (max-width: 991px) {
  .ai-quick {
    inset: auto 0 0;
    flex-direction: row;
    gap: .5rem;
    padding: .55rem .75rem calc(.55rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--pmb-navy) 90%, transparent);
    backdrop-filter: blur(14px);
    border-top: 1px solid oklch(100% 0 0 / .1);

    & a {
      flex: 1;
      width: auto;
      aspect-ratio: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .5rem;
      height: 46px;
      border-radius: 12px;
      font-size: .95rem;
      font-weight: 600;
      box-shadow: none;
      animation: none;

      & span { display: inline; }
    }

    & .ai-quick__enquire { display: flex; background: var(--ai-gradient-btn); }
    & .ai-quick__call { background: oklch(100% 0 0 / .12); }
  }

  .ai-theme .scroll-to-top { bottom: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-hero__ring, .ai-hero__ring-glow, .ai-quick__wa, .ai-progressbar { animation: none !important; }
}

/* services band sits on the soft lavender tone */
.ai-light.ai-services { background: var(--ai-bg-2); }

/* ==========================================================================
   v3 — Industries image cards, orbit section, quote bubble
   ========================================================================== */

/* ----- Industries / expertise image cards (2 + 2 wide, then rows of 3) ----- */
.ai-expertise { background: var(--ai-bg-2); }

.ai-xp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.ai-xp {
  position: relative;
  isolation: isolate;
  grid-column: span 2;
  height: clamp(260px, 22vw, 320px);
  border-radius: 22px;
  overflow: hidden;
  background: var(--ai-bg);

  &:nth-child(-n + 4) { grid-column: span 3; height: clamp(300px, 27vw, 400px); }

  & > img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 1.2s var(--ai-ease), filter .6s;
  }

  /* brand tint that fades in on hover */
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(160deg, color-mix(in srgb, var(--pmb-violet) 55%, transparent), color-mix(in srgb, var(--pmb-crimson) 45%, transparent));
    mix-blend-mode: multiply;
    opacity: 0;
    transition: opacity .6s;
  }

  &:hover > img,
  &:focus-within > img { scale: 1.08; }
  &:hover::after,
  &:focus-within::after { opacity: 1; }
  &:hover .ai-xp__line,
  &:focus-within .ai-xp__line { width: 110px; }
}

.ai-xp__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.4rem) 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, oklch(12% 0.06 280 / .88) 0%, oklch(12% 0.06 280 / .35) 55%, oklch(12% 0.06 280 / .8) 100%);

  & h3 {
    font-size: clamp(1rem, .9rem + .5vw, 1.3rem);
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #fff !important;
  }

  & p {
    max-width: 30ch;
    margin: .55rem 0 0;
    font-size: .92rem;
    line-height: 1.55;
    color: oklch(92% 0.02 280) !important;
  }
}

.ai-xp__num {
  position: absolute;
  top: 1rem;
  left: 1.2rem;
  font-size: .75rem;
  color: oklch(100% 0 0 / .6);
}

.ai-xp__line {
  width: 48px;
  height: 2px;
  margin: 1rem 0 1.1rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--pmb-blue), var(--pmb-violet), var(--pmb-crimson), var(--pmb-orange));
  transition: width .5s var(--ai-ease);
}

.ai-xp__btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.15rem;
  border-radius: 999px;
  background: #fff;
  color: var(--pmb-navy);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
  transition: background .3s, color .3s, translate .3s var(--ai-ease);

  & i { font-size: .75rem; transition: translate .3s var(--ai-ease); }
  &:hover, &:focus-visible { background: var(--ai-gradient-btn); color: #fff; translate: 0 -2px; outline: none; }
  &:hover i { translate: 3px 0; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ai-xp__tagline {
  margin: 2.5rem 0 0;
  text-align: center;
  font-size: clamp(1.1rem, 1rem + .6vw, 1.5rem);
  font-weight: 600;
  color: var(--ai-text) !important;

  & .ai-mono {
    display: block;
    margin-bottom: .4rem;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--ai-muted);
  }
}

@media (max-width: 991px) {
  .ai-xp-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-xp,
  .ai-xp:nth-child(-n + 4) { grid-column: span 1; height: 300px; }
  .ai-xp:last-child:nth-child(odd) { grid-column: span 2; }
}

@media (max-width: 575px) {
  .ai-xp-grid { grid-template-columns: 1fr; }
  .ai-xp,
  .ai-xp:nth-child(-n + 4),
  .ai-xp:last-child:nth-child(odd) { grid-column: auto; height: 270px; }
}

/* ----- Core strengths: orbit around the PMB mark ----- */
.ai-orbit-sec__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);

  & header p { margin: 1rem 0 0; font-size: 1.05rem; }
}

.ai-points {
  display: grid;
  gap: .75rem;
  margin-top: 2rem !important;

  & li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--ai-border);
    background: var(--ai-bg);
    box-shadow: var(--ai-shadow);
    color: var(--ai-text);
    font-weight: 500;
    transition: translate .35s var(--ai-ease), border-color .35s;

    &:hover { translate: 6px 0; border-color: color-mix(in srgb, var(--pmb-violet) 40%, transparent); }
  }

  & i {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    aspect-ratio: 1;
    border-radius: 11px;
    color: #fff;
    background: var(--ai-gradient-btn);
  }

  & li:nth-child(3n + 2) i { background: linear-gradient(135deg, var(--pmb-red), var(--pmb-orange)); }
  & li:nth-child(3n + 3) i { background: linear-gradient(135deg, var(--pmb-blue), var(--pmb-violet)); }
}

.ai-orbit {
  container-type: inline-size;
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.ai-orbit__ring {
  --_dur: 30s;
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--pmb-violet) 35%, transparent);
  animation: ai-spin-r var(--_dur) linear infinite;

  &.ai-orbit__ring--1 { inset: 30%; --_r: 20cqi; --_dur: 18s; }
  &.ai-orbit__ring--2 { inset: 15%; --_r: 35cqi; --_dur: 28s; animation-direction: reverse; }
  &.ai-orbit__ring--3 { inset: 0;   --_r: 50cqi; --_dur: 40s; border-style: solid; border-color: color-mix(in srgb, var(--pmb-navy) 10%, transparent); }
}

.ai-orbit__chip {
  position: absolute;
  inset: 0;
  width: 48px;
  height: 48px;
  margin: auto;
  transform: rotate(var(--a)) translateY(calc(var(--_r) * -1)) rotate(calc(var(--a) * -1));

  & i {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    background: #fff;
    color: var(--pmb-violet);
    font-size: 1.1rem;
    box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--pmb-navy) 55%, transparent);
    border: 1px solid var(--ai-border);
    /* counter-spin so icons stay upright while the ring turns */
    animation: ai-spin-r var(--_dur) linear infinite;
    animation-direction: reverse;
  }
}

.ai-orbit__ring--2 .ai-orbit__chip i { animation-direction: normal; color: var(--pmb-crimson); }
.ai-orbit__ring--3 .ai-orbit__chip i { color: var(--pmb-blue); }

.ai-orbit__core {
  position: absolute;
  inset: 38%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 8px color-mix(in srgb, var(--pmb-violet) 8%, transparent),
    0 20px 50px -15px color-mix(in srgb, var(--pmb-violet) 60%, transparent);

  &::before,
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--pmb-crimson) 40%, transparent);
    animation: ai-core-pulse 2.8s ease-out infinite;
  }

  &::after { animation-delay: 1.4s; border-color: color-mix(in srgb, var(--pmb-blue) 40%, transparent); }
}

/* the round PMB mark, cropped from the logo file */
.ai-orbit__mark {
  width: 74%;
  aspect-ratio: 1;
  background: url("../images/logo.jpg") no-repeat 6% 50% / 360% auto;
  border-radius: 50%;
}

@keyframes ai-core-pulse {
  from { scale: 1; opacity: .9; }
  to   { scale: 1.9; opacity: 0; }
}

@media (max-width: 991px) {
  .ai-orbit-sec__inner { grid-template-columns: 1fr; }
  .ai-orbit { width: min(100%, 400px); }
}

@media (max-width: 575px) {
  .ai-orbit__chip { width: 40px; height: 40px; }
  .ai-orbit__chip i { font-size: .95rem; border-radius: 12px; }
}

/* ----- "Request a quote" assistant bubble (desktop) ----- */
.ai-quote {
  position: fixed;
  right: 72px;
  bottom: 24px;
  z-index: 98;
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  font-family: var(--ai-font);
}

.ai-quote__text {
  position: relative;
  padding: .75rem 1.05rem;
  border-radius: 14px 14px 4px 14px;
  background: var(--pmb-navy);
  color: #fff;
  font: 600 .85rem/1 var(--ai-mono);
  box-shadow: 0 14px 30px -14px oklch(0% 0 0 / .6);

  & span {
    display: inline-block;
    width: 21ch;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--pmb-orange);
    vertical-align: bottom;
    animation: ai-quote-type 7s steps(21) infinite, pmb-caret .8s steps(1) infinite;
  }
}

@keyframes ai-quote-type {
  0%, 4%    { width: 0; }
  30%, 85%  { width: 21ch; }
  100%      { width: 0; }
}

.ai-quote__avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  background: var(--ai-gradient-btn);
  box-shadow: 0 14px 30px -10px var(--pmb-crimson);
  transition: scale .3s var(--ai-ease);

  &::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--pmb-violet) 45%, transparent);
    animation: ai-core-pulse 2.4s ease-out infinite;
  }

  & em {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

.ai-quote:hover .ai-quote__avatar { scale: 1.08; }
.ai-quote:focus-visible { outline: 2px solid var(--pmb-violet); outline-offset: 4px; border-radius: 16px; }

@media (max-width: 991px) {
  .ai-quote { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-orbit__ring, .ai-orbit__chip i, .ai-orbit__core::before, .ai-orbit__core::after,
  .ai-quote__text span, .ai-quote__avatar::before { animation: none !important; }
}

/* ==========================================================================
   v4 — Hero rotating word + robot, AI Powered Digital Agency section
   ========================================================================== */

/* "Let's grow with [AI | Web | Apps | Tech]" */
.ai-hero__title {
  & .ai-hero__static { display: block; }
}

.ai-hero__word {
  --_h: 1.08em;
  display: block;
  height: var(--_h);
  overflow: hidden;
  font-size: 1.45em;

  & .ai-hero__word-track {
    display: flex;
    flex-direction: column;
    animation: ai-word 10s var(--ai-ease) infinite;
  }

  & .ai-hero__word-track span {
    height: var(--_h);
    line-height: var(--_h);
    background: var(--ai-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* 4 words, the 5th repeats the 1st for a seamless loop */
@keyframes ai-word {
  0%, 20%   { translate: 0 0; }
  25%, 45%  { translate: 0 calc(var(--_h) * -1); }
  50%, 70%  { translate: 0 calc(var(--_h) * -2); }
  75%, 95%  { translate: 0 calc(var(--_h) * -3); }
  100%      { translate: 0 calc(var(--_h) * -4); }
}

.ai-hero__tagline {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: clamp(1rem, .95rem + .4vw, 1.25rem);
  font-weight: 500;
  color: var(--ai-text) !important;

  & .ai-mono { color: var(--ai-accent-text); }
}

/* friendly robot peeking beside the console */
.ai-hero__robot {
  position: absolute;
  right: -2%;
  bottom: -4%;
  z-index: 2;
  display: grid;
  justify-items: end;
  width: clamp(96px, 11vw, 140px);

  & img { width: 100%; height: auto; filter: drop-shadow(0 18px 24px oklch(0% 0 0 / .45)); }
}

.ai-hero__robot-say {
  position: relative;
  margin-bottom: .4rem;
  padding: .45rem .8rem;
  border-radius: 12px 12px 4px 12px;
  background: #fff;
  color: var(--pmb-navy);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 24px -12px oklch(0% 0 0 / .6);
  animation: ai-say 6s ease-in-out infinite;
}

@keyframes ai-say {
  0%, 8%    { opacity: 0; translate: 0 6px; }
  14%, 70%  { opacity: 1; translate: 0 0; }
  80%, 100% { opacity: 0; translate: 0 6px; }
}

.ai-quote__avatar {
  background: #fff;

  & img { width: 78%; height: auto; }
}

@media (max-width: 991px) {
  .ai-hero__tagline { justify-content: center; }
  .ai-hero__robot { right: 2%; bottom: -2%; }
}

@media (max-width: 575px) {
  .ai-hero__robot { width: 84px; right: 0; bottom: -6%; }
  .ai-hero__robot-say { font-size: .7rem; }
}

/* ----- AI Powered Digital Agency ----- */
.ai-agency {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(4rem, 8vw, 7rem);
  background:
    radial-gradient(50% 60% at 0% 0%, color-mix(in srgb, var(--pmb-violet) 30%, transparent), transparent 70%),
    radial-gradient(45% 55% at 100% 100%, color-mix(in srgb, var(--pmb-crimson) 22%, transparent), transparent 70%),
    var(--pmb-navy);
}

.ai-agency__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(oklch(100% 0 0 / .06) 1px, transparent 1px),
    linear-gradient(90deg, oklch(100% 0 0 / .06) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 70% at 40% 50%, #000 30%, transparent 80%);
}

.ai-agency__glow {
  position: absolute;
  z-index: -1;
  width: 340px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .45;
  animation: ai-float 16s ease-in-out infinite;

  &.ai-agency__glow--one { top: -120px; left: 30%; background: var(--pmb-blue); }
  &.ai-agency__glow--two { bottom: -160px; right: 10%; background: var(--pmb-orange); animation-delay: -8s; opacity: .3; }
}

.ai-agency__inner {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.ai-agency__content {
  position: relative;

  & p { margin: 1.1rem 0 0; font-size: 1.05rem; line-height: 1.75; }
}

.ai-agency__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.8rem !important;

  & li {
    padding: .5rem 1rem;
    border-radius: 999px;
    border: 1px solid oklch(100% 0 0 / .16);
    background: oklch(100% 0 0 / .06);
    color: var(--ai-text);
    font-size: .88rem;
    font-weight: 500;
    transition: background .3s, border-color .3s;

    &:hover { background: oklch(100% 0 0 / .12); border-color: color-mix(in srgb, var(--pmb-blue) 60%, transparent); }
  }
}

.ai-agency__contact {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.6rem;
  margin-top: 1.8rem;

  & a { display: inline-flex; align-items: center; gap: .5rem; color: var(--ai-text); font-weight: 500; }
  & a:hover { color: #fff; }
  & i { color: var(--pmb-orange); }
  & .fa-whatsapp { color: #25D366; }
}

.ai-agency__robot {
  display: block;
  width: 130px;
  height: auto;
  margin-top: 2rem;
  filter: drop-shadow(0 18px 26px oklch(0% 0 0 / .5));
}

.ai-form-card {
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 40px 90px -40px oklch(0% 0 0 / .8);
  color: var(--pmb-ink);
}

.ai-form-card__head {
  margin-bottom: 1.4rem;

  & .ai-mono {
    display: inline-block;
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--pmb-violet);
    background: color-mix(in srgb, var(--pmb-violet) 10%, transparent);
  }

  & h3 { margin-top: .7rem; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); font-weight: 700; color: var(--pmb-navy) !important; }
}

@media (max-width: 991px) {
  .ai-agency__inner { grid-template-columns: 1fr; }
  .ai-agency__robot { display: none; }
}

/* v4 fixes: keep the robot greeting inside the screen; centre the tagline on small screens */
.ai-hero__robot { display: block; }
.ai-hero__robot-say { position: absolute; right: 35%; bottom: calc(100% + 2px); margin: 0; }
@media (max-width: 991px) {
  .ai-hero__tagline { display: block; text-align: center; }
  .ai-hero__tagline .ai-caret { display: inline-block; vertical-align: middle; margin-left: .3rem; }
}

/* ==========================================================================
   v5 — Inner pages: hero, services, service detail, works, about, clients, contact
   ========================================================================== */

/* ----- Inner page hero ----- */
.ai-page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(55% 60% at 85% 0%, color-mix(in oklch, var(--ai-violet) 32%, transparent), transparent 70%),
    radial-gradient(45% 60% at 0% 100%, color-mix(in oklch, var(--ai-cyan) 18%, transparent), transparent 70%),
    var(--ai-bg);

  &.has-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, var(--ai-bg) 30%, color-mix(in srgb, var(--ai-bg) 75%, transparent) 60%, color-mix(in srgb, var(--ai-bg) 55%, transparent));
  }
}

.ai-page-hero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-page-hero__inner > * + * { margin-top: 1.2rem; }

.ai-page-hero__title {
  max-width: 18ch;
  font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
}

.ai-page-hero__text {
  max-width: 44rem;
  font-size: 1.1rem;
  line-height: 1.75;
}

.ai-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  font-family: var(--ai-mono);
  font-size: .78rem;
  color: var(--ai-muted);

  & a { color: var(--ai-muted); }
  & a:hover { color: var(--ai-text); }
  & i { font-size: .55rem; opacity: .6; }
  & [aria-current] { color: var(--ai-accent-text); }
}

/* ----- Generic split + media ----- */
.ai-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);

  & p { line-height: 1.8; margin: 1rem 0 0; }
}

.ai-media {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--ai-shadow);

  & img { width: 100%; height: 100%; object-fit: cover; display: block; }

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(160deg, color-mix(in srgb, var(--pmb-violet) 30%, transparent), transparent 50%, color-mix(in srgb, var(--pmb-crimson) 25%, transparent));
    mix-blend-mode: multiply;
  }
}

.ai-media__badge {
  position: absolute;
  left: 1.2rem;
  bottom: 1.2rem;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem 1.1rem;
  border-radius: 16px;
  background: color-mix(in srgb, #fff 92%, transparent);
  backdrop-filter: blur(10px);
  color: var(--pmb-navy);
  font-weight: 600;

  & strong { font-size: 1.6rem; line-height: 1; background: var(--ai-gradient-btn); -webkit-background-clip: text; background-clip: text; color: transparent; }
}

/* ----- Services page: CSS-only category filter ----- */
.ai-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 2.5rem;

  & input { position: absolute; opacity: 0; pointer-events: none; }

  & label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--ai-border);
    background: var(--ai-bg);
    color: var(--ai-text);
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s, box-shadow .25s;

    & small { font-family: var(--ai-mono); font-size: .72rem; opacity: .7; }
    &:hover { border-color: color-mix(in srgb, var(--pmb-violet) 45%, transparent); }
  }

  & input:checked + label {
    color: #fff;
    border-color: transparent;
    background: var(--ai-gradient-btn);
    box-shadow: 0 10px 24px -12px var(--pmb-crimson);
  }

  & input:focus-visible + label { outline: 2px solid var(--pmb-violet); outline-offset: 3px; }
}

.ai-svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}

/* hide cards outside the chosen category */
.ai-services-page:has(#f-ai:checked)        .ai-svc:not([data-cat="ai"]),
.ai-services-page:has(#f-dev:checked)       .ai-svc:not([data-cat="dev"]),
.ai-services-page:has(#f-design:checked)    .ai-svc:not([data-cat="design"]),
.ai-services-page:has(#f-marketing:checked) .ai-svc:not([data-cat="marketing"]),
.ai-services-page:has(#f-cloud:checked)     .ai-svc:not([data-cat="cloud"]) { display: none; }

.ai-svc {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--ai-border);
  background: var(--ai-bg);
  box-shadow: var(--ai-shadow);
  transition: translate .4s var(--ai-ease), box-shadow .4s, border-color .4s;

  &:hover {
    translate: 0 -6px;
    border-color: color-mix(in srgb, var(--pmb-violet) 35%, transparent);
    box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--pmb-violet) 55%, transparent);
  }

  &:hover .ai-svc__img img { scale: 1.07; }
}

.ai-svc__img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;

  & img { width: 100%; height: 100%; object-fit: cover; transition: scale 1s var(--ai-ease); }

  & .ai-svc__icon {
    position: absolute;
    left: 1rem;
    bottom: -22px;
    display: grid;
    place-items: center;
    width: 48px;
    aspect-ratio: 1;
    border-radius: 14px;
    color: #fff;
    background: var(--ai-gradient-btn);
    box-shadow: 0 10px 24px -10px var(--pmb-crimson);
  }
}

.ai-svc__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 2rem 1.4rem 1.4rem;

  & .ai-tag { align-self: flex-start; margin-bottom: .7rem; }
  & h3 { font-size: 1.2rem; font-weight: 600; }
  & p { flex: 1; margin: .5rem 0 1.1rem; line-height: 1.6; font-size: .95rem; }
}

.ai-svc[data-cat="dev"] .ai-svc__icon       { background: linear-gradient(135deg, var(--pmb-blue), var(--pmb-violet)); }
.ai-svc[data-cat="design"] .ai-svc__icon    { background: linear-gradient(135deg, var(--pmb-crimson), var(--pmb-orange)); }
.ai-svc[data-cat="marketing"] .ai-svc__icon { background: linear-gradient(135deg, var(--pmb-orange), var(--pmb-red)); }
.ai-svc[data-cat="cloud"] .ai-svc__icon     { background: linear-gradient(135deg, var(--pmb-violet), var(--pmb-blue)); }

/* ----- Service detail ----- */
.ai-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: clamp(2rem, 4vw, 3.5rem);
}

.ai-detail__main > section + section { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

.ai-detail__main h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 700; letter-spacing: -.02em; }

.ai-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
  margin-top: 1.4rem !important;

  & li {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid var(--ai-border);
    background: var(--ai-bg);
    color: var(--ai-text);
    font-weight: 500;

    &::before {
      content: "\2713";
      display: grid;
      place-items: center;
      flex: none;
      width: 26px;
      aspect-ratio: 1;
      border-radius: 8px;
      font-size: .8rem;
      color: #fff;
      background: var(--ai-gradient-btn);
    }
  }
}

.ai-ai-box {
  padding: clamp(1.5rem, 3vw, 2.2rem);
  border-radius: 22px;
  background:
    radial-gradient(60% 100% at 100% 0%, color-mix(in srgb, var(--pmb-crimson) 30%, transparent), transparent 60%),
    radial-gradient(60% 100% at 0% 100%, color-mix(in srgb, var(--pmb-blue) 25%, transparent), transparent 60%),
    var(--pmb-navy);
  color: #fff;

  & h2 { color: #fff !important; }
  & p { color: oklch(88% 0.03 280) !important; }

  & ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-top: 1.3rem !important; }
  & li {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .85rem 1rem;
    border-radius: 14px;
    background: oklch(100% 0 0 / .08);
    border: 1px solid oklch(100% 0 0 / .12);
    font-weight: 500;

    & i { color: var(--pmb-orange); }
  }
}

.ai-tech {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.2rem !important;

  & li {
    padding: .55rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--ai-border);
    background: var(--ai-bg-2);
    font-family: var(--ai-mono);
    font-size: .82rem;
    color: var(--ai-text);
  }
}

.ai-faq {
  display: grid;
  gap: .7rem;
  margin-top: 1.3rem;

  & details {
    border-radius: 16px;
    border: 1px solid var(--ai-border);
    background: var(--ai-bg);
    interpolate-size: allow-keywords;

    &::details-content { height: 0; overflow: clip; transition: height .35s var(--ai-ease), content-visibility .35s allow-discrete; }
    &[open]::details-content { height: auto; }
    &[open] summary i { rotate: 45deg; }
  }

  & summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    color: var(--ai-text);
    font-weight: 600;
    cursor: pointer;
    list-style: none;

    &::-webkit-details-marker { display: none; }
    & i { color: var(--pmb-violet); transition: rotate .3s var(--ai-ease); }
  }

  & p { margin: 0; padding: 0 1.2rem 1.2rem; line-height: 1.7; }
}

.ai-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 1rem;
}

.ai-aside__card {
  padding: 1.5rem;
  border-radius: 22px;
  border: 1px solid var(--ai-border);
  background: var(--ai-bg);
  box-shadow: var(--ai-shadow);

  & h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .9rem; }
  & .ai-btn { width: 100%; justify-content: center; margin-top: .6rem; }

  & ul a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .65rem .2rem;
    border-bottom: 1px solid var(--ai-border);
    color: var(--ai-text);
    font-weight: 500;
    font-size: .93rem;

    & i { font-size: .7rem; color: var(--pmb-violet); transition: translate .3s; }
    &:hover { color: var(--pmb-violet); }
    &:hover i { translate: 3px 0; }
  }

  & li:last-child a { border-bottom: 0; }
}

.ai-aside__card--dark {
  border: 0;
  background: var(--ai-gradient-btn);
  color: #fff;

  & h3, & p { color: #fff !important; }
  & p { opacity: .9; margin: 0 0 .5rem; }
  & .ai-btn--ghost { background: oklch(100% 0 0 / .14); border-color: oklch(100% 0 0 / .3); color: #fff; }
}

/* ----- Works ----- */
.ai-works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 1.5rem;
}

.ai-work {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--ai-border);
  background: var(--ai-bg);
  box-shadow: var(--ai-shadow);
  transition: translate .4s var(--ai-ease), box-shadow .4s;

  &:hover { translate: 0 -6px; box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--pmb-violet) 55%, transparent); }
}

/* browser-window frame around the screenshot */
.ai-work__frame {
  position: relative;
  margin: .9rem .9rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--ai-border);
  background: #f2f3fb;

  &::before {
    content: "";
    display: block;
    height: 26px;
    background:
      radial-gradient(circle at 14px 13px, var(--pmb-red) 4px, transparent 5px),
      radial-gradient(circle at 28px 13px, var(--pmb-orange) 4px, transparent 5px),
      radial-gradient(circle at 42px 13px, #3ccf6e 4px, transparent 5px),
      #e9eaf6;
  }

  & .ai-work__shot {
    aspect-ratio: 16 / 10;
    overflow: hidden;

    & img { width: 100%; height: auto; display: block; transition: translate 4s ease-in-out; }
  }

  & .ai-work__logo {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    padding: 2rem;
    background: #fff;

    & img { max-width: 70%; max-height: 70%; object-fit: contain; }
    & span { font-size: 1.4rem; font-weight: 700; color: var(--pmb-navy); text-align: center; }
  }
}

.ai-work:hover .ai-work__shot img { translate: 0 calc(-100% + 100cqh); }
.ai-work__shot { container-type: size; }

.ai-work__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem 1.3rem;

  & h3 { font-size: 1.1rem; font-weight: 600; }
  & small { display: block; margin-top: .25rem; font-family: var(--ai-mono); font-size: .75rem; color: var(--ai-muted); }
}

.ai-work__num {
  font-family: var(--ai-mono);
  font-size: .8rem;
  color: var(--pmb-violet);
}

.ai-work__visit {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: var(--ai-gradient-btn);
  transition: rotate .3s var(--ai-ease);

  &:hover { color: #fff; rotate: -45deg; }
}

/* ----- About ----- */
.ai-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.ai-value {
  padding: 2rem;
  border-radius: 22px;
  border: 1px solid var(--ai-border);
  background: var(--ai-surface);

  & > i {
    display: grid;
    place-items: center;
    width: 54px;
    aspect-ratio: 1;
    margin-bottom: 1.2rem;
    border-radius: 16px;
    color: #fff;
    font-size: 1.3rem;
    background: var(--ai-gradient-btn);
  }

  &:nth-child(2) > i { background: linear-gradient(135deg, var(--pmb-red), var(--pmb-orange)); }
  &:nth-child(3) > i { background: linear-gradient(135deg, var(--pmb-blue), var(--pmb-violet)); }

  & h3 { font-size: 1.25rem; font-weight: 600; }
  & p { margin: .7rem 0 0; line-height: 1.7; }
}

.ai-why {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1rem;
}

.ai-why li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .3rem 1rem;
  padding: 1.4rem;
  border-radius: 18px;
  border: 1px solid var(--ai-border);
  background: var(--ai-bg);
  box-shadow: var(--ai-shadow);

  & span {
    grid-row: span 2;
    font-family: var(--ai-mono);
    font-size: 1.6rem;
    font-weight: 600;
    background: var(--ai-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  & h3 { font-size: 1.05rem; font-weight: 600; }
  & p { margin: 0; font-size: .92rem; line-height: 1.6; }
}

/* ----- Clients ----- */
.ai-logo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 1rem;
}

.ai-logo-tile {
  position: relative;
  display: grid;
  place-items: center;
  gap: .6rem;
  aspect-ratio: 4 / 3;
  padding: 1.2rem;
  border-radius: 18px;
  border: 1px solid var(--ai-border);
  background: #fff;
  box-shadow: var(--ai-shadow);
  text-align: center;
  transition: translate .3s var(--ai-ease), border-color .3s;

  & img { max-width: 80%; max-height: 64px; object-fit: contain; }
  & .ai-logo-tile__name { font-size: 1.05rem; font-weight: 700; color: var(--pmb-navy); }
  & small { font-family: var(--ai-mono); font-size: .7rem; color: var(--ai-muted); }

  &:hover { translate: 0 -4px; border-color: color-mix(in srgb, var(--pmb-violet) 40%, transparent); }
  & a::after { content: ""; position: absolute; inset: 0; }
}

.ai-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: 26px;
  background: var(--ai-gradient-btn);
  color: #fff;
  text-align: center;

  & strong { display: block; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1; }
  & span { display: block; margin-top: .4rem; opacity: .9; font-size: .95rem; }
}

/* ----- Contact ----- */
.ai-contact-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.ai-contact-card {
  position: relative;
  display: grid;
  gap: .3rem;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--ai-border);
  background: var(--ai-bg);
  box-shadow: var(--ai-shadow);
  transition: translate .3s var(--ai-ease), border-color .3s;

  & > i {
    display: grid;
    place-items: center;
    width: 50px;
    aspect-ratio: 1;
    margin-bottom: .7rem;
    border-radius: 14px;
    color: #fff;
    font-size: 1.2rem;
    background: var(--ai-gradient-btn);
  }

  & h3 { font-size: 1.05rem; font-weight: 600; }
  & p, & a { margin: 0; color: var(--ai-muted); font-size: .93rem; line-height: 1.55; word-break: break-word; }
  & a.ai-contact-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  &:hover { translate: 0 -4px; border-color: color-mix(in srgb, var(--pmb-violet) 40%, transparent); }

  &:nth-child(2) > i { background: #25D366; }
  &:nth-child(3) > i { background: linear-gradient(135deg, var(--pmb-red), var(--pmb-orange)); }
  &:nth-child(4) > i { background: linear-gradient(135deg, var(--pmb-blue), var(--pmb-violet)); }
}

/* ----- Responsive ----- */
@media (max-width: 1199px) {
  .ai-detail { grid-template-columns: 1fr; }
  .ai-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
  .ai-contact-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
  .ai-split { grid-template-columns: 1fr; }
  .ai-values { grid-template-columns: 1fr; }
  .ai-band { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
  .ai-feature-grid,
  .ai-ai-box ul { grid-template-columns: 1fr; }
  .ai-contact-cards { grid-template-columns: 1fr; }
  .ai-filter { justify-content: flex-start; }
}

/* v5 helpers */
.ai-stats--row { grid-template-columns: repeat(4, 1fr); }
.ai-stats--row .ai-stat:nth-child(even) { top: 0; }
.ai-ticker__name { font-size: 1.05rem; font-weight: 600; white-space: nowrap; color: var(--ai-muted); }
.ai-page-hero .ai-hero__actions { margin-top: 2rem; }
@media (max-width: 991px) { .ai-stats--row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 991px) { .ai-page-hero .ai-hero__actions { justify-content: flex-start; } }

/* ----- Legal pages (privacy policy) ----- */
.ai-legal {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
}

.ai-legal__toc {
  position: sticky;
  top: 96px;
  padding: 1.4rem;
  border-radius: 20px;
  border: 1px solid var(--ai-border);
  background: var(--ai-bg-2);

  & ol { display: grid; gap: .2rem; counter-reset: toc; }
  & li { counter-increment: toc; }
  & a { display: block; padding: .4rem .5rem; border-radius: 8px; color: var(--ai-text); font-size: .92rem; }
  & a::before { content: counter(toc, decimal-leading-zero) "  "; font-family: var(--ai-mono); font-size: .75rem; color: var(--pmb-violet); }
  & a:hover { background: var(--ai-surface-2); }
}

.ai-legal__body {
  max-width: 760px;

  & section { scroll-margin-top: 100px; }
  & section + section { margin-top: 2.4rem; padding-top: 2.4rem; border-top: 1px solid var(--ai-border); }
  & h2 { font-size: 1.45rem; font-weight: 700; }
  & p { margin: .9rem 0 0; line-height: 1.8; }
  & ul { margin-top: .9rem !important; display: grid; gap: .6rem; }
  & ul li { position: relative; padding-left: 1.6rem; line-height: 1.7; color: var(--ai-muted); }
  & ul li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 8px; border-radius: 50%; background: var(--ai-gradient-btn); }
  & strong { color: var(--ai-text); }
  & a { color: var(--ai-accent-text); text-decoration: underline; text-underline-offset: 3px; }
}

.ai-legal__contact li { padding-left: 0 !important; }
.ai-legal__contact li::before { display: none; }
.ai-legal__contact i { width: 20px; color: var(--pmb-violet); }

@media (max-width: 991px) {
  .ai-legal { grid-template-columns: 1fr; }
  .ai-legal__toc { position: static; }
}

/* readability: keep small labels at 12px or more (mobile audit) */
.ai-tag,
.ai-filter label small,
.ai-form-card__head .ai-mono,
.ai-work__body small,
.ai-xp__num { font-size: .75rem; }

/* phones: service filter becomes one swipeable row instead of a tall stack */
@media (max-width: 575px) {
  .ai-filter {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -.5);
    padding: .3rem calc(var(--bs-gutter-x, 1.5rem) * .5) .6rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .ai-filter::-webkit-scrollbar { display: none; }
  .ai-filter label { flex: none; scroll-snap-align: start; }
}

/* ==========================================================================
   Portfolio page — demo cards with flow timelines
   ========================================================================== */
.pf-list { display: grid; gap: clamp(2rem, 4vw, 3rem); }

.pf-demo {
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 28px;
  border: 1px solid var(--ai-border);
  background: var(--ai-bg);
  box-shadow: var(--ai-shadow);
}

.pf-demo__top {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.pf-demo:nth-child(even) .pf-demo__shot { order: 2; }

.pf-demo__shot {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--ai-border);
  background: #eef0fb;
  box-shadow: 0 30px 60px -35px color-mix(in srgb, var(--pmb-navy) 60%, transparent);
  transition: translate .4s var(--ai-ease);

  & img { display: block; width: 100%; height: auto; transition: scale 1s var(--ai-ease); }
  &:hover { translate: 0 -4px; }
  &:hover img { scale: 1.03; }
}

.pf-demo__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .55rem .8rem;
  background: #e6e8f6;

  & i { width: 10px; height: 10px; border-radius: 50%; background: var(--pmb-red); }
  & i:nth-child(2) { background: var(--pmb-orange); }
  & i:nth-child(3) { background: #3ccf6e; }
  & em { margin-left: .6rem; padding: .15rem .7rem; border-radius: 99px; background: #fff; font: 500 .72rem/1.4 var(--ai-mono); font-style: normal; color: var(--ai-muted); }
}

.pf-demo__play {
  position: absolute;
  left: 50%;
  top: 55%;
  translate: -50% -50%;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 1.3rem;
  border-radius: 99px;
  background: var(--ai-gradient-btn);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 16px 40px -14px var(--pmb-crimson);
  opacity: 0;
  transition: opacity .3s;
}

.pf-demo__shot:hover .pf-demo__play,
.pf-demo__shot:focus-visible .pf-demo__play { opacity: 1; }

.pf-demo__num { color: var(--pmb-violet); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }

.pf-demo__info {
  & h3 { display: flex; align-items: center; gap: .6rem; margin-top: .4rem !important; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 700; }
  & h3 i { display: grid; place-items: center; width: 44px; aspect-ratio: 1; border-radius: 13px; font-size: 1.1rem; color: #fff; background: var(--ai-gradient-btn); }
  & > p { margin: .9rem 0 0; line-height: 1.75; }
  & .ai-hero__actions { margin-top: 1.4rem; }
}

.pf-demo__mods {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1.1rem !important;

  & li { padding: .35rem .75rem; border-radius: 99px; background: var(--ai-bg-2); border: 1px solid var(--ai-border); color: var(--ai-text); font-size: .82rem; font-weight: 500; }
}

.pf-ghost { color: var(--pmb-navy); }

/* flow timeline */
.pf-flow { margin-top: clamp(1.5rem, 3vw, 2.2rem); padding-top: 1.4rem; border-top: 1px dashed var(--ai-border); }
.pf-flow__title { margin-bottom: 1.1rem !important; color: var(--pmb-violet); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.pf-flow__title i { margin-right: .4rem; }

.pf-flow__steps {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .4rem;
  scrollbar-width: thin;

  &::before {
    content: "";
    position: absolute;
    top: 25px;
    left: 26px;
    right: 26px;
    height: 2px;
    background: linear-gradient(90deg, var(--pmb-blue), var(--pmb-violet), var(--pmb-crimson), var(--pmb-orange));
    opacity: .35;
  }

  & li { position: relative; display: grid; gap: .3rem; align-content: start; }
  & strong { margin-top: .4rem; font-size: .95rem; color: var(--ai-text); }
  & small { font-size: .82rem; line-height: 1.5; color: var(--ai-muted); }
}

.pf-flow__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--ai-border);
  color: var(--pmb-violet);
  font-size: 1.1rem;
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--pmb-navy) 50%, transparent);

  & b {
    position: absolute;
    top: -8px;
    right: -8px;
    display: grid;
    place-items: center;
    width: 22px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--ai-gradient-btn);
    color: #fff;
    font: 700 .72rem/1 var(--ai-mono);
  }
}

@media (max-width: 991px) {
  .pf-demo__top { grid-template-columns: 1fr; }
  .pf-demo:nth-child(even) .pf-demo__shot { order: 0; }
  .pf-demo__play { opacity: 1; top: auto; bottom: 1rem; translate: -50% 0; }
}

@media (max-width: 575px) {
  .pf-flow__steps { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; }
  .pf-flow__steps::before { top: 26px; bottom: 26px; left: 25px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--pmb-blue), var(--pmb-violet), var(--pmb-crimson), var(--pmb-orange)); }
  .pf-flow__steps li { grid-template-columns: 52px 1fr; column-gap: 1rem; }
  .pf-flow__steps li .pf-flow__icon { grid-row: span 2; }
  .pf-flow__steps li strong { margin-top: .2rem; }
}

/* let demo cards shrink so the flow timeline scrolls inside the card on tablets */
.pf-list > .pf-demo, .pf-demo__top > *, .pf-flow { min-width: 0; }

/* tablets & small laptops: wrap the flow steps into rows (no sideways scrolling) */
@media (min-width: 576px) and (max-width: 1199px) {
  .pf-flow__steps { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); overflow: visible; row-gap: 1.6rem; }
  .pf-flow__steps::before { display: none; }
}

.pf-demo__play { white-space: nowrap; }
@media (max-width: 575px) { .pf-demo__play { padding: .6rem 1rem; font-size: .9rem; bottom: .8rem; } }

/* ===== Portfolio v2: filter chips + demo card grid (16 demos) ===== */
.pf-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.pf-chip {
  display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: 99px;
  border: 1px solid var(--ai-border); background: var(--ai-bg); color: var(--ai-text); font: 600 .9rem/1.2 inherit; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
  & small { padding: .1rem .45rem; border-radius: 99px; background: var(--ai-bg-2); font-size: .75rem; color: var(--ai-muted); }
  &:hover { border-color: var(--pmb-violet); }
  &.is-active { background: var(--ai-gradient-btn); border-color: transparent; color: #fff; }
  &.is-active small { background: rgb(255 255 255 / .22); color: #fff; }
  &:focus-visible { outline: 2px solid var(--pmb-violet); outline-offset: 2px; }
}
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(1.2rem, 2.5vw, 1.8rem); align-items: start; }
.pf-card {
  display: flex; flex-direction: column; min-width: 0; border-radius: 24px; border: 1px solid var(--ai-border); background: var(--ai-bg);
  box-shadow: var(--ai-shadow); overflow: hidden; transition: translate .35s var(--ai-ease), box-shadow .35s;
  &:hover { translate: 0 -4px; }
  &[hidden] { display: none; }
}
.pf-card__shot {
  position: relative; display: block; background: #eef0fb; border-bottom: 1px solid var(--ai-border);
  & img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: top left; transition: scale 1s var(--ai-ease); }
  &:hover img { scale: 1.04; }
  &:hover .pf-demo__play, &:focus-visible .pf-demo__play { opacity: 1; }
  & .pf-demo__play { padding: .65rem 1.1rem; font-size: .9rem; }
}
.pf-card__body {
  display: grid; gap: .2rem; padding: 1.2rem 1.3rem 1.4rem;
  & h3 { display: flex; align-items: center; gap: .55rem; margin-top: .35rem !important; font-size: 1.2rem; font-weight: 700; }
  & h3 i { display: grid; place-items: center; flex: none; width: 36px; aspect-ratio: 1; border-radius: 11px; font-size: .9rem; color: #fff; background: var(--ai-gradient-btn); }
  & > p { margin: .5rem 0 0; font-size: .93rem; line-height: 1.65; }
  & .pf-demo__mods { margin-top: .8rem !important; gap: .35rem; }
  & .pf-demo__mods li { padding: .25rem .6rem; font-size: .76rem; }
  & .pf-demo__num { font-size: .8rem; letter-spacing: .06em; }
}
.pf-card__flow {
  margin-top: 1rem; border-top: 1px dashed var(--ai-border); padding-top: .8rem;
  & summary { display: flex; align-items: center; gap: .5rem; cursor: pointer; list-style: none; color: var(--pmb-violet); font-weight: 600; font-size: .9rem; }
  & summary::-webkit-details-marker { display: none; }
  & summary::after { content: "\f078"; font: 900 .7rem/1 "Font Awesome 5 Free"; margin-left: auto; transition: rotate .25s; }
  &[open] summary::after { rotate: 180deg; }
  & summary small { color: var(--ai-muted); font-weight: 500; }
  & ol { display: grid; gap: .9rem; margin: 1rem 0 0 !important; padding: 0; list-style: none; }
  & li { display: grid; grid-template-columns: 44px 1fr; gap: .8rem; align-items: start; }
  & .pf-flow__icon { width: 44px; border-radius: 13px; font-size: .95rem; }
  & li strong { display: block; font-size: .9rem; color: var(--ai-text); }
  & li small { display: block; font-size: .8rem; line-height: 1.5; color: var(--ai-muted); }
}
.pf-card__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; & .ai-btn { padding: .7rem 1.1rem; font-size: .9rem; } }
@media (hover: none) { .pf-card__shot .pf-demo__play { opacity: 1; top: auto; bottom: .8rem; translate: -50% 0; } }
@media (max-width: 575px) {
  .pf-filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: none; }
  .pf-filters::-webkit-scrollbar { display: none; }
  .pf-chip { flex: none; padding: .45rem .85rem; font-size: .85rem; }
}
