@font-face {
  font-family: "Jean Display";
  src: url("../assets/jean-home/JollyLodger-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #f4f0e7;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #17352d;
  --muted: #61716a;
  --accent: #b04d36;
  --accent-soft: #e8cabe;
  --line: color-mix(in srgb, var(--ink) 18%, transparent);
  --shadow: 0 28px 80px rgb(31 46 40 / 0.13);
  --page: min(1280px, calc(100vw - 48px));
  --radius-xl: clamp(28px, 4vw, 54px);
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.theme-redroof {
  --bg: #eee2d6;
  --surface: #f9f3ec;
  --ink: #522d27;
  --muted: #78645d;
  --accent: #a94432;
  --accent-soft: #d9b4a6;
}

body.theme-heritage {
  --bg: #ebe6bb;
  --surface: #f8f4d9;
  --ink: #173f36;
  --muted: #65705a;
  --accent: #d0612f;
  --accent-soft: #f0b17e;
}

body.theme-circular {
  --bg: #e7edcf;
  --surface: #f7f6df;
  --ink: #214f43;
  --muted: #617461;
  --accent: #e78232;
  --accent-soft: #f2c77d;
}

body.theme-market {
  --bg: #dce8df;
  --surface: #f2f5eb;
  --ink: #173f37;
  --muted: #60756d;
  --accent: #dd7c54;
  --accent-soft: #b9d0c3;
}

body.theme-iqiyi {
  --bg: #dfe9dc;
  --surface: #f5f7ee;
  --ink: #173f36;
  --muted: #5f736a;
  --accent: #67a934;
  --accent-soft: #c8dcaf;
}

body.theme-baidu {
  --bg: #dce7e8;
  --surface: #f3f7f4;
  --ink: #163d39;
  --muted: #5d7371;
  --accent: #315ae8;
  --accent-soft: #b8c9e7;
}

body.theme-shanhai {
  --bg: #dfeaec;
  --surface: #f6f8f2;
  --ink: #173e39;
  --muted: #607672;
  --accent: #24a6b7;
  --accent-soft: #b9dfe1;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.project-header {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 50%;
  width: min(1320px, calc(100vw - 28px));
  min-height: 62px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border: 1px solid rgb(255 255 255 / 0.56);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  box-shadow: 0 12px 34px rgb(30 48 41 / 0.09);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  transform: translateX(-50%);
}

.project-header__back,
.project-header__next {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 15px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 220ms ease, transform 220ms var(--ease);
}

.project-header__back:hover,
.project-header__next:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  transform: translateY(-1px);
}

.project-header__next {
  justify-self: end;
}

.project-header__mark {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-progress {
  position: fixed;
  z-index: 60;
  inset: 0 auto auto 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  pointer-events: none;
}

.project-main {
  overflow: clip;
}

.project-hero {
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 118px max(24px, calc((100vw - 1280px) / 2)) 42px;
}

.project-hero__shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: min(760px, calc(100svh - 160px));
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1.22fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 44px;
  padding: clamp(34px, 5vw, 74px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 42px;
  height: 2px;
  background: var(--accent);
}

.project-hero h1 {
  max-width: 9ch;
  margin: 0;
  font-family: "Jean Display", Impact, sans-serif;
  font-size: clamp(5rem, 9.4vw, 10.5rem);
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: 0.015em;
}

.project-hero__dek {
  max-width: 34rem;
  margin: 28px 0 0;
  font-size: clamp(1.05rem, 1.55vw, 1.34rem);
  line-height: 1.65;
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.project-facts div {
  min-width: 0;
}

.project-facts dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-facts dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 680;
  line-height: 1.45;
}

.project-hero__visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: var(--accent-soft);
}

.project-hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 1.2s var(--ease);
}

.project-hero__visual:hover img {
  transform: scale(1.025);
}

.project-hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 34px 0 60px rgb(0 0 0 / 0.08);
  pointer-events: none;
}

.project-hero__index {
  position: absolute;
  right: 22px;
  bottom: 18px;
  z-index: 2;
  margin: 0;
  color: rgb(255 255 255 / 0.92);
  font-size: clamp(4rem, 8vw, 8rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.07em;
  text-shadow: 0 8px 30px rgb(0 0 0 / 0.2);
}

.project-section {
  width: var(--page);
  margin: 0 auto;
  padding: clamp(76px, 10vw, 148px) 0;
}

.project-section--tight {
  padding-top: 0;
}

.section-intro {
  display: grid;
  grid-template-columns: 0.34fr 0.66fr;
  gap: clamp(36px, 8vw, 120px);
  margin-bottom: clamp(34px, 5vw, 64px);
}

.section-number {
  margin: 8px 0 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-intro h2 {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 5.6rem);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.section-intro p {
  max-width: 45rem;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.85;
}

.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 13%, transparent);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 22px 60px rgb(42 57 48 / 0.1);
}

.media-frame button {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.media-frame img {
  width: 100%;
  height: auto;
  transition: transform 520ms var(--ease);
}

.media-frame:hover img {
  transform: scale(1.012);
}

.media-caption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px 18px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.74rem;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 0;
}

.insight-card {
  min-height: 220px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  transition: transform 260ms var(--ease), background 260ms ease;
}

.insight-card:hover {
  background: var(--surface);
  transform: translateY(-5px);
}

.insight-card span {
  display: block;
  margin-bottom: 38px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.insight-card h3 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.72;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
}

.split-layout--reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.split-layout__copy {
  padding: clamp(18px, 4vw, 56px);
}

.split-layout__copy .eyebrow {
  margin-bottom: 18px;
}

.split-layout__copy h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.split-layout__copy p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 710;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.timeline article {
  position: relative;
  min-height: 250px;
  padding: 36px 24px 28px;
  border-right: 1px solid var(--line);
}

.timeline article:last-child {
  border-right: 0;
}

.timeline article::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 24px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 7px var(--bg);
}

.timeline time {
  display: block;
  margin-bottom: 54px;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 850;
}

.timeline h3 {
  margin: 0 0 12px;
  font-size: 1.16rem;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.board-stack {
  display: grid;
  gap: clamp(26px, 5vw, 70px);
}

.board-stack .media-frame:nth-child(even) {
  margin-left: clamp(0px, 6vw, 94px);
}

.board-stack .media-frame:nth-child(odd) {
  margin-right: clamp(0px, 6vw, 94px);
}

.agent-hero__visual {
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 58px);
  background:
    radial-gradient(circle at 70% 20%, rgb(255 255 255 / 0.46), transparent 35%),
    linear-gradient(145deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 56%, var(--ink)));
}

.agent-hero__visual img {
  width: min(86%, 630px);
  height: auto;
  max-height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 28px 38px rgb(20 49 41 / 0.24));
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
}

.metric-strip article {
  min-height: 178px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--surface);
}

.metric-strip span {
  display: block;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 780;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.metric-strip strong {
  display: block;
  color: var(--accent);
  font-size: clamp(2rem, 4.2vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.metric-strip p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.workflow-board {
  position: relative;
  padding: clamp(28px, 5vw, 62px);
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: var(--surface);
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 32%),
    var(--ink);
  box-shadow: var(--shadow);
}

.workflow-board__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 5vw, 58px);
}

.workflow-board__head p,
.workflow-board__head h3 {
  margin: 0;
}

.workflow-board__head p {
  color: color-mix(in srgb, var(--surface) 63%, transparent);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.workflow-board__head h3 {
  max-width: 15ch;
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-steps li {
  position: relative;
  min-height: 180px;
  padding: 18px;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 20px;
  background: rgb(255 255 255 / 0.07);
}

.workflow-steps li:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -12px;
  width: 13px;
  height: 13px;
  border-top: 1px solid rgb(255 255 255 / 0.6);
  border-right: 1px solid rgb(255 255 255 / 0.6);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.workflow-steps b {
  display: block;
  margin-bottom: 46px;
  color: color-mix(in srgb, var(--accent) 78%, white);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.workflow-steps strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.25;
}

.workflow-steps small {
  display: block;
  margin-top: 8px;
  color: rgb(255 255 255 / 0.6);
  font-size: 0.72rem;
  line-height: 1.5;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.matrix-card {
  min-height: 320px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.matrix-card__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(54px, 8vw, 110px);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.matrix-card__label i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 13%, transparent);
}

.matrix-card h3 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 2.5vw, 2.45rem);
  letter-spacing: -0.04em;
}

.matrix-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.72;
}

.agent-timeline {
  display: grid;
  gap: 14px;
}

.agent-timeline article {
  display: grid;
  grid-template-columns: 120px 0.75fr 1.25fr;
  gap: clamp(20px, 4vw, 60px);
  align-items: start;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.agent-timeline time {
  color: var(--accent);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 820;
  letter-spacing: -0.05em;
}

.agent-timeline h3 {
  margin: 3px 0 0;
  font-size: 1.2rem;
}

.agent-timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.75;
}

.weight-bars {
  display: grid;
  gap: 16px;
  padding: clamp(26px, 4vw, 50px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.weight-bars div {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 2fr) 54px;
  align-items: center;
  gap: 18px;
}

.weight-bars span,
.weight-bars b {
  font-size: 0.8rem;
  font-weight: 760;
}

.weight-bars i {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.weight-bars i::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--weight);
  border-radius: inherit;
  background: var(--accent);
  content: "";
}

.boundary-note {
  display: grid;
  grid-template-columns: 0.34fr 0.66fr;
  gap: clamp(30px, 8vw, 110px);
  padding: clamp(34px, 5vw, 64px);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.boundary-note h2,
.boundary-note p {
  margin: 0;
}

.boundary-note h2 {
  font-size: clamp(2rem, 4vw, 4.3rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.boundary-note p {
  color: var(--muted);
  line-height: 1.85;
}

.document-cover {
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 118px max(24px, calc((100vw - 1280px) / 2)) 42px;
}

.document-cover__shell {
  position: relative;
  isolation: isolate;
  min-height: min(760px, calc(100svh - 160px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 78% 18%, rgb(255 255 255 / 0.76), transparent 28%),
    linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--accent-soft) 68%, white));
  box-shadow: var(--shadow);
}

.document-cover__copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(38px, 6vw, 82px);
}

.document-cover__copy h1 {
  max-width: 9ch;
  margin: 0;
  font-family: "Jean Display", Impact, sans-serif;
  font-size: clamp(5.3rem, 9.2vw, 10.5rem);
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: 0.015em;
}

.document-cover__copy h2 {
  max-width: 17ch;
  margin: 26px 0 0;
  font-size: clamp(1.4rem, 2.2vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.document-cover__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.document-cover__meta li {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 730;
}

.document-cover__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  padding: clamp(28px, 4vw, 58px);
  overflow: hidden;
}

.document-cover__visual::before {
  position: absolute;
  width: 76%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px color-mix(in srgb, var(--accent) 7%, transparent),
    0 0 0 78px color-mix(in srgb, var(--accent) 5%, transparent);
  content: "";
}

.document-cover__visual img {
  position: relative;
  z-index: 1;
  width: min(64%, 430px);
  height: auto;
  max-height: 78%;
  object-fit: contain;
  border-radius: 30px;
  box-shadow: 0 36px 70px rgb(31 59 53 / 0.25);
  transform: rotate(4deg);
}

.document-cover__folio {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 20px;
  margin: 0;
  color: color-mix(in srgb, var(--ink) 25%, transparent);
  font-size: clamp(4rem, 9vw, 9rem);
  font-weight: 850;
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.document-pages {
  width: min(1500px, calc(100vw - 32px));
  display: grid;
  gap: clamp(22px, 4vw, 54px);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 94px) 0 clamp(72px, 10vw, 140px);
}

.document-page {
  margin: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: clamp(16px, 2vw, 30px);
  background: white;
  box-shadow: 0 24px 60px rgb(28 54 49 / 0.11);
}

.document-page img {
  width: 100%;
  height: auto;
}

.project-footer {
  width: var(--page);
  margin: 0 auto 24px;
  padding: clamp(42px, 7vw, 88px);
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: var(--surface);
  background: var(--ink);
}

.project-footer p {
  margin: 0 0 20px;
  color: color-mix(in srgb, var(--surface) 65%, transparent);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.project-footer a {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  text-decoration: none;
}

.project-footer strong {
  max-width: 13ch;
  font-size: clamp(2.5rem, 6.5vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.project-footer span {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--surface) 40%, transparent);
  border-radius: 50%;
  font-size: 1.6rem;
  transition: transform 260ms var(--ease), background 260ms ease;
}

.project-footer a:hover span {
  color: var(--ink);
  background: var(--surface);
  transform: translateX(6px);
}

.lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  place-items: center;
  padding: 30px;
  border: 0;
  background: rgb(10 20 17 / 0.9);
  backdrop-filter: blur(14px);
}

.lightbox[open] {
  display: grid;
}

.lightbox img {
  max-width: min(94vw, 1700px);
  max-height: 88vh;
  border-radius: 18px;
  box-shadow: 0 30px 100px rgb(0 0 0 / 0.45);
}

.lightbox__close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: 50%;
  color: white;
  background: rgb(255 255 255 / 0.12);
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 680ms ease, transform 680ms var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  :root {
    --page: min(100% - 28px, 1280px);
  }

  .project-header {
    grid-template-columns: 1fr auto;
  }

  .project-header__mark {
    display: none;
  }

  .project-hero {
    padding: 100px 14px 28px;
  }

  .project-hero__shell {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .project-hero__copy {
    min-height: 520px;
  }

  .project-hero__visual {
    min-height: min(74vw, 620px);
  }

  .project-hero__visual::after {
    box-shadow: inset 0 30px 60px rgb(0 0 0 / 0.08);
  }

  .section-intro,
  .split-layout,
  .split-layout--reverse {
    grid-template-columns: 1fr;
  }

  .split-layout--reverse .split-layout__copy {
    order: -1;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .insight-card {
    min-height: 0;
  }

  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline article:nth-child(2) {
    border-right: 0;
  }

  .timeline article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .board-stack .media-frame {
    margin-inline: 0 !important;
  }

  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .workflow-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .matrix-grid {
    grid-template-columns: 1fr;
  }

  .matrix-card {
    min-height: 0;
  }

  .matrix-card__label {
    margin-bottom: 44px;
  }

  .agent-timeline article {
    grid-template-columns: 90px 1fr;
  }

  .agent-timeline p {
    grid-column: 1 / -1;
  }

  .boundary-note {
    grid-template-columns: 1fr;
  }

  .document-cover {
    padding: 100px 14px 28px;
  }

  .document-cover__shell {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .document-cover__copy {
    min-height: 520px;
  }

  .document-cover__visual {
    min-height: min(92vw, 680px);
  }
}

@media (max-width: 560px) {
  .project-header__back,
  .project-header__next {
    padding: 0 10px;
    font-size: 0.68rem;
  }

  .project-header__next span {
    display: none;
  }

  .project-hero__copy {
    min-height: 490px;
    padding: 30px 24px;
  }

  .project-hero h1 {
    font-size: clamp(4.5rem, 23vw, 7rem);
  }

  .project-facts {
    grid-template-columns: 1fr;
  }

  .section-intro h2,
  .split-layout__copy h2 {
    letter-spacing: -0.04em;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline article,
  .timeline article:nth-child(2) {
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .project-footer a {
    align-items: center;
  }

  .project-footer span {
    width: 54px;
    height: 54px;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .metric-strip article {
    min-height: 0;
  }

  .workflow-board__head {
    display: block;
  }

  .workflow-board__head p {
    margin-top: 14px;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .workflow-steps li {
    min-height: 0;
  }

  .workflow-steps li:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -12px;
    transform: translateX(50%) rotate(135deg);
  }

  .workflow-steps b {
    margin-bottom: 24px;
  }

  .agent-timeline article {
    grid-template-columns: 1fr;
  }

  .agent-timeline p {
    grid-column: auto;
  }

  .weight-bars div {
    grid-template-columns: 1fr 48px;
  }

  .weight-bars i {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .metric-strip p,
  .workflow-steps strong,
  .workflow-steps small,
  .matrix-card p,
  .agent-timeline p,
  .boundary-note p {
    font-size: 1rem;
  }

  .document-cover__copy {
    min-height: 480px;
    padding: 32px 24px;
  }

  .document-cover__copy h1 {
    font-size: clamp(4.7rem, 23vw, 7.2rem);
  }

  .document-cover__meta li {
    min-height: 44px;
    font-size: 0.82rem;
  }

  .document-cover__visual img {
    width: min(70%, 360px);
  }

  .document-pages {
    width: calc(100vw - 20px);
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
