/* ==========================================================================
   Arcline Studio case study — /work/arcline-studio
   Paper artboard "15 Case Study · Arcline Studio" (2GH-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-work-arcline-studio.

   The page opens with the Arcline loading film: the overlay, the film and their
   fallbacks belong to interactive.css and modules/arcline-loader.js. Nothing here
   styles them.
   ========================================================================== */

/* Paper sets every caption on this artboard at 13/20 (the token is 13/18). English only:
   Arabic keeps its own, taller value. */
.page-work-arcline-studio[data-locale="en"] main { --lh-caption: calc(20 / 13); }

/* ---- 01 Hero (2OT-0) ---- */

/* 40px above the breadcrumbs on this artboard (the shared hero has 48). */
.page-work-arcline-studio .arc-hero { padding-block-start: calc(var(--header-offset) + var(--space-10)); }

/* 104 above the sector line, 40 to the title row, 32 to the monitor. */
.page-work-arcline-studio .arc-hero .hero__copy { --hero-bottom: clamp(1.5rem, 2.2222vw, 2rem); }

.page-work-arcline-studio .arc-hero__sector {
  padding-block-end: var(--space-6);
  border-block-end: 1px solid var(--c-rule);
}

/* Paper sets this headline at -4% (the Display specimen is -4.5%). The Latin name inside the Arabic headline
   is a lang="en" fragment: letter-spacing is inherited as a computed value, so it is set again on the fragment. */
.page-work-arcline-studio .arc-hero__title,
.page-work-arcline-studio .arc-hero__title [lang="en"] { letter-spacing: var(--tracking-tight); }

/* The summary sits on the headline's last line: 14px above the row's lower edge. */
.page-work-arcline-studio .arc-hero__summary { padding-block-end: 0.875rem; }

/* The monitor stands on a hairline. The picture is a transparent cut-out with the device in it. */
.page-work-arcline-studio .arc-hero__monitor { border-block-end: 1px solid var(--c-rule); }

.page-work-arcline-studio .arc-hero__monitor img {
  inline-size: 100%;
  block-size: auto;
}

/* ---- 02 Project metadata (2WW-0) ---- */
.page-work-arcline-studio .arc-meta { padding-block-start: clamp(2.5rem, 4.4444vw, 4rem); }   /* 64 */

/* The disclosure line: Paper draws it as a label column (emerald marker) and a sentence, without a hairline.
   The shared wide item is a stacked label and value under a hairline, so it is re-laid here. */
.page-work-arcline-studio .arc-meta__about {
  --c-marker: var(--color-emerald);
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  column-gap: var(--grid-gap);
  row-gap: var(--space-2);
  align-items: center;
  margin-block-start: var(--space-4);      /* 40 under the row, with the row gap */
  padding-block-start: 0;
  border-block-start: 0;
}

.page-work-arcline-studio .arc-meta__about dt {
  grid-column: span 3;
  min-block-size: calc(var(--fs-small) * var(--lh-small));
  color: var(--c-text);
}

.page-work-arcline-studio .arc-meta__about dd {
  grid-column: span 6;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  letter-spacing: var(--tracking-normal);
  color: var(--c-muted);
}

/* ---- 03 Context / brief (3X9-0) ---- */
.page-work-arcline-studio .arc-brief .grid { --grid-row-gap: var(--space-10); }

/* The label box is 34px tall beside a 46px first line. */
.page-work-arcline-studio .arc-brief__label { min-block-size: 2.125rem; }

/* A statement, not a headline: it wraps as running text, as drawn. */
.page-work-arcline-studio .arc-brief__statement { text-wrap: pretty; }

/* ---- 04 The design challenge (433-0) ---- */
.page-work-arcline-studio .arc-challenge { padding-block-start: calc(var(--section-pad) + var(--space-10)); }   /* 200 */

/* A block of its own, so the label is 16px tall as drawn (an inline box would take the body line height). */
.page-work-arcline-studio .arc-challenge__label { display: flex; }

.page-work-arcline-studio .arc-challenge__title {
  margin-block-start: clamp(2rem, 3.8889vw, 3.5rem);    /* 56 */
  letter-spacing: var(--tracking-tight);
}

/* The brand rule starts 40px in from the content edge here (120px from the page edge) and runs off the page. */
.page-work-arcline-studio .arc-challenge .rule--brand {
  --brand-rule-inset: var(--space-10);
  margin-block-start: clamp(3rem, 6.6667vw, 6rem);      /* 56 + 40 */
}

.page-work-arcline-studio .arc-challenge__answer { margin-block-start: var(--space-7); }

/* ---- 05 Design goals and approach (4I9-0) ---- */
.page-work-arcline-studio .arc-goals { padding-block-start: var(--space-10); }

/* Numbered rows on the page grid: numeral (3 columns), title (6), note (3). */
.page-work-arcline-studio .arc-goals__list {
  --rule-pad-top: var(--space-10);
  --rule-pad-bottom: var(--space-12);
}

.page-work-arcline-studio .arc-goals__list .rule-list__row {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  column-gap: var(--grid-gap);
}

.page-work-arcline-studio .arc-goals__list .rule-list__key {
  grid-column: span 3;
  inline-size: auto;
}

.page-work-arcline-studio .arc-goals__list .rule-list__body {
  grid-column: span 9;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  align-items: start;
}

.page-work-arcline-studio .arc-goals__list .rule-list__body > .h3 { grid-column: span 6; }

.page-work-arcline-studio .arc-goals__list .rule-list__body > .small {
  grid-column: span 3;
  margin-block-start: 0;
  padding-block-start: 0.625rem;
}

/* ---- 06 From brief to design (50A-0) ---- */

/* Four steps on the page grid (2 + 2 + 4 + 4 columns). Each step is a head, a figure and a caption;
   the three rows are shared across the steps so the figures and captions line up. */
.page-work-arcline-studio .arc-steps { --grid-row-gap: var(--space-5); }

.page-work-arcline-studio .arc-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-inline-size: 0;
}

@supports (grid-template-rows: subgrid) {
  .page-work-arcline-studio .arc-step {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
  }

  /* a picture keeps its own height at the top of the shared row */
  .page-work-arcline-studio .arc-step > .media { align-self: start; }
}

.page-work-arcline-studio .arc-step__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block-end: var(--space-3);
  border-block-end: 1px solid var(--c-rule);
}

.page-work-arcline-studio .arc-step__title {
  font-size: var(--fs-small);
  font-weight: var(--weight-medium);
  line-height: var(--lh-ui);
  letter-spacing: var(--tracking-normal);
  color: var(--c-ink);
}

.page-work-arcline-studio .arc-step__letter {
  font-size: var(--fs-label);
  font-weight: var(--weight-light);
  line-height: var(--lh-ui);
  color: var(--c-muted);
}

/* A · Brief notes: four notes that share the figure's height */
.page-work-arcline-studio .arc-notes {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.page-work-arcline-studio .arc-notes li {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  min-block-size: 3.1875rem;               /* 51 */
  padding: var(--space-2) 0.875rem;
  border: 1px solid var(--c-rule);
  border-radius: var(--radius-sm);
  background-color: var(--color-background);
  font-size: var(--fs-caption);
  line-height: var(--lh-ui);
  letter-spacing: var(--tracking-normal);
  color: var(--c-ink);
}

/* B · Content map: a root and five branches on a trunk */
.page-work-arcline-studio .arc-tree {
  font-size: calc(var(--fs-micro) + 0.0625rem);          /* 12 */
  line-height: var(--lh-ui);
  letter-spacing: var(--tracking-normal);
  color: var(--c-ink);
}

.page-work-arcline-studio .arc-tree__root,
.page-work-arcline-studio .arc-tree__node {
  display: flex;
  align-items: center;
  min-block-size: 1.9375rem;               /* 31 */
  padding-inline: var(--space-3);
  border-radius: var(--radius-sm);
}

.page-work-arcline-studio .arc-tree__root {
  background-color: var(--color-ink);
  font-weight: var(--weight-medium);
  color: var(--color-on-dark);
}

.page-work-arcline-studio .arc-tree__branches { position: relative; }

/* the trunk: from under the root to the middle of the last branch */
.page-work-arcline-studio .arc-tree__branches::before {
  content: "";
  position: absolute;
  inset-block: 0 0.96875rem;
  inset-inline-start: 0.875rem;
  inline-size: 1px;
  background-color: var(--color-ink);
  opacity: 0.35;
}

.page-work-arcline-studio .arc-tree__branches li {
  display: flex;
  align-items: center;
  margin-block-start: var(--space-2);
  padding-inline-start: 0.875rem;
}

.page-work-arcline-studio .arc-tree__branches li::before {
  content: "";
  flex: none;
  inline-size: var(--space-5);
  block-size: 1px;
  background-color: var(--color-ink);
  opacity: 0.35;
}

.page-work-arcline-studio .arc-tree__node {
  flex: 1 1 0;
  min-inline-size: 0;
  border: 1px solid var(--c-rule);
  background-color: var(--color-background);
}

.page-work-arcline-studio .arc-tree__node--first {
  justify-content: space-between;
  gap: var(--space-2);
  border-color: var(--color-ink);
  font-weight: var(--weight-medium);
}

.page-work-arcline-studio .arc-tree__tag {
  font-size: calc(var(--fs-micro) - 0.0625rem);          /* 10 */
  font-weight: var(--weight-regular);
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* C · Wireframe. The five greys are the wireframe's own (Paper 5VA-0). They are not brand colours and are
   used nowhere else: they exist only inside this drawing. */
.page-work-arcline-studio .arc-wire {
  --ratio: 411 / 231;
  --media-ground: var(--color-background);
  --wire-strong: #8E96A1;
  --wire-mid: #B8BEC6;
  --wire-soft: #CDD2D8;
  --wire-block: #E6E9ED;
  --wire-panel: #C3C8CF;
}

.page-work-arcline-studio .arc-wire svg {
  inline-size: 100%;
  block-size: 100%;
}

.page-work-arcline-studio .arc-wire__strong { fill: var(--wire-strong); }
.page-work-arcline-studio .arc-wire__mid { fill: var(--wire-mid); }
.page-work-arcline-studio .arc-wire__soft { fill: var(--wire-soft); }
.page-work-arcline-studio .arc-wire__block { fill: var(--wire-block); }
.page-work-arcline-studio .arc-wire__panel { fill: var(--wire-panel); }
.page-work-arcline-studio .arc-wire__ink { fill: var(--color-ink); }
.page-work-arcline-studio .arc-wire__paper { fill: var(--color-background); }

.page-work-arcline-studio .arc-wire__outline,
.page-work-arcline-studio .arc-wire__cross {
  fill: none;
  stroke: var(--wire-mid);
  stroke-width: 1;
}

/* ---- 07 Full-width final visual (6CZ-0) ---- */

/* Heading at the start; the live action (when the sample is live) at the end. 32 + 24 to the picture. */
.page-work-arcline-studio .arc-final__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6) var(--grid-gap);
  padding-block-end: var(--space-14);
}

.page-work-arcline-studio .arc-final__captions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2) var(--grid-gap);
  margin-block-start: var(--space-6);
}

.page-work-arcline-studio .arc-final__note {
  flex: 0 1 25.6875rem;                    /* 411: four columns */
  text-align: end;
}

/* ---- 08 Interface details (702-0) ---- */

/* Arcline's own interface, exported from Paper as images. Each picture carries its white sheet, its hairline
   and its 8px corners, so the figure adds nothing. */
.page-work-arcline-studio .arc-fragment img {
  inline-size: 100%;
  block-size: auto;
}

.page-work-arcline-studio .arc-details__row {
  --grid-row-gap: var(--grid-gap);
  margin-block-start: var(--grid-gap);
}

.page-work-arcline-studio .arc-details__col {
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
}

/* ---- 09 Multiple screens · Plates (8HY-0) ---- */

/* Row 1: plate 01 on eight columns; beside it the section's heading at the top and plate 02 at the bottom.
   The heading comes first in the document and is placed in the end column. The row gap is the least distance
   between the heading and plate 02: at 1440 plate 01 is the taller side and the gap changes nothing; on a
   narrow tablet the end column is the taller side and the heading would otherwise touch plate 02. */
.page-work-arcline-studio .arc-plates__lead {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  column-gap: var(--grid-gap);
  row-gap: var(--space-6);
}

.page-work-arcline-studio .arc-plates__intro {
  grid-column: 9 / -1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
}

.page-work-arcline-studio .arc-plate--one {
  grid-column: 1 / span 8;
  grid-row: 1 / span 2;
}

.page-work-arcline-studio .arc-plate--two {
  grid-column: 9 / -1;
  grid-row: 2;
  align-self: end;
}

.page-work-arcline-studio .arc-plate__caption {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-block-start: 0.875rem;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  letter-spacing: var(--tracking-normal);
  color: var(--c-muted);
}

.page-work-arcline-studio .arc-plate__num {
  flex: none;
  font-size: var(--fs-micro);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--c-ink);
}

/* Row 2: the phone, then two photographs as tall as the phone (587 at 1440). */
.page-work-arcline-studio .arc-plates__row { margin-block-start: clamp(2.5rem, 5vw, 4.5rem); }   /* 72 */

.page-work-arcline-studio .arc-plates__phone { align-self: start; }

.page-work-arcline-studio .arc-plates__photo {
  aspect-ratio: auto;
  min-block-size: 0;
}

.page-work-arcline-studio .arc-plates__photo > picture {
  position: absolute;
  inset: 0;
}

/* ---- Explore the experience · live preview (BQG-0). Rendered only when the sample is live. ---- */
.page-work-arcline-studio .arc-live__intro {
  grid-column: 4 / -1;
  max-inline-size: 32.4375rem;             /* 519 */
  margin-block-start: var(--space-5);
}

.page-work-arcline-studio .arc-live__frame { margin-block-start: clamp(2.5rem, 5vw, 4.5rem); }   /* 72 */

.page-work-arcline-studio .arc-live__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--grid-gap);
  margin-block-start: clamp(2.5rem, 5vw, 4.5rem);
}

.page-work-arcline-studio .arc-live__pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-4);
}

/* ---- 10 Design outcomes (9A6-0) ---- */

/* While the live preview is not rendered this section follows the plates, white on white: a quarter of its
   top padding keeps one section gap between them (160 + 40, the rhythm of sections 03 to 05). */
.page-work-arcline-studio .arc-outcomes--after-plates { padding-block-start: calc(var(--section-pad) * 0.25); }

.page-work-arcline-studio .arc-outcomes__intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-16);
}

.page-work-arcline-studio .arc-outcomes__heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-8);
}

.page-work-arcline-studio .arc-outcomes__heading .h2 { max-inline-size: 30rem; }   /* 480 */
.page-work-arcline-studio .arc-outcomes__note { max-inline-size: 22.5rem; }        /* 360 */

/* Label (two columns, on the first line of the statement) and a 28/34 statement. */
.page-work-arcline-studio .arc-outcomes__list {
  --rule-pad-top: var(--space-8);
  --rule-pad-bottom: 2.25rem;
  --rule-key: 12.0625rem;                  /* 193 */
  align-self: start;
}

.page-work-arcline-studio .arc-outcomes__list .rule-list__key { line-height: calc(var(--fs-h4) * var(--lh-h4)); }

/* Statements, not headings: they wrap as running text, as drawn. */
.page-work-arcline-studio .arc-outcomes__list .rule-list__body { text-wrap: pretty; }

/* ---- Tablet ---- */
@media (max-width: 1024px) {
  /* Hero: the summary sits under the headline */
  .page-work-arcline-studio .arc-hero__row { --grid-row-gap: var(--space-6); }

  .page-work-arcline-studio .arc-hero__summary {
    max-inline-size: 30rem;
    padding-block-end: 0;
  }

  .page-work-arcline-studio .arc-meta__about dt { grid-column: span 4; }
  .page-work-arcline-studio .arc-meta__about dd { grid-column: span 8; }

  .page-work-arcline-studio .arc-brief .grid { --grid-row-gap: var(--space-6); }
  .page-work-arcline-studio .arc-brief__label { min-block-size: 0; }

  /* The answer keeps to the end side */
  .page-work-arcline-studio .arc-challenge__answer > .lead { grid-column: 6 / -1; }

  /* Goals: numeral beside a title with its note underneath (the shared numbered row) */
  .page-work-arcline-studio .arc-goals__list {
    --rule-pad-top: var(--space-8);
    --rule-pad-bottom: var(--space-10);
  }

  .page-work-arcline-studio .arc-goals__list .rule-list__row { display: flex; }
  .page-work-arcline-studio .arc-goals__list .rule-list__key { inline-size: var(--rule-key); }
  .page-work-arcline-studio .arc-goals__list .rule-list__body { display: block; }

  .page-work-arcline-studio .arc-goals__list .rule-list__body > .small {
    max-inline-size: 30rem;
    margin-block-start: var(--space-3);
    padding-block-start: 0;
  }

  /* Steps: two by two */
  .page-work-arcline-studio .arc-steps { --grid-row-gap: var(--space-12); }

  .page-work-arcline-studio .arc-step {
    display: flex;
    grid-row: auto;
  }

  .page-work-arcline-studio .arc-step > .media { align-self: stretch; }

  /* Plates: down to 769px the heading is still in its narrow column beside plate 01, so it keeps the drawn
     break there (the shared rule releases desktop breaks from 1024px). Without it the Arabic emphasis is
     split across two lines. */
  .page-work-arcline-studio .arc-plates__intro .br-desktop { display: inline; }

  .page-work-arcline-studio .arc-live__intro {
    grid-column: 1 / -1;
    margin-block-start: 0;
  }

  .page-work-arcline-studio .arc-outcomes__intro { gap: var(--space-6); }
  .page-work-arcline-studio .arc-outcomes__heading { gap: var(--space-5); }
}

/* ---- Phone ---- */
@media (max-width: 768px) {
  .page-work-arcline-studio .arc-meta__about dt,
  .page-work-arcline-studio .arc-meta__about dd { grid-column: 1 / -1; }

  .page-work-arcline-studio .arc-challenge .rule--brand { --brand-rule-inset: var(--space-5); }
  .page-work-arcline-studio .arc-challenge__answer > .lead { grid-column: 1 / -1; }

  .page-work-arcline-studio .arc-goals__list .rule-list__key { inline-size: 2rem; }

  .page-work-arcline-studio .arc-steps { --grid-row-gap: var(--space-10); }

  .page-work-arcline-studio .arc-final__head { padding-block-end: var(--space-8); }

  .page-work-arcline-studio .arc-final__captions {
    flex-direction: column;
    margin-block-start: var(--space-4);
  }

  .page-work-arcline-studio .arc-final__note {
    flex: none;
    text-align: start;
  }

  /* The filter bar is 1280 × 76: scaled to a phone it could not be read. It is shown at reading size instead
     (at most its drawn size), cropped to its start, the typology filter. The frame is drawn here because the
     picture's own edge is cropped away; the artwork is left-to-right, so the crop keeps its left end in
     Arabic too. */
  .page-work-arcline-studio .arc-fragment--bar {
    direction: ltr;
    block-size: clamp(2.875rem, 13.5vw, 4.75rem);
    overflow: hidden;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius-sm);
    background-color: var(--color-background);
  }

  .page-work-arcline-studio .arc-fragment--bar picture { block-size: 100%; }

  .page-work-arcline-studio .arc-fragment--bar img {
    inline-size: auto;
    max-inline-size: none;
    block-size: calc(100% + 4px);
    margin-block-start: -2px;
    margin-inline-start: -2px;
  }

  /* Plates, row 1: heading, plate 01, plate 02 */
  .page-work-arcline-studio .arc-plates__lead {
    grid-template-rows: none;
    row-gap: var(--space-8);
  }

  .page-work-arcline-studio .arc-plates__intro,
  .page-work-arcline-studio .arc-plate--one,
  .page-work-arcline-studio .arc-plate--two {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .page-work-arcline-studio .arc-plates__intro { gap: var(--space-5); }
  .page-work-arcline-studio .arc-plates__intro .br-desktop { display: none; }

  /* Plates, row 2: the phone beside the lobby; the rooftop across the width below */
  .page-work-arcline-studio .arc-plates__row { --grid-row-gap: var(--grid-gap); }
  .page-work-arcline-studio .arc-plates__photo--wide { aspect-ratio: 4 / 3; }

  .page-work-arcline-studio .arc-outcomes__list { --rule-key: auto; }
}

@media (max-width: 480px) {
  /* Steps: one under another */
  .page-work-arcline-studio .arc-steps > .arc-step { grid-column: 1 / -1; }

  /* The phone on its own, centred; each photograph across the width at its drawn crop */
  .page-work-arcline-studio .arc-plates__row { --grid-row-gap: var(--space-8); }

  .page-work-arcline-studio .arc-plates__row > .arc-plates__phone,
  .page-work-arcline-studio .arc-plates__row > .arc-plates__photo { grid-column: 1 / -1; }

  .page-work-arcline-studio .arc-plates__phone { margin-inline: auto; }
  .page-work-arcline-studio .arc-plates__photo { aspect-ratio: var(--ratio); }
  .page-work-arcline-studio .arc-plates__photo--wide { aspect-ratio: 4 / 3; }
}
