:root {
  --interior-line: rgba(243, 240, 231, 0.1);
  --interior-brass-glow: rgba(184, 148, 88, 0.18);
  --interior-blue-glow: rgba(111, 143, 176, 0.16);
  --interior-panel-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
}

body.work-page,
body.about-page,
body.labs-page,
body.journal-page,
body.article-page,
body.case-study-page,
body.contact-page {
  position: relative;
  isolation: isolate;
}

body.work-page::before,
body.about-page::before,
body.labs-page::before,
body.journal-page::before,
body.article-page::before,
body.case-study-page::before,
body.contact-page::before,
body.work-page::after,
body.about-page::after,
body.labs-page::after,
body.journal-page::after,
body.article-page::after,
body.case-study-page::after,
body.contact-page::after {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: 0;
  pointer-events: none;
  filter: blur(82px);
  opacity: 0.8;
  will-change: transform;
}

body.work-page::before,
body.about-page::before,
body.labs-page::before,
body.journal-page::before,
body.article-page::before,
body.case-study-page::before,
body.contact-page::before {
  background:
    radial-gradient(circle at 16% 22%, rgba(111, 143, 176, 0.16), transparent 34%),
    radial-gradient(circle at 44% 78%, rgba(184, 148, 88, 0.12), transparent 28%);
  animation: interiorDriftA 22s ease-in-out infinite alternate;
}

body.work-page::after,
body.about-page::after,
body.labs-page::after,
body.journal-page::after,
body.article-page::after,
body.case-study-page::after,
body.contact-page::after {
  background:
    radial-gradient(circle at 82% 16%, rgba(184, 148, 88, 0.18), transparent 32%),
    radial-gradient(circle at 72% 62%, rgba(111, 143, 176, 0.1), transparent 30%);
  animation: interiorDriftB 28s ease-in-out infinite alternate;
}

@keyframes interiorDriftA {
  from {
    transform: translate3d(-2.5%, -1.5%, 0) scale(1);
  }

  to {
    transform: translate3d(2.5%, 2.2%, 0) scale(1.06);
  }
}

@keyframes interiorDriftB {
  from {
    transform: translate3d(1.5%, -2%, 0) scale(1);
  }

  to {
    transform: translate3d(-2%, 2.5%, 0) scale(1.05);
  }
}

#global-nav {
  position: fixed;
  z-index: 1000;
}

main,
.back-crumb,
#global-footer {
  position: relative;
  z-index: 1;
}

.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 1300;
  background: rgba(243, 240, 231, 0.06);
  pointer-events: none;
}

.page-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(111, 143, 176, 0.75), rgba(184, 148, 88, 0.95));
  box-shadow: 0 0 18px rgba(184, 148, 88, 0.35);
}

.work-hero,
.about-hero,
.labpage-hero,
.journal-hero,
.article-hero,
.case-hero,
.contact-hero {
  position: relative;
}

.work-hero::after,
.about-hero::after,
.labpage-hero::after,
.journal-hero::after,
.article-hero::after,
.case-hero::after,
.contact-hero::after {
  content: "";
  position: absolute;
  inset: -1rem;
  border-radius: 34px;
  pointer-events: none;
  opacity: 0.11;
  background:
    linear-gradient(rgba(243, 240, 231, 0.08) 1px, transparent 1px) center / 100% 36px,
    linear-gradient(90deg, rgba(243, 240, 231, 0.08) 1px, transparent 1px) center / 36px 100%;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1) 14%, rgba(0, 0, 0, 0) 74%);
}

.work-hero h1,
.about-copy h1,
.labpage-hero-copy h1,
.journal-hero-copy h1,
.article-hero-copy h1,
.contact-hero-copy h1,
.case-title,
.work-section-head h2,
.about-section-head h2,
.labpage-section-head h2,
.journal-section-head h2,
.article-prose h2,
.journal-footer-cta h2,
.article-footer-cta h2,
.work-footer-cta h2,
.about-cta h2,
.labpage-footer h2,
.contact-footer-cta h2,
.contact-form-head h2,
.contact-hero-lanes h2 {
  text-wrap: balance;
}

.ambient-card {
  position: relative;
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 260ms ease,
    box-shadow 260ms ease,
    background-color 260ms ease;
  will-change: transform;
}

.ambient-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 24%), rgba(184, 148, 88, 0.15), transparent 40%),
    radial-gradient(circle at 18% 84%, rgba(111, 143, 176, 0.1), transparent 34%);
  transition: opacity 260ms ease;
}

.ambient-card:is(:hover, :focus-within) {
  transform: translateY(-7px);
  border-color: rgba(184, 148, 88, 0.22);
  box-shadow:
    0 30px 65px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(184, 148, 88, 0.05) inset;
}

.ambient-card:is(:hover, :focus-within)::after {
  opacity: 1;
}

.work-shot,
.about-hero-shot,
.about-photo img,
.labpage-shot img,
.labpage-tool-card img,
.journal-card img,
.article-hero-image img,
.article-figure img,
.case-hero-img,
.case-img-full img,
.img-duo img {
  --media-scale: 1.02;
  --parallax-offset: 0px;
  transform: translate3d(0, var(--parallax-offset), 0) scale(var(--media-scale));
  transform-origin: center top;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.ambient-card:is(:hover, :focus-within) .work-shot,
.ambient-card:is(:hover, :focus-within) .about-hero-shot,
.ambient-card:is(:hover, :focus-within) .about-photo img,
.ambient-card:is(:hover, :focus-within) .labpage-shot img,
.ambient-card:is(:hover, :focus-within) .labpage-tool-card img,
.ambient-card:is(:hover, :focus-within) .journal-card img,
.ambient-card:is(:hover, :focus-within) .article-hero-image img,
.ambient-card:is(:hover, :focus-within) .article-figure img,
.ambient-card:is(:hover, :focus-within) .case-hero-img,
.ambient-card:is(:hover, :focus-within) .case-img-full img,
.ambient-card:is(:hover, :focus-within) .img-duo img {
  --media-scale: 1.06;
}

.labpage-status {
  position: relative;
  overflow: hidden;
}

.labpage-status > * {
  position: relative;
  z-index: 1;
}

.labs-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.95;
  mix-blend-mode: screen;
}

.labpage-status::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 52% 46%, rgba(111, 143, 176, 0.12), transparent 26%),
    radial-gradient(circle at 64% 36%, rgba(184, 148, 88, 0.12), transparent 30%);
}

.work-footer-cta,
.journal-footer-cta,
.article-footer-cta,
.about-cta,
.labpage-footer {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.about-photo figcaption,
.journal-card-meta,
.article-meta,
.labpage-roadmap-status,
.case-hero-img-cap {
  letter-spacing: 0.12em;
}

@media (prefers-reduced-motion: reduce) {
body.work-page::before,
body.about-page::before,
body.labs-page::before,
body.journal-page::before,
body.article-page::before,
body.case-study-page::before,
body.contact-page::before,
body.work-page::after,
body.about-page::after,
body.labs-page::after,
body.journal-page::after,
body.article-page::after,
body.case-study-page::after,
body.contact-page::after {
    animation: none;
  }

  .ambient-card,
  .ambient-card::after,
  .work-shot,
  .about-hero-shot,
  .about-photo img,
  .labpage-shot img,
  .labpage-tool-card img,
  .journal-card img,
  .article-hero-image img,
  .article-figure img,
  .case-hero-img,
  .case-img-full img,
  .img-duo img {
    transition: none;
  }
}

@media (max-width: 768px) {
  .page-progress {
    height: 1px;
  }

  .work-hero::after,
  .about-hero::after,
  .labpage-hero::after,
  .journal-hero::after,
  .article-hero::after,
  .case-hero::after,
  .contact-hero::after {
    inset: -0.35rem;
    opacity: 0.08;
  }
}
