/* ==========================================================================
   Professional Services & Consulting — /industries/professional-services
   Paper artboard "10 Professional Services" (1MQ-0). Everything shared comes
   from site.css; this file holds only what is particular to this page.
   Tokens only, logical properties only, every rule under
   .page-professional-services.
   ========================================================================== */

.page-professional-services {
  /* Row titles are 22/30 in Paper (the .h5 class is 22/28). Arabic keeps its own, taller line. */
  --ps-lh-title: calc(30 / 22);
  /* Paper's 140px section edge and its 72px and 80px header-to-content gaps, on the fluid tokens. */
  --ps-pad-140: calc(var(--section-pad) * 0.875);
  --ps-gap-72: calc(var(--section-gap) * 0.8182);
  --ps-gap-80: calc(var(--section-gap) * 0.9091);
}

.page-professional-services:lang(ar) { --ps-lh-title: var(--lh-h5); }

/* ---- Shared by several sections ---- */

/* Section intro under an H2: body size here, not the lead size of the shared header (519px wide). */
.page-professional-services .ps-intro {
  max-inline-size: 32.4375rem;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-normal);
}

/* Numbered points: a hairline, a numeral, a 22px title, a line of copy (sections 03 and 07). */
.page-professional-services .ps-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-10) var(--grid-gap);
}

.page-professional-services .ps-point {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding-block-start: var(--space-6);
  border-block-start: 1px solid var(--c-rule);
}

.page-professional-services .ps-point__num {
  font-size: var(--fs-label);
  font-weight: var(--weight-light);
  line-height: var(--lh-label);
  color: var(--c-muted);
}

.page-professional-services .ps-point__title { line-height: var(--ps-lh-title); }

/* Project actions set one under the other (text link, then the live button when a sample is live). */
.page-professional-services .ps-actions {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}

/* Stand-alone text links (20px tall as drawn) get a 44px touch target without changing the layout. */
.page-professional-services :is(.ps-actions, .ps-more__all) .link { position: relative; }

.page-professional-services :is(.ps-actions, .ps-more__all) .link::after {
  content: "";
  position: absolute;
  inset: -0.75rem 0;
}

/* ---- 01 Hero (1PN-0) ---- */

.page-professional-services .ps-hero { padding-block-start: calc(var(--header-offset) + var(--space-14)); }   /* 56 above the breadcrumbs */

/* Label and headline at the start (790), lead and buttons at the end (452), bottoms aligned. */
.page-professional-services .ps-hero__copy {
  --hero-top: clamp(2.5rem, 3.8889vw, 3.5rem);       /* 56 */
  --hero-bottom: clamp(2.5rem, 3.8889vw, 3.5rem);    /* 56 */
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}

.page-professional-services .ps-hero__headline {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-8);
  min-inline-size: 0;
  max-inline-size: 49.375rem;              /* 790 */
}

.page-professional-services .ps-hero__aside {
  display: flex;
  flex: 0 0 28.25rem;                      /* 452 */
  flex-direction: column;
  gap: var(--space-7);
  padding-block-end: var(--space-3);
}

/* Paper sets this lead at 20/30, muted (the .lead class is 22/32). */
.page-professional-services .ps-hero__lead {
  font-size: clamp(1.125rem, 1.0833rem + 0.1852vw, 1.25rem);   /* 20 → 18 */
  line-height: 1.5;
  letter-spacing: var(--tracking-snug);
  color: var(--c-muted);
  text-wrap: pretty;
}

.page-professional-services:lang(ar) .ps-hero__lead { line-height: var(--lh-lead); }

/* Who it is for (3 columns) beside the photograph (9 columns), bottoms aligned. 72 above, 120 below. */
.page-professional-services .ps-hero__visual {
  padding-block: clamp(2.5rem, 5vw, 4.5rem) var(--section-pad-tight);
}

.page-professional-services .ps-audience__label { padding-block-end: var(--space-5); }

.page-professional-services .ps-audience__list { border-block-end: 1px solid var(--c-rule); }

.page-professional-services .ps-audience__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-block-start: 1px solid var(--c-rule);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-normal);
  color: var(--c-text);
}

.page-professional-services .ps-audience__num {
  flex: none;
  font-size: var(--fs-label);
  font-weight: var(--weight-light);
  letter-spacing: 0;
  color: var(--c-muted);
}

/* ---- 02 Featured website (1X4-0): 140 above and below, 72 under the header ---- */

.page-professional-services .ps-featured { padding-block: var(--ps-pad-140); }

.page-professional-services .ps-featured .section__body { margin-block-start: var(--ps-gap-72); }

.page-professional-services .ps-featured__caption {
  align-items: start;
  margin-block-start: var(--space-7);
}

/* Arabic page: the project name is a Latin fragment (lang="en") in a .lead heading. The shared rule gives such a
   fragment its Latin tracking in .h2 to .h5 only, so the lead's own tracking is repeated here (COMPONENTS §22). */
.page-professional-services .ps-featured__caption [lang="en"] { letter-spacing: var(--tracking-tight); }

/* The kind sits on the line of the project name, at the end of the row. */
.page-professional-services .ps-featured__kind {
  line-height: calc(var(--fs-lead) * var(--lh-lead));
  text-align: end;
}

/* ---- 03 Credibility and expertise (23M-0): 160 above, 140 below ---- */

.page-professional-services .ps-credibility { padding-block-end: var(--ps-pad-140); }

.page-professional-services .ps-credibility__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-10);
}

.page-professional-services .ps-credibility__statement { max-inline-size: 73.75rem; }   /* 1180 */

/* Arabic: the emphasised phrase is held on one line (non-breaking spaces in ar.html), so that no single word is
   left alone under it on a phone. At the 40px floor of the H1 size that line is 308px wide, which is more than
   the column of a screen narrower than 360px: there the statement follows the screen width instead. From 360px
   up the H1 token is the smaller value and nothing changes. */
.page-professional-services:lang(ar) .ps-credibility__statement { font-size: min(var(--fs-h1), 11.2vw); }

.page-professional-services .ps-credibility__body { margin-block-start: clamp(3rem, 6.6667vw, 6rem); }   /* 96 */

/* ---- 04 Sector challenges (29S-0): brand rule, then 140 above and 160 below ---- */

.page-professional-services .ps-challenges__inner { padding-block-start: var(--ps-pad-140); }

.page-professional-services .ps-challenges__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-8);
  max-inline-size: 30rem;                  /* 480 */
}

.page-professional-services .ps-challenges__intro .body { max-inline-size: 25.6875rem; }   /* 411 */

/* Paper breaks after "The work is"; balanced wrapping would break after "The work". */
.page-professional-services:lang(en) .ps-challenges__intro .h2 { text-wrap: wrap; }

/* Rows: numeral (40), title (230), description. 30 above and below. */
.page-professional-services .ps-challenges__list {
  --rule-key: 2.5rem;
  --rule-pad-top: 1.875rem;
  --rule-pad-bottom: 1.875rem;
  --rule-body-gap: 0px;
}

.page-professional-services .ps-challenges__list .rule-list__key { line-height: calc(var(--fs-h5) * var(--ps-lh-title)); }

.page-professional-services .ps-challenges__list .rule-list__body {
  display: grid;
  grid-template-columns: 14.375rem minmax(0, 1fr);
  column-gap: var(--grid-gap);
  align-items: start;
}

.page-professional-services .ps-challenges__list .h5 { line-height: var(--ps-lh-title); }

.page-professional-services .ps-challenges__list .small { padding-block-start: var(--space-1); }

/* ---- 05 Capabilities (2H2-0) ---- */

/* Rows: numeral (60) on the first line of a 28px title; copy held to 440. */
.page-professional-services .ps-capabilities__list { --rule-key: 3.75rem; }

.page-professional-services .ps-capabilities__list .rule-list__key { line-height: calc(var(--fs-h4) * var(--lh-h4)); }

.page-professional-services .ps-capabilities__list .small { max-inline-size: 27.5rem; }

.page-professional-services .ps-capabilities__visuals {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.page-professional-services .ps-visual__caption {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-block-start: var(--space-4);
}

/* ---- 06 Featured work sample (3FC-0) ---- */

.page-professional-services .ps-work .section__body { margin-block-start: var(--ps-gap-72); }

/* Text column as tall as the stage: name and summary at the top, actions at the bottom. */
.page-professional-services .ps-work__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
}

.page-professional-services .ps-work__intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.page-professional-services .ps-work__name {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* Stage: dot texture on the surface colour, the sample's home page in a small window (820 of 954). */
.page-professional-services .ps-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 954 / 600;
  overflow: hidden;
  border: 1px solid var(--c-rule);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  background-position: center;
}

.page-professional-services .ps-window {
  inline-size: 85.95%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--color-background);
  box-shadow: var(--shadow-card);
}

.page-professional-services .ps-window__bar {
  display: flex;
  align-items: center;
  direction: ltr;                          /* window chrome around a left-to-right website: not mirrored */
  gap: 7px;
  block-size: 2.25rem;                     /* 36 */
  padding-inline: var(--space-4);
  border-block-end: 1px solid var(--color-rule);
}

.page-professional-services .ps-window__dot {
  flex: none;
  inline-size: 8px;
  block-size: 8px;
  border-radius: var(--radius-sm);
  background-color: var(--color-rule);
}

.page-professional-services .ps-window__title {
  overflow: hidden;
  padding-inline-start: var(--space-3);
  font-size: var(--fs-micro);
  line-height: calc(14 / 11);
  letter-spacing: var(--tracking-normal);
  color: var(--color-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-professional-services .ps-window__screen {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.page-professional-services .ps-window__screen :is(picture, img) {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.page-professional-services .ps-work__meta { margin-block-start: var(--space-12); }

/* ---- 07 Before / After (3K3-0) ---- */

.page-professional-services .ps-compare__inner { position: relative; }

.page-professional-services .ps-compare .section__body { margin-block-start: var(--ps-gap-72); }

/* The title keeps Paper's 700px box, which leaves the end of the row to the hint. */
.page-professional-services .ps-compare .section-header__title { max-inline-size: 43.75rem; }

/* "Drag to compare" is the shared slider's hint line (interactive.css), written as the figure's caption.
   Here it is drawn at the end of the header row, centred on the first line of the title, as in Paper:
   positioned against the container. */
.page-professional-services .ps-compare__hint {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  block-size: calc(var(--fs-h2) * var(--lh-h2));
  white-space: nowrap;
}

.page-professional-services .ps-compare__notes { margin-block-start: var(--ps-gap-72); }

.page-professional-services .ps-compare__project {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
  padding-block-start: var(--space-6);
}

.page-professional-services .ps-compare__name {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* Numerals are aqua on the midnight ground. */
.page-professional-services .ps-compare .ps-point__num { color: var(--c-marker); }

/* ---- 08 UI details (44Z-0): 80 under the header, two rows 56 apart ---- */

.page-professional-services .ps-details .section__body { margin-block-start: var(--ps-gap-80); }

.page-professional-services .ps-details__stage {
  display: flex;
  flex-direction: column;
  gap: var(--space-14);
}

/* A fragment: its label, then the exported interface (the picture carries its own hairline and 8px corners). */
.page-professional-services .ps-fragment {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-inline-size: 0;
}

.page-professional-services .ps-fragment__shot :is(picture, img) {
  display: block;
  inline-size: 100%;
  block-size: auto;
}

/* Never drawn larger than in Paper (519 and 737): the interface would read as enlarged. */
.page-professional-services .ps-fragment > .ps-fragment__shot,
.page-professional-services .ps-fragment__pair { max-inline-size: 46.0625rem; }

.page-professional-services .ps-fragment--narrow > .ps-fragment__shot { max-inline-size: 32.4375rem; }

.page-professional-services .ps-fragment__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
}

/* Design note under the insights list. Percentages of the 737px fragment, so the label and the text stay
   under the list's own two columns while the picture scales. */
.page-professional-services .ps-note {
  display: flex;
  gap: 2.714%;
  padding-block-start: var(--space-7);     /* 28 */
}

.page-professional-services .ps-note__key {
  flex: none;
  inline-size: 21.845%;
  padding-inline-start: 3.8%;
  line-height: calc(var(--fs-small) * var(--lh-small));
  color: var(--c-ink);
}

.page-professional-services .ps-note .small { max-inline-size: 27.5rem; }

/* ---- 10 Additional work (76T-0) ---- */

/* Header: label, title (Paper's 700px box), "Explore Our Work" at the end on the title's first line. */
.page-professional-services .ps-more .section-header__title { grid-column: 4 / span 6; }

.page-professional-services .ps-more__all {
  display: flex;
  grid-column: 10 / -1;
  align-items: center;
  justify-self: end;
  min-block-size: calc(var(--fs-h2) * var(--lh-h2));
}

/* Career Track: a sample screen without a case study, so it is not a link. */
.page-professional-services .ps-sample {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.page-professional-services .ps-sample__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3) var(--grid-gap);
}

.page-professional-services .ps-sample__head {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.page-professional-services .ps-sample__text {
  flex: 0 1 var(--label-col);
  padding-block-start: var(--space-2);
}

/* The second card starts 80px lower; its link sits at the end of the title row. */
.page-professional-services .ps-more__card { margin-block-start: 5rem; }

.page-professional-services .ps-more__card .project-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.375rem var(--grid-gap);
  align-items: start;
}

.page-professional-services .ps-more__card .project-card__actions {
  grid-row: 1 / span 2;
  grid-column: 2;
  padding-block-start: var(--space-2);
}

/* ---- 11 FAQ (8FG-0) ---- */

.page-professional-services .ps-faq__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-8);
}

.page-professional-services .ps-faq__intro .body { max-inline-size: 22.5rem; }   /* 360 */

/* ---- Narrow desktop: the lead column gives way so the headline keeps its two-line break ---- */
@media (max-width: 1280px) {
  .page-professional-services .ps-hero__aside { flex-basis: 20rem; }
}

/* ---- Tablet ---- */
@media (max-width: 1024px) {
  /* Hero: headline, then the lead and the buttons */
  .page-professional-services .ps-hero__copy {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-8);
  }

  .page-professional-services .ps-hero__headline { gap: var(--space-6); max-inline-size: none; }

  .page-professional-services .ps-hero__aside {
    flex-basis: auto;
    max-inline-size: 39.25rem;
    padding-block-end: 0;
  }

  /* Caption rows close up when they stack */
  .page-professional-services .ps-featured__caption { --grid-row-gap: var(--space-2); }
  .page-professional-services .ps-featured__kind { text-align: start; }

  .page-professional-services .ps-challenges__intro { gap: var(--space-6); max-inline-size: none; }
  .page-professional-services .ps-challenges__intro .body { max-inline-size: 39.25rem; }

  /* Featured work: text, then the stage */
  .page-professional-services .ps-work__text { gap: var(--space-8); }

  /* Before / after: the hint sits on the line of the section label */
  .page-professional-services .ps-compare .section-header__title { max-inline-size: none; }
  .page-professional-services .ps-compare__hint { block-size: calc(var(--fs-label) * var(--lh-label)); }
  .page-professional-services .ps-compare__project { padding-block-start: 0; }

  /* More work: the link moves under the title; the second card keeps a smaller offset */
  .page-professional-services .ps-more .section-header__title,
  .page-professional-services .ps-more__all { grid-column: 1 / -1; }

  .page-professional-services .ps-more__all {
    justify-self: start;
    min-block-size: 0;
  }

  .page-professional-services .ps-more__card { margin-block-start: var(--space-10); }

  .page-professional-services .ps-sample__body { flex-direction: column; }
  .page-professional-services .ps-sample__text { flex-basis: auto; padding-block-start: 0; }

  .page-professional-services .ps-faq__intro { gap: var(--space-6); }
}

/* ---- Phone ---- */
@media (max-width: 768px) {
  .page-professional-services .ps-points { grid-template-columns: minmax(0, 1fr); }

  .page-professional-services .ps-credibility__head { gap: var(--space-6); }

  /* Challenges: the numeral stays beside the title; the description goes under it */
  .page-professional-services .ps-challenges__list .rule-list__row {
    flex-direction: row;
    gap: var(--space-4);
    --rule-pad-top: var(--space-6);
    --rule-pad-bottom: var(--space-6);
  }

  .page-professional-services .ps-challenges__list .rule-list__key {
    inline-size: 2rem;
    line-height: calc(var(--fs-h5) * var(--ps-lh-title));
  }

  .page-professional-services .ps-challenges__list .rule-list__body { grid-template-columns: minmax(0, 1fr); }

  /* Capabilities: the numeral stays beside the title */
  .page-professional-services .ps-capabilities__list .rule-list__row { flex-direction: row; gap: var(--space-4); }

  .page-professional-services .ps-capabilities__list .rule-list__key {
    inline-size: 2rem;
    line-height: calc(var(--fs-h4) * var(--lh-h4));
  }

  /* The two visuals stack at no more than their drawn width (519) */
  .page-professional-services .ps-capabilities__visuals { gap: var(--space-8); max-inline-size: 32.4375rem; }

  /* Stage: the frame takes its height from the window, with a margin that scales with the screen */
  .page-professional-services .ps-stage {
    aspect-ratio: auto;
    padding: clamp(1.25rem, 5vw, 2.5rem);
  }

  .page-professional-services .ps-window { inline-size: 100%; }
  .page-professional-services .ps-window__bar { block-size: 1.75rem; padding-inline: var(--space-3); }
  .page-professional-services .ps-window__dot { inline-size: 6px; block-size: 6px; }

  .page-professional-services .ps-work__meta { margin-block-start: var(--space-8); }

  .page-professional-services .ps-details__stage { gap: var(--space-10); }

  /* The note reads as a short paragraph under the picture */
  .page-professional-services .ps-note {
    flex-direction: column;
    gap: var(--space-1);
    padding-block-start: 0;
  }

  .page-professional-services .ps-note__key { inline-size: auto; padding-inline-start: 0; }

  .page-professional-services .ps-more__card { margin-block-start: 0; }
}

@media (max-width: 480px) {
  /* One advisor card per row, at close to its drawn size */
  .page-professional-services .ps-fragment__pair { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }

  .page-professional-services .ps-hero__aside .cluster { inline-size: 100%; }
  .page-professional-services .ps-hero__aside .btn { flex: 1 1 100%; }
}
