
  /*
    Engineering hero: X-ray scanner (night edition).
    A coded office building and a process + HVAC plant module stand under an aurora sky.
    Outside the lens they look finished; inside it they become a live engineering model with
    structure, rebar, piping, flow, ductwork and quantities. Built with three.js (r160).
    Desktop: move to scan, drag to rotate. Touch: drag the lens to scan, swipe elsewhere to rotate.
  */
  :root { color-scheme: dark; }
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; background: #03050a; }

  .eng {
    --bg: #03050a;
    --ink: #f4f6f9;
    --ink-soft: rgba(222, 227, 236, 0.76);
    --ink-mute: rgba(206, 212, 222, 0.68);
    --cyan: #5fe8d6;
    --violet: #a98bff;
    --focus: #7ef0e0;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --gutter: clamp(20px, 4.65vw, 96px);
    --gutter-r: clamp(20px, 2.95vw, 64px);
    --region-end: 55%;
    --dock-top: 60%;

    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    background: #03050a url('../media/pumraw-aurora-reference.png') center / cover no-repeat;
    color: var(--ink);
    font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .eng__canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    cursor: crosshair;
    touch-action: pan-y;
  }
  .eng.is-ready .eng__canvas { opacity: 1; }
  .eng.is-dragging .eng__canvas { cursor: grabbing; }

  .eng__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(3, 5, 10, 0.62) 0%, rgba(3, 5, 10, 0.25) 30%, rgba(3, 5, 10, 0) 48%);
  }

  .eng__labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
  .eng__label {
    position: absolute;
    left: 0;
    top: 0;
    padding-left: 10px;
    font: 500 10.5px/1 var(--mono);
    letter-spacing: 0.05em;
    color: #d5fdf6;
    white-space: nowrap;
    opacity: 0;
    text-shadow: 0 0 6px #03050a, 0 0 2px #03050a;
    will-change: transform, opacity;
  }
  .eng__label::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 6px var(--cyan);
  }
  .eng__label--c { padding-left: 0; }
  .eng__label--c::before { display: none; }
  .eng__label--bubble { color: #ffffff; font-weight: 600; font-size: 11px; }
  .eng__label--dim { color: #e3ecff; }
  .eng__label--tag { color: #ffffff; font-weight: 600; letter-spacing: 0.1em; }

  /* the lens: a ring on desktop, a handle you can grab on touch screens */
  .eng__lens {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    will-change: transform;
    touch-action: none;
  }
  .eng.is-touch .eng__lens { pointer-events: auto; }
  .eng.is-scanning .eng__lens { opacity: 1; }
  .eng__lens svg { display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
  .eng__lens .spin { transform-origin: 100px 100px; animation: eng-spin 18s linear infinite; }
  @keyframes eng-spin { to { transform: rotate(360deg); } }
  .eng__lens .pulse { transform-origin: 100px 100px; opacity: 0; }
  .eng.is-touch.needs-cue .eng__lens .pulse { animation: eng-pulse 1.8s ease-out infinite; }
  @keyframes eng-pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.25); opacity: 0; } }
  .eng__cue {
    position: absolute;
    left: 50%;
    bottom: -34px;
    transform: translateX(-50%);
    padding: 6px 10px;
    border-radius: 999px;
    font: 600 10px/1 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #03050a;
    background: var(--cyan);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
  }
  .eng.is-touch.needs-cue .eng__cue { opacity: 1; }

  .eng__marker {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    pointer-events: none;
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 10px rgba(95, 232, 214, 0.8), inset 0 0 6px rgba(95, 232, 214, 0.6);
    transition: opacity 0.25s ease;
  }

  .eng__hud {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    width: 226px;
    padding: 11px 13px 12px;
    pointer-events: none;
    opacity: 0;
    font: 400 11px/1.6 var(--mono);
    font-variant-numeric: tabular-nums;
    color: #d7e6f5;
    background: rgba(4, 10, 20, 0.7);
    border: 1px solid rgba(95, 232, 214, 0.3);
    border-radius: 4px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: opacity 0.5s ease;
    will-change: transform;
  }
  .eng.is-scanning .eng__hud { opacity: 1; }
  .eng__hud h3 {
    margin: 0 0 6px;
    font: 600 10px/1.2 var(--mono);
    letter-spacing: 0.18em;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .eng__hud dl { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; margin: 0; }
  .eng__hud dt { color: rgba(186, 204, 226, 0.62); letter-spacing: 0.08em; }
  .eng__hud dd { margin: 0; text-align: right; color: #f1f8ff; }
  .eng__hud .tgt {
    display: grid;
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid rgba(95, 232, 214, 0.22);
    color: #c9fbf3;
  }
  .eng__hud .tgt span + span { color: rgba(201, 251, 243, 0.7); }

  /* phones: the read-out sits in a strip under the model instead of floating */
  .eng__hud.is-docked {
    left: var(--gutter);
    right: var(--gutter-r);
    top: var(--dock-top);
    width: auto;
    padding: 8px 10px 9px;
    font-size: 10px;
    line-height: 1.45;
    transform: none !important;
  }
  .eng__hud.is-docked h3 { display: none; }
  .eng__hud.is-docked dl { grid-template-columns: repeat(4, auto); column-gap: 10px; row-gap: 0; justify-content: space-between; }
  .eng__hud.is-docked dt { grid-row: 1; font-size: 9px; }
  .eng__hud.is-docked dd { grid-row: 2; text-align: left; }
  .eng__hud.is-docked .tgt { margin-top: 6px; padding-top: 5px; grid-template-columns: auto 1fr; column-gap: 10px; }
  .eng__hud.is-docked .tgt span + span { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* copy */
  .eng__inner {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding-inline: var(--gutter);
    padding-block: clamp(40px, 9.4vh, 92px) clamp(36px, 6vh, 56px);
    pointer-events: none;
  }
  .eng__top, .eng__bottom { pointer-events: auto; max-width: 40rem; }
  .eng__bottom { margin-top: clamp(24px, 4.2vh, 42px); }
  .eng__eyebrow {
    margin: 0 0 clamp(18px, 4vh, 40px);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--ink-mute);
  }
  .eng__title {
    margin: 0;
    font-size: clamp(2.35rem, min(4.6vw, 9.7vh), 6.25rem);
    font-weight: 500;
    line-height: 1.01;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 30px rgba(3, 5, 10, 0.6);
  }
  .eng__title span { display: block; }
  .eng__lede {
    max-width: 30em;
    margin: 0 0 clamp(20px, 3.2vh, 30px);
    font-size: clamp(0.9375rem, 0.5vw + 0.72rem, 1.125rem);
    line-height: 1.6;
    color: var(--ink-soft);
  }
  .eng__cta {
    --cta-x: 50%;
    --cta-y: 50%;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid rgba(214, 226, 238, 0.22);
    border-radius: 999px;
    background: rgba(5, 10, 18, 0.72);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: rgba(232, 237, 244, 0.82);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 8px 28px rgba(0, 0, 0, 0.2);
    transition: transform 0.32s cubic-bezier(.16, 1, .3, 1), border-color 0.32s ease, box-shadow 0.32s ease, color 0.32s ease;
  }
  .eng__cta::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 0;
    padding: 1px;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(92px circle at var(--cta-x) var(--cta-y), rgba(91, 186, 218, 0.98) 0%, rgba(91, 186, 218, 0.48) 36%, transparent 72%);
    opacity: 0.2;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: opacity 0.32s ease;
  }
  .eng__cta::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    left: -46%;
    width: 42%;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(91, 186, 218, 0.98), transparent);
    filter: drop-shadow(0 0 6px rgba(91, 186, 218, 0.75));
    opacity: 0;
  }
  .eng__cta > span, .eng__cta > svg { position: relative; z-index: 1; }
  .eng__cta svg { transition: transform 0.32s cubic-bezier(.16, 1, .3, 1); }
  .eng__cta:hover {
    color: #ffffff;
    transform: translateY(-2px) scale(1.025);
    border-color: rgba(91, 186, 218, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 0 0 1px rgba(91, 186, 218, 0.08), 0 12px 38px -12px rgba(91, 186, 218, 0.54);
  }
  .eng__cta:hover::before { opacity: 1; }
  .eng__cta:hover::after { opacity: 1; animation: eng-cta-streak 1.35s cubic-bezier(.16, 1, .3, 1) infinite; }
  .eng__cta:hover svg { transform: translateX(3px); }
  .eng__cta:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
  @keyframes eng-cta-streak {
    0% { transform: translateX(0); }
    70%, 100% { transform: translateX(350%); }
  }

  .eng__controls {
    position: absolute;
    right: var(--gutter-r);
    bottom: clamp(24px, 5vh, 48px);
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
  }
  .eng__model {
    margin: 0;
    font: 500 10.5px/1.5 var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: right;
    color: rgba(200, 214, 230, 0.74);
  }
  .eng__toggle {
    display: inline-flex;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(6, 10, 18, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .eng__toggle button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: transparent;
    color: rgba(230, 236, 244, 0.72);
    font: 500 13px/1 "Montserrat", "Helvetica Neue", Arial, sans-serif;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
  }
  .eng__toggle button:hover { color: #ffffff; }
  .eng__toggle button[aria-pressed="true"] { background: #ffffff; color: #0a0b10; }
  .eng__toggle button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .eng__hint {
    margin: 0;
    font: 400 10px/1 var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(200, 214, 230, 0.52);
  }

  .eng.is-static .eng__controls,
  .eng.is-static .eng__canvas,
  .eng.is-static .eng__lens,
  .eng.is-static .eng__hud { display: none; }

  /* portrait phones and tablets: model on top, read-out strip, copy underneath */
  @media (max-aspect-ratio: 1/1) {
    .eng__inner { justify-content: flex-end; gap: 0; }
    .eng__title { font-size: clamp(2.2rem, 9.2vw, 4.6rem); }
    .eng__scrim {
      background: linear-gradient(180deg,
        rgba(3, 5, 10, 0) calc(var(--region-end) - 4%),
        rgba(3, 5, 10, 0.72) calc(var(--region-end) + 6%),
        rgba(3, 5, 10, 0.92) 100%);
    }
    .eng__controls { top: 16px; bottom: auto; gap: 8px; }
    .eng__model { display: none; }
  }
  @media (max-aspect-ratio: 1/1) and (min-width: 700px) {
    .eng__hud.is-docked { font-size: 11px; padding: 10px 14px; }
    .eng__label { font-size: 11.5px; }
  }
  /* phones held sideways: compact side-by-side */
  @media (orientation: landscape) and (max-height: 520px) {
    .eng__inner { padding-block: 18px 16px; gap: 0; }
    .eng__bottom { margin-top: 12px; }
    .eng__eyebrow { margin-bottom: 8px; font-size: 0.6875rem; }
    .eng__title { font-size: clamp(1.6rem, 7.5vh, 2.4rem); }
    .eng__lede { font-size: 0.8125rem; margin-bottom: 12px; max-width: 24em; }
    .eng__cta { min-height: 40px; font-size: 0.8125rem; }
    .eng__controls { bottom: 12px; gap: 6px; }
    .eng__model, .eng__hint { display: none; }
    .eng__hud { width: 188px; font-size: 10px; padding: 8px 10px; }
  }
  @media (max-width: 480px) {
    .eng__toggle button { padding: 9px 13px; font-size: 12px; }
    .eng__hint { font-size: 9px; letter-spacing: 0.12em; }
  }
  @media (prefers-reduced-motion: reduce) {
    .eng__lens .spin, .eng.is-touch.needs-cue .eng__lens .pulse { animation: none; }
    .eng__canvas, .eng__lens, .eng__hud { transition: none; }
    .eng__cta, .eng__cta svg { transition: none; }
    .eng__cta:hover { transform: none; }
    .eng__cta:hover::after { animation: none; }
  }

  .pumraw-elementor-content {
    position: relative;
    z-index: 10;
    min-height: 1px;
    background: #03050a;
  }
