/* =========================================================================
   گروه علمی قطعات فولادی سرد نورد شده — IRSACFS
   Design language: "the cross-section".

   Where a contractor's site is about the wall that gets built, a scientific
   group's is about the section that gets studied. So the page is shaped like
   a technical paper: navy ink on pale blue stock, a wide annotation rail for
   figure numbers, and a signature drawing of a flat steel strip folding into
   a lipped channel — which is precisely what "cold-formed" means.
   ========================================================================= */

/* -------------------------------------------------------------- fonts -- */

@font-face {
  font-family: "Estedad";
  src: url("../fonts/Estedad-arabic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Estedad";
  src: url("../fonts/Estedad-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-21BB, U+2212;
}

/* ------------------------------------------------------------- tokens -- */

:root {
  /* #052154 is the group's own navy; it stays on the mark. Type and chrome
     use a softer relative so the page reads calm rather than saturated. */
  --brand: #052154;
  --navy: #0b2c5b;
  --btn-fg: #ffffff;
  --navy-2: #17427c;
  --paper: #f7f8fa;
  --card: #ffffff;
  --ink: #1b2431;
  --muted: #66748a;
  --rule: #e1e5eb;
  --rule-soft: #eef1f5;

  /* the colour an engineer annotates a drawing in, muted a stop */
  --mark: #1d6b8c;
  --mark-soft: #e9f1f5;

  --bg: var(--paper);
  --accent: var(--navy);

  /* paper, not folded metal — a softer corner than the sister site */
  --r: 6px;
  --r-lg: 12px;

  --display: "Estedad", system-ui, sans-serif;
  --body: "Estedad", system-ui, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
  --step-2: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --step-3: clamp(1.45rem, 1.1rem + 1.5vw, 2.05rem);
  --step-4: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem);
  --step-5: clamp(2rem, 1.3rem + 2.9vw, 3.4rem);

  --gutter: clamp(20px, 5vw, 56px);
  --max: 1200px;
  --rail: 5.5rem;         /* the annotation margin a paper keeps for figures */

  --lift: 0 1px 2px rgb(5 33 84 / 0.05), 0 10px 28px -16px rgb(5 33 84 / 0.35);
  --lift-2: 0 2px 4px rgb(5 33 84 / 0.06), 0 18px 42px -20px rgb(5 33 84 / 0.45);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #a8c0dc;
    --btn-fg: #08172b;
    --paper: #11151c;
    --card: #171d26;
    --ink: #dde3ec;
    --muted: #8b97a9;
    --rule: #272f3b;
    --rule-soft: #1c232d;
    --navy: #a8c0dc;
    --navy-2: #bed2e8;
    --mark: #6fa6bf;
    --mark-soft: #1a2831;
    --lift: 0 1px 2px rgb(0 0 0 / 0.5), 0 12px 32px -18px rgb(0 0 0 / 0.8);
    --lift-2: 0 2px 6px rgb(0 0 0 / 0.55), 0 20px 48px -22px rgb(0 0 0 / 0.9);
  }
}
:root[data-theme="dark"] {
  --brand: #a8c0dc;
  --btn-fg: #08172b;
  --paper: #11151c;
  --card: #171d26;
  --ink: #dde3ec;
  --muted: #8b97a9;
  --rule: #272f3b;
  --rule-soft: #1c232d;
  --navy: #a8c0dc;
  --navy-2: #bed2e8;
  --mark: #6fa6bf;
  --mark-soft: #1a2831;
  --lift: 0 1px 2px rgb(0 0 0 / 0.5), 0 12px 32px -18px rgb(0 0 0 / 0.8);
  --lift-2: 0 2px 6px rgb(0 0 0 / 0.55), 0 20px 48px -22px rgb(0 0 0 / 0.9);
}

/* an always-dark surface, independent of the theme */
:root {
  --deep: #101720;
  --deep-fg: #e6ebf2;
  --deep-muted: #94a1b3;
  --deep-rule: #24303f;
}

/* --------------------------------------------------------------- base -- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.95 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.5;
  color: var(--navy);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h5 { font-size: var(--step-0); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: color-mix(in oklab, var(--mark) 60%, transparent);
    text-underline-offset: 0.28em; text-decoration-thickness: 1px;
    transition: color 0.15s var(--ease); }
a:hover { color: var(--mark); }

:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; border-radius: var(--r); }

img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

blockquote {
  margin: 1.6rem 0; padding: 1rem 1.4rem;
  background: var(--mark-soft); border-radius: var(--r);
  border-inline-start: 3px solid var(--mark);
  font-size: var(--step-1);
}

ul, ol { margin: 0 0 1.15em; padding-inline-start: 1.15em; }
li { margin-bottom: 0.35em; padding-inline-start: 0.15em; }
li::marker { color: var(--mark); font-size: 0.85em; }
li > p:only-child { margin: 0; }

table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
th, td { border: 1px solid var(--rule); padding: 0.6em 0.8em; text-align: start; }
th { background: var(--rule-soft); font-weight: 700; color: var(--navy); }

::selection { background: var(--navy); color: #fff; }

.skip { position: absolute; inset-inline-start: -9999px; top: 0; z-index: 100;
        background: var(--navy); color: #fff; padding: 0.7em 1.2em; }
.skip:focus { inset-inline-start: 0; }

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
      overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ------------------------------------------------------------- layout -- */

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 760px; }

.section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--tight { padding-block: clamp(2.2rem, 4vw, 3.5rem); }
.section--deep {
  background: var(--deep);
  color: var(--deep-fg);
  --ink: var(--deep-fg);
  --navy: #fff;
  --muted: var(--deep-muted);
  --rule: var(--deep-rule);
  --card: #0c1e42;
  --mark: #55c2e8;
  --btn-fg: #0b1a2e;
}
.section--panel { background: var(--card); }

/* ------------------------------------------------- the section marker -- */

/* A clause number, the way a design guide numbers its sections. These are a
   real sequence — the page is read top to bottom — so the numbering earns
   its place rather than decorating. */
.eyebrow {
  display: flex; align-items: baseline; gap: 0.65rem;
  margin: 0 0 0.9rem;
  font: 700 0.82rem/1.6 var(--body);
  color: var(--mark);
}
.eyebrow::before {
  content: "§" counter(clause);
  direction: ltr;               /* keep the section sign left of its number */
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  background: var(--mark-soft);
  border-radius: 100px;
  padding: 0.1rem 0.6rem;
  font-size: 0.78rem;
}
body { counter-reset: clause; }
.section { counter-increment: clause; }
.eyebrow--plain::before { content: none; padding: 0; }

.section-head { margin-bottom: clamp(1.6rem, 3vw, 2.6rem); max-width: 46ch; }
.section-head h2 { margin: 0 0 0.5rem; }
.section-head p { color: var(--muted); margin: 0; }

/* ----------------------------------------------------------- masthead -- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 90%, transparent);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.masthead__in { display: flex; align-items: center; gap: 1rem; min-height: 70px; }

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none;
         color: inherit; padding-block: 0.5rem; flex: none; }
.brand__mark { width: 34px; color: var(--brand); flex: none; }
.brand__name { display: grid; line-height: 1.3; }
.brand__fa { font: 800 0.98rem/1.3 var(--display); color: var(--navy); }
.brand__en { font: 500 0.66rem/1.4 var(--body); letter-spacing: 0.16em;
             text-transform: uppercase; color: var(--muted); }

.nav { margin-inline-start: auto; display: flex; align-items: center; gap: 0.4rem; }
.nav a { display: block; padding: 0.4rem 0.7rem; border-radius: var(--r);
         text-decoration: none; font-size: 0.92rem; font-weight: 600;
         color: var(--muted); white-space: nowrap;
         transition: color 0.15s var(--ease), background 0.15s var(--ease); }
.nav a:hover { color: var(--navy); background: var(--rule-soft); }
.nav a[aria-current] { color: var(--navy); background: var(--mark-soft);
                       box-shadow: inset 0 -2px 0 var(--mark); }

.navtoggle { display: none; margin-inline-start: auto; width: 42px; height: 42px;
             align-items: center; justify-content: center; background: none;
             border: 1px solid var(--rule); border-radius: var(--r);
             color: inherit; cursor: pointer; }
.navtoggle svg { width: 20px; height: 20px; }
.navtoggle__x { display: none; }
.navtoggle[aria-expanded="true"] .navtoggle__x { display: block; }
.navtoggle[aria-expanded="true"] .navtoggle__bars { display: none; }

@media (max-width: 860px) {
  .navtoggle { display: flex; }
  .nav { position: fixed; inset: 70px 0 auto; flex-direction: column;
         align-items: stretch; gap: 0; background: var(--paper);
         border-bottom: 1px solid var(--rule);
         padding: 0.6rem var(--gutter) 1.4rem;
         max-height: calc(100dvh - 70px); overflow-y: auto; display: none; }
  .nav[data-open] { display: flex; }
  .nav a { padding: 0.85rem 0.9rem; font-size: 1.05rem; }
}

/* --------------------------------------------------------------- hero -- */

.hero { border-bottom: 1px solid var(--rule);
        background: linear-gradient(180deg, var(--card), var(--paper) 78%); }
.hero__in {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  padding-block: clamp(2.8rem, 6vw, 5rem) clamp(2.4rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 940px) { .hero__in { grid-template-columns: 1.05fr 0.95fr; } }
.hero h1 { font-size: var(--step-5); line-height: 1.38; margin: 0 0 1rem; max-width: 16ch; }
.hero__lead { font-size: var(--step-1); color: var(--muted); max-width: 40ch; margin: 0 0 1.8rem; }

/* ------------------------------------------------- the section drawing -- */

/* A flat strip folding into a lipped channel. The bends animate closed on
   load, because that is the whole of cold forming: no heat, just folding. */
.profile { width: 100%; height: auto; overflow: visible; }
.profile .steel { fill: none; stroke: var(--navy); stroke-width: 7;
                  stroke-linecap: square; stroke-linejoin: miter; }
.profile .ghost { fill: none; stroke: var(--rule); stroke-width: 2;
                  stroke-dasharray: 5 5; }
.profile .dim { stroke: var(--mark); stroke-width: 1.2; }
.profile .dimtext { font: 500 11px var(--body); fill: var(--mark); }
.profile .axis { stroke: var(--mark); stroke-width: 1; stroke-dasharray: 8 4; opacity: 0.65; }
.profile .centroid { fill: none; stroke: var(--mark); stroke-width: 1.4; }

@media (prefers-reduced-motion: no-preference) {
  .profile .fold {
    animation: fold 1s var(--ease) backwards;
    transform-box: fill-box;
  }
  @keyframes fold { from { transform: rotate(var(--turn)); } }
  .profile .fold--flange-top { transform-origin: right center; --turn: 90deg;
                               animation-delay: 0.2s; }
  .profile .fold--flange-bot { transform-origin: right center; --turn: -90deg;
                               animation-delay: 0.2s; }
  .profile .fold--lip-top { transform-origin: center top; --turn: -90deg;
                            animation-delay: 0.65s; }
  .profile .fold--lip-bot { transform-origin: center bottom; --turn: 90deg;
                            animation-delay: 0.65s; }
  .profile .annotate { animation: appear 0.6s var(--ease) 1.2s backwards; }
  @keyframes appear { from { opacity: 0; } }
}

/* --------------------------------------------------------- data strip -- */

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
         gap: 1px; background: var(--rule); border: 1px solid var(--rule);
         border-radius: var(--r-lg); overflow: hidden; }
.facts > div { background: var(--card); padding: 1.1rem 1.25rem; }
.facts dt { font: 500 0.8rem/1.5 var(--body); color: var(--muted); margin: 0 0 0.15rem; }
.facts dd { margin: 0; font: 800 1.1rem/1.5 var(--display); color: var(--navy); }

/* --------------------------------------------------------------- grid -- */

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.6rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

/* --------------------------------------------------------------- card -- */

.card {
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: 1.5rem 1.6rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease),
              border-color 0.25s var(--ease);
}
.card--link { text-decoration: none; color: inherit; }
.card--link:hover { box-shadow: var(--lift-2); transform: translateY(-2px);
                    border-color: color-mix(in oklab, var(--mark) 45%, var(--rule)); }
.card__icon { width: 46px; height: 46px; margin-bottom: 0.4rem; }
.card h3 { margin: 0; font-size: var(--step-1); }
.card p, .card ul { color: var(--muted); font-size: 0.97rem; margin: 0; }
.card ul { padding-inline-start: 1.15em; }

/* ----------------------------------------------------------- company -- */

.company {
  display: grid; gap: 1.5rem 2rem; align-items: start;
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: clamp(1.4rem, 3vw, 2.2rem);
  scroll-margin-top: 90px;
}
@media (min-width: 780px) { .company { grid-template-columns: 13rem minmax(0, 1fr); } }
.company__logo {
  display: grid; place-items: center; padding: 1.2rem;
  background: #fff; border: 1px solid var(--rule-soft); border-radius: var(--r);
  min-height: 8rem;
}
.company__logo picture { display: block; width: 100%; }
.company__logo img { max-height: 5rem; max-width: 100%; width: auto;
                     margin-inline: auto; object-fit: contain; }
.company h2 { margin: 0 0 0.7rem; font-size: var(--step-2); }
.company .prose { color: var(--muted); }

/* ------------------------------------------------------------- prose -- */

.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.2em; }
.prose h3, .prose h4, .prose h5 { margin-top: 1.8em; }
.prose h2:first-child, .prose h3:first-child, .prose h4:first-child { margin-top: 0; }
.prose a { text-decoration: underline; }
.prose .btn, .prose .download { text-decoration: none; }
.prose .actions { margin-top: 1.2rem; }
.prose img { border-radius: var(--r); }
.prose figure { margin: 2rem 0; }
.prose iframe { width: 100%; border: 1px solid var(--rule); border-radius: var(--r);
                aspect-ratio: 16 / 9; height: auto; }

figure { margin: 0; }
figcaption { margin-top: 0.7rem; font: 400 0.86rem/1.75 var(--body); color: var(--muted); }

/* An article keeps a readable measure while its figures use the rail. */
.article-body {
  display: grid;
  grid-template-columns:
    [full-start] minmax(0, 1fr)
    [text-start] min(760px, 100%) [text-end]
    minmax(0, 1fr) [full-end];
  row-gap: clamp(1.2rem, 2.4vw, 1.9rem);
}
.article-body > * { grid-column: text; }
.article-body > figure, .article-body > .gallery, .article-body > .video { grid-column: full; }
/* A portrait scan gains nothing from the full width — it only towers over
   the page. Anything taller than it is wide stays in the reading column. */
.article-body > figure.figure--tall { grid-column: text; }
.figure--lead img { width: auto; max-width: min(100%, 720px); max-height: 46vh;
                    margin-inline: auto; border-radius: var(--r); }

.figure img { width: 100%; border-radius: var(--r); }
/* consecutive figures pair up instead of stacking full width */
.article-body > figure + figure { margin-top: -0.4rem; }
@media (min-width: 900px) {
  .article-body > figure.figure--pair { grid-column: text; }
}
.figure picture { display: block; margin-inline: auto; }
/* a small decorative graphic keeps its own size and centres */
.article-body > figure img { margin-inline: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
           gap: 0.75rem; }
.gallery--pair { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.shot { display: block; position: relative; border: 0; padding: 0; cursor: zoom-in;
        background: var(--rule-soft); border-radius: var(--r); overflow: hidden;
        aspect-ratio: 4 / 3; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s var(--ease); }
.shot:hover img { transform: scale(1.05); }

.video { width: 100%; border: 1px solid var(--rule); border-radius: var(--r);
         background: #000; aspect-ratio: 16 / 9; }

.download {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.2rem; background: var(--card);
  border: 1px solid var(--rule); border-radius: var(--r-lg);
  text-decoration: none; color: inherit;
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.download:hover { box-shadow: var(--lift); border-color: var(--mark); color: inherit; }
.download__icon {
  flex: none; width: 40px; height: 48px; display: grid; place-items: center;
  border: 1.5px solid var(--mark); border-radius: var(--r);
  color: var(--mark); font: 600 0.6rem/1 var(--body); letter-spacing: 0.05em;
}
.download__text { flex: 1; display: grid; gap: 0.15rem; min-width: 0; }
.download__text strong { color: var(--navy); font-weight: 700; line-height: 1.5; }
.download__text span { color: var(--muted); font-size: 0.85rem; }
.download > svg { flex: none; width: 20px; height: 20px; color: var(--rule); }
.download:hover > svg { color: var(--mark); }

/* ------------------------------------------------------------ buttons -- */

.btn { display: inline-flex; align-items: center; gap: 0.55rem;
       padding: 0.75rem 1.35rem; border: 1px solid var(--navy);
       border-radius: 100px; background: var(--navy); color: var(--btn-fg);
       font: 600 0.95rem/1 var(--body); text-decoration: none; cursor: pointer;
       transition: background 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.btn:hover { background: var(--navy-2); color: var(--btn-fg); box-shadow: var(--lift); }
.btn--ghost { background: none; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--btn-fg); }
.btn--quiet { background: none; border-color: var(--rule); color: var(--ink); }
.btn--quiet:hover { border-color: var(--mark); color: var(--mark); background: none; box-shadow: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* -------------------------------------------------------- page header -- */

.pagehead { border-bottom: 1px solid var(--rule);
            background: linear-gradient(180deg, var(--card), var(--paper));
            padding-block: clamp(2.2rem, 4.5vw, 3.4rem) clamp(1.6rem, 3vw, 2.4rem); }
.pagehead h1 { margin: 0 0 0.5rem; max-width: 22ch; }
.pagehead p { color: var(--muted); max-width: 52ch; margin: 0; font-size: var(--step-1); }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
          margin: 0 0 1rem; padding: 0; list-style: none;
          font: 400 0.84rem/1.6 var(--body); color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--mark); }
.crumbs li::after { content: "›"; margin-inline-start: 0.5rem; color: var(--rule); }
.crumbs li:last-child::after { content: none; }

/* --------------------------------------------------------- post list -- */

.postlist { display: grid; gap: clamp(0.9rem, 2vw, 1.3rem); }
.postlist__item {
  display: grid; gap: 0.3rem 1.6rem; padding: 1.35rem 1.5rem;
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--r-lg); text-decoration: none; color: inherit;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.postlist__item:hover { box-shadow: var(--lift-2); transform: translateY(-2px); }
@media (min-width: 760px) { .postlist__item { grid-template-columns: 9rem minmax(0, 1fr); } }
.postlist__date { font: 500 0.85rem/1.9 var(--body); color: var(--mark); }
.postlist__title { font: 800 var(--step-2)/1.5 var(--display); color: var(--navy); margin: 0 0 0.3rem; }
.postlist__text { color: var(--muted); font-size: 0.96rem; margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; list-style: none; }
.tag { display: inline-block; padding: 0.25rem 0.7rem; border: 1px solid var(--rule);
       border-radius: 100px; font: 400 0.78rem/1.6 var(--body); color: var(--muted);
       text-decoration: none; }
.tag:hover { border-color: var(--mark); color: var(--mark); }

/* ----------------------------------------------------------- contact -- */

.channels { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule);
            border-radius: var(--r-lg); overflow: hidden; }
.channel { background: var(--card); display: flex; gap: 0.9rem; align-items: center;
           padding: 1rem 1.2rem; text-decoration: none; color: inherit; }
.channel:hover { color: var(--mark); }
.channel svg { width: 20px; height: 20px; flex: none; color: var(--mark); }
.channel__l { font: 500 0.8rem/1.5 var(--body); color: var(--muted); display: block; }
.channel__v { font-weight: 700; color: var(--navy); }

/* ---------------------------------------------------------- lightbox -- */

.lightbox { position: fixed; inset: 0; z-index: 90; border: 0; padding: 0; margin: 0;
            max-width: none; max-height: none; width: 100%; height: 100%;
            background: rgb(5 19 44 / 0.95); display: none; place-items: center; }
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgb(5 19 44 / 0.9); }
.lightbox img { max-width: min(94vw, 1400px); max-height: 84vh; object-fit: contain;
                border-radius: var(--r); }
.lightbox__bar { position: absolute; inset-inline: 0; bottom: 0; display: flex;
                 align-items: center; justify-content: space-between; gap: 1rem;
                 padding: 1rem clamp(1rem, 4vw, 2.5rem); color: #c9d8ee;
                 font: 400 0.86rem/1.6 var(--body); }
.lightbox button { background: none; border: 1px solid rgb(255 255 255 / 0.25);
                   border-radius: 100px; color: #eaf1fb; width: 42px; height: 42px;
                   cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { border-color: #fff; }
.lightbox__nav { position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%);
                 display: flex; justify-content: space-between;
                 padding-inline: clamp(0.5rem, 3vw, 2rem); }
.lightbox__close { position: absolute; top: 1rem; inset-inline-end: 1rem; }

/* ------------------------------------------------------------- pager -- */

/* Both cards read the same way — label, then title — with an arrow showing
   which direction each one goes. Pinning the two labels to opposite edges
   made them look like a broken pair rather than a pair. */
.pager {
  display: grid; gap: 0.9rem;
  margin-top: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(0.9rem, 1.6vw, 1.2rem);
  border-top: 1px solid var(--rule);
}
@media (min-width: 620px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a {
  display: grid; gap: 0.3rem; align-content: start;
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: 1rem 1.2rem;
  text-decoration: none;
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.pager a:hover { box-shadow: var(--lift); border-color: var(--mark); }
/* the arrow sits with its label rather than at the far edge of the card,
   so neither card has a gap running through the middle of it */
.pager span { display: flex; align-items: center; gap: 0.4rem;
              font: 500 0.8rem/1.6 var(--body); color: var(--muted); }
.pager svg { width: 17px; height: 17px; color: var(--mark); flex: none; }
.pager strong { font: 700 0.98rem/1.55 var(--display); color: var(--navy); }

/* ---------------------------------------------------------- colophon -- */

.colophon { background: var(--deep); color: var(--deep-muted);
            padding-block: clamp(2.4rem, 5vw, 3.6rem) 1.4rem; font-size: 0.95rem; }
.colophon a { color: #dbe7f7; text-decoration: none; }
.colophon a:hover { color: #fff; }
.colophon__grid { display: grid; gap: clamp(1.6rem, 4vw, 3rem); padding-bottom: 2rem;
                  border-bottom: 1px solid var(--deep-rule); }
@media (min-width: 780px) { .colophon__grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.colophon h2 { font: 700 0.86rem/1.6 var(--body); color: var(--deep-muted); margin: 0 0 0.8rem; }
.colophon ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.colophon li { margin: 0; }
.colophon .brand__fa, .colophon .brand__mark { color: #fff; }
.colophon .brand__en { color: var(--deep-muted); }
.colophon__about { color: var(--deep-muted); max-width: 34em; margin: 1rem 0 0; }
.colophon__legal { display: flex; flex-wrap: wrap; justify-content: space-between;
                   gap: 0.6rem 1.5rem; padding-top: 1.3rem; color: var(--deep-muted);
                   font-size: 0.82rem; }

/* ------------------------------------------------------ split section -- */

/* Prose beside the drawing it refers to, rather than a column of text with
   the pictures piled underneath. */
.split { display: grid; gap: clamp(1.8rem, 4vw, 3.2rem); align-items: center; }
@media (min-width: 940px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); }
  .split--reverse > :first-child { order: 2; }
}
.split__aside { min-width: 0; }
.split__aside .profile { max-width: 22rem; margin-inline: auto; }
.split__aside img { width: 100%; border-radius: var(--r); }
.figure--wide { max-width: 900px; margin-inline: auto; }

/* --------------------------------------------------------- utilities -- */

.muted { color: var(--muted); }
.lead { font-size: var(--step-1); color: var(--muted); }
.stack { display: grid; gap: clamp(1.2rem, 2.5vw, 1.9rem); align-content: start; }
.measure { max-width: 68ch; }
.logo-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(50%, 11rem), 1fr));
              gap: 1px; background: var(--rule); border: 1px solid var(--rule);
              border-radius: var(--r-lg); overflow: hidden; }
.logo-strip a { background: #fff; display: grid; place-items: center;
                padding: 1.5rem 1.2rem; min-height: 7.5rem; }
.logo-strip picture { display: block; width: 100%; text-align: center; }
.logo-strip img { max-height: 3.4rem; max-width: 78%; width: auto; margin-inline: auto;
                  object-fit: contain; opacity: 0.9;
                  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease); }
.logo-strip a:hover img { opacity: 1; transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
}

@media print {
  .masthead, .colophon, .pager, .navtoggle, .lightbox { display: none !important; }
  body { background: #fff; color: #000; }
}
