/* Unified photorealistic 3D cutaway customer-case template matching Monitros's homepage design system. */
:root {
  color-scheme: dark;
  --navy: #0B1220;
  --ink: #FBFBFA;
  --ink-2: #D6DFEB;
  --ink-3: #B4C0D2;
  --line: rgba(210, 218, 230, 0.16);
  --accent: #E0611A;
  --accent-text: #F5A46F;
  --ok: #52C789;
  --warn: #F5A46F;
  --bad: #FF7B72;
  --display: "Outfit", "IBM Plex Sans", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --px: clamp(16px, 3vw, 44px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--navy); color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
@view-transition { navigation: auto; }

/* Exact pure #0B1220 obsidian canvas matching the 2K renders + deep edge feathering -> ZERO matte rectangle seam! */
.hero {
  position: relative; height: 100vh; height: 100dvh; overflow: hidden; isolation: isolate;
  background: #0B1220;
}

/* Centered 16:9 photorealistic 2K architectural cutaway stage with guaranteed >=32px outer card margins */
.stage-wrap {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center;
  padding: clamp(148px, 18.5vh, 188px) clamp(24px, 3vw, 48px) clamp(74px, 9.5vh, 96px);
}
.hero.card-left .stage-wrap {
  padding-left: clamp(326px, 23.5vw, 376px);
  padding-right: clamp(18px, 2.5vw, 42px);
}
.hero.card-right .stage-wrap {
  padding-left: clamp(18px, 2.5vw, 42px);
  padding-right: clamp(326px, 23.5vw, 376px);
}
.scene {
  position: relative;
  width: min(74vw, 112vh);
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
}
.scene-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block;
  user-select: none; pointer-events: none;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-composite: intersect;
}

/* Realistic multiply-blended dark-lamp dimming overlay when Luminaire L-0417 is in Dark fault state */
.lamp-fault-dim {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 2;
  opacity: 0; transition: opacity 0.4s ease;
  mix-blend-mode: multiply;
  background:
    radial-gradient(ellipse 8.5% 8.0% at 17.0% 22.8%, #0B1220 0%, #0B1220 62%, rgba(11, 18, 32, 0.25) 86%, transparent 100%),
    radial-gradient(ellipse 18% 36% at 20.5% 44%, #111A2B 0%, #182336 48%, rgba(24, 35, 54, 0.28) 78%, transparent 100%),
    radial-gradient(ellipse 17% 14% at 21.0% 71%, #141E30 0%, #1E2A40 52%, transparent 92%);
}
.lamp-fault-dim::after {
  content: ""; position: absolute;
  left: 12.2%; top: 18.8%; width: 9.2%; height: 7.4%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, #0B1220 0%, #0B1220 64%, transparent 100%);
}
.lamp-fault-dim.active { opacity: 1; }

header {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) var(--px) 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; height: clamp(22px, 2.7vh, 29px); width: auto; opacity: 0.96; }

/* Compact editorial customer story header */
.intro {
  position: absolute; left: 0; right: 0; top: clamp(54px, 6.8vh, 74px); z-index: 3;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 var(--px); pointer-events: none;
}
.intro h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(24px, min(2.8vw, 4.1vh), 42px);
  line-height: 1.08; letter-spacing: -0.022em; color: var(--ink);
  text-shadow: 0 2px 24px rgba(7, 12, 22, 0.65);
}
.intro h1 .ln { display: inline; }
.intro h1 .ln:first-child::after { content: " "; }
.case {
  margin-top: 7px; max-width: 66em;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px;
  font-size: clamp(12.2px, min(0.98vw, 1.55vh), 14px); line-height: 1.44; color: var(--ink-2);
}
.case p { text-wrap: balance; }
.case b { font-weight: 600; color: var(--ink); margin-right: 4px; }
.case b.now { color: var(--ok); }
.where {
  margin-top: 8px; display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px 7px;
  padding: 4px 12px; border-radius: 999px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--ink-2); background: rgba(11, 18, 32, 0.84);
  border: 1px solid rgba(210, 218, 230, 0.16);
}
.where .pulse { display: none; }

/* Elevated clickable map-pins matching the homepage, with true semantic severity borders */
.pins { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.pin {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -100%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(210, 218, 230, 0.24);
  background: rgba(11, 18, 32, 0.88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: rgba(251, 251, 250, 0.94); font: 450 12px/1 var(--body); white-space: nowrap;
  cursor: pointer; pointer-events: auto;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.65);
  transition: transform 0.2s var(--ease), background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.pin::after {
  content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  width: 1.25px; height: 10px;
  background: linear-gradient(180deg, rgba(210, 218, 230, 0.65), rgba(210, 218, 230, 0.16));
  pointer-events: none;
}
.pin::before {
  content: ""; position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(235, 242, 252, 0.92); border: 1.5px solid #0B1220;
  pointer-events: none;
}
.pin[data-s="g"] { --c: var(--ok); }
.pin[data-s="o"] { --c: var(--warn); }
.pin[data-s="r"] { --c: var(--bad); }
.pin:hover, .pin:focus-visible, .pin.on {
  background: rgba(14, 24, 44, 0.98);
  border-color: var(--c, var(--warn));
  transform: translate(-50%, -100%) translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.78), 0 0 0 1.5px rgba(210, 218, 230, 0.14);
  z-index: 2;
}
.pin:hover::after, .pin:focus-visible::after, .pin.on::after {
  background: linear-gradient(180deg, var(--c, var(--warn)), rgba(210, 218, 230, 0.2));
}
.pin:hover::before, .pin:focus-visible::before, .pin.on::before {
  background: var(--c, var(--warn)); box-shadow: 0 0 0 2.5px rgba(11, 18, 32, 0.7);
}
.pin.occluded { opacity: 0; pointer-events: none; }
.pin .dot { width: 5.5px; height: 5.5px; border-radius: 50%; flex-shrink: 0; background: var(--c, var(--ok)); }

/* Mobile numbered hardware markers (hidden on desktop) */
.mob-dot {
  display: none;
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  width: 19px; height: 19px; border-radius: 50%; padding: 0;
  border: 1.8px solid var(--c, var(--ok));
  background: rgba(11, 18, 32, 0.92);
  color: #FBFBFA; font: 600 10px/1 var(--mono);
  place-items: center; cursor: pointer; pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.78);
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}
.mob-dot[data-s="g"] { --c: var(--ok); }
.mob-dot[data-s="o"] { --c: var(--warn); }
.mob-dot[data-s="r"] { --c: var(--bad); }
.mob-dot.on {
  background: var(--c, var(--accent)); border-color: #FBFBFA; color: #0B1220;
  transform: translate(-50%, -50%) scale(1.18); z-index: 4;
}
.mob-chips { display: none; }

/* Crisp solid orthogonal edge-to-edge card leader with dark backing stroke */
.card-leader {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 3; pointer-events: none;
}
.card-leader polyline#leader-bg,
.card-leader line#leader-bg {
  fill: none; stroke: rgba(7, 12, 22, 0.88); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round;
  transition: opacity 0.2s ease;
}
.card-leader polyline#leader-line,
.card-leader line#leader-line {
  fill: none; stroke: var(--leader-c, #F5A46F); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transition: opacity 0.2s ease;
}
.card-leader circle {
  fill: var(--leader-c, #F5A46F); stroke: #0B1220; stroke-width: 1.5;
  transition: opacity 0.2s ease;
}

/* Floating live field-log card matching homepage */
.card {
  position: absolute; z-index: 4; left: 0; top: 0;
  width: 304px; padding: 13px 15px 14px; border-radius: 12px;
  background: rgba(11, 18, 32, 0.92);
  border: 1px solid rgba(210, 218, 230, 0.22);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 22px 48px -14px rgba(0, 0, 0, 0.74);
  color: var(--ink-2);
  opacity: 0; transform: translateY(5px);
  transition: opacity 0.24s var(--ease), transform 0.28s var(--ease);
  pointer-events: none;
}
.card.show { opacity: 1; transform: none; pointer-events: auto; }
.card[data-s="g"] { --c: var(--ok); }
.card[data-s="o"] { --c: var(--warn); }
.card[data-s="r"] { --c: var(--bad); }
.c-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.c-name { font-family: var(--display); font-weight: 600; font-size: 15.5px; color: var(--ink); line-height: 1.15; }
.c-meta { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.c-time { font-family: var(--mono); font-size: 11px; letter-spacing: -0.02em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.c-step {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 3px; border-radius: 999px;
  background: rgba(251, 251, 250, 0.06);
  border: 1px solid rgba(210, 218, 230, 0.16);
}
.c-nav {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-2); font: 500 13px/1 var(--body);
  cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease;
}
.c-nav:hover { background: rgba(251, 251, 250, 0.14); color: var(--ink); }
.c-idx { font-family: var(--mono); font-size: 10px; color: var(--ink-3); padding: 0 2px; font-variant-numeric: tabular-nums; }
.c-kind { margin-top: 2px; font-size: 11.5px; color: var(--ink-3); }
.c-say { margin-top: 7px; font-size: 12.6px; line-height: 1.44; color: var(--ink-2); transition: opacity 0.25s ease; }
.c-say b { font-family: var(--display); font-weight: 600; color: var(--c, var(--ink)); margin-right: 5px; }
.c-say.struck { text-decoration: line-through; opacity: 0.65; }
.c-say.out { opacity: 0; }
.c-read {
  margin-top: 10px; padding-top: 9px;
  border-top: 1px solid rgba(210, 218, 230, 0.14);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  font-variant-numeric: tabular-nums;
}
.c-read div { display: flex; flex-direction: column-reverse; gap: 1px; min-width: 0; }
.c-read dt { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-read dd { font-family: var(--display); font-weight: 600; font-size: 15.5px; color: var(--ink); white-space: nowrap; }
.c-read dd.hi-val { color: var(--c, var(--warn)); }
.c-read dd i { font-style: normal; font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--ink-3); margin-left: 2px; }
.c-read dd i.tight { margin-left: 0; }

/* Frosted pill bottom live stats strip matching the homepage */
.stats {
  position: absolute; z-index: 4; left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  height: 36px;
  display: inline-flex; align-items: center;
  padding: 0 16px; border-radius: 999px;
  background: rgba(11, 18, 32, 0.84);
  border: 1px solid rgba(210, 218, 230, 0.18);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 14px 36px -10px rgba(0, 0, 0, 0.66);
  white-space: nowrap;
}
.stats li {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 0 12px; border-left: 1px solid rgba(210, 218, 230, 0.2);
  font-size: 12.2px; color: var(--ink-3);
}
.stats li:first-child { border-left: 0; padding-left: 0; }
.stats li:last-child { padding-right: 0; }
.stats b {
  font-family: var(--display); font-weight: 600; font-size: 15px;
  color: var(--ink); font-variant-numeric: tabular-nums; transition: color 0.35s ease;
}
.stats b.flag { color: var(--warn); }
.stats b.flag-bad { color: var(--bad); }
.stats .sh { display: none; }

/* Bottom-left Customer Story Switcher & bottom-right footer pill (neutral slate chrome; amber reserved strictly for warnings!) */
.story-switch {
  position: absolute; z-index: 4; left: var(--px);
  bottom: max(18px, env(safe-area-inset-bottom));
  height: 36px;
  display: inline-flex; align-items: center; gap: 2px;
  padding: 0 5px; border-radius: 999px;
  background: rgba(11, 18, 32, 0.82);
  border: 1px solid rgba(210, 218, 230, 0.16);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}
.story-switch a {
  padding: 6px 10px; border-radius: 999px;
  font: 500 12px/1 var(--body); color: var(--ink-3); text-decoration: none;
  white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease;
}
.story-switch a:hover { color: var(--ink); background: rgba(251, 251, 250, 0.08); }
.story-switch a[aria-current="page"] {
  background: rgba(251, 251, 250, 0.14); color: var(--ink); font-weight: 600;
}
.story-switch .sw-back {
  color: rgba(235, 242, 252, 0.92); padding-right: 11px; margin-right: 4px;
  border-right: 1px solid rgba(210, 218, 230, 0.16); border-radius: 999px 0 0 999px;
}
.story-switch .sw-back:hover { color: var(--ink); }

.cust-foot {
  position: absolute; z-index: 4; right: var(--px);
  bottom: max(18px, env(safe-area-inset-bottom));
  height: 36px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 4px;
  background: transparent;
  border: 0;
  font-size: 11.5px; color: var(--ink-3);
}
.cust-foot .cf-sep { opacity: 0.45; }
.cust-foot a { color: rgba(235, 242, 252, 0.88); text-decoration: none; }
.cust-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1320px) {
  .cust-foot { display: none; }
}
@media (max-width: 1160px) {
  .story-switch { bottom: 64px; left: 50%; transform: translateX(-50%); }
  .stage-wrap { padding-bottom: 120px; }
}

@media (max-width: 899px) {
  html, body { height: auto; min-height: 100%; overflow-y: auto; }
  .hero {
    height: auto; min-height: 100dvh; overflow: visible;
    display: flex; flex-direction: column; align-items: stretch;
    background: #0B1220;
    padding-bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  }
  header {
    position: static; flex-shrink: 0; order: 1;
    padding: max(12px, env(safe-area-inset-top)) 14px 4px;
  }
  .intro {
    position: static; flex-shrink: 0; order: 2; pointer-events: auto;
    padding: 4px 14px 4px; align-items: center;
  }
  .intro h1 { font-size: clamp(21px, 5.8vw, 26px); }
  .case { font-size: 11.8px; line-height: 1.38; gap: 2px 10px; margin-top: 5px; }
  .where {
    font-size: 10.2px; padding: 0; margin-top: 6px;
    background: transparent; border: 0; border-radius: 0;
    color: var(--ink-3);
    line-height: 1.3; gap: 2px 6px;
  }
  .where .w-sep { display: inline; opacity: 0.45; }
  .where span:not(.w-sep):not(.pulse) { white-space: nowrap; }

  .stage-wrap,
  .hero.card-left .stage-wrap,
  .hero.card-right .stage-wrap {
    position: static; display: block; flex-shrink: 0; order: 3;
    padding: 4px 6px 2px;
  }
  .scene {
    width: 100%; max-height: none;
    border-radius: 0; overflow: hidden;
    border: 0;
    background: #0B1220;
  }
  .c-nav { width: 30px; height: 30px; font-size: 15px; }
  .c-idx { font-size: 11px; padding: 0 4px; }
  .scene-img {
    -webkit-mask-image:
      linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%),
      linear-gradient(180deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%),
      linear-gradient(180deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
    mask-composite: intersect;
  }
  .pin, .card-leader { display: none; }
  .mob-dot { display: inline-grid; }

  /* Sleek single-row horizontal scrollable pill strip so card + stats + switcher fit above the 844px fold */
  .mob-chips {
    display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; order: 4;
    padding: 4px 12px 4px; flex-shrink: 0;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%);
  }
  .mob-chips::-webkit-scrollbar { display: none; }
  .mob-chip {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 34px;
    padding: 4px 10px 4px 6px; border-radius: 999px;
    border: 1px solid rgba(210, 218, 230, 0.18);
    background: rgba(16, 26, 44, 0.88);
    color: var(--ink-2); font: 500 11.8px/1 var(--body);
    cursor: pointer; white-space: nowrap;
  }
  .mob-chip[data-s="g"] { --c: var(--ok); }
  .mob-chip[data-s="o"] { --c: var(--warn); }
  .mob-chip[data-s="r"] { --c: var(--bad); }
  .mob-chip-num {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 18px; height: 18px; border-radius: 50%;
    background: #0B1220; color: #FBFBFA;
    border: 1.8px solid var(--c, var(--ok));
    font: 600 10px/1 var(--mono);
  }
  .mob-chip.on {
    background: rgba(24, 38, 64, 0.96); border-color: var(--c, var(--warn)); color: var(--ink);
  }
  .mob-chip.on .mob-chip-num { background: var(--c, var(--warn)); border-color: #FBFBFA; color: #0B1220; }

  .card {
    position: static; width: auto; margin: 5px 12px 0; order: 5;
    padding: 11px 14px 12px;
    opacity: 1; transform: none; pointer-events: auto;
  }

  .stats {
    position: static; transform: none; height: auto; order: 6;
    margin: 8px 12px 0; border-radius: 12px; padding: 8px 8px;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 4px;
    white-space: normal;
  }
  .stats li {
    flex-direction: column; align-items: center; text-align: center;
    padding: 0 4px; border-left: 0; gap: 1px; font-size: 11px;
  }
  .stats li.mob-hide { display: none; }
  .stats b { font-size: 13.5px; }
  .stats .lg { display: none; }
  .stats .sh { display: inline; }

  .story-switch {
    position: static; transform: none; height: auto; order: 7;
    margin: 8px 12px 0; padding: 3px 4px; overflow-x: auto; scrollbar-width: none;
    justify-content: space-between;
  }
  .story-switch::-webkit-scrollbar { display: none; }
  .story-switch a { min-height: 34px; display: inline-flex; align-items: center; padding: 0 10px; font-size: 12px; }
  .cust-foot {
    position: static; order: 8; height: auto; align-self: center;
    margin-top: 8px; background: transparent; border: 0; padding: 0;
    font-size: 11.5px;
  }
}
