/* Jiang Lab homepage mockup.
   Palette: white, black, a cool gray and Rutgers scarlet. Scarlet is the only accent:
   actions, section labels and lead-author markers. Colour in the pictures comes from the science art. */

:root {
  --bg: #ffffff;
  --mist: #f4f5f6;
  --ink: #131416;
  --muted: #5f6a72;
  --line: #e0e3e6;
  --scarlet: #cc0033;
  --scarlet-deep: #a50029;
  --scarlet-wash: #fcebef;
  --scarlet-on-dark: #ff6f88;
  --night: #101113;
  --night-raised: #1a1b1e;
  --night-line: #2b2d31;
  --hero-art: url("content/hero/24-open-recognition-map.jpg");
  --font: "Figtree", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --nav-h: 80px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

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

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* ---------- Type ---------- */

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, min(5.4vw, 8.4vh), 4.6rem); line-height: 1.02; letter-spacing: -0.028em; }
h2 { font-size: clamp(1.85rem, 3.1vw, 2.7rem); line-height: 1.1; }
h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.012em; }
h4 { font-size: 1.05rem; line-height: 1.3; letter-spacing: -0.008em; }
p { text-wrap: pretty; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--scarlet);
  margin-bottom: 16px;
}
.muted { color: var(--muted); }
.fine { margin-top: 20px; font-size: 0.85rem; color: var(--muted); }

.tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}
.tag--lead { background: var(--scarlet-wash); border-color: var(--scarlet-wash); color: var(--scarlet-deep); }

/* ---------- Actions ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 26px;
  background: var(--scarlet);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}
.btn:hover { background: var(--scarlet-deep); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1.5px solid currentColor;
}
.link-arrow::after { content: "→"; transition: transform 0.2s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

.text-link { font-weight: 600; font-size: 0.97rem; color: var(--scarlet); text-decoration: none; }
.text-link::after { content: " →"; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-top: 4px solid var(--scarlet);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: calc(var(--nav-h) - 4px); gap: 24px; }

.brand { display: grid; text-decoration: none; line-height: 1.15; }
.brand-name { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.brand-sub { font-size: 0.9rem; color: var(--muted); }

.nav-links { display: flex; gap: clamp(20px, 3.2vw, 44px); }
.nav-links a { font-weight: 600; font-size: 1rem; text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { border-bottom-color: var(--scarlet); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px; font-weight: 600; cursor: pointer; }

/* ---------- Hero ---------- */

/* The picture is anchored bottom-right at full hero height. Its upper-left is empty white,
   which is where the headline sits. */
.hero { position: relative; overflow: hidden; background: var(--bg); min-height: clamp(620px, 90vh, 880px); border-bottom: 1px solid var(--line); }
.hero-copy { position: relative; z-index: 2; padding-top: clamp(44px, 7.5vh, 96px); padding-bottom: 160px; }
.hero h1 { max-width: 15ch; }
.lede { margin-top: 22px; max-width: 36ch; font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.45; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; margin-top: 32px; }

.hero-art {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  aspect-ratio: 1586 / 992;
  background: var(--hero-art) right bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%);
  mask-image: linear-gradient(to right, transparent 0, #000 14%);
}
.art-note {
  position: absolute;
  z-index: 2;
  left: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  bottom: 16px;
  margin-left: -10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
}

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { margin-bottom: clamp(32px, 4vw, 56px); }

.split-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(32px, 6vw, 96px); align-items: start; margin-bottom: clamp(36px, 4.5vw, 60px); }
.split-head--end { align-items: end; grid-template-columns: minmax(0, 1fr) auto; }
.split-head > .muted { padding-top: 6px; }

/* Research areas */
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(28px, 3vw, 40px); }
.area { display: flex; flex-direction: column; align-items: flex-start; }
.area-figure { width: 100%; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; background: var(--mist); border: 1px solid var(--line); }
.area-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--zoom, 1));
  transform-origin: var(--fx, 50%) var(--fy, 50%);
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.area:hover .area-figure img { transform: scale(calc(var(--zoom, 1) * 1.05)); }
.area-kicker { margin-top: 22px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.area h3 { margin-top: 8px; font-size: clamp(1.3rem, 1.8vw, 1.5rem); }
.area > p:not(.area-kicker) { margin: 10px 0 16px; color: var(--muted); }
.area .text-link { margin-top: auto; }

/* Featured discovery: the one dark band */
.mechanism { background: var(--night); color: #f2f2f1; padding: clamp(72px, 10vw, 128px) 0; }
.mechanism-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.mechanism .eyebrow { color: var(--scarlet-on-dark); }
.mechanism-lede { margin-top: 16px; color: #b5b7bc; }

.stops { margin-top: 28px; }
.stops button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0 14px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--night-line);
  padding: 18px 0;
  cursor: pointer;
  color: #a9abb1;
  transition: color 0.2s ease;
}
.stops li:last-child button { border-bottom: 1px solid var(--night-line); }
.stops button:hover { color: #e8e8e6; }
.stop-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
}
.stop-text strong { display: block; font-size: 1.15rem; letter-spacing: -0.01em; color: #f2f2f1; }
.stop-text span { display: block; margin-top: 4px; font-size: 0.97rem; line-height: 1.5; }
.stops button[aria-pressed="true"] { color: #e8e8e6; }
.stops button[aria-pressed="true"] .stop-num { background: var(--scarlet); border-color: var(--scarlet); color: #fff; }
.fineprint { margin: 22px 0 26px; font-size: 0.9rem; color: #8f9298; }

.viewer-frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; background: var(--night-raised); }
.viewer-layer { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 1s cubic-bezier(0.65, 0, 0.2, 1); will-change: transform; }
.viewer-layer img { width: 100%; height: 100%; object-fit: cover; }
.pin {
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: rgba(16, 17, 19, 0.55);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.3s ease, background-color 0.2s ease;
}
.pin:hover { background: var(--scarlet); border-color: var(--scarlet); }
.viewer.is-zoomed .pin { opacity: 0; pointer-events: none; }
.viewer figcaption { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; margin-top: 12px; font-size: 0.82rem; font-style: italic; color: #8f9298; }
.viewer-reset { font-style: normal; font-weight: 600; background: none; border: 1px solid var(--night-line); border-radius: 999px; padding: 6px 14px; color: #e8e8e6; cursor: pointer; }
.viewer-reset:hover { border-color: #e8e8e6; }

/* Publications: the publication wall.
   A reference list set on a year rule. A paper's figure sits at its right whenever one is held.
   Pointing at a paper tints its row and lets the figure grow a little; selecting the figure
   opens it whole. Adapted from the Oops Lab Playground's wall
   (Oops Lab Playground/src/publication-wall.css).
   Rows are plain HTML in index.html; app.js adds the topic filter and the newest/oldest sort. */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pw-n { margin-left: 4px; opacity: 0.6; font-variant-numeric: tabular-nums; }

/* --pw-pad keeps a row's contents clear of the right-hand end of its hover tint. */
.pw-sheet { --pw-gut: 104px; --pw-fig: 184px; --pw-pad: 22px; --pw-rule: #c9cdd2; }

.pw-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); font-size: 0.86rem; }
.pw-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.pw-hint { color: var(--muted); }
.pw-sorts { display: flex; gap: 2px; }
.pw-sort { background: none; border: 0; border-radius: 999px; padding: 6px 12px; font-size: 0.86rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: color 0.2s ease, background-color 0.2s ease; }
.pw-sort:hover { color: var(--ink); }
.pw-sort[aria-pressed="true"] { background: var(--mist); color: var(--ink); }
html:not(.js) .filters, html:not(.js) .pw-sorts, html:not(.js) .pw-hint { display: none; }

/* The list and its year rule */
.pw-list { position: relative; }
.pw-list::before { content: ""; position: absolute; left: calc(var(--pw-gut) - 1px); top: 0; bottom: 0; width: 2px; background: var(--pw-rule); }
.pw-item { position: relative; display: grid; grid-template-columns: var(--pw-gut) minmax(0, 1fr) var(--pw-fig); align-items: center; min-height: 104px; margin-top: var(--pw-gap, 0px); padding: 14px var(--pw-pad) 14px 0; }
.pw-item::after { content: ""; position: absolute; left: var(--pw-gut); right: 0; bottom: 0; height: 1px; background: var(--line); }
.pw-item::before { content: ""; position: absolute; left: calc(var(--pw-gut) - 6px); top: 24px; width: 8px; height: 8px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.3s ease, box-shadow 0.3s ease; }

/* The hover state: a tint running from the year rule, a filled marker and the year in scarlet.
   A row reached by keyboard, or by a link such as #pub-cell-2025, gets the same look. */
.pw-item:is(:hover, :focus-within, :target) { background: linear-gradient(90deg, transparent var(--pw-gut), rgba(204, 0, 51, 0.055) 45%, rgba(204, 0, 51, 0.02)); }
.pw-item:is(:hover, :focus-within, :target)::before { background: var(--scarlet); border-color: var(--scarlet); transform: scale(1.4); box-shadow: 0 0 0 5px rgba(204, 0, 51, 0.14); }

.pw-year { align-self: start; padding: 5px 26px 0 0; text-align: right; }
.pw-year b { display: block; font-size: 1.7rem; font-weight: 700; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; transition: color 0.25s ease, opacity 0.25s ease; }
/* A year is printed once per run of papers; pointing at a later paper in the run shows it again. */
.pw-item.is-repeat .pw-year b { opacity: 0; }
.pw-item:is(:hover, :focus-within, :target) .pw-year b { color: var(--scarlet); opacity: 1; }

/* Text column */
.pw-text { min-width: 0; padding: 0 28px 0 30px; }
.pw-topic { margin-bottom: 4px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; line-height: 1.4; color: var(--scarlet); }
.pw-title { font-size: clamp(1.03rem, 1.28vw, 1.14rem); line-height: 1.3; letter-spacing: -0.012em; }
.pw-authors { margin-top: 5px; font-size: 0.87rem; color: var(--muted); }
.pw-authors strong { color: var(--ink); font-weight: 700; }
.pw-venue { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font-size: 0.86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pw-journal { font-weight: 700; color: var(--ink); }
.pw-venue a { font-weight: 600; color: var(--scarlet); text-decoration: none; }
.pw-venue a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Figure slot. With a figure it holds the figure; without one it holds only a short tag. */
.pw-slot { position: relative; width: var(--pw-fig); }
.pw-slot--fig { height: calc(var(--pw-fig) * 0.625); }
.pw-idle { display: flex; align-items: center; justify-content: flex-end; text-align: right; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; line-height: 1.5; color: #8b939a; }
/* A paper with a figure does not show its tag; the tag stays in the markup as the fallback. */
.pw-slot--fig .pw-idle { display: none; }
.pw-fig { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: zoom-in; transform-origin: right center; transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease, border-color 0.2s ease; }
/* The figure grows a little with its row, towards the text so it stays clear of the edge. */
.pw-item:is(:hover, :focus-within) .pw-fig { z-index: 1; transform: scale(1.07); border-color: #c9cdd2; box-shadow: 0 14px 30px -16px rgba(19, 20, 22, 0.45); }
.pw-fig img { width: 100%; height: 100%; min-height: 0; padding: 5px; object-fit: contain; }
/* Tall data figures fill the preview from the top; the enlarged view shows them whole. */
.pw-fig--cover img { padding: 0; object-fit: cover; object-position: top center; }
.pw-cap { display: block; padding: 4px 8px 5px; overflow: hidden; border-top: 1px solid var(--line); background: #fff; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.03em; line-height: 1.3; text-align: left; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

.credit { margin-top: 14px; font-size: 0.8rem; color: var(--muted); }
.credit a { text-underline-offset: 3px; }
.credit a:hover { color: var(--scarlet); }
.more { margin-top: 28px; }

@media (max-width: 1000px) {
  .pw-sheet { --pw-gut: 88px; --pw-fig: 160px; --pw-pad: 16px; }
  .pw-text { padding: 0 20px 0 24px; }
}
@media (max-width: 760px) {
  /* Narrow screens: the figure sits under its paper instead of beside it. */
  .pw-sheet { --pw-gut: 60px; --pw-pad: 10px; }
  .pw-hint { order: 3; width: 100%; }
  .pw-item { grid-template-columns: var(--pw-gut) minmax(0, 1fr); align-items: start; min-height: 0; padding-top: 16px; padding-bottom: 16px; }
  .pw-item::before { top: 21px; }
  .pw-year { padding: 5px 16px 0 0; }
  .pw-year b { font-size: 1.2rem; letter-spacing: -0.03em; }
  .pw-text { padding: 0 0 0 18px; }
  .pw-slot { grid-column: 2; grid-row: 2; width: min(100% - 18px, 176px); margin-left: 18px; }
  .pw-slot--fig { height: auto; margin-top: 12px; aspect-ratio: 8 / 5; }
  .pw-idle { display: none; }
  .pw-fig { transform-origin: left center; }
}
@media (prefers-reduced-motion: reduce) {
  .pw-fig, .pw-item::before { transition: none; }
}

/* Enlarged figure */
.lightbox { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 16px 18px 18px; border: 0; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.lightbox::backdrop { background: rgba(16, 17, 19, 0.72); }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.lightbox-title { font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.lightbox-frame { display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: auto; }
.lightbox-frame img { width: auto; max-width: 100%; max-height: calc(100vh - 230px); object-fit: contain; }
.lightbox-note { margin-top: 12px; font-size: 0.95rem; max-width: 80ch; }
.lightbox .credit { margin-top: 8px; }

/* Team: just the PI for now. The group and person styles below are ready for when people join. */
.section.team { background: var(--mist); border-top: 1px solid var(--line); padding: clamp(56px, 7vw, 92px) 0; }
.team-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.team .section-head { margin-bottom: 0; }
.team .section-head .muted { margin-top: 14px; max-width: 30ch; }

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mist);
  color: var(--muted);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--pi { width: 72px; height: 72px; background: var(--ink); color: #fff; font-size: 1.3rem; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--scarlet); }

.pi { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0 clamp(20px, 2.4vw, 30px); align-items: start; padding: clamp(20px, 2.6vw, 30px); background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.pi .avatar--pi { margin: 5px; }
.pi h3 { font-size: clamp(1.35rem, 1.9vw, 1.6rem); }
.role { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--scarlet); margin-bottom: 6px; }
.pi-body > p:not(.role):not(.person-links) { margin-top: 10px; font-size: 0.98rem; color: var(--muted); max-width: 70ch; }
.person-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 16px; font-size: 0.93rem; font-weight: 600; }
.person-links a { color: var(--scarlet); text-decoration: none; }
.person-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.team-group { margin-top: clamp(28px, 3.5vw, 44px); }
.group-title { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.person { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.person-role { margin-top: 2px; font-size: 0.9rem; font-weight: 600; color: var(--scarlet); }
.person-note { margin-top: 6px; font-size: 0.92rem; line-height: 1.45; color: var(--muted); }

/* Join */
.join {
  position: relative;
  background: #ebe8e5 url("content/hero/22-architectural-genome.jpg") right center / cover no-repeat;
  padding: clamp(72px, 9vw, 120px) 0;
  border-top: 1px solid var(--line);
}
.join::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.82) 38%, rgba(255, 255, 255, 0) 72%); }
.join-inner { position: relative; }
.join h2 { max-width: 17ch; }
.join-inner > p:not(.eyebrow) { margin: 18px 0 28px; max-width: 46ch; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact .section-head { margin-bottom: 0; }
.contact-list > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.contact-list > div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.contact-list dd { font-weight: 500; }
.contact-list dd a { margin-right: 20px; text-underline-offset: 4px; }
.contact-list dd a:hover { color: var(--scarlet); }
.placeholder { color: var(--muted); font-style: italic; font-weight: 400; }

/* Footer */
.footer { background: var(--night); color: #f2f2f1; border-top: 4px solid var(--scarlet); padding: 36px 0 44px; font-size: 0.92rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; }
.mock-note { color: #a9abb1; max-width: 64ch; font-size: 0.85rem; }

/* ---------- Motion ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .viewer-layer, .link-arrow::after, .area-figure img { transition: none; }
}

/* ---------- Smaller screens ---------- */

@media (max-width: 960px) {
  .split-head, .split-head--end, .mechanism-grid, .contact-grid, .team-layout { grid-template-columns: minmax(0, 1fr); }
  .split-head--end { align-items: start; }

  /* Stack the hero: copy first, the picture below it, pulled up under the empty part of the art. */
  .hero { min-height: 0; }
  .hero-copy { padding-bottom: 0; }
  .hero-art {
    position: relative;
    width: 100%;
    height: auto;
    margin-top: -9vw;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 24%);
  }
  .art-note { position: static; margin: 0; padding: 10px var(--gutter) 14px; border-radius: 0; background: none; text-align: right; }

}

@media (max-width: 720px) {
  :root { --nav-h: 68px; }
  body { font-size: 1rem; }
  .brand-name { font-size: 1.3rem; }
  .brand-sub { font-size: 0.82rem; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 4px var(--gutter) 14px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }

  /* Phones show the right-hand part of the same picture, a little larger. */
  .hero-copy { padding-top: 36px; }
  .hero-art {
    aspect-ratio: 4 / 3;
    margin-top: 4px;
    background: var(--hero-art) 86% bottom / auto 100% no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 26%);
  }


  .pi { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .contact-list > div { grid-template-columns: 1fr; gap: 4px; }
  .join::before { background: rgba(255, 255, 255, 0.86); }
}
