@font-face {
  font-family: Inter;
  src: url("./fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("./fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Unbounded;
  src: url("./fonts/unbounded-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: Unbounded;
  src: url("./fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Manrope;
  src: url("./fonts/manrope-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url("./fonts/manrope-cyrillic.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, p, dl, dd { margin: 0; }

.project-page {
  --paper: #fff;
  --ink: #121824;
  --muted: #475468;
  --panel: #eff2f6;
  --accent: #023c9b;
  --dark: #090f1b;
  --gutter: clamp(20px, 5vw, 82px);
  --display: Inter, Arial, sans-serif;
  --body: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
}

.nucleogo {
  --accent: #254de5;
  --display: Unbounded, Inter, Arial, sans-serif;
  --body: Manrope, Inter, Arial, sans-serif;
  background: linear-gradient(var(--dark) 76px, var(--paper) 76px);
}

.affinery {
  --panel: #edf3f7;
}

.project-page img { display: block; max-width: 100%; height: auto; }
.project-page a { color: inherit; }
.project-page a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

.project-shell {
  width: min(100% - 2 * var(--gutter), 1280px);
  margin-inline: auto;
}

.project-skip {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: var(--gutter);
  padding: 14px;
  transform: translateY(-150%);
  background: var(--paper);
}

.project-skip:focus { transform: none; }

.project-header,
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.project-header {
  min-height: 76px;
  font-size: 14px;
}

.project-brand { display: block; width: 160px; }
.project-back { text-decoration: none; }
.project-back:hover { text-decoration: underline; text-underline-offset: .25em; }
.nucleogo .project-header { color: #fff; }

.project-page h1,
.project-page h2 {
  font-family: var(--display);
  font-weight: 650;
  letter-spacing: -.055em;
  line-height: 1.09;
}

.project-page h2 { font-size: clamp(31px, 4vw, 61px); }

.project-page p {
  color: var(--muted);
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.65;
}

.project-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
  margin-top: 27px;
  padding: 10px 17px;
  border: 1px solid currentColor;
  font-size: 14px;
  text-decoration: none;
  transition: background .2s, color .2s;
}

.project-button:hover { background: var(--ink); color: var(--paper); }

.nuc-hero {
  position: relative;
  display: grid;
  align-items: center;
  isolation: isolate;
  min-height: clamp(520px, 78svh, 850px);
  overflow: hidden;
  color: #fff;
  background: var(--dark);
}

.nuc-hero-art,
.nuc-hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }

.nuc-hero .nuc-hero-art {
  z-index: -2;
  object-fit: cover;
  object-position: center 80%;
  animation: device-entrance .85s cubic-bezier(.22, 1, .36, 1) both;
}

.nuc-hero::after {
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, #090f1bd9, #090f1b49 48%, transparent 75%);
}

.nuc-hero-content {
  padding-block: 60px;
  animation: copy-entrance .58s .09s cubic-bezier(.22, 1, .36, 1) both;
}

.nuc-hero h1 { font-size: clamp(50px, 8.6vw, 142px); }
.nuc-hero h1 span { color: #98fff0; }
.nuc-hero p { margin-top: 17px; color: #d4deeb; font-size: clamp(25px, 3.4vw, 52px); line-height: 1.14; }
.nuc-hero .project-button:hover,
.nucleogo .nuc-contact .project-button:hover { background: #fff; color: var(--dark); }

#presentation > .landing-block {
  padding-block: clamp(52px, 7vw, 105px);
  scroll-margin-top: 20px;
}

.tone-panel { background: var(--panel); }

.tone-dark {
  --ink: #fff;
  --muted: #d4deeb;
  --accent: #98fff0;
  color: var(--ink);
  background: var(--dark);
}

.landing-block h2 { max-width: 21ch; overflow-wrap: anywhere; }

.landing-block h3 {
  margin: 0;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.22;
  letter-spacing: -.025em;
}

.landing-block h3 + p { margin-top: 9px; }

.block-body { margin-top: clamp(24px, 4vw, 56px); }

.landing-block .lead {
  max-width: 59ch;
  color: var(--ink);
  font-size: clamp(19px, 2.25vw, 29px);
  line-height: 1.45;
}

.landing-split,
.feature-grid,
.figure-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 42px);
  align-items: start;
}

.landing-split.centered { align-items: center; }
.landing-split > * { min-width: 0; }
.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stack { display: grid; gap: clamp(18px, 3vw, 36px); align-content: start; }

.feature-panel,
.landing-callout {
  min-width: 0;
  padding: clamp(17px, 3vw, 37px);
  border: 1px solid #cad5e7;
  background: var(--paper);
}

.landing-callout {
  border-inline-start: 4px solid var(--accent);
  background: #e5edf9;
}

.feature-grid > .feature-panel { height: 100%; }

.route-list > div:not(.landing-callout) {
  padding-bottom: 18px;
  border-bottom: 1px solid #cad5e7;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid #aabbdb;
  border-radius: 4px;
  font-size: clamp(13px, 1.35vw, 16px);
}

.steps li:not(:last-child)::after {
  position: absolute;
  left: calc(100% + 3px);
  content: "›";
  color: var(--accent);
}

.plain-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.25em;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.55;
}

.metric {
  display: block;
  margin-block: 10px 7px;
  color: var(--accent);
  font-size: clamp(29px, 4vw, 55px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.data-pairs { margin-block: 12px; }

.data-pairs > div {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.35fr);
  gap: 10px;
  padding-block: 10px;
  border-bottom: 1px solid #dce3ee;
  line-height: 1.4;
}

.data-pairs dt { font-weight: 700; }
.funnel dt { color: var(--accent); font-size: clamp(21px, 3vw, 35px); }

.landing-block .source-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.bar-chart {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: clamp(4px, 1vw, 12px);
  height: clamp(148px, 19vw, 230px);
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.bar-chart li {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  text-align: center;
  font-size: clamp(10px, 1.3vw, 15px);
}

.bar-chart li::after {
  order: 1;
  height: calc(var(--bar) * .74);
  min-height: 6px;
  content: "";
  background: #315bd6;
  border-radius: 4px 4px 0 0;
}

.bar-chart span { order: 2; color: var(--muted); }
.market-bars li:not(:first-child)::after { background: #087768; }

.project-art {
  min-width: 0;
  margin: 0;
}

.project-art img {
  width: 100%;
  max-height: 590px;
  object-fit: contain;
  border-radius: 8px;
}

.project-art figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.figure-pair img { height: clamp(145px, 22vw, 340px); }
.aff-diagram img { background: #fff; }

.deck-table,
.roadmap-scroll {
  margin-block: 24px 0;
  overflow-x: auto;
  color: var(--ink);
  scrollbar-color: #7e93b6 #e8eef7;
}

.deck-table:focus-visible,
.roadmap-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.deck-table table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 14px;
  text-align: left;
}

.deck-table caption { padding: 0 0 12px; font-weight: 700; text-align: left; }
.deck-table th, .deck-table td { max-width: 30ch; padding: 11px 14px; border: 1px solid #cad5e7; vertical-align: top; }
.deck-table th, .deck-table td[colspan] { background: #e5edf9; }
.deck-table td p, .deck-table th p { margin: 0; color: inherit; font-size: inherit; line-height: 1.4; }

.inline-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 19px;
  padding: 0;
  list-style: none;
}

.inline-facts li { padding: 9px 12px; border: 1px solid #cad5e7; }

.roadmap { --labels: 152px; min-width: 990px; }
.roadmap-axis { display: grid; grid-template-columns: var(--labels) repeat(3, 1fr); text-align: center; align-items: end; }
.roadmap-axis > span { text-align: left; }
.roadmap-axis > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 0 8px; }
.roadmap-axis b { grid-column: 1 / -1; font-size: 19px; }
.roadmap-row { display: grid; grid-template-columns: var(--labels) minmax(0, 1fr); align-items: stretch; border-top: 1px solid #cad5e7; }
.roadmap-row:last-child { border-bottom: 1px solid #cad5e7; }
.roadmap-row h3 { align-self: center; padding-right: 10px; font-size: 16px; }

.roadmap-track {
  position: relative;
  min-height: 76px;
  background: repeating-linear-gradient(to right, #cad5e7 0 1px, transparent 1px calc(100% / 12));
}

.roadmap-track > span {
  position: absolute;
  inset-block: 10px;
  left: var(--start);
  display: grid;
  align-content: center;
  width: var(--length);
  padding: 4px 7px;
  border-radius: 5px;
  background: #294dc4;
  color: #fff;
  font-size: 12px;
  line-height: 1.23;
}

.roadmap-row:last-child .roadmap-track > span { background: #c2eddf; color: #153e38; }
.roadmap-row:last-child .roadmap-track > .roadmap-milestone { background: linear-gradient(100deg, #254de5, #38d7ad); }
.roadmap-track > .roadmap-event {
  padding-left: 15px;
  border-left: 2px solid var(--accent);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
}

.roadmap-event::before {
  position: absolute;
  top: 5px;
  left: -5px;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  content: "";
  background: var(--accent);
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.people-grid.block-body { margin-top: clamp(24px, 4vw, 56px); }
.people-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.people-grid img { width: 100%; aspect-ratio: 1.1; object-fit: cover; border-radius: 5px; }
.people-grid h3 { margin-top: 12px; font-size: clamp(16px, 1.6vw, 21px); }
.people-grid p { font-size: 14px; line-height: 1.45; }

.nuc-contact {
  background: linear-gradient(90deg, #090f1bf1 22%, #090f1bcc 61%, #090f1b66), url("../images/projects/nucleogo-contact.webp") right center / cover no-repeat, var(--dark);
}
.nuc-contact .lead { margin-top: 18px; }

.contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; }
.contact-links .project-button { margin-top: 0; }
.contact-list { display: grid; gap: 14px; padding: 0; list-style: none; font-size: clamp(18px, 2.3vw, 29px); }
.contact-list a { overflow-wrap: anywhere; text-underline-offset: .25em; }
.program-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 13px; }
.program-logos img { width: min(100%, 200px); padding: 12px; height: 70px; object-fit: contain; background: #fff; border-radius: 4px; }

.affinery-hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  padding-block: clamp(55px, 9vw, 145px);
}

.affinery-hero h1 { color: var(--accent); font-size: clamp(62px, 10vw, 142px); }
.affinery-hero .affinery-subtitle { margin-top: 5px; color: var(--ink); font-size: clamp(24px, 3.5vw, 48px); line-height: 1.11; letter-spacing: -.04em; }
.affinery-intro { max-width: 43ch; margin-top: 22px; }
.affinery-hero img { width: 100%; }

.project-footer {
  min-height: 73px;
  font-size: 14px;
}

@keyframes device-entrance {
  from { opacity: .35; transform: scale(1.045); }
  to { opacity: 1; transform: none; }
}

@keyframes copy-entrance {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@supports (animation-timeline: view()) {
  .nucleogo :is(.project-art, .bar-chart) {
    animation: copy-entrance linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 26%;
  }
}

@media (max-width: 800px) {
  .affinery-hero, .landing-split { grid-template-columns: minmax(0, 1fr); }
  .three-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .project-brand { width: 128px; }
  .feature-grid, .three-up { grid-template-columns: minmax(0, 1fr); }
  .people-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nuc-hero { min-height: 660px; align-items: start; }
  .nuc-hero-content { padding-top: 43px; }
  .nuc-hero .nuc-hero-art { top: auto; bottom: 0; height: 70%; object-position: 100% 50%; }
  .nuc-hero::after { background: linear-gradient(var(--dark) 26%, #090f1b00 61%); }
  .nuc-hero h1 { font-size: clamp(43px, 11.3vw, 67px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nuc-hero .nuc-hero-art, .nuc-hero-content, .nucleogo :is(.project-art, .bar-chart) { animation: none; }
  .project-button { transition: none; }
}
