/* The About page's Studio document owns the content, bands and responsive grids. */
#Form:has(#qab_hero) [data-qs-layout="homepage"] .qs-skin-region--header {
  & .qs-nav {
    --qs-menu-focus: var(--qs-brand-cyan, #00aeef);

    & :is(a, button):focus-visible { outline-color: #17212b; }
  }

  & .qs-btn--primary:is(:hover, :focus-visible) {
    background: var(--qs-brand-cyan, #00aeef) !important;
    box-shadow: inset 0 0 0 1px #17212b !important;
  }
}

#Form [data-qs-layout="homepage"] .qs-studio-page section[id^="qab_"] {
  --about-cyan: var(--qs-brand-cyan, #00aeef);
  --about-rule: #cbd5dc;
  --about-dark-rule: rgb(212 232 243 / 30%);
  --about-body-size: clamp(15px, 1.12vw, 20px);
  --about-small-size: clamp(15px, 1.02vw, 18px);
  --about-row-gap: clamp(22px, 3vw, 70px);
  box-sizing: border-box;
  scroll-margin-top: 85px;

  &[data-qs-role="qab-dark"] {
    background-image:
      radial-gradient(ellipse at 60% 0%, rgb(38 84 108 / 34%), transparent 75%),
      linear-gradient(116deg, #10171e, #111e26 58%, #10171e);
  }

  & :is([data-qs-role="qab-frame"], [data-qs-role="qab-frame"] *) {
    min-width: 0;
  }

  & :is([data-qs-role="qab-hero-story"], [data-qs-role="qab-team-intro"], [data-qs-role="qab-intro-heading"]) {
    display: grid;
    gap: clamp(10px, 1.15vw, 24px);
    justify-items: start;
  }

  & :is([data-qs-role="qab-copy"], [data-qs-role="qab-split-copy"], [data-qs-role="qab-small-copy"]) {
    margin: 0;
    font-family: var(--font-body, Inter, system-ui, sans-serif);
    font-size: var(--about-body-size);
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  & [data-qs-role="qab-copy"] {
    max-width: 58ch;
  }

  & [data-qs-role="qab-small-copy"] {
    font-size: var(--about-small-size);
    line-height: 1.45;
  }

  & [data-qs-role="qab-split-copy"] {
    max-width: 65ch;
  }

  &[data-qs-role="qab-dark"] [data-qs-role="qab-split-copy"] {
    padding-left: clamp(18px, 2.4vw, 54px);
    box-shadow: -1px 0 0 var(--about-dark-rule);
  }

  & [data-qs-role="qab-eyebrow"] {
    margin: 0;
    font-family: var(--font-body, Inter, system-ui, sans-serif);
    font-size: clamp(12px, .87vw, 16px);
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--n-color, #37434d) !important;
  }

  & :is([data-qs-role="qab-title"], [data-qs-role="qab-card-title"], [data-qs-role="qab-milestone-title"]) {
    margin: 0;
    font-family: var(--font-display, Outfit, system-ui, sans-serif);
    font-weight: 700;
    letter-spacing: -.035em;
    text-wrap: pretty;
  }

  & h1[data-qs-role="qab-title"] {
    font-size: clamp(44px, 4.1vw, 105px);
    line-height: 1.03;

    & em { display: block; }
  }

  & h2[data-qs-role="qab-title"] {
    font-size: clamp(34px, 3.46vw, 88px);
    line-height: 1.04;
  }

  & [data-qs-role="qab-title"] em {
    font-style: normal;
  }

  &[data-qs-role="qab-dark"] [data-qs-role="qab-title"] em {
    color: var(--about-cyan) !important;
  }

  &[data-qs-role="qab-light"] :is([data-qs-role="qab-title"] em, [data-qs-role="qab-stat-value"] > span) {
    color: #17212b !important;
    text-decoration: underline var(--about-cyan) .1em;
    text-underline-offset: .15em;
  }

  & [data-qs-role="qab-card-title"] {
    font-size: clamp(20px, 1.55vw, 33px);
    line-height: 1.14;
  }

  & [data-qs-role="qab-action"] {
    width: fit-content;
    min-height: 46px;
    padding: .8em 1.35em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .75em;
    font-family: var(--font-body, Inter, system-ui, sans-serif);
    font-size: var(--about-small-size);
    line-height: 1.25;
    font-weight: 700;
    border: 0 !important;
    border-radius: 5px;
    color: #0a202b !important;
    background: var(--about-cyan) !important;
    text-decoration: none;
    transition: box-shadow .18s ease;

    & > span { color: inherit !important; }
    &:is(:hover, :focus-visible) {
      box-shadow: 0 4px 16px color-mix(in srgb, var(--about-cyan) 24%, transparent);
    }

    & .qs-studio-arrow { display: none; }
    &::after { content: "→" / ""; line-height: 1; }
  }

  & a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
  }

  & [data-qs-role="qab-hero-photo"] {
    position: relative;
    display: grid;
    place-items: center;
    justify-self: end;
    width: min(100%, 38vw, 820px);
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(145deg, #214661, #0d2338) !important;
    box-shadow: 0 14px 36px rgb(19 47 62 / 13%);
  }

  & [data-qs-role="qab-hero-image"] {
    position: absolute;
    inset: 0;
    margin: 0;

    &:not(:has(img[src]:not([src=""]))) { display: none; }

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

  & [data-qs-role="qab-photo-placeholder"] {
    position: absolute;
    inset: 50% auto auto 50%;
    translate: -50% -50%;
    display: grid;
    justify-items: center;
    gap: 12px;
    margin: 0;
    font-size: clamp(15px, 1.25vw, 22px);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;

    &::after {
      content: "";
      grid-row: 1;
      width: 40px;
      height: 30px;
      border: 1px solid currentColor;
      border-radius: 4px;
      background:
        radial-gradient(circle at 70% 27%, currentColor 2px, transparent 3px),
        linear-gradient(140deg, transparent 49%, currentColor 50% 52%, transparent 53%) 4px 8px / 17px 18px no-repeat,
        linear-gradient(42deg, transparent 48%, currentColor 49% 53%, transparent 54%) 20px 11px / 16px 14px no-repeat;
      opacity: .8;
    }
  }

  & [data-qs-role="qab-hero-photo"]:has([data-qs-role="qab-hero-image"] img[src]:not([src=""])) [data-qs-role="qab-photo-placeholder"] {
    display: none;
  }

  & :is([data-qs-role="qab-facts"], [data-qs-role="qab-pillars"], [data-qs-role="qab-techs"], [data-qs-role="qab-timeline"]) {
    margin-top: var(--about-row-gap);
  }

  & :is([data-qs-role="qab-stat"], [data-qs-role="qab-pillar"]) {
    display: grid;
    align-content: start;
    gap: .35rem;
    padding-inline: clamp(14px, 2.5vw, 62px);
  }

  & :is([data-qs-role="qab-stat"], [data-qs-role="qab-pillar"]):first-child { padding-left: 0; }
  & :is([data-qs-role="qab-stat"], [data-qs-role="qab-pillar"]):last-child { padding-right: 0; }
  & [data-qs-role="qab-stat"] + [data-qs-role="qab-stat"] { box-shadow: -1px 0 0 var(--about-rule); }
  & [data-qs-role="qab-pillar"] + [data-qs-role="qab-pillar"] { box-shadow: -1px 0 0 var(--about-dark-rule); }
  & [data-qs-role="qab-stat"] [data-qs-role="qab-small-copy"] { max-width: 24ch; }

  & :is([data-qs-role="qab-stat-value"], [data-qs-role="qab-milestone-year"]) {
    margin: 0;
    font-family: var(--font-display, Outfit, system-ui, sans-serif);
    font-size: clamp(25px, 2.58vw, 61px);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -.035em;
    color: #17212b !important;
  }

  & [data-qs-role^="qab-mark-"] {
    width: 37px;
    height: 33px;
    position: relative;
    color: var(--about-cyan) !important;
    margin-bottom: .2rem;
  }

  & [data-qs-role="qab-mark-strategy"]::after {
    content: "";
    position: absolute;
    inset: 3px auto auto 3px;
    width: 25px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, currentColor 0 2px, transparent 2.5px 5px,
      currentColor 5.5px 7px, transparent 7.5px 10px, currentColor 10.5px 12px, transparent 12.5px);
  }

  & [data-qs-role="qab-mark-support"]::after {
    content: "";
    position: absolute;
    inset: 2px 0;
    background:
      radial-gradient(circle at 50% 24%, transparent 3.5px, currentColor 4px 5px, transparent 5.5px),
      radial-gradient(circle at 19% 34%, transparent 2.5px, currentColor 3px 4px, transparent 4.5px),
      radial-gradient(circle at 81% 34%, transparent 2.5px, currentColor 3px 4px, transparent 4.5px),
      radial-gradient(ellipse at 50% 103%, transparent 9px, currentColor 10px 11px, transparent 12px),
      radial-gradient(ellipse at 11% 107%, transparent 6px, currentColor 7px 8px, transparent 9px),
      radial-gradient(ellipse at 89% 107%, transparent 6px, currentColor 7px 8px, transparent 9px);
  }

  & [data-qs-role="qab-mark-delivery"]::after {
    content: "";
    position: absolute;
    inset: 4px 3px;
    background: currentColor;
    clip-path: polygon(50% 0, 98% 24%, 50% 48%, 2% 24%, 50% 0, 50% 8%, 18% 24%, 50% 40%,
      82% 24%, 50% 8%, 50% 0, 2% 24%, 2% 39%, 50% 64%, 98% 39%, 98% 48%, 50% 74%,
      2% 48%, 2% 64%, 50% 90%, 98% 64%, 98% 73%, 50% 100%, 2% 73%);
  }

  & [data-qs-role="qab-mark-partnership"]::after {
    content: "∞" / "";
    position: absolute;
    inset: -10px 0 auto;
    font-size: 41px;
    line-height: 1.15;
    font-weight: 500;
    font-family: system-ui, sans-serif;
  }

  & [data-qs-role="qab-feature-photo"] {
    margin: 0;
    overflow: hidden;

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

  & [data-qs-role="qab-feature-photo"] img { aspect-ratio: 1.3; }
  & [data-qs-role="qab-caption"] {
    margin: .55rem 0 0;
    font: 600 clamp(13px, 1vw, 16px)/1.35 var(--font-body, Inter, system-ui, sans-serif);
  }

  & [data-qs-role="qab-links"] { margin: 0; }
  & :is([data-qs-role="qab-links"], #qab_journey [data-qs-role="qab-split-copy"], [data-qs-role="qab-milestone"]) a {
    font-weight: 700;
    color: inherit !important;
    text-decoration-line: underline;
    text-decoration-color: var(--about-cyan);
    text-underline-offset: .2em;
  }

  & [data-qs-role="qab-links"] a { font-size: var(--about-small-size); }

  & [data-qs-role="qab-techs"] {
    --about-logo-width: clamp(128px, 12vw, 206px);
    --about-logo-height: clamp(74px, 6.7vw, 112px);
    --about-logo-gap: clamp(10px, 1vw, 18px);
  }

  & [data-qs-role="qab-tech-row"] {
    display: flex;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;

    &::-webkit-scrollbar { display: none; }
    &[data-about-logo-scrollable] { cursor: grab; }
    &[data-about-logo-dragging] { cursor: grabbing; user-select: none; }
    &:focus-visible { outline: 2px solid var(--about-cyan); outline-offset: 3px; }
  }

  & [data-qs-role="qab-tech-list"] {
    display: flex;
    flex: none;
    gap: var(--about-logo-gap);
    width: max-content;
    padding-right: var(--about-logo-gap);
  }

  & [data-qs-role="qab-tech-item"] {
    display: flex;
    flex: 0 0 var(--about-logo-width);
    align-items: center;
    justify-content: center;
    gap: .4rem;
    box-sizing: border-box;
    width: var(--about-logo-width);
    height: var(--about-logo-height);
    padding: 4px clamp(8px, 1vw, 18px);
    overflow: hidden;
  }

  & [data-qs-role="qab-tech-logo"] {
    width: 100%;
    height: 100%;
    margin: 0;

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

  & [data-qs-role="qab-tech-logo"] :is(img[alt="Azure AI Foundry"], img[alt="SQL Server"]) {
    scale: 1.24;
  }

  /* The supplied logos have transparent artwork. Lift dark wordmarks against the section background. */
  & [data-qs-role="qab-tech-logo"] :is(img[alt="Anthropic"], img[alt="Cognition"], img[alt="LangChain"], img[alt="xAI"], img[alt="SQL Server"]) {
    filter: brightness(0) invert(1);
  }

  & [data-qs-role="qab-tech-logo"] :is(img[alt="Microsoft Partner"], img[alt="Authorize.net"], img[alt="Twilio SendGrid"],
    img[alt="Firecrawl"], img[alt="OpenClaw"], img[alt="NVIDIA"], img[alt="OpenAI"], img[alt="Vue.js"],
    img[alt="Azure AI Foundry"], img[alt="Perplexity"]) {
    filter: invert(1) hue-rotate(180deg);
  }

  & [data-qs-role="qab-tech-item"]:has([data-qs-role="qab-tech-name"]) [data-qs-role="qab-tech-logo"] {
    flex: none;
    width: clamp(24px, 2.8vw, 48px);

    & img {
      filter: brightness(0) invert(1) drop-shadow(0 0 0 #fff) drop-shadow(0 0 0 #fff);
    }
  }

  & [data-qs-role="qab-tech-name"] {
    flex: none;
    width: max-content;
    margin: 0;
    font-size: clamp(15px, 1.3vw, 24px);
    font-weight: 700;
    white-space: nowrap;
  }

  & [data-qs-role="qab-milestone"] {
    position: relative;
    display: grid;
    align-content: start;
    gap: .45rem;
    padding: clamp(18px, 1.9vw, 38px) clamp(14px, 2vw, 46px) 0 0;
    box-shadow: inset 0 1px var(--about-rule);

    &::after {
      content: "";
      position: absolute;
      inset: -4px auto auto 0;
      width: 8px;
      height: 8px;
      background: var(--about-cyan);
    }
  }

  & [data-qs-role="qab-milestone-year"] { font-size: clamp(25px, 2.15vw, 49px); }
  & [data-qs-role="qab-milestone-title"] {
    font-size: clamp(17px, 1.38vw, 28px);
    line-height: 1.2;
  }

  &[id="qab_contact"] h2[data-qs-role="qab-title"] {
    font-size: clamp(31px, 3vw, 72px);
  }

  &:is(#qab_journey, #qab_contact) h2[data-qs-role="qab-title"] em { display: block; }

  & [data-qs-role="qab-service-link"] {
    margin: 0;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.4;
    font-weight: 700;

    & a {
      color: #0a202b !important;
      text-decoration: none;
      text-underline-offset: .22em;
    }

    & a:is(:hover, :focus-visible) { text-decoration: underline; }
  }
}

@media (max-width: 1023px) {
  #Form [data-qs-layout="homepage"] .qs-studio-page #qab_contact [data-qs-role="qab-split-copy"] {
    padding-left: 0;
    box-shadow: none;
  }
}

@media (max-width: 831px) {
  #Form [data-qs-layout="homepage"] .qs-studio-page section[id^="qab_"] {
    & h1[data-qs-role="qab-title"] { font-size: clamp(37px, 6.7vw, 64px); }
    & [data-qs-role="qab-hero-photo"] { width: min(100%, 520px); justify-self: start; }
    &[data-qs-role="qab-dark"] [data-qs-role="qab-split-copy"] { padding-left: 0; box-shadow: none; }
    & :is([data-qs-role="qab-stat"], [data-qs-role="qab-pillar"], [data-qs-role="qab-milestone"]) { padding-bottom: 18px; }
    & :is([data-qs-role="qab-stat"], [data-qs-role="qab-pillar"]):nth-child(odd) { padding-left: 0; box-shadow: none; }
    & :is([data-qs-role="qab-stat"], [data-qs-role="qab-pillar"]):nth-child(n+3) { padding-top: 18px; }
  }
}

@media (max-width: 560px) {
  #Form [data-qs-layout="homepage"] .qs-studio-page section[id^="qab_"] {
    & h1[data-qs-role="qab-title"] { font-size: clamp(32px, 8.7vw, 48px); text-wrap: balance; }
    & [data-qs-role="qab-pillar"] {
      padding: 14px 0 16px !important;
      box-shadow: 0 -1px var(--about-dark-rule) !important;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  #Form [data-qs-layout="homepage"] .qs-studio-page section[id^="qab_"] [data-qs-role="qab-action"] {
    transition: none;
  }
}
