:root {
  --glass-border: rgba(239, 238, 230, .17);
  --glass-soft: rgba(239, 238, 230, .055);
  --glass-dark: rgba(12, 20, 18, .3);
}

/* One continuous spatial scene, seen through the interface. */
body.immersive { background: #0c1412; }
.experience-background,
.experience-background.video-ready { background: #0c1412; }
.experience-background video,
.experience-background.video-ready video {
  opacity: .36;
  filter: saturate(.7) contrast(1.05);
}
.experience-background .background-shade {
  background: linear-gradient(90deg, rgba(7, 15, 13, .58), rgba(7, 15, 13, .2) 68%, rgba(7, 15, 13, .3));
}
.in-build .experience-background video { opacity: .7; }
.in-build .background-shade { opacity: .68; }
.creative-atmosphere {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}
.atmosphere-wash {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(ellipse at 80% 30%, rgba(211, 114, 52, .28), transparent 42%),
    radial-gradient(ellipse at 15% 70%, rgba(126, 157, 132, .19), transparent 40%),
    radial-gradient(ellipse at 55% 90%, rgba(196, 170, 117, .15), transparent 40%);
  animation: light-atmosphere 28s ease-in-out infinite alternate;
}
.portal-cluster {
  position: absolute;
  top: 2vh;
  right: -15vw;
  width: min(90vw, 1250px);
  height: 110vh;
  perspective: 1100px;
  transform: translate3d(0, var(--scene-drift, 0px), 0);
  transition: transform 1s cubic-bezier(.22, 1, .36, 1);
}
.portal-sculpture {
  position: absolute;
  inset: 5% 12%;
  transform-style: preserve-3d;
  animation: architectural-orbit 32s ease-in-out infinite alternate;
}
.portal-sculpture > i {
  position: absolute;
  inset: 2% 9%;
  border: 1px solid rgba(232, 171, 111, .48);
  border-radius: 47% 47% 3% 3%;
  background: linear-gradient(125deg, rgba(255, 237, 209, .035), transparent 40%, rgba(206, 114, 45, .035));
  box-shadow: inset 0 0 45px rgba(223, 157, 89, .025), 0 0 24px rgba(206, 114, 45, .04);
}
.portal-sculpture > i:nth-child(1) { transform: translateZ(-150px); opacity: .36; }
.portal-sculpture > i:nth-child(2) { transform: translateZ(-65px); opacity: .52; }
.portal-sculpture > i:nth-child(3) { transform: translateZ(20px); opacity: .78; }
.portal-sculpture > i:nth-child(4) { transform: translateZ(105px); }
.portal-sculpture > i:nth-child(5) { transform: translateZ(190px); border-color: rgba(245, 226, 196, .35); }
.floating-glass {
  position: absolute;
  width: clamp(180px, 25vw, 420px);
  height: clamp(240px, 39vh, 520px);
  top: 42%;
  left: -5%;
  border: 1px solid rgba(221, 232, 214, .2);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(239, 238, 230, .08), rgba(132, 168, 143, .015) 50%, rgba(239, 238, 230, .025));
  transform: perspective(1000px) rotateY(28deg) rotateZ(-22deg);
  animation: floating-pane 26s ease-in-out infinite alternate;
}
.floating-glass.secondary {
  top: 3%;
  left: 24%;
  width: clamp(110px, 15vw, 250px);
  height: clamp(160px, 25vh, 330px);
  border-radius: 70px 14px 70px 14px;
  opacity: .45;
  animation-delay: -11s;
}
.atmosphere-beam {
  position: absolute;
  top: -30%;
  left: 20%;
  width: 25%;
  height: 160%;
  background: linear-gradient(90deg, transparent, rgba(229, 171, 103, .075), transparent);
  transform: rotate(28deg);
  animation: architectural-light 24s ease-in-out infinite alternate;
}
.technical-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-width: .75;
  opacity: .38;
}
.technical-lines .trace {
  stroke-dasharray: 70 650;
  animation: trace-path 24s linear infinite;
}
.technical-lines .trace.second { animation-delay: -10s; }
.technical-lines .node { fill: #e9b280; stroke: none; }

/* Dark glass lets the architectural scene remain visible across both pages. */
body.immersive > .header {
  color: var(--paper);
  background: rgba(14, 23, 20, .3);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}
.header-cta { border-bottom-color: rgba(239, 238, 230, .6); }
.header-cta > span { color: #e8ad79; }
.menu-toggle > span { background: var(--paper); }
.immersive .mobile-nav {
  background: rgba(13, 23, 19, .92);
  color: var(--paper);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(22px);
}
.immersive .ticker {
  background: linear-gradient(90deg, rgba(206, 114, 45, .16), rgba(239, 238, 230, .025), rgba(206, 114, 45, .12));
  color: var(--paper);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}
.ticker i { color: #e4a472; }
.immersive .hero h1 { text-shadow: 0 3px 32px rgba(3, 10, 7, .18); }
.immersive .expertise,
.immersive .studio {
  margin: 34px 4%;
  padding: 65px 4.5%;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: linear-gradient(130deg, rgba(239, 238, 230, .065), rgba(12, 22, 17, .2) 65%, rgba(239, 238, 230, .025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 25px 70px rgba(0, 0, 0, .08);
  backdrop-filter: blur(9px) saturate(120%);
  -webkit-backdrop-filter: blur(9px) saturate(120%);
}
.immersive .possibilities {
  margin: 34px 4%;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(239, 238, 230, .035);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .1);
}
.possibility-copy {
  background: linear-gradient(130deg, rgba(153, 161, 118, .13), rgba(14, 23, 18, .13));
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
}
.possibility-copy h2 em { color: #ebbd91; }
.possibility-copy .possibility-detail,
.concept-note { opacity: .85; color: #c8d0bf; }
.image-note {
  background: rgba(13, 23, 19, .45);
  border: 1px solid rgba(239, 238, 230, .25);
  border-radius: 6px;
  backdrop-filter: blur(14px);
}
.immersive .contact {
  margin: 34px 4%;
  padding: 55px 4.5%;
  color: var(--paper);
  border: 1px solid rgba(230, 170, 113, .27);
  border-radius: 24px;
  background: linear-gradient(125deg, rgba(206, 114, 45, .15), rgba(239, 238, 230, .035) 55%, rgba(119, 113, 84, .08));
  backdrop-filter: blur(12px) saturate(125%);
  -webkit-backdrop-filter: blur(12px) saturate(125%);
}
.contact-title > span,
.contact-spark { color: #e8b183; }
.contact-bottom,
.contact-links { border-top-color: rgba(239, 238, 230, .22); }
.contact .pill-button {
  background: rgba(239, 238, 230, .1);
  border: 1px solid rgba(239, 238, 230, .3);
  color: var(--paper);
}
.contact .pill-button:hover { background: rgba(206, 114, 45, .35); }
.immersive footer {
  color: var(--paper);
  background: rgba(9, 18, 14, .25);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
}
.immersive footer p,
.immersive footer > span { color: #c3cbb8; }
.motion-controls {
  background: rgba(9, 18, 14, .4);
  border-top-color: rgba(239, 238, 230, .18);
  backdrop-filter: blur(18px);
}
.round-link,
.circle-cta { background: rgba(239, 238, 230, .035); backdrop-filter: blur(4px); }
.build-journey { background: transparent; }
.journey-stage {
  border-radius: 18px;
  border-color: rgba(239, 238, 230, .23);
  background: linear-gradient(90deg, rgba(12, 22, 17, .25), rgba(239, 238, 230, .015));
}
.journey-stage::before,
.journey-stage::after { display: none; }
.in-build .creative-atmosphere { opacity: .65; }
.work-page .portfolio {
  background: transparent;
  backdrop-filter: none;
}
.project-card {
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(239, 238, 230, .07), rgba(9, 18, 14, .15));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(10px);
  transition: border-color .4s, background .4s;
}
.project-card:hover { border-color: rgba(231, 172, 119, .55); background: rgba(239, 238, 230, .085); }
.project-card-image { background: rgba(12, 22, 17, .25); }
.project-card-details { padding: 20px 22px 24px; }
.project-card-details > span { color: #c3cbb7; }
.project-badge { background: rgba(9, 18, 14, .45); border-radius: 5px; }
.project-arrow { background: rgba(239, 238, 230, .85); backdrop-filter: blur(12px); }

/* Forms retain enough density to read and write comfortably. */
#brief-dialog,
#project-dialog {
  color: var(--paper);
  background: rgba(15, 25, 20, .84);
  border: 1px solid rgba(239, 238, 230, .24);
  border-radius: 20px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .28);
  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
}
dialog::backdrop { background: rgba(4, 12, 7, .52); backdrop-filter: blur(8px); }
.close-dialog { color: var(--paper); }
.dialog-inner { color-scheme: dark; }
.dialog-inner input,
.dialog-inner select,
.dialog-inner textarea { color: var(--paper); border-bottom-color: rgba(239, 238, 230, .35); }
.dialog-inner select option { color: var(--paper); background: #19261f; }
.dialog-inner input::placeholder,
.dialog-inner textarea::placeholder { color: #aebaa6; }
.dialog-intro,
.form-note { color: #c3cbb7; }
.dialog-inner .submit-brief { background: rgba(206, 114, 45, .8); color: #fff8ee; }
#form-status { color: #c2dca9; }
.project-gallery { background: rgba(5, 13, 8, .23); }
.close-project { background: rgba(19, 31, 23, .85); }
.project-thumbnails button { background: rgba(239, 238, 230, .04); }

.background-paused .creative-atmosphere *,
.background-paused .pointer-light { animation-play-state: paused !important; }

@keyframes architectural-orbit {
  from { transform: rotateY(-28deg) rotateX(7deg) rotateZ(-17deg) translateY(-2%); }
  to { transform: rotateY(-8deg) rotateX(-5deg) rotateZ(-7deg) translateY(4%); }
}
@keyframes light-atmosphere {
  from { transform: translate3d(-3%, -2%, 0) rotate(-5deg); }
  to { transform: translate3d(5%, 4%, 0) rotate(8deg); }
}
@keyframes floating-pane {
  from { transform: perspective(1000px) rotateY(28deg) rotateZ(-22deg) translateY(0); }
  to { transform: perspective(1000px) rotateY(10deg) rotateZ(-12deg) translateY(-65px); }
}
@keyframes architectural-light {
  from { transform: translateX(-50%) rotate(28deg); opacity: .3; }
  to { transform: translateX(140%) rotate(18deg); opacity: .9; }
}
@keyframes trace-path { to { stroke-dashoffset: -1440; } }

@media (max-width: 760px) {
  .portal-cluster { right: -38vw; width: 130vw; top: 6vh; height: 100vh; }
  .portal-sculpture > i { border-color: rgba(232, 171, 111, .38); }
  .experience-background video,
  .experience-background.video-ready video { opacity: .28; }
  .experience-background .background-shade {
    background: linear-gradient(90deg, rgba(7, 15, 13, .62), rgba(7, 15, 13, .28));
  }
  .technical-lines { opacity: .23; }
  .immersive .expertise,
  .immersive .studio,
  .immersive .contact {
    margin: 20px 4%;
    padding: 45px 6%;
    border-radius: 18px;
    backdrop-filter: blur(7px);
  }
  .immersive .possibilities { margin: 20px 4%; border-radius: 18px; }
  .possibility-copy { padding: 38px 8% 28px; }
  .project-card-details { padding: 16px 18px 20px; }
  .work-page .project-card-details { padding: 18px 20px 22px; }
  .contact-title { padding-right: 26px; }
  .floating-glass { opacity: .6; }
}

@media (prefers-reduced-motion: reduce) {
  .creative-atmosphere * { animation: none !important; }
  .portal-cluster { transition: none; }
  .portal-sculpture { transform: rotateY(-20deg) rotateZ(-10deg); }
}

@supports not (backdrop-filter: blur(1px)) {
  .immersive .expertise,
  .immersive .studio,
  .immersive .contact,
  .possibility-copy { background: rgba(14, 25, 18, .72); }
}
