/*
 * /about-us/ (templates/page-about-us.php), 20 Oct 2026. The hero's stack
 * (our file service on the portals on TunerSuite) and the partners' network
 * are drawn in CSS 3D; js/page-about-us.js moves them with anime.js 4, once.
 * Colours come from the tokens, so both themes draw themselves. No opacity is
 * ever set on a 3D scene: it would flatten it in Chrome.
 */

/* Every icon on the page is a line drawing (tdb_v3_icon). */
.about svg[viewBox="0 0 24 24"] {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- hero ---------------------------------------------------------------- */
.ab-hero {
  padding-block: var(--sp-6) var(--sp-7);
  overflow-x: clip;
}

.ab-hero__grid {
  display: grid;
  gap: var(--sp-6);
  align-items: center;
}

@media (min-width: 960px) {
  .ab-hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--sp-7);
  }
}

.ab-hero h1 {
  font-size: var(--step-5);
  line-height: var(--leading-tight);
  max-width: 18ch;
  margin-block: var(--sp-3) var(--sp-4);
}

.ab-hero .lede {
  max-width: 56ch;
}

.ab-figs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-block: var(--sp-6) var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line-strong);
}

.ab-figs dt {
  color: var(--ink-3);
  font-size: var(--step--1);
  line-height: var(--leading-snug);
}

.ab-figs dd {
  margin: var(--sp-1) 0 0;
  font-family: var(--font-mono);
  font-size: var(--step-4);
  line-height: 1;
  color: var(--accent-ink);
}

.ab-counted {
  max-width: 60ch;
}

/* The stack: TunerSuite at the base, the portals on it, our file service on top. */
.ab-stack {
  display: grid;
  place-items: center;
  min-height: clamp(300px, 36vw, 470px);
  padding-block: var(--sp-8) var(--sp-5);
  perspective: 1600px;
  overflow: clip;
}

.ab-stack__scene {
  position: relative;
  width: clamp(220px, 26vw, 320px);
  aspect-ratio: 1;
  transform: rotateX(54deg) rotateZ(-38deg);
  transform-style: preserve-3d;
}

.ab-plate {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.ab-plate--base { transform: translateZ(0); }
/* Far enough apart that the front edge of each plate, where its words are, shows. */
.ab-plate--mid { transform: translateZ(clamp(64px, 7vw, 96px)); }
.ab-plate--top { transform: translateZ(clamp(128px, 14vw, 192px)); }

/* The plate's edge: a second face just under the top one. */
.ab-plate::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-2);
  background: var(--line-strong);
  transform: translateZ(-10px);
}

.ab-plate__top {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
  box-shadow: var(--shadow-float);
  color: var(--ink);
}

.ab-plate__top svg {
  width: 26px;
  height: 26px;
  color: var(--accent-ink);
}

.ab-plate__top b {
  font-size: var(--step-2);
  line-height: var(--leading-tight);
}

.ab-plate__top span {
  color: var(--ink-2);
  font-size: var(--step--1);
}

.ab-plate--top .ab-plate__top {
  border-color: var(--accent);
}

.ab-plate--top::before {
  background: var(--accent);
}

/* ---- what we do ---------------------------------------------------------- */
.ab-doors {
  display: grid;
  gap: var(--sp-5);
}

@media (min-width: 960px) {
  .ab-doors {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ab-door {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
}

.ab-door--main {
  border-color: var(--accent);
}

.ab-door h3 {
  font-size: var(--step-2);
  line-height: var(--leading-tight);
}

.ab-door p {
  margin: 0;
  color: var(--ink-2);
}

.ab-door > .row:last-child {
  margin-top: auto;
  padding-top: var(--sp-2);
}

.ab-ico {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-sunk);
  color: var(--accent-ink);
}

.ab-ico svg {
  width: 22px;
  height: 22px;
}

/* ---- two columns: words beside a picture ---------------------------------- */
.ab-split {
  display: grid;
  gap: var(--sp-6);
  align-items: center;
}

@media (min-width: 960px) {
  .ab-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--sp-7);
  }
}

/* ---- partners ------------------------------------------------------------ */
.ab-points {
  display: grid;
  gap: var(--sp-5);
  margin: var(--sp-5) 0 0;
  padding: 0;
  list-style: none;
}

.ab-points li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
}

.ab-points h3 {
  margin-bottom: var(--sp-1);
  font-size: var(--step-1);
}

.ab-points p {
  margin: 0;
  color: var(--ink-2);
}

/* The network: TunerSuite in the middle, the people around it standing up on a tilted floor. */
.ab-net {
  display: grid;
  place-items: center;
  padding-block: var(--sp-5);
  perspective: 1400px;
  overflow: clip;
}

.ab-net__scene {
  position: relative;
  width: min(420px, 82vw);
  aspect-ratio: 1;
  transform: rotateX(50deg);
  transform-style: preserve-3d;
}

.ab-net__scene::before {
  content: "";
  position: absolute;
  inset: 6%;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
}

.ab-net__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ab-net__lines line {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
}

.ab-node {
  --x: 50%;
  --y: 50%;
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -100%) rotateX(-50deg);
  transform-origin: 50% 100%;
}

.ab-node b {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
  box-shadow: var(--shadow-float);
  color: var(--ink);
  font-size: var(--step--1);
  white-space: nowrap;
}

.ab-node--hub {
  display: grid;
  justify-items: center;
  gap: var(--sp-1);
}

.ab-node--hub svg {
  width: 30px;
  height: 30px;
  color: var(--accent-ink);
}

.ab-node--hub b {
  border-color: var(--accent);
  font-size: var(--step-0);
}

.ab-node--1 { --x: 50%; --y: 10%; }
.ab-node--2 { --x: 84.75%; --y: 30%; }
.ab-node--3 { --x: 84.75%; --y: 70%; }
.ab-node--4 { --x: 50%; --y: 90%; }
.ab-node--5 { --x: 15.25%; --y: 70%; }
.ab-node--6 { --x: 15.25%; --y: 30%; }

@media (max-width: 520px) {
  /* Flatter on a phone, so the people standing at the front do not cover the middle. */
  .ab-net__scene {
    transform: rotateX(36deg);
  }

  .ab-node--hub svg {
    display: none;
  }

  .ab-node b {
    padding: var(--sp-1) var(--sp-2);
    font-size: var(--step--1);
    white-space: normal;
    max-width: 9ch;
    text-align: center;
  }
}

/* ---- the loop ------------------------------------------------------------ */
.ab-loop {
  position: relative;
  display: grid;
  gap: var(--sp-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .ab-loop {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-6);
  }
}

.ab-loop__line {
  display: none;
}

@media (min-width: 900px) {
  .ab-loop__line {
    display: block;
    position: absolute;
    top: 22px;
    left: 22px;
    right: 22px;
    height: 2px;
    background: var(--accent);
    transform-origin: left center;
  }
}

.ab-step {
  position: relative;
}

.ab-step__n {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--sp-3);
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent-ink);
}

.ab-step__n svg {
  width: 20px;
  height: 20px;
}

.ab-step h3 {
  margin-bottom: var(--sp-2);
  font-size: var(--step-1);
}

.ab-step p {
  margin: 0;
  color: var(--ink-2);
}

.ab-proof {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line-strong);
}

.ab-proof__fig {
  font-size: var(--step-2);
  line-height: var(--leading-snug);
}

.ab-proof__fig b {
  font-family: var(--font-mono);
  color: var(--accent-ink);
}

/* ---- simple to use ------------------------------------------------------- */
.ab-ticks {
  display: grid;
  gap: var(--sp-3);
  margin: var(--sp-5) 0 0;
  padding: 0;
  list-style: none;
}

.ab-ticks li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
}

.ab-ticks svg {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--ok);
}

/* The real screen, in a frame that scrolls, turned a little towards the words. */
.ab-shot {
  perspective: 1600px;
}

.ab-shot .shot__frame {
  height: clamp(340px, 42vw, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
  box-shadow: var(--shadow-float);
  scrollbar-width: thin;
  transform: rotateY(-8deg) rotateX(3deg);
  transform-origin: left center;
  transition: transform var(--dur-3) var(--ease-out);
}

.ab-shot .shot__frame:hover,
.ab-shot .shot__frame:focus-visible {
  transform: none;
}

.ab-shot .shot__frame:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.ab-shot .shot__frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.ab-shot .shot__l {
  display: none;
}

:root[data-theme="light"] .ab-shot .shot__d {
  display: none;
}

:root[data-theme="light"] .ab-shot .shot__l {
  display: block;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .ab-shot .shot__d {
    display: none;
  }

  :root:not([data-theme="dark"]) .ab-shot .shot__l {
    display: block;
  }
}

/* ---- the company and what next --------------------------------------------- */
.about .specs {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.about .specs > div {
  display: grid;
  grid-template-columns: 10em minmax(0, 1fr);
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--line);
}

.about .specs dt {
  color: var(--ink-3);
}

.about .specs dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ab-next {
  text-align: center;
}

.ab-next .row {
  justify-content: center;
  flex-wrap: wrap;
}

.ab-next .lede {
  margin-inline: auto;
}

@media (max-width: 600px) {
  .ab-figs dd {
    font-size: var(--step-3);
  }

  /* A phone's plates hold one short line each, on the edge that shows. */
  .ab-stack {
    min-height: 250px;
    padding-block: var(--sp-6) var(--sp-3);
  }

  .ab-plate__top {
    padding: var(--sp-3) var(--sp-4);
  }

  .ab-plate__top span {
    display: none;
  }

  .ab-plate__top b {
    font-size: var(--step-1);
  }

  .about .specs > div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-shot .shot__frame {
    transition: none;
  }
}
