/* Serrium — the radiograph viewer on the operatory wall. One family: Archivo (variable width and weight). */

:root {
  --bezel: #0b1630;
  --panel: #f4f8fb;
  --panel-lit: #ffffff;
  --panel-edge: #e3ecf5;
  --film: #0e1a36;
  --film-deep: #09122a;
  --film-base: #16244a;
  --blue: #4995d1;
  --blue-deep: #2f74ad;
  --gold: #e2a825;
  --navy: #0d1b3d;
  --ink: #15385c;
  --rule: rgba(13, 27, 61, 0.22);

  --rail-h: 56px;
  --bezel-w: 20px;
  --pad-x: clamp(20px, 3.4vw, 48px);

  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--rail-h) + 24px); }
body {
  background: var(--bezel);
  color: var(--navy);
  font-family: var(--body);
  font-weight: 420;
  font-stretch: 100%;
  line-height: 1.5;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--navy); color: var(--panel-lit); }
a { color: var(--ink); text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { color: var(--navy); text-decoration-color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }

.skip { position: absolute; left: -200vw; top: 8px; background: var(--panel-lit); color: var(--navy); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- bezel rail ---------- */
.rail {
  position: sticky; top: 0; z-index: 20;
  min-height: var(--rail-h);
  background: var(--bezel);
  color: #ffffff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 calc(var(--bezel-w) + var(--pad-x) - 8px);
}
.brand img { height: 28px; width: auto; }
.switches { display: flex; gap: clamp(12px, 2.2vw, 36px); }
.switches a {
  position: relative;
  color: #ffffff;
  font-family: var(--display);
  font-stretch: 80%; font-weight: 700;
  font-size: 0.875rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
  padding: 6px 0 6px 16px;
}
.switches a::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}
.switches a:hover::before, .switches a[aria-current="true"]::before { background: #ffffff; border-color: #ffffff; }

/* ---------- the lit panel ---------- */
.panel {
  position: relative;
  margin: 0 var(--bezel-w);
  background: var(--panel);
  padding: 0 var(--pad-x) 72px;
  overflow: clip;
}
/* the tube sits behind the mount: brightest there, falling off toward the bezels */
.panel::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1200px;
  background: radial-gradient(70% 55% at 50% 30%, var(--panel-lit) 0%, rgba(255, 255, 255, 0.6) 40%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}
.panel > * { position: relative; }
.plot .panel { animation: switch-on 1.1s steps(1, end) both; }
@keyframes switch-on {
  0% { filter: brightness(0.35); }
  18% { filter: brightness(0.7); }
  26% { filter: brightness(0.4); }
  40% { filter: brightness(0.95); }
  48% { filter: brightness(0.6); }
  60% { filter: brightness(1); }
  100% { filter: brightness(1); }
}
.plot .film { animation: expose 0.6s ease-out 0.7s both; }
@keyframes expose { from { opacity: 0.55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .plot .panel, .plot .film { animation: none; } }

/* ---------- the series (hero) ---------- */
.series { padding-top: 28px; }
.mount {
  background: var(--blue);
  padding: 12px;
  box-shadow: 0 0 48px 8px rgba(255, 255, 255, 0.85), 0 18px 40px -22px rgba(13, 27, 61, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.label-strip {
  background: var(--panel-lit);
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 16px 20px 12px;
  margin-bottom: 12px;
}
.label-strip h1 {
  font-family: var(--display);
  font-stretch: 62%; font-weight: 900;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 0.95; letter-spacing: -0.005em;
  text-transform: uppercase;
}
.meta {
  font-family: var(--display);
  font-stretch: 80%; font-weight: 600;
  font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}
.films {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
/* the film: a portrait base with rounded corners, the art above a reserved label strip */
.film {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 5px;
  background: radial-gradient(80% 70% at 50% 40%, var(--film) 0%, var(--film-deep) 100%);
  box-shadow: inset 0 0 0 1px var(--film-base), inset 0 0 24px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: box-shadow 160ms ease-out;
}
.film::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: 0.09;
  mix-blend-mode: screen;
}
.film > svg:first-child { position: absolute; left: 0; top: 0; width: 100%; height: 81%; }
.film .line { fill: none; stroke: #f4f8fb; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.88; filter: drop-shadow(0 0 2px rgba(244, 248, 251, 0.5)); }
.film .faint { fill: none; stroke: #f4f8fb; stroke-width: 1.1; stroke-linecap: round; opacity: 0.38; }
.film .d1 { fill: #f4f8fb; stroke: none; opacity: 0.09; }
.film .d2 { fill: #f4f8fb; stroke: none; opacity: 0.18; }
.film .d3 { fill: #f4f8fb; stroke: none; opacity: 0.34; }
.film.lit, .film:hover, .film:focus-within { box-shadow: inset 0 0 0 1px var(--film-base), inset 0 0 24px rgba(0, 0, 0, 0.5), 0 0 0 3px var(--panel-lit), 0 0 18px rgba(255, 255, 255, 0.9); }
.film.lit .line, .film:hover .line { opacity: 1; filter: drop-shadow(0 0 4px rgba(244, 248, 251, 0.8)); }
.corner {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 19%;
  display: flex; align-items: center;
  padding: 0 10px;
  background: rgba(244, 248, 251, 0.06);
  border-top: 1px solid rgba(244, 248, 251, 0.14);
  font-family: var(--display);
  font-stretch: 80%; font-weight: 600;
  font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(244, 248, 251, 0.78);
  line-height: 1.1;
}
/* the china marker: an authored stroke on the film, and the finding written beside it */
.mark { position: absolute; left: 0; top: 0; width: 100%; height: 81%; pointer-events: none; }
.mark path { fill: var(--gold); opacity: 0.92; }
.finding {
  position: absolute; left: 9px; top: 7px; right: 8px;
  color: var(--gold);
  font-family: var(--display);
  font-stretch: 70%; font-weight: 900;
  font-size: 0.75rem; letter-spacing: 0.02em; line-height: 1.05; text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-2deg); transform-origin: left top;
}

.notes {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 20px 40px;
  padding: 30px 4px 0;
}
.lede { font-size: 1.1875rem; line-height: 1.45; max-width: 58ch; color: var(--ink); }

/* the marker note: the email action, written in marker on the panel */
.marker-note {
  position: relative;
  display: inline-block; flex: none;
  font-family: var(--display);
  font-stretch: 70%; font-weight: 900;
  font-size: 1.25rem; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
  padding: 16px 30px;
  transition: color 120ms ease-out;
}
.marker-note svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.marker-note svg path { fill: var(--gold); transition: fill 120ms ease-out; }
.marker-note span { position: relative; }
.marker-note::before {
  content: ""; position: absolute; inset: 8px 10px; border-radius: 12px;
  background: var(--gold); opacity: 0;
  transition: opacity 120ms ease-out;
}
.marker-note:hover::before, .marker-note:focus-visible::before { opacity: 1; }
.marker-note:hover { color: var(--navy); }
.marker-big { font-size: clamp(1.375rem, 2.4vw, 1.75rem); padding: 20px 38px; }

.findings {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px;
  margin-top: 22px; padding: 10px 4px 0;
  border-top: 1px solid var(--rule);
}
.findings-head {
  font-family: var(--display);
  font-stretch: 80%; font-weight: 600;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
  margin-right: 10px;
}
.findings a {
  text-decoration: none; color: var(--navy);
  font-size: 0.9375rem;
  padding: 3px 8px 3px 0;
  border-bottom: 2px solid transparent;
}
.findings .n {
  display: inline-block; min-width: 22px;
  font-family: var(--display); font-weight: 800; font-stretch: 80%;
  color: var(--ink);
  margin-right: 4px;
}
.findings a:hover, .findings a.lit, .findings a:focus-visible { border-bottom-color: var(--navy); }

/* ---------- typed labels (section heads) ---------- */
.typed {
  display: inline-block;
  background: var(--panel-lit);
  font-family: var(--display);
  font-stretch: 62%; font-weight: 900;
  font-size: clamp(1.875rem, 3.2vw, 2.75rem);
  line-height: 1; text-transform: uppercase;
  padding: 12px 18px 10px;
  box-shadow: 0 6px 16px -10px rgba(13, 27, 61, 0.5);
  margin-bottom: 18px;
}
.intro { font-size: 1.125rem; max-width: 56ch; color: var(--ink); margin-bottom: 36px; }
section + section { margin-top: 96px; }

/* ---------- the report sheet (what we do) ---------- */
.rows { border-top: 2px solid var(--navy); }
.row {
  display: grid; grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 24px 48px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}
.row h3 {
  font-family: var(--display);
  font-stretch: 62%; font-weight: 900;
  font-size: 2.25rem; line-height: 1; text-transform: uppercase;
}
.sub {
  font-family: var(--display);
  font-stretch: 80%; font-weight: 600;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
  margin-top: 8px;
}
.row-body { display: grid; grid-template-columns: minmax(0, 52ch) minmax(0, 1fr); gap: 16px 48px; }
.row-body p { color: var(--navy); }
.row-body ul li {
  position: relative; padding: 7px 0 7px 18px;
  font-size: 0.9375rem; line-height: 1.35;
  border-top: 1px solid var(--rule);
}
.row-body ul li:first-child { border-top: 0; padding-top: 2px; }
.row-body ul li::before {
  content: ""; position: absolute; left: 0; top: 13px;
  width: 7px; height: 7px; background: var(--navy); border-radius: 50%;
}
.row-body ul li:first-child::before { top: 8px; }

/* ---------- the panoramic film (how it runs) ---------- */
.pano-scroll { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.pano {
  position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: radial-gradient(80% 120% at 50% 50%, var(--film) 0%, var(--film-deep) 100%);
  box-shadow: inset 0 0 0 1px var(--film-base), inset 0 0 40px rgba(0, 0, 0, 0.5), 0 0 40px 4px rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  color: #ffffff;
  overflow: hidden;
}
.pano-film { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pano-film .line { fill: none; stroke: #f4f8fb; stroke-width: 1.5; opacity: 0.8; filter: drop-shadow(0 0 2px rgba(244, 248, 251, 0.5)); }
.pano-film .faint { fill: none; stroke: #f4f8fb; stroke-width: 1; opacity: 0.3; }
.pano-film .d1 { fill: none; stroke: #f4f8fb; stroke-width: 10; opacity: 0.08; }
.pano-film .d2 { fill: #f4f8fb; opacity: 0.14; }
.pano-film .d3 { fill: #f4f8fb; opacity: 0.3; }
.pano li {
  position: relative;
  padding: 24px 20px 190px;
  border-left: 1px solid rgba(244, 248, 251, 0.16);
  scroll-snap-align: start;
}
.pano li:first-child { border-left: 0; }
.when {
  font-family: var(--display);
  font-stretch: 62%; font-weight: 900;
  font-size: 1.75rem; line-height: 1; text-transform: uppercase;
  margin-bottom: 10px;
  color: #ffffff;
}
.pano li p:last-child { font-size: 0.9375rem; line-height: 1.4; color: #cfe0f0; max-width: 26ch; }

/* ---------- the typed label sequence (how it starts) ---------- */
.labels { display: grid; gap: 10px; max-width: 760px; }
.labels li {
  display: grid; grid-template-columns: 2.4ch 11.5ch 1fr; gap: 0 14px; align-items: baseline;
  background: var(--panel-lit);
  padding: 12px 18px;
}
.step, .call {
  font-family: var(--display);
  font-stretch: 62%; font-weight: 900;
  font-size: 1.75rem; line-height: 1; text-transform: uppercase;
}
.step { color: var(--ink); min-width: 1.2ch; }
.what { font-size: 1rem; line-height: 1.4; color: var(--ink); max-width: 52ch; }

/* ---------- tail ---------- */
.nots { margin: 4px 0 0; max-width: 60ch; }
.nots li { font-size: 1.1875rem; line-height: 1.4; padding: 12px 0; border-top: 1px solid var(--rule); }
.nots li:last-child { border-bottom: 1px solid var(--rule); }
.contact .intro { margin-bottom: 24px; }

/* ---------- 404: a single unexposed film ---------- */
.lost { min-height: calc(100vh - var(--rail-h) - 72px); padding-top: 28px; }
.lost .mount { max-width: 720px; }
.lost .films { grid-template-columns: 1fr; }
.lost .film { aspect-ratio: 16 / 7; display: grid; place-items: center; }
.lost .film p { position: relative; color: rgba(244, 248, 251, 0.78); font-family: var(--display); font-stretch: 80%; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.875rem; }
.lost .notes { max-width: 720px; }
.lost .marker-note svg path { fill: var(--navy); }
.lost .marker-note::before { background: var(--navy); }
.lost .marker-note:hover { color: var(--panel-lit); }

/* ---------- bezel foot ---------- */
.rail-foot {
  position: static; height: auto; justify-content: flex-start; gap: 28px;
  padding-top: 18px; padding-bottom: 18px;
  font-family: var(--display); font-stretch: 80%; font-weight: 600;
  font-size: 0.875rem; letter-spacing: 0.08em;
}
.foot-logo { height: 22px; width: auto; }
.rail-foot a { color: #ffffff; text-decoration-color: rgba(255, 255, 255, 0.5); }
.rail-foot a:hover { color: #ffffff; text-decoration-color: #ffffff; }

/* ---------- responsive ---------- */
@media (max-width: 1300px) {
  .films { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .finding { font-size: 0.875rem; }
}
@media (max-width: 1100px) {
  .row { grid-template-columns: 1fr; gap: 12px; }
  .row-body { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --rail-h: 52px; --bezel-w: 10px; --pad-x: 14px; }
  .rail { flex-wrap: wrap; padding: 10px 16px; gap: 6px 0; }
  .brand img { height: 22px; }
  .switches { width: 100%; justify-content: space-between; gap: 6px; }
  .switches a { font-size: 0.6875rem; letter-spacing: 0.04em; padding: 4px 0 4px 11px; }
  .switches a::before { width: 6px; height: 6px; }
  .series { padding-top: 14px; }
  .mount { padding: 8px; }
  .label-strip { flex-direction: column; gap: 6px; padding: 12px 12px 10px; margin-bottom: 8px; }
  .label-strip h1 { font-size: clamp(1.75rem, 9.4vw, 2.5rem); }
  .meta { font-size: 0.6875rem; text-align: left; max-width: none; }
  .mount { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .label-strip { position: sticky; left: 0; }
  .films { grid-template-columns: repeat(8, 148px); gap: 8px; width: max-content; }
  .film { scroll-snap-align: start; }
  .corner { font-size: 0.6875rem; padding: 0 8px; }
  .finding { font-size: 0.75rem; }
  .notes { padding-top: 20px; gap: 16px; }
  .lede { font-size: 1.0625rem; }
  .marker-note { font-size: 1.0625rem; padding: 14px 22px; }
  .marker-big { font-size: 1.125rem; padding: 16px 26px; }
  .findings { gap: 4px 14px; }
  .findings a { font-size: 0.875rem; }
  section + section { margin-top: 64px; }
  .panel { padding-bottom: 48px; }
  .row { padding: 20px 0; }
  .row h3 { font-size: 1.75rem; }
  .pano { grid-template-columns: repeat(5, 78vw); width: max-content; min-width: 100%; }
  .pano li { padding: 18px 14px 150px; }
  .labels li { grid-template-columns: 2.2ch 1fr; gap: 2px 12px; padding: 10px 12px; }
  .what { grid-column: 2; }
  .step, .call { font-size: 1.375rem; }
  .rail-foot { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; }
}
