@font-face {
  font-family: "Google Sans Flex";
  src: url("fonts/google-sans-flex-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans Flex";
  src: url("fonts/google-sans-flex-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
/* Use the installed New York face, including its macOS optical-size names. */
@font-face {
  font-family: "Portfolio New York";
  src: local("New York"), local("NewYork-Regular"), local("NewYorkMedium-Regular"), local("New York Medium");
  font-style: normal;
  font-weight: 400;
}
@font-face {
  font-family: "Portfolio New York";
  src: local("NewYork-Medium"), local("NewYorkMedium-Medium"), local("New York Medium Medium");
  font-style: normal;
  font-weight: 500;
}
:root {
  color-scheme: light;
  --font-sans: "Google Sans Flex", Arial, sans-serif;
  --font-serif: "Portfolio New York", "New York", ui-serif, Georgia, serif;
  --text: #595959;
  --muted: #767676;
  --line: #eaeaea;
  --paper: #fff;
  --panel: #fafafa;
  --reading-width: 834px;
  --gutter: 32px;
  --edge-height: 100px;
  --ease: cubic-bezier(.12,.23,.5,1);
}
* { box-sizing: border-box; }
html { scroll-padding-block: 100px; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 14px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid #526782; outline-offset: 5px; }
p, h1, h2, h3, figure { margin: 0; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; }
h1 { font-size: 32px; line-height: 1.6; text-wrap: pretty; }
h2, h3 { font-size: 20px; line-height: 1.6; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
.icon { display: inline-block; flex: 0 0 16px; width: 16px; height: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 8px 16px; background: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

/* Landing page: 400px introduction + 32px gap at the 1440px design size. */
.site-header { position: fixed; inset: 0 0 auto; height: 64px; padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 20; font: 500 16px/1 var(--font-serif); }
.site-header a { flex-shrink: 0; }
.site-header span { text-align: right; }
.site-header a:hover { color: #222; }
.home-layout { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 32px; max-width: 1920px; margin: 0 auto; padding-top: 64px; padding-bottom: 64px; }
.introduction { position: sticky; top: 64px; align-self: start; padding: 32px; }
.introduction p + p { margin-top: 22px; }
.profile-links { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.profile-links a, .unavailable-link { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.profile-links a:hover { color: #222; }
.profile-links a .icon { transition: transform .2s ease; }
.profile-links a:hover .icon { transform: translate(2px,-2px); }
.unavailable-link { cursor: default; }
.project-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-content: start; padding: 16px; }
.project-card { display: flex; min-width: 0; flex-direction: column; gap: 16px; align-self: start; }
.project-image { aspect-ratio: 480 / 393; display: flex; align-items: center; justify-content: center; padding: 6.667%; overflow: hidden; }
.warm { background: linear-gradient(180deg,#e8e8e8 1.262%,#fff1e6 53.968%,#e8e8e8); }
.cool { background: radial-gradient(ellipse at center, #b1b8c0 33.753%, #c4c7d0 65.306%, #fbf6ff 110%); }
.project-image img { width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; box-shadow: 0 0 32px -11px #8f8c9a; transition: transform .45s ease; }
a.project-card:hover .project-image img { transform: scale(1.018); }
a.project-card:hover h2 { color: #222; }
.project-image.dispatch { aspect-ratio: 480 / 390; }
.project-image.dispatch .dispatch-mask { position: relative; width: 100%; aspect-ratio: 416 / 326; overflow: hidden; border-radius: 3.484px; }
.project-image.dispatch img { position: absolute; top: 0; left: 0; width: 139.32%; max-width: none; height: 100%; object-fit: fill; border-radius: 0; box-shadow: none; }
.project-meta { font-size: 12px; line-height: 1.6; }
.project-meta h2 { font: 500 12px/1.6 var(--font-sans); }

/* Case studies share one reading grid and typography system. */
.back-nav { position: fixed; left: 32px; top: 64px; z-index: 20; }
.back-nav a { display: inline-flex; align-items: center; gap: 16px; min-height: 24px; }
.back-nav a:hover { color: #222; }
.case-content { width: min(var(--reading-width),calc(100% - 64px)); margin: 0 auto; padding-block: 64px 96px; }
.case-intro { display: grid; gap: 32px; }
.columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; }
.columns > * { min-width: 0; }
.support-comparison { grid-auto-rows: 1fr; }
.support-comparison > div { display: flex; }
.support-comparison > div > .panel { width: 100%; }
.columns > div > h2 + p, .columns > div > h3 + p { margin-top: 16px; }
.eyebrow { color: var(--muted); font-size: 14px; line-height: 1.6; }
.columns .eyebrow { margin-bottom: 16px; }
.case-section { display: grid; gap: 32px; margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.case-section > .eyebrow { margin-bottom: -16px; }
.panel { min-width: 0; border: 1px solid var(--line); background: var(--panel); padding: 32px; }
.panel > * + * { margin-top: 16px; }
.panel > .eyebrow { font-size: 12px; text-transform: uppercase; }
.panel .panel { background: transparent; border: 0; padding: 0; }
.note { padding: 24px; background: #f3f3f3; }
.steps { padding-left: 24px; margin: 16px 0 0; }
.steps li { padding-left: 12px; padding-bottom: 16px; }
.steps li + li { padding-top: 16px; border-top: 1px solid var(--line); }
.steps li:last-child { padding-bottom: 0; }
.detail-list { margin: 0; }
.detail-list > div + div { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.detail-list dt { font-weight: 500; }
.detail-list dd { margin: 8px 0 0; }
.three-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.three-columns .panel { padding: 24px; }
.three-columns h3 { font-family: var(--font-sans); font-size: 14px; font-weight: 500; }
.figure { min-width: 0; }
.figure.warm { padding: 32px; }
.image-link { display: block; cursor: zoom-in; }
.image-link img { width: 100%; border-radius: 3px; }
.warm .image-link img { box-shadow: 0 0 32px -11px #8f8c9a; }
figcaption { font-size: 12px; margin-top: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 12px; }
th, td { text-align: left; vertical-align: top; padding: 18px 24px; border: 1px solid var(--line); }
th { font-weight: 500; }
.gallery { min-width: 0; }
.gallery-track { display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #d8d8d8 transparent; padding: 0 0 8px; }
.gallery-track > .figure { flex: 0 0 38%; scroll-snap-align: start; }
.gallery-track .image-link { aspect-ratio: 317 / 207; display: flex; align-items: center; }
.gallery-track img { width: 100%; height: 100%; object-fit: contain; }
.gallery-track figcaption { font-size: 14px; font-weight: 500; }
.gallery-controls { display: flex; justify-content: flex-end; gap: 16px; margin-top: 16px; }
.gallery-controls button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); background: #fff; border-radius: 50%; cursor: pointer; }
.gallery-controls .icon { width: 24px; height: 24px; }
.gallery-controls button:hover { background: #f0f0f0; }
.gallery-controls button:disabled { opacity: .3; cursor: default; }
/* Wabtec “A guided start” composition — Figma 56:25607 only. */
.wabtec-search-media { min-width: 0; display: grid; gap: 32px; padding-block: 32px; border: 1px solid var(--line); background: var(--panel); }
.wabtec-search-media > .figure { display: flex; flex-direction: column; gap: 16px; padding-inline: 32px; }
.wabtec-search-media > .figure > figcaption { margin: 0; min-height: 22px; }
.wabtec-search-media > .figure > .image-link { aspect-ratio: 768 / 499; overflow: hidden; border-radius: 3px; }
.wabtec-search-media > .figure > .image-link img { width: 100%; height: 100%; object-fit: cover; }
.wabtec-search-media .gallery-track { padding: 0 0 0 32px; scroll-padding-left: 32px; scrollbar-width: none; }
.wabtec-search-media .gallery-track::-webkit-scrollbar { display: none; }
.wabtec-search-media .gallery-track > .figure { flex: 0 0 317px; }
.wabtec-search-media .gallery-controls { margin-top: 32px; padding-right: 32px; }
.wabtec-search-media .gallery-controls button { border-radius: 3px; }
/* Remaining Wabtec media: opt-in geometry, with Figma-specific variations. */
.wabtec-intro-hero .image-link { aspect-ratio: 834 / 542; }
.wabtec-intro-hero img { height: 100%; object-fit: contain; }
.wabtec-media-frame { min-width: 0; display: grid; gap: 32px; padding: 32px 0; border: 1px solid var(--line); background: var(--panel); }
.panel.wabtec-media-frame { padding: 32px 0; }
.wabtec-media-frame > * + * { margin-top: 0; }
.wabtec-media-frame > p, .wabtec-media-frame > .figure { padding-inline: 32px; }
.wabtec-media-frame > .figure > .image-link { aspect-ratio: 768 / 499; overflow: hidden; border-radius: 3px; }
.wabtec-media-frame > .figure > .image-link img { width: 100%; height: 100%; object-fit: contain; }
.wabtec-media-frame > .eyebrow { min-height: 20px; }
.wabtec-media-divider { height: 1px; margin-inline: 32px; background: var(--line); }
.wabtec-media-carousel .gallery-track { padding: 0 0 0 32px; scroll-padding-left: 32px; scrollbar-width: none; }
.wabtec-media-carousel .gallery-track::-webkit-scrollbar { display: none; }
.wabtec-media-carousel .gallery-track > .figure { flex: 0 0 317px; }
.wabtec-media-carousel .gallery-track .image-link { height: 207px; overflow: hidden; border-radius: 3px; }
.wabtec-media-carousel .gallery-track .image-link img { width: 100%; height: 100%; object-fit: contain; }
.wabtec-media-carousel .gallery-controls { margin-top: 32px; padding-right: 32px; }
.wabtec-media-carousel .gallery-controls button { border-radius: 3px; }
.wabtec-intro-carousel .gallery-track { padding-left: 0; scroll-padding-left: 0; }
.wabtec-answer-media > .figure { display: flex; flex-direction: column; gap: 32px; }
.wabtec-answer-media > .figure > figcaption { margin: 0; min-height: 22px; }
.wabtec-answer-media > .figure > .image-link, .wabtec-answer-media > .figure > .image-link img { border-radius: 0; }
.wabtec-answer-media > .figure > .image-link img { object-fit: cover; }
.wabtec-answer-media .gallery-track > .figure:nth-child(2) .image-link { position: relative; }
.wabtec-answer-media .gallery-track > .figure:nth-child(2) img { position: absolute; top: .34%; height: 99.7%; object-fit: fill; }
.wabtec-diagram-carousel .flow-track li { display: flex; align-items: center; justify-content: center; height: 86px; padding: 32px; border-color: #dbdbdb; border-radius: 3px; white-space: nowrap; }
.wabtec-knowledge-media .flow-track li { height: 106px; white-space: normal; }
.wabtec-knowledge-media .flow-track li:nth-child(1), .wabtec-knowledge-media .flow-track li:nth-child(4) { width: 170px; }
.wabtec-knowledge-media .flow-track li:nth-child(2), .wabtec-knowledge-media .flow-track li:nth-child(6) { width: 150px; }
.wabtec-knowledge-media .flow-track li:nth-child(3) { width: 184px; }
.wabtec-knowledge-media .flow-track li:nth-child(5) { width: 220px; }
.wabtec-knowledge-media .flow-track li:nth-child(2), .wabtec-knowledge-media .flow-track li:nth-child(4) { padding-inline: 16px; white-space: nowrap; }
.wabtec-sme-media, .wabtec-escalation-media { gap: 24px; background: #f9f9f9; }
.wabtec-sme-media .flow-track li:nth-child(1) { width: 169px; }
.wabtec-sme-media .flow-track li:nth-child(2) { width: 127px; }
.wabtec-sme-media .flow-track li:nth-child(3) { width: 144px; }
.wabtec-sme-media .flow-track li:nth-child(4) { width: 190px; }
.wabtec-sme-media .flow-track li:nth-child(5) { width: 118px; }
.wabtec-sme-media .flow-track li:nth-child(6) { width: 156px; }
.wabtec-escalation-media .flow-track li:nth-child(1) { width: 190px; }
.wabtec-escalation-media .flow-track li:nth-child(2), .wabtec-escalation-media .flow-track li:nth-child(3) { width: 129px; }
.wabtec-escalation-media .flow-track li:nth-child(4) { width: 139px; }
.wabtec-escalation-media .flow-track li:nth-child(5) { width: 143px; }
.wabtec-escalation-media .flow-track li:nth-child(6) { width: 214px; }
.wabtec-sme-media .gallery-controls, .wabtec-escalation-media .wabtec-diagram-carousel .gallery-controls { margin-top: 24px; }
.wabtec-escalation-media > .wabtec-media-divider { margin-block: 8px; }
.wabtec-escalation-media > .figure > .image-link { aspect-ratio: 768 / 501; border: 1px solid var(--line); border-radius: 5.5px; }
.wabtec-escalation-media > .figure img { border-radius: 5.5px; }
.wabtec-escalation-media .gallery-track > .figure:nth-child(-n+2) .image-link, .wabtec-escalation-media .gallery-track > .figure:nth-child(-n+2) img { border-radius: 5.5px; }
.wabtec-escalation-media .gallery-track > .figure:nth-child(2) .image-link { border: 1px solid var(--line); }
.wabtec-theme-media { display: grid; gap: 24px; background: #f9f9f9; overflow: hidden; }
.wabtec-theme-media > * + * { margin-top: 0; }
.wabtec-theme-media > .columns { gap: 24px; width: calc(100% + 2px); }
.wabtec-theme-media .figure { display: flex; flex-direction: column; gap: 16px; }
.wabtec-theme-media figcaption { margin: 0; }
.wabtec-theme-media .image-link { aspect-ratio: 373 / 242.448; overflow: hidden; border-radius: 3px; }
.wabtec-theme-media img { width: 100%; height: 100%; object-fit: fill; }
@media (max-width: 599px) {
  .panel.wabtec-theme-media { padding: 32px; }
  .wabtec-theme-media > .columns { width: 100%; }
}
.flow-track { list-style: none; margin: 0; align-items: center; gap: 56px; }
.flow-track li { flex: 0 0 auto; position: relative; border: 1px solid var(--line); padding: 28px 24px; background: #fff; font-size: 12px; scroll-snap-align: start; }
.flow-track li + li::before { content: ""; position: absolute; left: -41px; top: calc(50% - 12px); width: 24px; height: 24px; background: url("icons/east.svg") center / contain no-repeat; }
.case-footer { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-top: 32px; margin-top: 32px; }
.case-footer a { display: inline-flex; align-items: center; gap: 12px; }

/* Eight overlapping masks gradually increase blur toward the viewport edge. */
.edge-blur { position: fixed; left: 0; right: 0; height: var(--edge-height); pointer-events: none; z-index: 10; }
.edge-blur--top { top: 0; --direction: to top; }
.edge-blur--bottom { bottom: 0; --direction: to bottom; }
.edge-blur span { position: absolute; inset: 0; z-index: var(--layer); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); -webkit-mask-image: linear-gradient(var(--direction),transparent var(--start),#000 var(--middle),#000 var(--end),transparent var(--fade)); mask-image: linear-gradient(var(--direction),transparent var(--start),#000 var(--middle),#000 var(--end),transparent var(--fade)); }
/* Content starts visible; animation is an enhancement, never a JS prerequisite. */
.entrance { animation: arrive .8s var(--ease) .2s both; }
.profile-links.entrance { animation-delay: .4s; }
.project-card { animation: arrive .8s var(--ease) both; }
.project-card:nth-child(1) { animation-delay: .2s; }
.project-card:nth-child(2) { animation-delay: .4s; }
.project-card:nth-child(3) { animation-delay: .6s; }
.project-card:nth-child(4) { animation-delay: .8s; }
@keyframes arrive { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: 72px 32px 32px; background: rgba(255,255,255,.97); color: var(--text); overflow: auto; }
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.lightbox::backdrop { background: rgba(255,255,255,.7); backdrop-filter: blur(12px); }
.lightbox > img { width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 160px); object-fit: contain; }
.lightbox-close { position: fixed; right: 24px; top: 20px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 24px; background: #fff; cursor: pointer; }
.lightbox-close span { margin-left: 12px; font-size: 20px; }
.lightbox-caption { max-width: 70ch; text-align: center; }
body:has(.lightbox[open]) { overflow: hidden; }

@media (max-width: 1279px) {
  .home-layout { grid-template-columns: 29% minmax(0,1fr); gap: 16px; }
  .introduction { padding-right: 16px; }
  .back-nav { position: sticky; top: 0; left: auto; padding: 18px 32px; width: fit-content; }
  .case-content { padding-top: 16px; }
}
@media (max-width: 833px) {
  :root { --edge-height: 64px; }
  .home-layout { display: block; }
  .introduction { position: static; max-width: 520px; padding: 24px 24px 32px; }
  .site-header { padding-inline: 24px; font-size: 14px; }
  .profile-links a, .unavailable-link { min-height: 36px; }
  .project-grid { padding: 0 24px 16px; gap: 24px 16px; }
  .columns { gap: 24px; }
  .three-columns { grid-template-columns: 1fr; }
  .back-nav { padding-inline: 24px; }
  .case-content { width: calc(100% - 48px); }
}
@media (max-width: 599px) {
  .site-header { padding-inline: 20px; font-size: 13px; }
  .introduction { padding: 20px 20px 32px; }
  .project-grid { grid-template-columns: 1fr; padding: 0 20px 24px; gap: 28px; }
  .project-card { gap: 12px; }
  .project-meta, .project-meta h2 { font-size: 13px; }
  .case-content { width: calc(100% - 40px); padding-block: 16px 72px; }
  .back-nav { padding: 18px 20px; }
  h1 { font-size: 28px; line-height: 1.45; }
  .columns { grid-template-columns: 1fr; gap: 24px; }
  .case-intro, .case-section { gap: 24px; }
  .case-section { margin-top: 28px; padding-top: 28px; }
  .case-section > .eyebrow { margin-bottom: -8px; }
  .panel { padding: 24px; }
  .figure.warm { padding: 16px; }
  .gallery-track > .figure { flex-basis: 84%; }
  .gallery-track figcaption { font-size: 12px; }
  .panel .gallery-track > .figure { flex-basis: 94%; }
  .table-wrap table { min-width: 540px; }
  .lightbox { padding: 72px 16px 24px; }
  .case-footer { align-items: flex-start; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 359px) {
  .site-header span { max-width: 130px; line-height: 1.3; }
}
@media print {
  .site-header, .back-nav, .edge-blur, .gallery-controls, .case-footer, .skip-link, .lightbox { display: none; }
  .case-content { width: 100%; padding: 0; }
  .case-section { break-inside: avoid; }
  .gallery-track { flex-wrap: wrap; overflow: visible; }
  .entrance, .project-card { animation: none; }
}
