/* Hero redesign and micro-interactions for every page except the Apple pages (body.apple has its own).
   Loaded last. Movement and keyframes sit inside prefers-reduced-motion: no-preference; colour and opacity changes
   stay for everyone so hover and focus still give feedback. */

/* ====================== HERO ====================== */
body:not(.apple) .hero { isolation: isolate; }
body:not(.apple) .hero__glow { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
body:not(.apple) .hero__glow i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
body:not(.apple) .hero__glow i:nth-child(1) { width: 46vw; height: 46vw; left: -10vw; top: -18vw; background: #0071e3; }
body:not(.apple) .hero__glow i:nth-child(2) { width: 38vw; height: 38vw; right: -8vw; top: -10vw; background: #5e5ce6; opacity: 0.4; }
body:not(.apple) .hero__glow i:nth-child(3) { width: 30vw; height: 30vw; left: 38vw; top: 8vw; background: #2997ff; opacity: 0.28; }

/* pill label above every hero title */
body:not(.apple) .hero .eyebrow, body:not(.apple) .hero__pill {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; padding: 7px 16px; border-radius: 980px;
  background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 0.86rem; font-weight: 500; letter-spacing: 0; color: #f5f5f7; }
body:not(.apple) .hero .eyebrow .signal, body:not(.apple) .hero__pill .live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #30d158; box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.6); }
body:not(.apple) .hero .eyebrow .bar { display: none; }
body:not(.apple) .hero .crumbs { margin-bottom: 14px; }

/* accent words in titles */
body:not(.apple) .grad { background: linear-gradient(92deg, #2997ff 0%, #7dc4ff 45%, #5e9bff 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* home hero: copy first, then a rounded stage with the photograph */
body:not(.apple) .hero--home { background: #000; }
body:not(.apple) .hero--home .hero__body { padding-top: calc(var(--header-h) + 52px); padding-bottom: clamp(24px, 3vw, 40px); }
body:not(.apple) .hero--home .display { font-size: clamp(2.6rem, 1.3rem + 5.4vw, 5.6rem); letter-spacing: -0.032em; line-height: 1.03; max-width: 20ch; margin-inline: auto; }
body:not(.apple) .hero--home .lede { max-width: 52ch; }
body:not(.apple) .hero__stage { padding-bottom: clamp(28px, 4vw, 56px); }
body:not(.apple) .hero__frame { position: relative; margin: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 21 / 9; background: #0b0b0d;
  box-shadow: 0 40px 90px -30px rgba(0, 113, 227, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12); }
body:not(.apple) .hero__frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; }
body:not(.apple) .hero__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.7) 100%); pointer-events: none; }
body:not(.apple) .hero__chips { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 16px; border: 0; }
body:not(.apple) .hero__chips a { padding: 9px 16px; border-radius: 980px; background: rgba(28, 28, 30, 0.55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); }
body:not(.apple) .hero__chips a strong { color: #fff; font-size: 0.88rem; font-weight: 500; }
body:not(.apple) .hero__chips a:hover { background: rgba(0, 113, 227, 0.75); }
body:not(.apple) .hero__chips a:hover strong { text-decoration: none; }
body:not(.apple) .hero__float { position: absolute; z-index: 2; display: grid; gap: 2px; padding: 14px 20px; border-radius: 18px; background: rgba(28, 28, 30, 0.55); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); text-align: left; }
body:not(.apple) .hero__float strong { font-size: 1.7rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
body:not(.apple) .hero__float span { font-size: 0.78rem; color: #c7c7cc; }
body:not(.apple) .hero__float--a { left: clamp(14px, 3vw, 36px); top: clamp(14px, 3vw, 32px); }
body:not(.apple) .hero__float--b { right: clamp(14px, 3vw, 36px); top: clamp(14px, 3vw, 32px); }
@media (max-width: 760px) {
  body:not(.apple) .hero__frame { aspect-ratio: 4 / 5; border-radius: 22px; }
  body:not(.apple) .hero__float { padding: 10px 14px; }
  body:not(.apple) .hero__float strong { font-size: 1.2rem; }
  body:not(.apple) .hero__chips { padding: 10px; gap: 6px; }
  body:not(.apple) .hero__chips a { padding: 7px 12px; }
}

/* inner-page heroes: soft glow behind the title, photo kept as a dimmed backdrop */
body:not(.apple) .hero:not(.hero--home):not(.hero--light)::after { content: ""; position: absolute; z-index: -1; left: 50%; top: -30%; width: 70vw; height: 70%; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0, 113, 227, 0.34), rgba(0, 113, 227, 0)); pointer-events: none; }
body:not(.apple) .hero--light::after { content: ""; position: absolute; z-index: -1; left: 50%; top: -40%; width: 60vw; height: 80%; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0, 113, 227, 0.14), rgba(0, 113, 227, 0)); pointer-events: none; }
body:not(.apple) .hero__lines { opacity: 0.5; }

/* ====================== MICRO-INTERACTIONS (colour and opacity: always) ====================== */
body:not(.apple) a, body:not(.apple) button, body:not(.apple) .btn { transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .25s ease, opacity .2s ease; }
body:not(.apple) :focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
body:not(.apple) .field input:focus, body:not(.apple) .field select:focus, body:not(.apple) .field textarea:focus { box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.18); border-color: var(--brand); outline: 0; }
body:not(.apple) .scroll-progress { background: linear-gradient(90deg, #0071e3, #5e5ce6); height: 3px; }
body:not(.apple) .nav__link { border-radius: 980px; padding-inline: 12px; }
body:not(.apple) .nav__link:hover { background: rgba(255, 255, 255, 0.1); }
body:not(.apple) .footer a { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s ease, color .2s ease; }
body:not(.apple) .footer a:hover { background-size: 100% 1px; text-decoration: none; }
body:not(.apple) .faq summary { cursor: pointer; }
body:not(.apple) .svc-index a { transition: color .2s ease, padding-left .25s ease; }

/* ====================== MICRO-INTERACTIONS (movement) ====================== */
@media (prefers-reduced-motion: no-preference) {
  /* hero ambience */
  body:not(.apple) .hero__glow i:nth-child(1) { animation: drift-a 22s ease-in-out infinite alternate; }
  body:not(.apple) .hero__glow i:nth-child(2) { animation: drift-b 26s ease-in-out infinite alternate; }
  body:not(.apple) .hero__glow i:nth-child(3) { animation: drift-c 19s ease-in-out infinite alternate; }
  @keyframes drift-a { to { transform: translate(8vw, 6vw) scale(1.12); } }
  @keyframes drift-b { to { transform: translate(-7vw, 8vw) scale(0.92); } }
  @keyframes drift-c { to { transform: translate(-6vw, -3vw) scale(1.2); } }
  body:not(.apple) .hero .eyebrow .signal, body:not(.apple) .hero__pill .live { animation: live-ping 2.2s ease-out infinite; }
  @keyframes live-ping { 0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(48, 209, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); } }
  body:not(.apple) .grad { animation: grad-slide 7s ease-in-out infinite alternate; }
  @keyframes grad-slide { to { background-position: 100% 0; } }
  body:not(.apple) .hero__float--a { animation: bob 6s ease-in-out infinite alternate; }
  body:not(.apple) .hero__float--b { animation: bob 7.5s ease-in-out -2s infinite alternate; }
  @keyframes bob { to { transform: translateY(-8px); } }

  /* buttons: lift, press, shine, arrow nudge */
  body:not(.apple) .btn { position: relative; overflow: hidden; transition: transform .2s var(--ease), background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .25s ease; }
  body:not(.apple) .btn:hover { transform: translateY(-1px); }
  body:not(.apple) .btn:active { transform: scale(0.97); }
  body:not(.apple) .btn--primary::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%); transform: translateX(-120%); }
  body:not(.apple) .btn--primary:hover::before { transform: translateX(120%); transition: transform .7s ease; }
  body:not(.apple) .btn--primary:hover { box-shadow: 0 8px 24px -8px rgba(0, 113, 227, 0.7); }
  body:not(.apple) .btn .ripple { position: absolute; border-radius: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: currentColor; opacity: 0.25; pointer-events: none; animation: ripple .6s ease-out forwards; }
  @keyframes ripple { to { transform: scale(26); opacity: 0; } }
  body:not(.apple) .link-arrow::after { display: inline-block; transition: transform .25s var(--ease); }
  body:not(.apple) .link-arrow:hover::after { transform: translate(4px, -1px); }

  /* cards: lift and image zoom */
  body:not(.apple) .tile, body:not(.apple) .product, body:not(.apple) .client, body:not(.apple) .partner, body:not(.apple) .cap, body:not(.apple) .dir-item, body:not(.apple) .office, body:not(.apple) .metric, body:not(.apple) .path, body:not(.apple) .node {
    transition: transform .35s var(--ease), box-shadow .35s ease, background-color .25s ease; }
  body:not(.apple) .product:hover, body:not(.apple) .client:hover, body:not(.apple) .partner:hover, body:not(.apple) .cap:hover, body:not(.apple) .dir-item:hover, body:not(.apple) .metric:hover { transform: translateY(-4px); box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.22); }
  body:not(.apple) .node:hover { transform: translateY(-3px); }
  body:not(.apple) .client--logo img, body:not(.apple) .plogo { transition: transform .35s var(--ease), filter .3s ease; }
  body:not(.apple) .client:hover img { transform: scale(1.08); }
  body:not(.apple) .partner:hover .plogo { transform: scale(1.08); }
  body:not(.apple) .cap svg, body:not(.apple) .checklist svg { transition: transform .35s var(--ease); }
  body:not(.apple) .cap:hover svg { transform: scale(1.18) rotate(-6deg); }
  body:not(.apple) .checklist li:hover svg { transform: scale(1.25); }
  body:not(.apple) .tile__go { transition: transform .3s var(--ease), background-color .2s ease, color .2s ease; }
  body:not(.apple) .tile:hover .tile__go { transform: rotate(45deg) scale(1.08); }
  body:not(.apple) .tile li, body:not(.apple) .chips li { transition: transform .2s var(--ease), background-color .2s ease, border-color .2s ease; }
  body:not(.apple) .tile li:hover, body:not(.apple) .chips li:hover { transform: translateY(-2px); border-color: var(--brand); }
  body:not(.apple) .hero__chips a { transition: transform .25s var(--ease), background-color .25s ease; }
  body:not(.apple) .hero__chips a:hover { transform: translateY(-3px); }
  body:not(.apple) .svc-index a:hover { padding-left: 8px; }

  /* header and menu */
  body:not(.apple) .nav__link svg { transition: transform .25s var(--ease); }
  body:not(.apple) .brand img { transition: transform .35s var(--ease); }
  body:not(.apple) .brand:hover img { transform: scale(1.04); }
  body:not(.apple) .mega a:hover { transform: translateX(3px); }
  body:not(.apple) .mega a { transition: transform .2s var(--ease), color .2s ease; }

  /* faq and tabs */
  body:not(.apple) .faq summary svg { transition: transform .3s var(--ease); }
  body:not(.apple) .faq details[open] summary svg { transform: rotate(45deg); }
  body:not(.apple) .tab::after { transition: transform .3s var(--ease); }

  /* logos strip pauses under the pointer */
  body:not(.apple) .marquee:hover .marquee__track { animation-play-state: paused; }

  /* form pills */
  body:not(.apple) .form .option, body:not(.apple) .form label.option { transition: transform .15s var(--ease), background-color .2s ease, color .2s ease; }
  body:not(.apple) .form .option:active { transform: scale(0.95); }

  /* lists settle in one by one (JS adds .stagger-in when each enters view) */
  body:not(.apple) .stagger-pre { opacity: 0; transform: translateY(14px); }
  body:not(.apple) .stagger-pre.stagger-in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s var(--ease); transition-delay: var(--d, 0ms); }
}

/* bold client wall on the home page: big white cards, large logos, three across */
body:not(.apple) .clients--bold { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; border: 0; }
body:not(.apple) .clients--bold .client { min-height: 190px; border-radius: 24px; background: #fff; box-shadow: none; padding: 24px; gap: 14px; }
body:not(.apple) .clients--bold .client--logo img { max-width: 70%; max-height: 104px; }
body:not(.apple) .clients--bold .client small { font-size: 0.9rem; font-weight: 600; color: #1d1d1f; }
body:not(.apple) .section--dark .clients--bold .client:hover { background: #fff; box-shadow: 0 0 0 2px #2997ff, 0 18px 40px -12px rgba(41, 151, 255, 0.5); }
@media (max-width: 760px) { body:not(.apple) .clients--bold { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } body:not(.apple) .clients--bold .client { min-height: 140px; border-radius: 18px; } body:not(.apple) .clients--bold .client--logo img { max-height: 70px; } }

/* ====================== SOLUTIONS OVERVIEW ====================== */
body:not(.apple) .sol-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
body:not(.apple) .sol-index { position: sticky; top: calc(var(--header-h) + 24px); }
body:not(.apple) .sol-index h2 { font-size: 1.4rem; letter-spacing: -0.02em; margin: 0 0 12px; }
body:not(.apple) .sol-index ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
body:not(.apple) .sol-index li { border-bottom: 1px solid var(--line); }
body:not(.apple) .sol-index a { display: flex; gap: 12px; padding: 11px 0; text-decoration: none; color: var(--ink-2); font-size: 0.95rem; transition: color .2s ease, padding-left .25s ease; }
body:not(.apple) .sol-index a span { color: var(--brand); font-weight: 600; min-width: 1.6em; }
body:not(.apple) .sol-index a:hover, body:not(.apple) .sol-index a.is-current { color: var(--ink); padding-left: 6px; }
body:not(.apple) .sol-list { display: grid; gap: 20px; }
body:not(.apple) .sol { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(20px, 3vw, 40px); background: var(--paper); border-radius: 28px; padding: clamp(22px, 3vw, 40px); scroll-margin-top: calc(var(--header-h) + 20px); }
body:not(.apple) .sol:nth-child(even) .sol__fig { order: -1; }
body:not(.apple) .sol__n { font-size: 0.9rem; font-weight: 600; color: var(--brand); margin: 0 0 6px; }
body:not(.apple) .sol__tag { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin: 8px 0 0; letter-spacing: -0.015em; }
body:not(.apple) .sol .lede { margin: 10px 0 0; font-size: 1.05rem; }
body:not(.apple) .sol__list { list-style: none; margin: 20px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; }
body:not(.apple) .sol__list a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 0.95rem; transition: color .2s ease, padding-left .25s ease; }
body:not(.apple) .sol__list a::after { content: "\203A"; float: right; color: var(--ink-3); }
body:not(.apple) .sol__list a:hover { color: var(--brand); padding-left: 6px; }
body:not(.apple) .sol__row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 14px; }
body:not(.apple) .sol__row strong { font-size: 0.85rem; min-width: 74px; color: var(--ink); }
body:not(.apple) .sol__logos { display: inline-flex; gap: 22px; flex-wrap: wrap; align-items: center; color: var(--ink-3); }
body:not(.apple) .sol__clients { display: inline-flex; gap: 14px; flex-wrap: wrap; align-items: center; }
body:not(.apple) .sol__clients img { height: 30px; width: auto; max-width: 96px; object-fit: contain; border-radius: 0; background: #fff; padding: 5px 9px; box-sizing: content-box; border-radius: 10px; }
body:not(.apple) .sol__fig { margin: 0; align-self: stretch; min-height: 260px; border-radius: 20px; overflow: hidden; }
body:not(.apple) .sol__fig img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; transition: transform .8s var(--ease); }
body:not(.apple) .sol:hover .sol__fig img { transform: scale(1.04); }
body:not(.apple) .sol .btn { margin-top: 6px; }
@media (max-width: 980px) {
  body:not(.apple) .sol-layout { grid-template-columns: 1fr; }
  body:not(.apple) .sol-index { position: static; }
  body:not(.apple) .sol-index ol { display: flex; gap: 8px; overflow-x: auto; border: 0; padding-bottom: 6px; scrollbar-width: none; }
  body:not(.apple) .sol-index li { border: 0; flex: none; }
  body:not(.apple) .sol-index a { padding: 8px 14px; border-radius: 980px; background: var(--paper); white-space: nowrap; }
  body:not(.apple) .sol { grid-template-columns: 1fr; }
  body:not(.apple) .sol:nth-child(even) .sol__fig { order: 0; }
  body:not(.apple) .sol__fig { min-height: 200px; order: -1; }
}
@media (max-width: 560px) { body:not(.apple) .sol__list { grid-template-columns: 1fr; } }

/* ====================== HERO ENTRANCE (CSS only: visible even if scripts are slow) ====================== */
body:not(.apple) .hero__frame img { position: absolute; inset: 0; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes hero-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  @keyframes hero-pop { from { opacity: 0; transform: translateY(60px) scale(0.95); } to { opacity: 1; transform: none; } }
  @keyframes hero-chip { from { opacity: 0; transform: translateY(14px) scale(0.92); } to { opacity: 1; transform: none; } }
  @keyframes hero-zoom { from { transform: scale(1.18); } to { transform: scale(1); } }
  body:not(.apple) .hero .crumbs, body:not(.apple) .hero .eyebrow, body:not(.apple) .hero__pill { animation: hero-up .7s var(--ease) both; }
  body:not(.apple) .hero h1 { animation: hero-up .9s var(--ease) .12s both; }
  body:not(.apple) .hero .lede { animation: hero-up .9s var(--ease) .26s both; }
  body:not(.apple) .hero .btn-row, body:not(.apple) .hero__meta, body:not(.apple) .product-hero figure { animation: hero-up .9s var(--ease) .4s both; }
  body:not(.apple) .hero__frame { animation: hero-pop 1.2s var(--ease) .45s both; }
  body:not(.apple) .hero__frame img { animation: hero-zoom 2.4s var(--ease) .45s both; }
  body:not(.apple) .hero__float--a { animation: hero-chip .8s var(--ease) 1.2s both, bob 6s ease-in-out 2s infinite alternate; }
  body:not(.apple) .hero__float--b { animation: hero-chip .8s var(--ease) 1.35s both, bob 7.5s ease-in-out 2.1s infinite alternate; }
  body:not(.apple) .hero__chips a { animation: hero-chip .7s var(--ease) both; }
  body:not(.apple) .hero__chips a:nth-child(1) { animation-delay: 1.3s; } body:not(.apple) .hero__chips a:nth-child(2) { animation-delay: 1.38s; }
  body:not(.apple) .hero__chips a:nth-child(3) { animation-delay: 1.46s; } body:not(.apple) .hero__chips a:nth-child(4) { animation-delay: 1.54s; }
  body:not(.apple) .hero__chips a:nth-child(5) { animation-delay: 1.62s; } body:not(.apple) .hero__chips a:nth-child(6) { animation-delay: 1.7s; }
}

body:not(.apple) .sol__needs { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
body:not(.apple) .sol__needs li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; color: var(--ink-2); }
body:not(.apple) .sol__needs strong { color: var(--ink); }
body:not(.apple) .sol__label { margin: 18px 0 0; font-size: 0.85rem; font-weight: 600; color: var(--ink); }
