*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --header-h: 4.35rem;

  /* Shared horizontal rhythm with the header shell */
  --shell-max: 72rem;
  --content-max: 56rem;
  --page-gutter: 1.25rem;

  /* Light consulting palette — cool mist + deep teal (not neon dark-tech) */
  --bg: #f0f4f8;
  --bg-elevated: #ffffff;
  --bg-tint: #e5edf5;
  --bg-deep: #d8e3ef;

  --ink: #152433;
  --text: #152433;
  --text-soft: #3d5368;
  --text-muted: #5c738a;

  --accent: #0c6b7c;
  --accent-strong: #095a69;
  --accent-bright: #128396;
  --cyan: #0c6b7c;
  --navy: #0f2433;

  --line: rgba(21, 36, 51, 0.12);
  --line-strong: rgba(12, 107, 124, 0.3);
  --wash: rgba(12, 107, 124, 0.07);
  --wash-strong: rgba(12, 107, 124, 0.12);
  --header-fill: rgba(240, 244, 248, 0.92);
  --header-solid: rgba(240, 244, 248, 0.98);
  --menu-fill: rgba(255, 255, 255, 0.98);
  --btn-fill: rgba(255, 255, 255, 0.82);
  --btn-fill-hover: rgba(255, 255, 255, 0.95);

  --scene-glow: rgba(12, 107, 124, 0.1);
  --scene-glow-soft: rgba(80, 120, 160, 0.12);
  --panel-fill: rgba(255, 255, 255, 0.88);
  --panel-hi: rgba(12, 107, 124, 0.1);
  --panel-bar: rgba(232, 239, 247, 0.95);
  --panel-sidebar: rgba(225, 234, 244, 0.95);
  --panel-stroke: rgba(21, 36, 51, 0.16);
  --panel-stroke-hi: rgba(12, 107, 124, 0.45);
  --svg-label: #2a3f52;
  --svg-muted: #5c738a;
  --svg-ln: #8a9db0;
  --svg-hi: #0c6b7c;

  --font-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(ellipse 80% 50% at 10% -10%, rgba(12, 107, 124, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(80, 120, 160, 0.1), transparent 50%),
    var(--bg);
  color: var(--text);
}

body {
  min-height: 100dvh;
  font-family: var(--font-sans);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: linear-gradient(
    180deg,
    var(--header-fill) 0%,
    rgba(240, 244, 248, 0.72) 72%,
    rgba(240, 244, 248, 0) 100%
  );
}

.page .site-header {
  background: var(--header-solid);
  border-bottom: 1px solid var(--line);
  background-image: none;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0.55rem 1.2rem;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  line-height: 1.15;
  min-width: 0;
  max-width: min(100%, 18rem);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: clamp(0.92rem, 2.4vw, 1.05rem);
}

.brand-role {
  margin-top: 0.15rem;
  color: var(--cyan);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.site-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem 0.85rem;
}

.site-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
}

.site-menu a:hover,
.site-menu a:focus-visible,
.site-menu a[aria-current="page"] {
  color: var(--cyan);
  outline: none;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
}

.nav-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.hamburger-lines {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 1.25rem;
  height: 0.85rem;
}

.hamburger-lines span {
  display: block;
  height: 2px;
  background: var(--cyan);
  border-radius: 1px;
}

.page-main {
  padding: calc(var(--header-h) + 2.25rem) 0 4.5rem;
}

.page-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.page-wrap h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-wrap .intro {
  margin: 0 0 2.25rem;
  max-width: none;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.55;
}

.about {
  padding: 3.5rem 0 4.5rem;
  border-top: 1px solid var(--line);
}

.about h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.about p,
.timeline p,
.edu {
  color: var(--text-soft);
  line-height: 1.55;
}

.page-wrap--timeline {
  max-width: var(--content-max);
}

.history-dual {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 1.15rem;
  align-items: stretch;
}

.history-dual > .era-aside--left {
  grid-column: 1;
}

.history-dual > .era-aside--right {
  grid-column: 3;
}

.history-dual > .history-jobs {
  display: contents;
}

.history-job {
  grid-column: 2;
  margin: 0 0 2rem;
  padding: 0 0 2rem;
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.history-job:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.era-aside {
  display: grid;
  align-items: stretch;
  min-height: 100%;
  padding-bottom: 2rem;
}

.era-aside--left {
  grid-template-columns: auto 0.85rem;
  column-gap: 0.7rem;
}

.era-aside--right {
  grid-template-columns: 0.85rem auto;
  column-gap: 0.7rem;
}

.era-bracket {
  display: block;
  width: 0.85rem;
  border: 2px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px var(--wash);
}

.era-bracket--left {
  border-right: none;
  border-radius: 0.45rem 0 0 0.45rem;
}

.era-bracket--right {
  border-left: none;
  border-radius: 0 0.45rem 0.45rem 0;
}

.era-title {
  margin: 0;
  align-self: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 899px) {
  .history-dual {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }

  .history-dual > .era-aside--left,
  .history-dual > .era-aside--right {
    display: none;
  }

  .history-dual > .history-jobs {
    display: block;
  }

  .history-job {
    grid-column: auto;
  }
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  margin: 0 0 2rem;
  padding: 0 0 2rem;
  border-bottom: 1px solid var(--line);
}

.timeline li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.timeline .role-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin: 0 0 0.35rem;
}

.timeline .when {
  margin: 0;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline .industry {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 650;
}

.timeline .org {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-weight: 600;
}

.timeline .stack {
  margin: 0 0 0.7rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.edu {
  margin: 2rem 0 0;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem 1.75rem;
}

.skill-grid h2 {
  margin: 0 0 0.65rem;
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.skill-grid ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  color: var(--text-soft);
  line-height: 1.55;
}

.skill-grid li {
  margin: 0 0 0.35rem;
}

.page-wide {
  max-width: var(--content-max);
}

.content-block {
  margin: 0 0 2.75rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.content-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.content-block h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  letter-spacing: -0.02em;
}

.content-block h3 {
  margin: 1.5rem 0 0.55rem;
  font-size: 1.05rem;
  color: var(--text);
}

.content-block p,
.content-block li {
  color: var(--text-soft);
  line-height: 1.55;
}

.content-block a {
  color: var(--cyan);
}

.lede-line {
  margin: 0 0 0.85rem;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 600;
}

.service-hero {
  margin: 0 0 2.75rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: linear-gradient(
    135deg,
    var(--bg-elevated) 0%,
    var(--bg-tint) 100%) 0%,
    rgba(229, 237, 245, 0.7) 100%
  );
}

.service-kicker {
  margin: 0 0 0.45rem;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.service-hero h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.03em;
}

.service-hero p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.callout {
  margin: 1.1rem 0 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-tint);
}

.callout p {
  margin: 0 0 0.55rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  margin: 1rem 0;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--wash-strong);
  text-align: left;
  vertical-align: top;
  color: var(--text-soft);
}

th {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.plain-list {
  margin: 0.5rem 0 0;
  padding: 0 0 0 1.15rem;
}

.plain-list.numbered {
  list-style: decimal;
}

.plain-list li {
  margin: 0 0 0.55rem;
}

/* Definition-style rows — preferred over bold-label / em-dash bullets */
.entry-list {
  display: grid;
  gap: 0;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.entry-list > li,
.entry-list > .entry {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11.5rem) minmax(0, 1fr);
  gap: 0.65rem 1.35rem;
  margin: 0;
  padding: 0.95rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

.entry-list .entry-term,
.entry-list dt {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.entry-list .entry-detail,
.entry-list dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.entry-list .entry-detail code,
.entry-list dd code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
  color: var(--cyan);
}

.risk-cluster {
  margin: 1.35rem 0 0;
  padding: 1rem 0 0.15rem 1.05rem;
  border-left: 2px solid var(--line-strong);
}

.risk-cluster > h3 {
  margin: 0 0 0.15rem;
}

.risk-cluster > .lede-line,
.risk-cluster > p.cluster-lead {
  margin: 0 0 0.35rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.risk-cluster .entry-list {
  margin-top: 0.55rem;
}

/* Numbered process rail */
.process-rail {
  display: grid;
  gap: 0;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: process-step;
}

.process-rail > li {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.85rem 1.1rem;
  margin: 0;
  padding: 0 0 1.45rem 0.15rem;
  counter-increment: process-step;
}

.process-rail > li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 2.35rem;
  bottom: 0.15rem;
  width: 1px;
  background: linear-gradient(
    180deg,
    var(--line-strong) 0%,
    var(--wash) 100%
  );
}

.process-index {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.45rem;
  background: var(--bg-elevated);
  color: var(--accent);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 2.35rem;
}

.process-rail h3,
.process-rail h4,
.process-body > strong {
  display: block;
  margin: 0.15rem 0 0.4rem;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.process-body p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

@media (max-width: 640px) {
  .entry-list > li,
  .entry-list > .entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
    padding: 0.85rem 0 0.9rem;
  }

  .process-rail > li {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.7rem 0.85rem;
  }

  .process-index {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.76rem;
    line-height: 2.1rem;
  }

  .process-rail > li:not(:last-child)::before {
    left: 1rem;
    top: 2.15rem;
  }
}

.note {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0 0 2.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.toc a {
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.toc a:hover,
.toc a:focus-visible {
  text-decoration: underline;
}

.services-subnav,
.section-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  margin: 0 0 2.25rem;
}

.services-subnav a,
.section-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.services-subnav a:hover,
.services-subnav a:focus-visible,
.services-subnav a[aria-current="page"],
.section-subnav a:hover,
.section-subnav a:focus-visible,
.section-subnav a[aria-current="page"] {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1rem;
}

.service-card {
  display: block;
  padding: 1.25rem 1.3rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  color: inherit;
  text-decoration: none;
  background: var(--bg-elevated);
  transition: border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 1px 0 rgba(21, 36, 51, 0.04);
}

.service-card:hover,
.service-card:focus-visible {
  border-color: var(--line-strong);
  background: var(--bg-tint);
  outline: none;
}

.service-card h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.service-card p:last-child {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 0.95rem;
}

@media (max-width: 799px) {
  .hamburger {
    display: inline-flex;
  }

  .site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem 0 1rem;
    background: var(--menu-fill);
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle:checked ~ .site-menu {
    display: flex;
  }

  .site-menu a {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--line);
    font-size: 0.95rem;
  }
}

.carousel {
  position: relative;
  width: 100%;
  height: clamp(20rem, 44dvh, 27rem);
  margin-top: var(--header-h);
  overflow: hidden;
  background: var(--bg);
}

.home-explore {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2.25rem var(--page-gutter) 4.5rem;
}

.home-explore > h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  letter-spacing: -0.03em;
}

.home-explore > p {
  margin: 0 0 1.5rem;
  max-width: 42rem;
  color: var(--text-soft);
  line-height: 1.55;
}

.home-explore .service-cards {
  margin-top: 0.25rem;
}

.carousel-nav {
  position: absolute;
  right: max(var(--page-gutter), calc((100% - min(100%, var(--content-max))) / 2 + var(--page-gutter)));
  bottom: 0.65rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--btn-fill);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.nav-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-btn .icon-play,
.nav-btn .icon-pause {
  fill: var(--accent);
  stroke: none;
}

.nav-btn .icon-play {
  display: none;
}

.nav-btn.is-paused .icon-pause {
  display: none;
}

.nav-btn.is-paused .icon-play {
  display: block;
}

.nav-btn:hover:not(:disabled),
.nav-btn:focus-visible {
  border-color: var(--accent);
  background: var(--btn-fill-hover);
  outline: none;
}

.nav-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease-in-out;
}

.slide.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.slide-frame {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.scene {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2.5rem);
  width: 100%;
  height: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(0.85rem, 2vw, 1.25rem) var(--page-gutter) 3.35rem;
  background:
    radial-gradient(ellipse 70% 55% at 72% 42%, var(--scene-glow), transparent 58%),
    radial-gradient(ellipse 50% 40% at 28% 78%, var(--scene-glow-soft), transparent 70%),
    linear-gradient(145deg, #e8eef6 0%, #f5f8fc 52%, #eef3f8 100%);
}

.scene-visual {
  position: relative;
  order: 2;
  flex: 1 1 55%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  padding: 0.35rem 0.5rem 0 0;
}

.scene-glow {
  position: absolute;
  inset: 16% 10% 20% 6%;
  background: radial-gradient(circle at 50% 45%, var(--scene-glow), transparent 68%);
  pointer-events: none;
}

.scene-svg {
  position: relative;
  width: min(100%, 42rem);
  height: auto;
  max-height: min(34dvh, 18.5rem);
}

.scene-svg .panel {
  fill: var(--panel-fill);
  stroke: var(--panel-stroke);
  stroke-width: 1.5;
}

.scene-svg .panel-hi {
  fill: var(--panel-hi);
  stroke: var(--panel-stroke-hi);
}

.scene-svg .panel-bar {
  fill: var(--panel-bar);
  stroke: var(--panel-stroke);
  stroke-width: 1.5;
}

.scene-svg .sidebar {
  fill: var(--panel-sidebar);
  stroke: var(--panel-stroke);
  stroke-width: 1;
}

.scene-svg .dot {
  fill: var(--accent-bright);
  stroke: none;
}

.scene-svg .label,
.scene-svg .code,
.scene-svg .code-hi,
.scene-svg .muted,
.scene-svg .ln,
.scene-svg .chip-text {
  font-family: var(--font-sans);
  fill: var(--svg-label);
}

.scene-svg .label {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 650;
}

.scene-svg .code,
.scene-svg .code-hi {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 15px;
}

.scene-svg .code-hi {
  fill: var(--svg-hi);
}

.scene-svg .muted {
  font-size: 14px;
  fill: var(--text-muted);
}

.scene-svg .ln {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  fill: var(--svg-ln);
}

.scene-svg .flow {
  stroke: var(--line-strong);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.scene-svg .cursor {
  fill: var(--accent);
  stroke: none;
  animation: cursor-blink 1.2s steps(1) infinite;
}

.scene-svg .ai-chip,
.scene-svg .panel-hi.ai-chip {
  fill: var(--panel-hi);
  stroke: var(--panel-stroke-hi);
  stroke-width: 1.5;
}

.scene-svg .chip-text {
  font-size: 13px;
  font-weight: 650;
  fill: var(--svg-hi);
}

.scene-svg .diff-add {
  fill: rgba(60, 160, 110, 0.18);
  stroke: rgba(90, 200, 140, 0.35);
  stroke-width: 1;
}

.scene-svg .diff-del {
  fill: rgba(180, 70, 70, 0.16);
  stroke: rgba(220, 120, 120, 0.3);
  stroke-width: 1;
}

.scene-pipeline .panel-hi {
  animation: stage-pulse 3.2s ease-in-out infinite;
}

.scene-pipeline .panel-hi:nth-of-type(2) {
  animation-delay: 0.35s;
}

@keyframes cursor-blink {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes stage-pulse {
  0%,
  100% {
    stroke: rgba(12, 107, 124, 0.4);
  }
  50% {
    stroke: rgba(12, 107, 124, 0.85);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-svg .cursor,
  .scene-pipeline .panel-hi {
    animation: none;
  }
}

.scene .copy {
  position: relative;
  order: 1;
  flex: 0 1 42%;
  width: auto;
  max-width: 34rem;
  min-width: min(100%, 18rem);
  padding: 0.35rem 0 0 clamp(0.5rem, 2vw, 1.5rem);
  background: none;
}

@media (max-width: 799px) {
  .scene {
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
  }

  .scene-visual {
    order: 1;
    flex: 0 1 auto;
    width: 100%;
    padding: 0.75rem 1rem 0;
    opacity: 0.75;
  }

  .scene-svg {
    max-height: 22dvh;
  }

  .scene .copy {
    order: 2;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 0 1.15rem 3.75rem;
    background: linear-gradient(
      180deg,
      rgba(240, 244, 248, 0) 0%,
      rgba(240, 244, 248, 0.88) 28%,
      rgba(240, 244, 248, 0.98) 100%
    );
  }
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent-strong);
  font-size: clamp(0.7rem, 1.1vw, 0.85rem);
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.copy h1,
.copy h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.75rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lede {
  margin: 0;
  max-width: 36ch;
  color: var(--text-soft);
  font-size: clamp(0.92rem, 1.35vw, 1.12rem);
  line-height: 1.5;
}

.copy .lede + .lede {
  margin-top: 1rem;
}

.copy a {
  color: var(--cyan);
  font-weight: 650;
  text-decoration: none;
}

.copy a:hover,
.copy a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 699px) {
  .copy h1,
  .copy h2 {
    font-size: clamp(1.4rem, 7vw, 1.9rem);
  }

  .lede {
    max-width: 38ch;
  }

  .carousel-nav {
    right: 0.7rem;
    bottom: 0.7rem;
  }

  .nav-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .nav-btn {
    width: 2.75rem;
    padding: 0;
    justify-content: center;
  }
}
