:root {
  --navy: #193d48;
  --paper: #f5f2e9;
  --orange: #d76629;
  --ink: #193d48;
  --muted: #58666a;
  --line: #c9cdc5;
  --ease: cubic-bezier(.22,.75,.18,1);
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: #252c2b; color: var(--paper); }
button, a, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, input { font: inherit; }
button, a { color: inherit; }
button { cursor: pointer; }
a { text-decoration: none; }
button { border: 0; background: none; }
button:disabled { cursor: wait; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 5px; }
::selection { background: #f5b27a; color: var(--navy); }
.orange { color: var(--orange); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 50%; padding: 16px 24px; transform: translate(-50%,-180%); background: var(--paper); color: var(--navy); }
.skip-link:focus { transform: translate(-50%,0); }
#experience { position: fixed; inset: 0 0 auto; height: 100%; height: 100dvh; overflow: hidden; }
.scene { position: absolute; inset: 0; background: #252c2b; background-position: center; background-size: cover; background-repeat: no-repeat; transform-origin: var(--zoom-x,50%) var(--zoom-y,50%); transition: transform 1s var(--ease), filter .8s var(--ease); }
.scene-film { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; pointer-events: none; }
.scene-film.is-visible { opacity: 1; }
.return-film { opacity: 0; pointer-events: none; }
.return-film.is-visible { opacity: 1; }
body[data-state="page"] .scene { transform: scale(2.1); filter: blur(5px) brightness(.6); }
body[data-media="fallback"] .scene-film { opacity: 0; }
.site-header { position: absolute; inset: 24px 36px auto; display: flex; align-items: center; gap: 20px; z-index: 10; pointer-events: none; }
.site-header > * { pointer-events: auto; }
.brand { flex: none; width: 76px; height: 76px; padding: 0; background: transparent; }
.brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
.header-caption { font-size: 12px; line-height: 1.5; max-width: 170px; letter-spacing: .04em; text-shadow: 0 1px 10px #000; }
.index-toggle { margin-left: auto; display: flex; align-items: center; gap: 22px; min-height: 48px; padding: 0 18px; background: rgb(18 36 41 / .64); border: 1px solid rgb(255 255 255 / .35); font-size: 13px; }
.menu-icon { display: grid; gap: 6px; width: 20px; }
.menu-icon i { width: 20px; height: 1px; background: currentColor; transition: transform .25s; }
.index-toggle:hover .menu-icon i:first-child { transform: translateX(3px); }
.index-toggle:hover .menu-icon i:last-child { transform: translateX(-3px); }
.intro { position: absolute; left: 7.3vw; bottom: 14vh; width: min(740px,70vw); transition: opacity .4s, transform .8s var(--ease); }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 11px; line-height: 1.5; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; }
.accent-line { height: 1px; width: 34px; background: var(--orange); }
.intro h1 { margin: 22px 0 30px; font-size: clamp(48px,5.3vw,94px); font-weight: 400; letter-spacing: -.055em; line-height: .98; }
.intro-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 620px; }
.intro-bottom > p { margin: 0; font-size: 14px; line-height: 1.6; }
.enter-button { display: flex; align-items: center; gap: 14px; text-align: left; font-size: 13px; padding: 5px; }
.enter-button small { display: block; margin-top: 5px; color: #d0d9d8; font-size: 10px; }
.circle-arrow { display: grid; place-items: center; width: 49px; height: 49px; border: 1px solid rgb(255 255 255 / .65); border-radius: 50%; font-size: 24px; transition: color .2s, background .2s; }
.enter-button:hover .circle-arrow { color: var(--navy); background: var(--paper); }
body:not([data-state="intro"]) .intro { opacity: 0; transform: translateY(25px); pointer-events: none; visibility: hidden; }
.scene-footer { position: absolute; bottom: 28px; left: 36px; right: 36px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; letter-spacing: .03em; text-shadow: 0 1px 5px #111; }
.scene-footer a { display: flex; gap: 30px; padding: 8px 0; }
body:not([data-state="intro"]) .scene-footer { display: none; }
.desk-ui { position: absolute; inset: 0; pointer-events: none; }
.desk-ui button, .desk-ui a { pointer-events: auto; }
.desk-bottom { position: absolute; bottom: 20px; left: 36px; right: 36px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; gap: 20px; text-shadow: 0 1px 5px #111; }
.desk-bottom p { font-size: 12px; }
.desk-bottom p span { margin-left: 20px; }
.text-button { padding: 12px 0; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 12px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 5px; }
.five-pages { text-transform: uppercase; letter-spacing: .12em; }
.paper-hotspots { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .45s; }
body[data-state="menu"] .paper-hotspots { opacity: 1; }
.paper-hit { position: absolute; display: block; color: var(--navy); pointer-events: auto; border: 1px solid transparent; background: transparent; transition: background .25s, border-color .25s, box-shadow .25s; }
.paper-hit:hover, .paper-hit:focus-visible { background: rgb(255 242 214 / .16); border-color: var(--orange); box-shadow: 0 0 0 1px rgb(215 102 41 / .25); }
.paper-hit .hit-indicator { position: absolute; top: -15px; right: -15px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; box-shadow: 0 2px 6px #0003; font-size: 17px; transition: background .2s, transform .2s; }
.paper-hit:hover .hit-indicator { background: var(--orange); transform: rotate(45deg); }
.hit-title { position: absolute; left: 0; bottom: calc(100% + 12px); padding: 8px 12px; color: #fff; background: var(--navy); font-size: 11px; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.paper-hit:hover .hit-title, .paper-hit:focus-visible .hit-title { opacity: 1; transform: none; }
.mobile-directory { display: none; }
.transition-ui { position: absolute; left: 50%; bottom: 30px; width: min(440px,calc(100% - 48px)); transform: translateX(-50%); display: flex; align-items: center; gap: 16px; font-size: 10px; letter-spacing: .03em; padding: 9px 14px; background: rgb(13 29 32 / .76); }
.transition-ui > span:first-child { white-space: nowrap; }
.transition-track { width: 65px; height: 1px; flex: 1; background: #ffffff50; }
.transition-track > span { display: block; height: 1px; background: var(--paper); width: 100%; transform-origin: left; transform: scaleX(0); }
.transition-ui .text-button { font-size: 10px; margin-left: auto; gap: 8px; white-space: nowrap; }
.media-message { position: absolute; max-width: 340px; padding: 12px; bottom: 94px; right: 24px; background: var(--paper); color: var(--navy); font-size: 13px; line-height: 1.5; }
dialog { border: 0; }
dialog::backdrop { background: rgb(9 24 28 / .68); backdrop-filter: blur(8px); }
.index-dialog { width: calc(100% - 48px); max-width: 1380px; max-height: calc(100dvh - 48px); padding: 32px 5vw; margin: auto; overflow-y: auto; color: var(--navy); background: var(--paper); }
.directory-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.close-button { display: flex; align-items: center; gap: 24px; min-height: 44px; font-size: 12px; padding: 8px; }
.close-button span { font-size: 28px; font-weight: 300; }
.index-dialog h2 { font-size: clamp(35px,4.3vw,70px); line-height: 1; letter-spacing: -.055em; font-weight: 400; margin: 22px 0 36px; }
#directory { border-top: 1px solid var(--line); }
.directory-link { display: grid; grid-template-columns: 44px 1fr 40px; align-items: center; gap: 20px; min-height: 65px; border-bottom: 1px solid var(--line); transition: color .2s, padding .25s; }
.directory-link > span:first-child { font-family: monospace; font-size: 11px; color: var(--muted); }
.directory-link > span:nth-child(2) { font-size: clamp(20px,2.6vw,38px); letter-spacing: -.04em; }
.directory-link > span:last-child { font-size: 26px; text-align: right; }
.directory-link:hover { padding-left: 8px; color: #b04b17; }
.directory-footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 4px; font-size: 11px; }
.paper-page { position: fixed; z-index: 20; inset: 24px; display: flex; flex-direction: column; color: var(--navy); background: var(--paper); box-shadow: 0 10px 90px #0006; overflow: hidden; transform-origin: top left; }
.paper-toolbar { display: flex; align-items: center; gap: 24px; flex-shrink: 0; height: 68px; padding: 0 clamp(20px,4vw,70px); border-bottom: 1px solid var(--line); }
.page-index { margin-left: auto; }
#page-counter { font-family: monospace; letter-spacing: .1em; font-size: 11px; }
.close-page { font-size: 28px; width: 44px; height: 44px; flex: none; }
.paper-scroll { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-color: #929d94 transparent; scrollbar-width: thin; }
#page-content { max-width: 1440px; margin: 0 auto; padding: 0 clamp(24px,6vw,100px); }
.paper-scroll:focus-visible { outline-offset: -4px; }
.project-dialog { max-width: 1050px; width: calc(100% - 48px); max-height: calc(100dvh - 48px); padding: 24px; background: var(--paper); color: var(--navy); overflow-y: auto; }
.project-dialog > .close-button { margin-left: auto; }
.project-dialog img { width: 100%; max-height: 55vh; object-fit: cover; }
.project-dialog h2 { font-size: clamp(28px,4vw,56px); font-weight: 400; letter-spacing: -.045em; margin: 24px 0 12px; }
.project-dialog p { max-width: 65ch; line-height: 1.65; }
.project-dialog a { display: inline-flex; padding: 14px 0; text-decoration: underline; text-underline-offset: 5px; font-size: 13px; }
.noscript { position: fixed; inset: 0; z-index: 100; background: var(--paper); color: var(--navy); padding: 10vw; }
.desk-actions { display: flex; align-items: center; gap: 24px; }
.desk-team-link { text-decoration: none; }
@media (max-width: 760px) { .desk-bottom .five-pages { display: none; } .desk-actions { width: 100%; justify-content: space-between; gap: 16px; } .mobile-directory .directory-link { min-height: 49px; } }
@media (min-width: 1900px) { .intro { bottom: 16vh; } }
@media (max-width: 760px) {
  .site-header { inset: max(18px,env(safe-area-inset-top)) 20px auto; gap: 13px; }
  .brand { width: 59px; height: 59px; }
  .header-caption { max-width: 125px; font-size: 10px; line-height: 1.45; }
  .index-toggle { padding: 0 11px; gap: 14px; font-size: 12px; background: rgb(18 36 41 / .8); }
  .intro { left: 24px; right: 24px; bottom: 18vh; width: auto; }
  .intro h1 { font-size: clamp(44px,9.5vw,66px); line-height: 1.02; margin: 22px 0 28px; }
  .intro .eyebrow { font-size: 9px; letter-spacing: .12em; }
  .intro-bottom { align-items: flex-start; flex-direction: column; gap: 25px; }
  .intro-bottom > p { font-size: 13px; }
  .scene-footer { bottom: max(18px,env(safe-area-inset-bottom)); left: 24px; right: 24px; font-size: 10px; }
  .scene-footer a { max-width: 150px; gap: 10px; }
  .desk-ui { overflow: auto; pointer-events: auto; }
  .mobile-directory { display: block; position: absolute; left: 12px; right: 12px; bottom: 76px; padding: 12px 20px 4px; color: var(--navy); background: rgb(245 242 233 / .97); }
  .mobile-directory .directory-link { min-height: 55px; grid-template-columns: 20px 1fr 22px; gap: 12px; }
  .mobile-directory .directory-link > span:nth-child(2) { font-size: 19px; letter-spacing: -.035em; line-height: 1.1; padding: 8px 0; }
  .mobile-directory .directory-link > span:last-child { font-size: 20px; }
  .mobile-directory .directory-link:last-child { border: 0; }
  .desk-bottom { left: 24px; right: 24px; bottom: max(14px,env(safe-area-inset-bottom)); font-size: 11px; }
  .desk-bottom p { display: none; }
  .desk-bottom .text-button { font-size: 11px; }
  .paper-hotspots { display: none; }
  .transition-ui { bottom: max(25px,env(safe-area-inset-bottom)); flex-wrap: wrap; column-gap: 12px; row-gap: 0; }
  .transition-ui > span:first-child { font-size: 10px; }
  .transition-ui .text-button { min-height: 34px; font-size: 9px; }
  .paper-page { inset: 8px; }
  .paper-toolbar { height: 62px; padding: 0 16px; gap: 10px; }
  .paper-toolbar .text-button { font-size: 11px; gap: 8px; }
  .page-index { font-size: 10px !important; }
  #page-counter { display: none; }
  .close-page { width: 32px; }
  #page-content { padding: 0 24px; }
  .index-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 20px 24px; }
  .index-dialog h2 { margin-top: 35px; font-size: 39px; }
  .index-dialog .directory-link { grid-template-columns: 24px 1fr 28px; gap: 14px; min-height: 70px; }
  .index-dialog .directory-link > span:nth-child(2) { font-size: 25px; }
  .directory-footer { flex-direction: column; gap: 12px; line-height: 1.5; }
  .project-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 16px; }
}
@media (max-height: 570px) and (min-width: 761px) {
  .site-header { top: 14px; }
  .brand { width: 52px; height: 52px; }
  .intro { bottom: 15vh; }
  .intro h1 { font-size: 56px; margin: 15px 0; }
  .intro .eyebrow { margin: 0; }
}
@media (max-width: 760px) and (max-height: 520px) {
  .intro { bottom: 85px; left: 28px; }
  .intro h1 { font-size: 38px; margin: 8px 0; }
  .intro-bottom { flex-direction: row; align-items: center; max-width: 600px; }
  .intro .eyebrow, .header-caption { display: none; }
  .mobile-directory { inset: 90px 20px 58px; overflow-y: auto; }
  .mobile-directory .directory-link { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Native portrait compositions retain the paper navigation instead of covering
   the scene with the former mobile directory. All geometry comes from its
   measured render and uses the same cover transform as the video and stills. */
body[data-office-portrait="true"] .mobile-directory { display: none; }
body[data-office-portrait="true"] .paper-hotspots { display: block; }
body[data-office-portrait="true"] .desk-ui { pointer-events: none; overflow: visible; }
body[data-office-portrait="true"] .desk-bottom {
  inset: auto max(20px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));
}
body[data-office-portrait="true"] .desk-actions { width: auto; }
body[data-office-portrait="true"] .desk-team-link,
body[data-office-portrait="true"] .desk-lab-link,
body[data-office-portrait="true"] .desk-bottom p,
body[data-office-portrait="true"] .desk-bottom .five-pages { display: none; }
body[data-office-portrait="true"] .site-header {
  top: max(16px,env(safe-area-inset-top));
  left: max(20px,env(safe-area-inset-left));
  right: max(20px,env(safe-area-inset-right));
}
body[data-office-portrait="true"] .brand { width: clamp(52px,9vw,76px); height: clamp(52px,9vw,76px); }
body[data-office-portrait="true"] .header-caption { background: transparent; }
body[data-office-portrait="true"] .paper-hit .hit-indicator {
  top: 50%; right: 5%; width: 20px; height: 20px; font-size: 12px;
  transform: translateY(-50%); background: rgb(25 61 72 / .74); box-shadow: none;
}
body[data-office-portrait="true"] .paper-hit:hover .hit-indicator { background: var(--orange); }
body[data-office-portrait="true"] .paper-hit:focus-visible { outline-offset: -4px; background: rgb(255 242 214 / .23); }
body[data-office-portrait="true"] .hit-title { display: none; }
body[data-office-portrait="true"] .transition-ui { bottom: max(16px,env(safe-area-inset-bottom)); }
body[data-office-portrait="true"] .scene-footer {
  bottom: max(18px,env(safe-area-inset-bottom));
  left: max(24px,env(safe-area-inset-left));
  right: max(24px,env(safe-area-inset-right));
}
@media (max-height: 640px) and (max-aspect-ratio: 11/10) {
  body[data-office-portrait="true"] .header-caption { display: none; }
  body[data-office-portrait="true"] .intro { bottom: 105px; }
  body[data-office-portrait="true"] .intro h1 { font-size: 42px; margin: 18px 0; }
  body[data-office-portrait="true"] .intro-bottom { gap: 14px; }
  body[data-office-portrait="true"] .intro-bottom > p { display: none; }
}

/* The compact landscape render keeps the original five physical menu sheets
   visible after tablet rotation; the two existing lower links complete it. */
body[data-office-compact="true"] .mobile-directory { display: none; }
body[data-office-compact="true"] .paper-hotspots { display: block; }
body[data-office-compact="true"] .desk-ui { pointer-events: none; overflow: visible; }
body[data-office-compact="true"] .desk-bottom {
  left: max(24px,env(safe-area-inset-left));
  right: max(24px,env(safe-area-inset-right));
  bottom: max(10px,env(safe-area-inset-bottom));
}
body[data-office-compact="true"] .desk-bottom p,
body[data-office-compact="true"] .desk-bottom .five-pages { display: none; }
body[data-office-compact="true"] .paper-hit .hit-indicator {
  top: 50%; right: 5%; width: 20px; height: 20px; font-size: 12px;
  transform: translateY(-50%); background: rgb(25 61 72 / .74); box-shadow: none;
}
body[data-office-compact="true"] .paper-hit:hover .hit-indicator { background: var(--orange); }
body[data-office-compact="true"] .paper-hit:focus-visible { outline-offset: -4px; background: rgb(255 242 214 / .23); }
body[data-office-compact="true"] .hit-title { display: none; }

/* The opening view uses links only, leaving the office visible. */
#intro.intro {
  top: max(116px,calc(env(safe-area-inset-top) + 94px));
  left: max(36px,env(safe-area-inset-left));
  right: max(36px,env(safe-area-inset-right));
  bottom: auto;
  width: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 28px;
}
#intro .sr-only { margin: 0; }
.intro-links { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 24px; }
.intro-links a, #intro .enter-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  padding: 8px 0;
  color: #f5f2e9;
  font-size: 13px;
  line-height: 1.35;
  text-shadow: 0 1px 8px rgb(0 0 0 / .8);
}
.intro-links a:hover { text-decoration: underline; text-underline-offset: 6px; }
#intro .enter-button { gap: 10px; }
#intro .enter-button:hover { color: #f2a16e; }
.nav-icon { display: inline-block; flex: none; width: 18px; height: 18px; vertical-align: middle; }
.text-button .nav-icon, .directory-link .nav-icon { display: block; }
.hit-indicator .nav-icon { width: 16px; height: 16px; }
body[data-state="menu"] .paper-hotspots { display: block; }
@media (max-width: 760px) {
  #intro.intro {
    top: max(98px,calc(env(safe-area-inset-top) + 82px));
    left: max(24px,env(safe-area-inset-left));
    right: max(24px,env(safe-area-inset-right));
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 0 20px;
  }
  .intro-links { display: contents; }
  .intro-links a, #intro .enter-button { font-size: 12px; }
}
@media (max-width: 760px) and (max-height: 650px) and (orientation: portrait) {
  #intro.intro { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 8px; top: 90px; }
  .intro-links a, #intro .enter-button { font-size: 11px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #intro.intro { top: max(76px,calc(env(safe-area-inset-top) + 64px)); left: 24px; right: 24px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0 16px; }
  .intro-links { display: contents; }
  .intro-links a, #intro .enter-button { font-size: 12px; }
  .site-header { top: max(8px,env(safe-area-inset-top)); left: max(16px,env(safe-area-inset-left)); right: max(16px,env(safe-area-inset-right)); }
  .brand { width: 44px; height: 44px; }
  .header-caption { display: none; }
  .desk-bottom { left: max(16px,env(safe-area-inset-left)); right: max(16px,env(safe-area-inset-right)); bottom: max(2px,env(safe-area-inset-bottom)); }
  .desk-bottom p, .desk-bottom .five-pages { display: none; }
  .desk-actions { width: 100%; justify-content: space-between; gap: 16px; }
  .desk-actions .text-button { padding: 6px 0; min-height: 44px; font-size: 11px; }
  .paper-hit .hit-indicator { top: 50%; right: 5%; width: 20px; height: 20px; transform: translateY(-50%); background: rgb(25 61 72 / .74); box-shadow: none; }
  .paper-hit .hit-indicator .nav-icon { width: 13px; height: 13px; }
}

/* Touch screens keep the existing Menu button instead of a second link menu. */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  #intro .intro-links { display: none; }
}
