/* ==========================================================================
   Home — /
   Paper artboard "01 Home" (EN-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-home.
   ========================================================================== */

/* ---- 01 Hero (EO-0) ---- */

/* 72px between the header and the copy (Home has no breadcrumbs). The phone runs past the
   bottom edge of the section and is cut there, as drawn. */
.page-home .home-hero {
  padding-block-start: calc(var(--header-offset) + clamp(2.5rem, 5vw, 4.5rem));
  overflow: clip;
}

/* Headline (8 columns) and the introduction (400px, at the end), aligned on the last line. */
.page-home .home-hero__copy { align-items: end; }

.page-home .home-hero__headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.5rem, 2.5vw, 2.25rem);                      /* 36 */
}

/* Paper sets this headline at 112 / 108, one step under the Display specimen. */
.page-home .home-hero__title { font-size: clamp(2.75rem, 1.3333rem + 6.2963vw, 7rem); }   /* 112 → 44 */

.page-home .home-hero__aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  justify-self: end;
  inline-size: 100%;
  max-inline-size: 25rem;                                  /* 400 */
  padding-block-end: 0.875rem;                             /* 14 */
}

.page-home .home-hero__intro {
  font-size: clamp(1.0625rem, 1rem + 0.2778vw, 1.25rem);   /* 20 → 17 */
  line-height: 1.5;                                        /* 30 on 20 */
  letter-spacing: var(--tracking-snug);
  color: var(--c-muted);
  text-wrap: pretty;
}

/* Project index (3 columns) beside the feature image (9 columns), both resting on the section's bottom edge. */
.page-home .home-hero__visual {
  align-items: end;
  padding-block-start: clamp(3rem, 6.6667vw, 6rem);        /* 96 */
}

.page-home .home-hero__index { padding-block-end: var(--space-14); }

.page-home .home-index__label {
  padding-block-end: 1.125rem;                             /* 18 */
  font-size: var(--fs-label);
  font-weight: var(--weight-light);
  line-height: var(--lh-label);
  letter-spacing: var(--tracking-normal);
  text-transform: uppercase;
  color: var(--c-muted);
}

.page-home .home-index {
  max-inline-size: 14.5rem;                                /* 232 */
  border-block-end: 1px solid var(--c-rule);
}

.page-home .home-index__row {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  padding-block: 0.875rem;
  border-block-start: 1px solid var(--c-rule);
}

.page-home .home-index__num {
  flex: none;
  inline-size: 1.25rem;
  font-size: var(--fs-label);
  font-weight: var(--weight-light);
  line-height: var(--lh-label);
  color: var(--c-muted);
}

.page-home .home-index__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-inline-size: 0;
}

.page-home .home-index__name {
  font-size: var(--fs-body);
  line-height: calc(24 / 17);
  letter-spacing: var(--tracking-snug);
  color: var(--c-text);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--dur-base) var(--ease-standard);
}

.page-home .home-index__sector {
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  letter-spacing: var(--tracking-normal);
  color: var(--c-muted);
}

@media (hover: hover) {
  .page-home .home-index__row:hover .home-index__name { text-decoration-color: currentColor; }
}

.page-home .home-hero__media { position: relative; }

/* Feature tile: rounded at the top only, it meets the bottom edge of the section. */
.page-home .home-hero__tile {
  --media-ground: var(--color-petroleum);
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}

/* The phone overlaps the tile's start edge and hangs below it: 290 wide on a 954 tile,
   64 outside the start edge, 150 below the bottom edge (of 580). */
.page-home .home-hero__phone {
  position: absolute;
  inset-block-end: -25.86%;
  inset-inline-start: -6.71%;
  inline-size: 30.4%;
  margin: 0;
}

/* ---- 02 Two services (GV-0) ---- */

/* Faint fan at the top end corner and an emerald glow from the lower start corner.
   Physical sides for the wave on purpose: the profile artwork is not mirrored.
   Paper: 760px wide at "870px -250px" (190px beyond the end edge). There the fan's tail lies behind the last
   letters of the title's first line, and behind more of the title as the window narrows. A wave never runs
   behind text, so it is drawn 15px further out at 1440 and further still below that. */
.page-home .home-services {
  background-image:
    radial-gradient(40% 36% at 0% 100%, rgb(0 156 120 / 0.08) 0%, rgb(0 156 120 / 0) 70%),
    url("/assets/images/brand/waveform-fan-faint.webp");
  background-size: 100% 100%, 760px auto;
  background-position: 0 0, right min(-205px, calc(-205px - (1440px - 100vw) * 0.4)) top -250px;
  background-repeat: no-repeat;
}

/* Arabic: the glow mirrors. The wave keeps its corner but is drawn higher and further out, because the
   section label sits at this end and a wave never runs behind text. Above 1440 the label moves in with the
   centred column while the wave stays on the window's edge, so the wave is lifted clear of it. */
[dir="rtl"] .page-home .home-services {
  background-image:
    radial-gradient(40% 36% at 100% 100%, rgb(0 156 120 / 0.08) 0%, rgb(0 156 120 / 0) 70%),
    url("/assets/images/brand/waveform-fan-faint.webp");
  background-position: 0 0, right -260px top calc(-330px - clamp(0px, (100vw - 1440px) * 2, 120px));
}

.page-home .service-panel {
  display: flex;
  flex-direction: column;
  overflow: clip;
  border-radius: var(--radius-sm);
  background-color: var(--c-surface);
}

/* The second panel sits 120px lower: midnight with the brand glow in its lower corner. */
.page-home .service-panel--dark {
  margin-block-start: var(--space-30);
  background-color: var(--color-midnight);
  background-image: url("/assets/images/brand/glow-midnight.webp");
  background-size: cover;
  background-position: right bottom;                       /* the glow artwork is not mirrored */
  background-repeat: no-repeat;
}

/* Panel media, 628 × 420. Its children are sized against it (cqi), so the ghost numeral and the
   figures keep Paper's proportions at every width. */
.page-home .service-panel__media {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  aspect-ratio: 628 / 420;
  overflow: clip;
  background-position: 50% 50%;
  container-type: inline-size;
}

.page-home .service-panel--dark .service-panel__media { align-items: center; }

.page-home .service-panel__ghost {
  position: absolute;
  inset-block-start: -5.41cqi;                             /* -34 */
  inset-inline-start: 4.46cqi;                             /* 28 */
  font-size: 47.77cqi;                                     /* 300 */
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--color-ghost);
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.page-home .service-panel--dark .service-panel__ghost { color: rgb(255 255 255 / 0.05); }

.page-home .service-panel__monitor {
  position: relative;
  inline-size: 82.8%;                                      /* 520 */
  margin: 0;
}

.page-home .service-panel__monitor img {
  display: block;
  inline-size: 100%;
  block-size: auto;
}

/* Compact comparison, 532 × 299 (the shared slider's compact size: interactive.css). Here it lies on the dark
   panel, so Paper gives its frame a deep shadow. */
.page-home .service-panel__compare {
  position: relative;
  inline-size: 84.71%;
  --ba-frame-shadow: 0 24px 60px rgb(0 0 0 / 0.45);
}

.page-home .service-panel__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-10) var(--space-10) 2.75rem;        /* 40 40 44 */
}

.page-home .service-panel__body > .icon { color: var(--c-ink); }
.page-home .service-panel__text { max-inline-size: 28.75rem; }   /* 460 */
.page-home .service-panel__action { padding-block-start: var(--space-3); }

/* ---- 03 Before & After (I5-0) ----
   The comparisons are the shared slider in its large size (interactive.css): handle, icon, glow, tags, frame
   shadow and the look of the hint all come from there. Only the layout around them is set here. */
.page-home .home-ba { --ba-stage-gap: clamp(2.5rem, 5vw, 4.5rem); }   /* 72 */

/* Introduction: 520 wide, 32 under the title. */
.page-home .home-ba__header .section-header__intro {
  max-inline-size: 32.5rem;
  margin-block-start: var(--space-8);
}

.page-home .home-ba__group { margin-block-start: var(--ba-stage-gap); }

.page-home .home-ba__stage .before-after { position: relative; }

/* "Drag to compare" (the figure's caption) sits at the end of the header row, on the introduction's last line. */
.page-home .home-ba__hint {
  position: absolute;
  inset-block-end: calc(100% + var(--ba-stage-gap));
  inset-inline-end: 0;
}

.page-home .home-ba__footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-14);
  margin-block-start: var(--ba-stage-gap);
}

/* One caption per example, all in the same cell so the selector below never moves.
   Without JavaScript the first example and its caption are shown. */
.page-home .home-ba__captions { display: grid; }

.page-home .ba-caption {
  grid-area: 1 / 1;
  align-content: start;
  visibility: hidden;
}

.page-home .ba-caption[data-ba-caption="re"] { visibility: visible; }
.page-home [data-ba-active] .ba-caption { visibility: hidden; }

.page-home [data-ba-active="re"] .ba-caption[data-ba-caption="re"],
.page-home [data-ba-active="mf"] .ba-caption[data-ba-caption="mf"],
.page-home [data-ba-active="ps"] .ba-caption[data-ba-caption="ps"] { visibility: visible; }

.page-home .ba-caption__main {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.page-home .ba-caption__label { color: var(--color-aqua); }
.page-home .ba-caption__main .h4 { text-wrap: pretty; }
.page-home .ba-caption__actions { padding-block-start: 0.875rem; }

/* What changed: three short columns under hairlines. */
.page-home .ba-changes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.page-home .ba-changes__item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-block-start: 0.875rem;
  border-block-start: 1px solid var(--c-rule);
}

.page-home .ba-changes dt {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  letter-spacing: var(--tracking-normal);
  color: var(--c-text);
}

.page-home .ba-changes dd {
  font-size: var(--fs-caption);
  line-height: calc(19 / 13);
  letter-spacing: var(--tracking-normal);
  color: var(--c-muted);
  text-wrap: pretty;
}

/* Example selector: three buttons, the pressed one under an emerald rule. */
.page-home .example-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.page-home .example-selector__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-inline-size: 0;
  padding-block-start: 1.375rem;                           /* 22: the rule and the space under it */
  text-align: start;
  color: var(--c-muted);
  transition: color var(--dur-base) var(--ease-standard);
}

.page-home .example-selector__item::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 1px;
  background-color: var(--c-rule);
  transition: background-color var(--dur-base) var(--ease-standard);
}

.page-home .example-selector__item[aria-pressed="true"] { color: var(--c-text); }

.page-home .example-selector__item[aria-pressed="true"]::before {
  block-size: 2px;
  background-color: var(--color-emerald);
}

.page-home .example-selector__thumb {
  flex: none;
  inline-size: 8rem;                                       /* 128 × 72 */
  --ratio: 16 / 9;
  opacity: 0.7;
  transition: opacity var(--dur-base) var(--ease-standard);
}

.page-home .example-selector__item[aria-pressed="true"] .example-selector__thumb { opacity: 1; }

.page-home .example-selector__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-inline-size: 0;
}

.page-home .example-selector__label {
  font-size: var(--fs-label);
  font-weight: var(--weight-light);
  line-height: var(--lh-label);
  letter-spacing: var(--tracking-normal);
  text-transform: uppercase;
}

.page-home .example-selector__name {
  font-size: var(--fs-body);
  line-height: calc(24 / 17);
  letter-spacing: var(--tracking-snug);
}

@media (hover: hover) {
  .page-home .example-selector__item:hover { color: var(--c-text); }
  .page-home .example-selector__item:hover .example-selector__thumb { opacity: 1; }
}

.page-home .home-ba__close {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6) var(--grid-gap);
}

.page-home .home-ba__note {
  max-inline-size: 32.5rem;                                /* 520 */
  line-height: calc(19 / 13);
}

/* ---- Section header with a link at the end of the title row (04 and 07) ---- */
.page-home .home-head__main {
  grid-column: 4 / -1;
  display: flex;
  align-items: flex-end;
  gap: var(--grid-gap);
}

.page-home .home-head__main > .h2 {
  flex: 1 1 0;
  min-inline-size: 0;
}

.page-home .home-head__link {
  flex: none;
  margin-block-end: var(--space-3);
}

/* ---- 04 Selected work (O2-0) ---- */

/* Paired glow: teal on the start side, emerald on the end side. */
.page-home .home-work {
  background-image:
    radial-gradient(46% 34% at 10% 36%, rgb(8 127 131 / 0.09) 0%, rgb(8 127 131 / 0) 70%),
    radial-gradient(46% 34% at 94% 70%, rgb(0 156 120 / 0.09) 0%, rgb(0 156 120 / 0) 70%);
  background-repeat: no-repeat;
}

[dir="rtl"] .page-home .home-work {
  background-image:
    radial-gradient(46% 34% at 90% 36%, rgb(8 127 131 / 0.09) 0%, rgb(8 127 131 / 0) 70%),
    radial-gradient(46% 34% at 6% 70%, rgb(0 156 120 / 0.09) 0%, rgb(0 156 120 / 0) 70%);
}

.page-home .home-work__gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-18);                                    /* 72 between the two rows */
}

/* The second card of each row starts lower: 32 and 72. A margin, so the card's link does not cover the gap. */
.page-home .home-work__card--drop-sm { margin-block-start: var(--space-8); }
.page-home .home-work__card--drop-lg { margin-block-start: var(--space-18); }

.page-home .home-work__tag {
  position: absolute;
  inset-block-start: var(--space-5);
  inset-inline-end: var(--space-5);
  z-index: 1;
  padding: 6px 12px 7px;
}

/* ---- 05 Industries (PT-0) ---- */
.page-home .industry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
}

/* Each cell is a size container, so a card can be 520 tall on 411 wide at any width. */
.page-home .industry-grid__cell {
  display: flex;
  container-type: inline-size;
}

.page-home .industry-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-inline-size: 0;
  min-block-size: 126.52cqi;                               /* 520 on 411 */
  overflow: clip;
  border: 1px solid var(--c-rule);
  border-radius: var(--radius-lg);
  background-color: var(--color-background);
}

.page-home .industry-card__media {
  flex: none;
  aspect-ratio: 411 / 270;
  overflow: hidden;
}

.page-home .industry-card__media--tall { aspect-ratio: 411 / 300; }

.page-home .industry-card :is(.industry-card__media, .industry-card__bg) :is(picture, img) {
  display: block;
  inline-size: 100%;
  block-size: 100%;
}

.page-home .industry-card :is(.industry-card__media, .industry-card__bg) img {
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  transition: transform var(--dur-slower) var(--ease-out);
}

.page-home .industry-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-8);
  padding: 1.625rem var(--space-7) var(--space-7);         /* 26 28 28 */
}

.page-home .industry-card--image-end .industry-card__body { padding-block: var(--space-7) var(--space-6); }   /* 28 / 24 */

.page-home .industry-card__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.page-home .industry-card__num {
  font-size: var(--fs-label);
  font-weight: var(--weight-light);
  line-height: var(--lh-label);
  letter-spacing: var(--tracking-normal);
  color: var(--c-muted);
}

.page-home .industry-card__title { text-wrap: wrap; }

.page-home .industry-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}

.page-home .industry-card__text { max-inline-size: 17.5rem; }   /* 280 */

.page-home .industry-card__foot .icon {
  color: var(--c-ink);
  transition: translate var(--dur-base) var(--ease-out);
}

/* Full-bleed card: the photograph under a near-black shade, text in white. */
.page-home .industry-card--bleed {
  border: 0;
  background-color: var(--color-petroleum);
}

.page-home .industry-card--bleed .industry-card__body { padding: var(--space-7); }
.page-home .industry-card--bleed .industry-card__text { color: var(--c-text); }

.page-home .industry-card__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.page-home .industry-card__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, rgb(3 9 15 / 0.55) 0%, rgb(3 9 15 / 0.05) 38%, rgb(3 9 15 / 0.78) 100%);
}

.page-home .industry-card--bleed-deep .industry-card__bg::after {
  background-image: linear-gradient(180deg, rgb(3 9 15 / 0.6) 0%, rgb(3 9 15 / 0.05) 40%, rgb(3 9 15 / 0.8) 100%);
}

/* Arabic: the title sits at the other end, over the bright tank, so the shade is held a little further down. */
[dir="rtl"] .page-home .industry-card--bleed:not(.industry-card--bleed-deep) .industry-card__bg::after {
  background-image: linear-gradient(180deg, rgb(3 9 15 / 0.7) 0%, rgb(3 9 15 / 0.38) 26%, rgb(3 9 15 / 0.05) 52%, rgb(3 9 15 / 0.78) 100%);
}

/* The title link covers the whole card. Its focus ring is drawn inside the card, which clips. */
.page-home .industry-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.page-home .industry-card__title a:focus-visible { outline: none; }

.page-home .industry-card__title a:focus-visible::after {
  border-radius: calc(var(--radius-lg) - 4px);
  outline: 2px solid var(--c-focus);
  outline-offset: -5px;
}

@media (hover: hover) {
  .page-home .industry-card:hover :is(.industry-card__media, .industry-card__bg) img { transform: scale(1.03); }
  .page-home .industry-card:hover .industry-card__foot .icon { translate: calc(4px * var(--dir)) 0; }
}

/* ---- 06 Why redesign matters (RO-0) ---- */

/* The statement at the top of the column, the button at its foot, level with the last observation. */
.page-home .home-why__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-12);
}

.page-home .home-why__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-10);
}

.page-home .home-why__lead { max-inline-size: 27.5rem; }   /* 440 */
.page-home .home-why__text { max-inline-size: 28.75rem; }  /* 460 */

/* ---- 07 Process (SM-0) ---- */
.page-home .home-process .section__body { margin-block-start: calc(var(--section-gap) + var(--space-2)); }   /* 96 */

.page-home .process-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-block-start: var(--space-7);
  border-block-start: 1px solid var(--c-rule);
}

.page-home .process-step:first-child { border-block-start-color: var(--c-rule-strong); }

.page-home .process-step__num { color: var(--c-ink); }

.page-home .process-step__body {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-block-start: 2.75rem;                            /* 44 */
}

.page-home .process-step__text { max-inline-size: 16.875rem; }   /* 270 */

/* ---- Arabic keeps its own taller lines where this page sets a Latin line height ---- */
.page-home:lang(ar) .home-hero__intro { line-height: var(--lh-lead); }

.page-home:lang(ar) :is(.home-index__name, .example-selector__name) { line-height: var(--lh-body); }

.page-home:lang(ar) :is(.ba-changes dd, .home-ba__note) { line-height: var(--lh-caption); }

/* ---- Small desktop ---- */
@media (max-width: 1280px) {
  /* Paper's line breaks suit the 1440 measure; below it the section titles are balanced instead. */
  .page-home .section-header .br-desktop,
  .page-home .home-why .br-desktop { display: none; }

  /* 07: the title needs the whole row, the link goes under it. */
  .page-home .home-head--stack-early .home-head__main {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }

  .page-home .home-head--stack-early .home-head__main > .h2 { flex: none; }
  .page-home .home-head--stack-early .home-head__link { margin-block-end: 0; }
}

/* ---- Tablet ---- */
@media (max-width: 1024px) {
  /* Hero: copy stacks; the index becomes a row of three above the image. */
  .page-home .home-hero__aside {
    justify-self: start;
    max-inline-size: 30rem;
    padding-block-end: 0;
  }

  .page-home .home-hero__visual {
    --grid-row-gap: var(--space-10);
    padding-block-start: var(--space-14);
  }

  .page-home .home-hero__index { padding-block-end: 0; }

  .page-home .home-index {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--grid-gap);
    max-inline-size: none;
    border-block-end: 0;
  }

  .page-home .home-index__row {
    block-size: 100%;
    border-block-end: 1px solid var(--c-rule);
  }

  /* The phone stays inside the page margin. */
  .page-home .home-hero__phone {
    inset-inline-start: 3%;
    inline-size: 28%;
  }

  /* Two services: the panels stack, without the step. */
  .page-home .home-services {
    background-size: 100% 100%, 570px auto;
    background-position: 0 0, right -150px top -190px;
  }

  /* Arabic: the label is now the first thing in this corner, so the wave stays inside the space above it
     (the fan's lowest lines are 80% down the 570px picture). */
  [dir="rtl"] .page-home .home-services { background-position: 0 0, right -210px top calc(var(--section-pad) - 469px); }

  .page-home .service-panel--dark { margin-block-start: 0; }

  /* Before & After: the hint returns to its own line above the comparison. */
  .page-home .home-ba__hint {
    position: static;
    margin-block-end: var(--space-4);
  }

  .page-home .home-ba__footer { gap: var(--space-12); }
  .page-home .example-selector__thumb { inline-size: 6rem; }

  /* Section header with a link: label, title, link in one column. */
  .page-home .home-head__main {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }

  .page-home .home-head__main > .h2 { flex: none; }
  .page-home .home-head__link { margin-block-end: 0; }

  /* Selected work keeps its two uneven rows, with smaller steps. */
  .page-home .home-work__gallery { gap: var(--space-14); }
  .page-home .home-work__card--drop-sm { margin-block-start: var(--space-6); }
  .page-home .home-work__card--drop-lg { margin-block-start: var(--space-12); }

  /* Industries: two columns. */
  .page-home .industry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Why redesign matters: the button follows the statement. */
  .page-home .home-why__intro { gap: var(--space-10); }
  .page-home .home-why__copy { gap: var(--space-6); }

  /* Process: two by two. */
  .page-home .process-step__body { padding-block-start: var(--space-6); }
}

/* ---- Phone ---- */
@media (max-width: 768px) {
  .page-home .home-hero__visual { --grid-row-gap: var(--space-8); }

  /* Index: one project per row again. */
  .page-home .home-index {
    display: block;
    border-block-end: 1px solid var(--c-rule);
  }

  .page-home .home-index__row {
    block-size: auto;
    border-block-end: 0;
  }

  /* A taller crop of the feature image, so the laptop keeps some presence on a narrow screen. */
  .page-home .home-hero__tile { aspect-ratio: 4 / 3; }
  .page-home .home-hero__phone { inline-size: 31%; }

  /* The title can now reach across the whole column, so the wave ends above its first line
     (English, beside the label) or above the label (Arabic). */
  .page-home .home-services {
    background-size: 100% 100%, 420px auto;
    background-position: 0 0, right -130px top calc(var(--section-pad) - 311px);
  }

  [dir="rtl"] .page-home .home-services { background-position: 0 0, right -170px top calc(var(--section-pad) - 349px); }

  .page-home .service-panel__body {
    gap: var(--space-4);
    padding: var(--space-7) var(--space-6) var(--space-8);
  }

  .page-home .home-ba__footer { gap: var(--space-10); }

  /* The selector sits directly under the comparison, and only the chosen caption takes room:
     its height may change without moving the buttons that were just pressed. */
  .page-home .example-selector { order: -1; }
  .page-home .home-ba__captions { display: block; }

  .page-home .ba-caption,
  .page-home [data-ba-active] .ba-caption {
    display: none;
    visibility: visible;
  }

  .page-home .ba-caption[data-ba-caption="re"] { display: grid; }
  .page-home [data-ba-active] .ba-caption[data-ba-caption="re"] { display: none; }

  .page-home [data-ba-active="re"] .ba-caption[data-ba-caption="re"],
  .page-home [data-ba-active="mf"] .ba-caption[data-ba-caption="mf"],
  .page-home [data-ba-active="ps"] .ba-caption[data-ba-caption="ps"] { display: grid; }

  /* What changed: one row per point. */
  .page-home .ba-changes {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border-block-end: 1px solid var(--c-rule);
  }

  .page-home .ba-changes__item { padding-block: 0.875rem var(--space-4); }

  /* Example selector: one example per row. */
  .page-home .example-selector {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }

  .page-home .example-selector__item { padding-block-start: var(--space-4); }

  /* Selected work: one card per row, no steps. */
  .page-home .home-work__gallery { gap: var(--space-12); }
  .page-home .home-work__row { --grid-row-gap: var(--space-12); }

  .page-home .home-work__card--drop-sm,
  .page-home .home-work__card--drop-lg { margin-block-start: 0; }

  /* The tall card keeps its drawn width (411): across a whole tablet column its portrait picture
     would be taller than the screen. On a phone the column is narrower than that anyway. */
  .page-home .home-work__card--drop-sm { max-inline-size: 25.6875rem; }

  .page-home .home-work__tag {
    inset-block-start: var(--space-3);
    inset-inline-end: var(--space-3);
  }

  /* Industries stay two by two; the cards tighten. */
  .page-home .industry-card__body,
  .page-home .industry-card--bleed .industry-card__body { padding: var(--space-5); }

  .page-home .industry-card__body { gap: var(--space-6); }

  .page-home .process-step { gap: var(--space-3); padding-block-start: var(--space-5); }
  .page-home .process-step__body { padding-block-start: var(--space-2); }
  .page-home .process-step__text { max-inline-size: none; }
}

@media (max-width: 480px) {
  /* Industries: one column. */
  .page-home .industry-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }

  .page-home .industry-card { min-block-size: 110cqi; }

  .page-home .home-hero .cluster .btn { flex: 1 1 auto; }

  .page-home .home-ba__close .btn { inline-size: 100%; }

  .page-home .example-selector__thumb { inline-size: 5.5rem; }
}

/* ---- Reduced motion: no hover movement on the industry cards, as in the shared components ---- */
@media (prefers-reduced-motion: reduce) {
  .page-home .industry-card :is(.industry-card__media, .industry-card__bg) img,
  .page-home .industry-card__foot .icon { transition: none; }

  .page-home .industry-card:hover :is(.industry-card__media, .industry-card__bg) img { transform: none; }
  .page-home .industry-card:hover .industry-card__foot .icon { translate: 0 0; }
}
