#journey{height:390svh;height:390dvh}.still #journey{height:100svh;height:100dvh}.site-header{position:fixed}.arrival{bottom:19%}.controls{bottom:18px}.past-intro .controls{visibility:hidden;pointer-events:none}.site-footer button{color:inherit}.arrival p{line-height:1.6}.site-header>nav{margin-left:auto}.site-header .menu-toggle{background:transparent}.site-header .wordmark{font-size:24px}#viewport canvas{position:static}@media(max-width:760px){.site-header{left:4vw;right:4vw;padding:8px 12px;gap:9px}.site-header>nav,.site-header .nav-contact{display:none}.site-header #motion{margin-left:auto;font-size:10px;padding:8px}.site-header .menu-toggle{display:block;font-size:11px}.arrival{bottom:23%}#journey{height:350svh;height:350dvh}}#opening-frames{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}.still .controls{display:block}.still .controls>span{display:none}
/* Chapter navigation belongs to the cinematic controls, not the website menu. */
.controls{display:grid;grid-template-columns:1fr auto;gap:4px 20px}
.story-chapters{grid-column:1/-1;display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid #fff2ca26;padding-bottom:6px;margin-bottom:3px}
.story-chapters button{min-height:44px;font-size:12px;padding:8px 15px;border-color:transparent;background:transparent;color:#fff2d6b8}
.story-chapters button:hover{background:#fff2cf15;color:#fff6e5}
.story-chapters button[aria-current]{background:#fff2cf24;border-color:#fff2ca40;color:#fff6e5}
.controls #hint{font-size:12px}.controls>div{margin-top:0}.arrival{bottom:25%}
@media(max-width:700px){.controls{display:grid;grid-template-columns:1fr;padding:10px 12px;gap:5px}.story-chapters{gap:0;justify-content:space-between}.story-chapters button{font-size:11px;padding:6px 9px}.controls #hint{font-size:11px}.controls>div{width:100%}.arrival{bottom:30%}.arrival h1{font-size:36px}.arrival p{margin:14px 0}}
.still .controls{display:grid}

.stage{background:#080a0b}


/* Each line passes the reader vertically while the film stays pinned. */
#journey { height: 750svh; height: 750dvh; }
.still #journey { height: 100svh; height: 100dvh; }
#journey .stage {
  background: #080a0b url("assets/golden/frames-desktop/frame-000.webp") center / cover no-repeat;
}
.floor-copy, .floor-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.floor-shade {
  z-index: 4;
  opacity: var(--floor-shade, 0);
  background: radial-gradient(ellipse at 11% 68%, #110b08d9, #110b0873 33%, transparent 70%);
}
.floor-copy { z-index: 5; }
.floor-copy p {
  position: absolute;
  left: clamp(32px, 8vw, 150px);
  bottom: clamp(132px, 23dvh, 240px);
  margin: 0;
  color: #fff7e2;
  font: 500 clamp(48px, 6.3vw, 96px) / .98 Display, sans-serif;
  letter-spacing: -.052em;
  text-shadow: 0 3px 18px #170f0bd9;
}
.arrival h2 {
  margin: 0;
  font: 500 clamp(42px, 5vw, 72px) / 1.02 Display, sans-serif;
  letter-spacing: -.04em;
}
.arrival p { text-wrap: balance; }
#services.build-intro h1 {
  margin: 0;
  font: 500 clamp(38px, 4.6vw, 65px) / 1 Display, sans-serif;
  letter-spacing: -.05em;
  text-wrap: balance;
}
.story-skip {
  padding-block: 11px;
  color: #fff6e5;
  white-space: nowrap;
  font-size: 12px;
}
@media (max-width: 760px) {
  #journey { height: 540svh; height: 540dvh; }
  .floor-copy p {
    left: 7vw;
    right: 7vw;
    bottom: max(142px, 25dvh);
    font-size: clamp(38px, 10vw, 60px);
  }
  .floor-shade {
    background: linear-gradient(0deg, #0c0805e6, #0c08058f 30%, transparent 70%);
  }
  .arrival { bottom: max(152px, 27dvh); }
  .arrival h2 { font-size: 40px; }
}
@media (max-width: 380px) {
  .story-chapters button { padding-inline: 6px; }
  .story-tools { gap: 9px !important; }
}

.crystal-reveal {
  z-index: 1;
  opacity: 0;
  overflow: hidden;
  background: #100906;
}
.crystal-plate,
.crystal-plate img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.crystal-plate {
  transform: translateY(calc(var(--crystal-travel, 0) * -2.8%)) scale(calc(1.035 + var(--crystal-travel, 0) * .065));
}
.crystal-reveal::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(0deg, #0a0503e8, #0a05035a 34%, transparent 67%);
}
#viewport #crystal-frames {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.arrival h2 { text-shadow: 0 3px 20px #150706; }
.arrival p { color: #fff3df; }

#hero-liquid,
#hero-liquid-fallback,
#hero-dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

/* The settled logo dissolves into the same dark palette as the service pages. */
.crystal-site {
  --basalt: #100906;
  --ember-paper: #fff2e0;
  --ember-muted: #d9baa4;
  --ember-gold: #ffcb88;
  --ember-line: #9a594b5e;
  --ember-panel: #21130f;
  background: var(--basalt);
  color: var(--ember-paper);
}
#journey { --drain-viewports: .88; }
html:not(.still) .ready #journey {
  height: calc(750dvh + 100dvh * var(--drain-viewports));
}
#journey .stage { touch-action: pan-y pinch-zoom; }
#interactive-logo,
.crystal-handoff {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#interactive-logo { z-index: 4; transform-origin: 50% 38%; }
.crystal-handoff {
  z-index: 4;
  opacity: var(--crystal-drain, 0);
  background: linear-gradient(0deg, var(--basalt) 2%, #100906c9 24%, #1009064d 49%, transparent 77%);
}
.crystal-site .controls { opacity: var(--controls-exit, 1); }
.crystal-site .light-section,
.crystal-site .automation-chapter,
.crystal-site .demo-invite,
.crystal-site .contact-section {
  background: transparent;
  color: var(--ember-paper);
}
.crystal-site main {
  background:
    radial-gradient(ellipse 56vw 390px at 89% 6%, #5a2c182e, transparent 100%),
    radial-gradient(ellipse 54vw 620px at 2% 25%, #621e251e, transparent 100%),
    radial-gradient(ellipse 70vw 640px at 98% 55%, #743d1527, transparent 100%),
    var(--basalt);
}
.crystal-site .crystal-services {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(var(--basalt), transparent 24%),
    radial-gradient(ellipse 48% 75% at 1% 32%, #78222b37, transparent),
    radial-gradient(ellipse 64% 78% at 100% 48%, #9d4d202a, transparent);
}
.crystal-site #services { background: transparent; color: var(--ember-paper); }
html:not(.still) .crystal-services::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 65px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62px 1px at 50% 21px, #b99c9a82, transparent 100%),
    radial-gradient(ellipse 140px 16px at 50% 23px, #8753442f, transparent 100%),
    linear-gradient(#c8a9bc73, transparent) top center / 1px 21px no-repeat;
}
.crystal-site :is(.project-switch button, .service-view .service-fit, .workspace-title > span,
  .work-selection > p, .work-image-caption, .project-scope li, .work-bottom > p, .privacy,
  .contact-section .form-note, #contact-status) { color: var(--ember-muted); }
.crystal-site .project-switch button[aria-pressed=true] { color: var(--ember-gold); }
.crystal-site .plain-list { color: var(--ember-muted); }
.crystal-site .light-section p,
.crystal-site .automation-heading > p,
.crystal-site .automation-close p,
.crystal-site .demo-invite p,
.crystal-site .contact-section p,
.crystal-site .site-footer > div p { color: var(--ember-muted); }
.crystal-site .chapter-copy ul,
.crystal-site .service-copy ul,
.crystal-site .work-section .project-open { color: var(--ember-gold); }
.crystal-site .service-choices button,
.crystal-site .work-selection button {
  background: #20120dc9;
  color: var(--ember-paper);
  border-color: var(--ember-line);
}
.crystal-site .service-choices button[aria-pressed=true],
.crystal-site .work-selection button[aria-pressed=true],
.crystal-site .workflow-rail button[aria-pressed=true] {
  background: #f0c18c;
  color: #2b150e;
  border-color: #f0c18c;
}
.crystal-site :is(.automation-chapter, .apps-chapter, .insights-chapter, .work-section, .demo-invite, .contact-section) {
  border-top: 1px solid #77402e52;
}
.crystal-site :is(.work-image, .workflow-show, .process-list details, .service-workspace, .service-connection, .service-signal) {
  background: var(--ember-panel);
  border: 1px solid var(--ember-line);
  color: var(--ember-paper);
}
.crystal-site :is(.job-record, .connection-record, .connection-draft, .flow-paper, .briefing-note, .inspection-phone, .signal-reading) {
  background: #f6e4cf;
  color: #392019;
}
.crystal-site :is(.job-record, .connection-record, .connection-draft, .flow-paper, .briefing-note, .inspection-phone, .signal-reading) p {
  color: #664535;
}
.crystal-site .flow-message,
.crystal-site .job-follow,
.crystal-site .briefing-action,
.crystal-site .inspection-line,
.crystal-site .inspection-photos span {
  background: #ead3b9;
  color: #3f241b;
}
.crystal-site :is(.connection-message, .work-tags span, .project-tags span) {
  background: #47251c;
  color: #ffe0b8;
}
.crystal-site :is(.workflow-rail button, .flow-result > span, .flow-result > p, .flow-actions > p, .work-feature span, .signal-disc) { color: var(--ember-muted); }
.crystal-site :is(.pale-button, .pale-button:visited, .nav-contact, .arrival a, .flow-actions button, .contact-section button[type=submit]) {
  background: #f1ca98;
  color: #2f160c;
  border-color: #f1ca98;
}
.crystal-site :is(.contact-section input, .contact-section textarea, .contact-section select, .mobile-menu) {
  background: #21130e;
  color: var(--ember-paper);
  border-color: var(--ember-line);
}
.crystal-site :is(.contact-section label, .contact-section input::placeholder, .contact-section textarea::placeholder) { color: var(--ember-muted); }
.crystal-site .site-footer { background: #0c0604; }
body.crystal-site.past-intro .site-header { background: #1f100dea; }
.crystal-site :focus-visible { outline-color: var(--ember-gold); }
@media (max-width: 760px) {
  #journey { --drain-viewports: .75; }
  html:not(.still) .ready #journey { height: calc(540dvh + 100dvh * var(--drain-viewports)); }
}

.crystal-site .review-note { color: #b49382 !important; }
.crystal-services::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(620px, 76vh);
  pointer-events: none;
  background: url("assets/crystal-reveal/aftermath.webp") center 45% / cover;
  opacity: .20;
  mask-image: linear-gradient(transparent, #000 26%, #000 39%, transparent 100%);
}
@media (max-width: 760px) {
  .crystal-services::after {
    background-image: url("assets/crystal-reveal/aftermath-phone.webp");
    opacity: .15;
  }
}

/* Specular edges and refraction keep the controls in the crystal palette. */
.crystal-site {
  --glass-line: #f5ceac51;
  --glass-fill: linear-gradient(145deg, #fff1d426 0%, #b5857821 31%, #59312629 55%, #140c13a6 100%);
  --glass-depth: inset 0 1px 0 #fff1dc63, inset 0 -1px 0 #e5a68f27, 0 5px 16px #08030354;
}
.crystal-site .site-header,
.crystal-site .controls,
body.crystal-site.past-intro .site-header,
.crystal-site .mobile-menu {
  border: 1px solid var(--glass-line);
  background: var(--glass-fill), #130c0b80;
  box-shadow: var(--glass-depth);
  -webkit-backdrop-filter: blur(20px) saturate(154%);
  backdrop-filter: blur(20px) saturate(154%);
}
.crystal-site :is(.arrival a, .nav-contact, .pale-button, .flow-actions button, .contact-section button[type=submit],
  .service-choices button, .work-selection button, .workflow-rail button, .story-chapters button[aria-current=step], [id=quality], [id=motion]) {
  border: 1px solid var(--glass-line);
  background: var(--glass-fill), #25131180;
  box-shadow: var(--glass-depth);
  color: var(--ember-paper);
}
.crystal-site :is(.arrival a, .nav-contact, .pale-button, .flow-actions button, .contact-section button[type=submit],
  .service-choices button[aria-pressed=true], .work-selection button[aria-pressed=true],
  .workflow-rail button[aria-pressed=true]) {
  border-color: #ffdcb387;
  background: linear-gradient(149deg, #fff1d5ed, #e4b48bcf 48%, #b8785dad), #a4674f;
  color: #25120e;
}
@media (hover: hover) {
  .crystal-site :is(.arrival a, .nav-contact, .pale-button, .service-choices button, .work-selection button):hover {
    filter: brightness(1.14);
  }
}
.crystal-site .scroll-enter {
  align-self: center;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: #fff2de;
  font-size: 12px;
  text-decoration: none;
}
.crystal-site .scroll-enter[hidden] { display: none; }
.crystal-site .scroll-enter svg {
  width: 17px;
  height: 17px;
  stroke: #ffe0b9;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: enter-nudge 2s ease-in-out infinite;
}
@keyframes enter-nudge {
  0%, 100% { transform: translateY(-1px); }
  50% { transform: translateY(2px); }
}
#traveling-logo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
}
@media (prefers-reduced-motion: reduce) {
  .crystal-site .scroll-enter svg { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .crystal-site :is(.site-header, .controls, .mobile-menu) {
    background: #211310;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.crystal-site :is(.work-image, .workflow-show, .process-list details, .service-workspace, .service-connection, .service-signal) {
  border-color: var(--glass-line);
  background: var(--glass-fill), #21130f9e;
  box-shadow: var(--glass-depth);
}

.crystal-site #services:focus { outline: none; }
