/* ==========================================================================
   Icons & flags (Huzaifa Tech SVG icon pack)
   Rule: tech icons always sit on a white / off-white chip with a hairline
   border (never transparent, also on charcoal), brand colours untouched.
   Sizes: hero 72–96px · marquee/tools 48–56px · inline tags 24–32px.
   Flags: 4:3, 6px radius, always with the country name beside them.
   ========================================================================== */

/* ---- Chips -------------------------------------------------------------- */
.tchip {
  --chip: 32px;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--chip);
  height: var(--chip);
  padding: calc(var(--chip) * 0.18);
  border-radius: min(16px, calc(var(--chip) * 0.3));
  background: #FFFFFF;
  border: 1px solid var(--border);
  box-sizing: border-box;
}
.tchip img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tchip--hero { --chip: 88px; padding: 12px; border-radius: 16px; box-shadow: 0 10px 28px rgba(43, 43, 43, 0.10); }
.tchip--lg { --chip: 56px; padding: 10px; border-radius: 16px; }
.tchip--md { --chip: 44px; padding: 8px; border-radius: 12px; }
.tchip--sm { --chip: 32px; padding: 5px; border-radius: 9px; }
.tchip--xs { --chip: 28px; padding: 4px; border-radius: 8px; }
.tchip--placeholder { color: var(--muted); font-weight: 600; font-size: calc(var(--chip) * 0.4); background: var(--bg-alt); }
[data-dark] .tchip { background: #FFFFFF; } /* never transparent on charcoal */
/* Inline lists of chips (service cards, project cards, case study, footer) */
.tlist { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tlist li { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-caption); font-weight: 500; color: var(--ink); }
.svc__stack.tlist li { padding: 3px 12px 3px 3px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: #FFFFFF; }
.svc__stack.tlist .tchip { border: 0; border-radius: 50%; }
.pcard__tech.tlist { gap: 6px; margin-top: 8px; }
.pcard__tech.tlist li { display: inline-flex; }

/* ---- Flags ------------------------------------------------------------- */
.flag { display: block; flex: none; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-alt); }
.flag--placeholder { display: inline-block; border-radius: 6px; border: 1px dashed var(--meta); background: var(--bg-alt); }
.flaglist { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; margin: 0; padding: 0; list-style: none; }
.flaglist li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: rgba(255, 255, 255, 0.85); font-size: var(--fs-caption); font-weight: 500; color: var(--ink-80); }
.flaglist .flag { width: 24px; height: 18px; border-radius: 4px; }

/* Hero trust line: "Clients in N countries" + staggered flags */
.hero__trust { flex-direction: column; gap: 14px; }
.hero__flags { display: grid; justify-items: center; gap: 10px; }
.hero__flags-title { font-size: var(--fs-small); font-weight: 600; color: var(--ink); }
.flaglist--trust li { opacity: 0; transform: translateY(8px) scale(0.96); animation: hs-flag-in 0.6s var(--ease-out) forwards; animation-delay: calc(0.9s + var(--d, 0) * 0.08s); }
@keyframes hs-flag-in { to { opacity: 1; transform: none; } }
html.xrdl-show body:not(.xrdl-ready) .flaglist--trust li { animation-play-state: paused; }

/* ---- Hero floating stack ------------------------------------------------- */
.tech__tile { background: #FFFFFF; color: inherit; transform: rotate(var(--rot, 0deg)); }
.tech-stack { gap: 14px 12px; }
@media (max-width: 1199px) {
  .tech-stack { margin-top: 20px; }
  .tech .tchip--hero { --chip: 64px; padding: 10px; }
  .tech__name { font-size: 11px; }
}
@media (min-width: 1200px) {
  .tech { position: absolute; }
  .tech__tile.tchip--hero { --chip: 88px; }
  /* Left and right columns only, clear of the centred headline, text and buttons. */
  .tech--p1 { left: 1%;  top: 30%; --rot: -8deg; }
  .tech--p2 { right: 2%; top: 12%; --rot: 9deg; }
  .tech--p3 { right: 7%; top: 56%; --rot: -7deg; }
  .tech--p4 { left: 7%;  top: 60%; --rot: 6deg; }
  .tech--p5 { left: 0%;  top: 86%; --rot: 10deg; }
  .tech--p6 { right: 0%; top: 86%; --rot: -5deg; }
}

/* ---- Marquee chips ------------------------------------------------------ */
.marquee__track { align-items: center; }
.logo { gap: 12px; height: 72px; padding: 0 22px 0 8px; color: var(--ink); background: #FFFFFF; font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0; }
.logo:hover { color: var(--ink); background: var(--bg-alt); border-color: var(--border); }
@media (max-width: 767px) { .marquee__track { animation-duration: calc(var(--marquee-dur, 46s) * 1.6); } .logo { height: 64px; } }

/* ---- Tools & technologies (tabs) ---------------------------------------- */
.tools__box { padding: clamp(16px, 2.5vw, 28px); border-radius: var(--radius-feature); border: var(--hairline); background: var(--tone-cream); }
.tools__tabs { position: relative; display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 24px; border-radius: var(--radius-pill); background: var(--bg); border: var(--hairline); }
.tools__tabs [role="tab"] { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: var(--radius-pill); font-size: var(--fs-small); font-weight: 600; color: var(--muted); transition: color 0.3s; }
.tools__tabs [role="tab"][aria-selected="true"] { color: var(--on-ink); }
.tools__count { font-size: 11px; font-variant-numeric: tabular-nums; opacity: 0.7; }
.tools__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.tool__card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  min-height: 140px; padding: 20px 12px 16px;
  border-radius: var(--radius-card);
  border: var(--hairline);
  background: var(--bg);
  text-align: center;
  color: var(--ink);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s;
}
.tool__card:hover, .tool__card:focus-visible { transform: translateY(-5px); box-shadow: 0 12px 28px rgba(43, 43, 43, 0.10); border-color: var(--meta); }
.tool__name { font-size: var(--fs-small); font-weight: 600; }
.tool__badge { padding: 2px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; color: var(--muted); background: var(--bg-alt); border: var(--hairline); }
.tool--primary .tool__badge { color: #fff; border-color: transparent; background: var(--grad); }
.tool__tip {
  position: absolute; left: 50%; top: calc(100% + 10px); z-index: 5;
  width: max-content; max-width: 240px; padding: 8px 12px;
  border-radius: 10px; background: var(--ink); color: var(--on-ink);
  font-size: 12.5px; font-weight: 400; line-height: 1.45; text-align: left;
  opacity: 0; visibility: hidden; transform: translate(-50%, 4px);
  transition: opacity 0.2s, transform 0.25s var(--ease-out), visibility 0.2s;
  pointer-events: none;
}
.tool__tip::after { content: ""; position: absolute; bottom: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom-color: var(--ink); }
.tool { position: relative; }
.tool:hover, .tool:focus-within { z-index: 6; }
.tool__card:hover .tool__tip, .tool__card:focus-visible .tool__tip, .tool__card:focus-within .tool__tip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (max-width: 599px) { .tools__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tool__tip { max-width: 180px; } }

/* ---- Serving clients worldwide ------------------------------------------ */
.countries__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.countries__list li { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 20px 10px 12px; border-radius: var(--radius-pill); border: var(--hairline); background: var(--bg); font-weight: 600; }
.countries__list .flag { width: 40px; height: 30px; }

/* ---- Footer marks + legal line ------------------------------------------- */
.footer__marks { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: clamp(32px, 4vw, 48px); padding-top: 24px; border-top: 1px solid var(--cream-12); }
.flaglist--footer { justify-content: flex-start; }
.flaglist--footer li { background: transparent; border-color: var(--cream-12); color: var(--cream-60); }
.footer__tech { gap: 6px; }
.footer__bar { flex-wrap: wrap; }
.footer__legal { flex: 1 1 100%; order: -1; max-width: 80ch; font-size: 12px; color: var(--cream-60); }

/* ---- Motion preferences ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .flaglist--trust li { opacity: 1; transform: none; animation: none; }
  .tool__card, .tool__tip { transition: none; }
  .tool__card:hover, .tool__card:focus-visible { transform: none; }
}
