@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Geist:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap");

:root {
  --ivory: #fff8ec;
  --paper: #eee5d2;
  --stone: #211b16;
  --copper: #d79a64;
  --edge: #fff6e77d;
  --ui: Geist, "Segoe UI", sans-serif;
  --display: "Cormorant Garamond", Georgia, serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: #253949; }
body { margin: 0; color: var(--ivory); font: 400 16px/1.5 var(--ui); }
a { color: inherit; text-underline-offset: .2em; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ivory); outline-offset: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link {
  position: fixed;
  z-index: 8;
  top: 12px;
  left: 12px;
  padding: 9px 15px;
  transform: translateY(-160%);
  background: var(--paper);
  color: var(--stone);
}
.skip-link:focus { transform: none; }

.journey-view, .journey-view > * {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.journey-view { z-index: -1; overflow: hidden; background: #263a49; }
.journey-scene { display: block; opacity: 0; }
.journey-view[data-live][data-journey-rendered] .journey-scene,
body:has(.journey-entry[open]) .journey-view[data-live][data-network-rendered] .journey-scene { opacity: 1; }
.journey-still { background: url("/images/journey/server-room.webp?v=4") center / cover; }
.journey-view[data-live][data-journey-rendered] .journey-still,
.journey-view[data-live][data-network-rendered] .journey-still { opacity: 0; transition: opacity .33s ease; }
.journey-shade {
  background:
    linear-gradient(90deg, #091421d6, #111d2b8a 28%, transparent 75%),
    linear-gradient(0deg, #0a141a75, transparent 27%, transparent 84%, #1021315c);
}

.journey-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(15px, 2.9vw, 38px);
  pointer-events: none;
}
.journey-header-group { display: flex; align-items: center; gap: 5px; }
.journey-pill {
  display: inline-flex;
  min-height: 40px;
  min-width: 40px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #fff6ea80;
  border-radius: 999px;
  background: #fff4e3eb;
  color: #28221e;
  font: 650 11px/1.2 var(--ui);
  letter-spacing: .045em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: auto;
}
.journey-pill:hover { background: #fffaf2; }
.journey-brand { display: inline-flex; border-radius: 9px; pointer-events: auto; }
.journey-brand img { display: block; }

.journey-nav {
  position: fixed;
  z-index: 4;
  top: 50%;
  right: clamp(12px, 2.9vw, 38px);
  translate: 0 -50%;
}
.journey-nav ol { position: relative; display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.journey-nav ol::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 50%; width: 1px; background: var(--edge); }
.journey-nav a {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #fff6e73d;
  border-radius: 50%;
  background: #152430d9;
  color: var(--ivory);
  font: 500 11px/1 var(--mono);
  text-decoration: none;
}
.journey-nav a:hover, .journey-nav [aria-current="location"] { border-color: var(--ivory); background: var(--ivory); color: #24201d; }
.journey-nav a[data-run-state="active"] { box-shadow: 0 0 0 2px #ffc08b; }
.journey-nav a[data-run-state="failed"] { box-shadow: 0 0 0 2px #ff9789; }

.journey-chapter {
  display: flex;
  align-items: center;
  min-height: 112svh;
  padding: 108px max(74px, 6vw) 138px max(28px, 6vw);
  scroll-margin-block-start: 0;
}
.journey-chapter:first-child { min-height: 100svh; }
.journey-chapter:last-child { min-height: 94svh; }
.chapter-copy { max-width: min(610px, 50vw); }
.chapter-copy .chapter-number {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 8px;
  background: linear-gradient(125deg, #f2ca9a, var(--copper));
  color: #24160f;
  border-radius: 2px;
  font: 500 10px/1.25 var(--mono);
  letter-spacing: .17em;
  text-transform: uppercase;
  text-shadow: none;
}
.chapter-copy h1, .chapter-copy h2 {
  margin: 0;
  font: 600 clamp(49px, 7.3vw, 112px)/.90 var(--display);
  letter-spacing: -.04em;
  text-shadow: 0 2px 28px #051013ab;
}
.chapter-copy p:not(.chapter-number) {
  max-width: 37ch;
  margin: 22px 0 0;
  color: var(--ivory);
  font-size: clamp(14px, 1.35vw, 18px);
  text-shadow: 0 2px 10px #000d;
}
.chapter-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  margin-top: 23px;
  font: 700 11px/1.4 var(--ui);
  letter-spacing: .095em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 2px 8px #0009;
}
.chapter-link > span, .journey-next > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--edge);
  border-radius: 50%;
  background: #0d1b2169;
  font: 400 20px/1 var(--ui);
}
.chapter-link:hover > span, .journey-next:hover > span { background: var(--ivory); color: var(--stone); text-shadow: none; }
.scenario-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.scenario-button, .release-follow, .release-dismiss { border-radius: 999px; }
.scenario-button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #ffd2a5b3;
  background: #f4c398;
  color: #23180f;
  font-size: 13px;
  font-weight: 700;
}
.scenario-button:hover { background: #ffe2c2; }
.scenario-button span { margin-left: 5px; }
.scenario-secondary { border-color: #ffeed188; background: #102332bd; color: var(--ivory); }
.scenario-secondary:hover { background: #294256; }
.scenario-button[aria-disabled="true"] { opacity: .62; cursor: default; }
.release-console {
  position: fixed;
  z-index: 5;
  inset: auto auto max(16px, 3vh) max(16px, 6vw);
  width: min(395px, calc(100% - 32px));
  padding: 12px 14px;
  border: 1px solid #d8eeff44;
  border-radius: 13px;
  background: #0e2030f5;
  box-shadow: 0 8px 35px #06101885;
}
.release-console-head { display: flex; align-items: center; gap: 7px; }
.release-console-head span { margin-right: auto; color: #d4dfec; font-size: 12px; font-weight: 600; }
.release-follow, .release-dismiss { min-height: 34px; padding-inline: 10px; border: 1px solid #a6c1d15c; background: #132c3d; font-size: 12px; }
.release-follow[aria-pressed="true"] { border-color: #ffc296a3; color: #ffcca4; }
.release-dismiss { min-width: 34px; padding: 0; font-size: 18px; }
.release-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 15px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  color: #fff6e7;
  font-size: 12px;
  text-shadow: 0 2px 8px #000;
}
.release-stages li { display: inline-flex; align-items: center; gap: 5px; }
.release-stages li::before {
  content: "";
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.release-stages li[data-state="active"] { color: #ffd1a5; text-decoration: underline; text-underline-offset: 3px; }
.release-stages li[data-state="complete"]::before { border-color: #81e2c6; background: #81e2c6; }
.release-stages li[data-state="failed"] { color: #ffab9d; }
.release-stages li[data-state="failed"]::before { background: #ffab9d; }
.release-status { min-height: 1.55em; margin: 7px 0 0; color: var(--ivory); font-size: 13px; }

.journey-next {
  position: fixed;
  z-index: 2;
  bottom: clamp(18px, 4.4vh, 42px);
  left: 50%;
  translate: -50%;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-decoration: none;
}
.journey-next small { font: 700 10px/1 var(--ui); text-transform: uppercase; letter-spacing: .12em; text-shadow: 0 2px 8px #000; }
.journey-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 21px max(22px, 6vw) 29px;
  border-top: 1px solid #fff6e73d;
  background: #111d28ec;
  font-size: 12px;
}
.journey-footer p { margin: 0; }
.journey-footer .footer-brand { display: flex; align-items: center; gap: 8px; }
.journey-footer nav { display: flex; flex-wrap: wrap; gap: 11px 19px; }
.journey-footer a { text-decoration: none; }
.journey-footer a:hover { text-decoration: underline; }

.journey-entry {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 22px;
  border: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 46%, #09152174 8%, #0b182525 62%, #07142070);
  color: var(--ivory);
  text-align: center;
}
.journey-entry[open] { display: grid; place-items: center; }
.journey-entry::backdrop { background: transparent; }
body:has(.journey-entry[open]) > :not(.journey-view, .journey-entry),
body:has(.journey-entry[open]) .journey-shade { visibility: hidden; }
.entry-center { position: relative; }
.entry-center p {
  margin: 0 0 22px;
  font: 600 clamp(51px, 9vw, 106px)/.95 var(--display);
  letter-spacing: -.058em;
  text-shadow: 0 4px 34px #050e19cf;
}
.entry-center button {
  min-height: 48px;
  padding: 9px 19px;
  border: 1px solid #fff0d99c;
  border-radius: 999px;
  background: #fff0d9;
  color: #292019;
  font: 650 12px/1.2 var(--ui);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.entry-center button:hover { background: #fff6e7; }
.entry-center button span { margin-left: 7px; }
.entry-links { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.entry-read { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 5px; font-size: 13px; text-shadow: 0 2px 8px #06121c; }
.entry-contact { position: absolute; bottom: 27px; font-size: 13px; text-shadow: 0 2px 8px #06121c; }
html:has(.journey-entry[open]) { overflow: hidden; }
#journey-title:focus { outline: none; }

@media (max-width: 720px) {
  .journey-chapter { min-height: 104svh; padding: 94px 63px 140px 23px; align-items: end; }
  .journey-chapter:last-child { min-height: 97svh; }
  .chapter-copy { max-width: 100%; }
  .chapter-copy h1, .chapter-copy h2 { font-size: clamp(42px, 11vw, 64px); }
  .chapter-copy p:not(.chapter-number) { max-width: 32ch; margin-top: 15px; }
  .chapter-link { margin-top: 16px; }
  .journey-nav { right: 9px; }
  .journey-nav a { width: 34px; height: 40px; }
  .journey-nav ol { gap: 6px; }
  .journey-next { left: auto; right: 8px; translate: none; }
  .journey-next > span { width: 42px; height: 42px; background: #142439d9; }
  .journey-next small { display: none; }
  .journey-shade { background: linear-gradient(0deg, #0a1624f0, #0a1624a3 31%, transparent 72%, #0b182c54); }
  .journey-still { background-position: 78% center; }
  body:has(.release-console:not([hidden])) .journey-next { visibility: hidden; }
  .release-console { inset-inline: 12px; width: auto; }
  .release-stages { column-gap: 10px; }
  .journey-footer { padding-bottom: 75px; }
}

@media (max-height: 660px) and (max-width: 720px) {
  .journey-chapter { min-height: max(105svh, 585px); }
}
@media (max-width: 420px) {
  .journey-header { padding-inline: 10px; }
  .journey-pill { padding-inline: 8px; font-size: 10px; }
}
@media (max-width: 375px) {
  .journey-about { display: none; }
}
@media (max-width: 360px) {
  .journey-chapter { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .journey-view[data-live] .journey-still { transition: none; }
}

.journey-entry[open] { justify-items: start; padding-inline: max(6vw, calc((100vw - 1240px)/2)); text-align: left; background: linear-gradient(90deg,#06101ad6 0%,#07142078 36%,transparent 70%); }
.entry-links { justify-content: start; }
.entry-center { max-width: 42rem; }
.entry-contact { left: max(6vw, calc((100vw - 1240px)/2)); }
@media (max-width: 720px) {
  .journey-entry[open] { align-items: end; padding: 24px 24px max(14vh, 80px); background: linear-gradient(0deg,#06101af5 0%,#06101a94 35%,transparent 72%); }
  .entry-contact { left: 24px; }
}

.door-approach, .door-light { display: none; }
@media (prefers-reduced-motion: no-preference) {
  body:has(.journey-view[data-live][data-journey-rendered]) .door-approach { display: block; height: 100svh; }
  .crossing-door .door-light { display: block; position: fixed; inset: 0; z-index: 30; background: #fff3db; opacity: var(--door-light, 0); pointer-events: none; }
  .crossing-door :is(.portfolio-bar, main, .release-console, .journey-next, .journey-nav, .journey-footer, .journey-shade) { opacity: 0; transition: opacity .42s ease; pointer-events: none; }
}

/* The moving tray supplies the screen-space origin of the reading panel. */
.portfolio-release { --travel-chapter-height:140svh; }
@media (max-width:720px) {
  .portfolio-release { --travel-chapter-height:130svh; }
}
@media screen and (prefers-reduced-motion:no-preference) and (min-height:550px) and (min-width:320px) {
  .portfolio-release:has(.journey-view[data-live][data-journey-rendered]) .journey-chapter {
    min-height:var(--travel-chapter-height);
  }
}
.journey-view .drawer-leader { display:none; }
@media screen and (prefers-reduced-motion:no-preference) {
  .presenting-drawers .journey-shade { background:linear-gradient(0deg,#08151c60,transparent 50%); }
  .presenting-drawers .journey-view .drawer-leader:not([hidden]) {
    display:block; inset:0 auto auto 0; width:1px; height:2px; background:#b6e6df;
    box-shadow:0 0 5px #91d2c5; transform-origin:0 50%;
  }
  .presenting-drawers .journey-chapter .chapter-copy {
    width:min(410px,calc(100vw - 28px)); max-width:100%;
    padding:clamp(14px,1.5vw,22px); border:1px solid #91b5b374; border-top-color:#b6ded5;
    border-radius:4px 4px 12px 12px; background:linear-gradient(150deg,#1f363bf5,#101f27f8 64%);
    box-shadow:inset 0 1px #dbf7ef21,0 8px 26px #020a0f60;
    opacity:0; pointer-events:none;
  }
  .presenting-drawers .journey-chapter .drawer-presented {
    position:fixed; z-index:2; top:0; left:0; max-width:none; will-change:transform,opacity;
    max-height:calc(100dvh - 154px); overflow-y:auto;
  }
  .presenting-drawers .journey-chapter .chapter-copy::before { content:none; }
  .presenting-drawers .chapter-copy .chapter-number { margin:0 0 8px; }
  .presenting-drawers .chapter-copy :is(h1,h2) { font-size:clamp(34px,4.3vw,56px); line-height:.97; }
  .presenting-drawers .chapter-copy p:not(.chapter-number) { max-width:none; margin:12px 0 0; font-size:clamp(14px,1.1vw,16px); }
  .presenting-drawers .chapter-copy :is(.scenario-actions,.chapter-link) { margin-top:12px; }
}
