html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: black;
  overflow: hidden;
  font-family: Aptos, Arial, sans-serif;
}



:root {

--product-offset-x: -150px;

  --dimension-line-color: #ffffff;
  --dimension-line-width: 4;

  /* "visited" hotspot colour — reads clearly on both black and blue */
  --hotspot-seen-color: #0ef494;
}

.layout {
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  display: grid;

  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;

  grid-template-areas:
    "owlWindow productWindow"
    "contentWindow productWindow";

  margin: auto;
  position: absolute;
  inset: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;

  background: linear-gradient(
    135deg,
    transparent 75%,
    #1e6fa3 75%
  );

  opacity: 1;
  transition: opacity 0.45s ease;
}

body.video-playing::after {
  opacity: 0;
}

body.video-playing .teledyneLogo {
  opacity: 0;
  pointer-events: none;
}

.owlWindow {
  grid-area: owlWindow;
  position: relative;
  overflow: visible;
  min-height: 0;
  z-index: 30;
}

/* Fallback mode: simple owl background, no tracking */
.owlWindow.fallback-owl {
  background-image: url("images/owlTrans.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.owlWindow.fallback-owl .owlFrame {
  display: none;
}



.owlFrame {
  position: fixed;

    left: 25%;
    top: 34%;

    width: 42vw;
    max-width: 700px;

  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

/* Owl overlay with transparent eye holes */
.owlFrame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/owl.png") center / contain no-repeat;
  pointer-events: none;
  z-index: 2;
}

.owlTitle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
  padding-top: 5%;
}

.owlTitle img {
  display: block;
  width: 100%;
  height: auto;
}

.eyes {
  position: absolute;
  width: 68%;
  aspect-ratio: 2 / 1;
  top: 46%;
  left: 51%;
  transform: translate(-50%, -50%);
  background: url("images/owlEyes.png") center / contain no-repeat;
  background-repeat: no-repeat;
  z-index: 1;
  pointer-events: none;
}


.contentWindow {
  grid-area: contentWindow;
  background: transparent;
  color: #ffffff;
  position: relative;
  overflow: visible;
  min-height: 0;
  z-index: 30;
  pointer-events: none;
}
.contentInner {
  box-sizing: border-box;
  width: 85%;
  height: auto;

  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);

  padding: clamp(28px, 4vw, 64px);

  display: flex;
  flex-direction: column;

  z-index: 9;
}

.contentTopRow {
  display: flex;
  align-items: flex-end; /* key change */
  gap: clamp(16px, 2.5vw, 36px);
  margin-bottom: clamp(16px, 2vw, 28px);
}

.contentIcon {
  flex: 0 0 auto;
  width: 18%; /* adjust this value as needed */
  min-width: 40px; /* optional: prevents it getting too small */
  max-width: 120px; /* optional: prevents it getting too large */
}

.contentIcon img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.contentTitle {
  margin: 0;
  font-size: 1.5vw;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #ffffff;
  max-width: 100%;
}

.contentParagraph {
  margin: 0;
  font-size: 1.5vw;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #ffffff;
  max-width: 100%;

  align-self: flex-start; /* ensures it stays at top */
}

.contentBottomLine {
  margin-top: auto;
  padding-top: 2rem; /* adds extra separation */
  font-size: 1vw;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  display:none;
}

.productWindow {
  grid-area: productWindow;
  position: relative;
  left: var(--product-offset-x);
  overflow: visible;
  /*background: black;*/
  z-index: 10;
}

.productWindow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/blueMist.png") center center / contain no-repeat;
  z-index: -1;
}

.productWindow::after {
  display: none;
}


body.video-playing .hotspot-pair,
body.video-playing .hotspot-line,
body.video-playing .hotspot-icon {
  opacity: 0;
  pointer-events: none;
}


#productOverlay canvas,
#productOverlay .hotspot-pair,
#productOverlay .dimension-label {
  transition: opacity 0.3s ease;
}

body.video-playing #productOverlay canvas,
body.video-playing #productOverlay .hotspot-pair,
body.video-playing #productOverlay .dimension-label {
  opacity: 0;
  pointer-events: none;
}


.hotspotVideoOverlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: block;
  opacity: 0;
  pointer-events: none;
  background: transparent;
  transition: opacity 0.45s ease;
}

.hotspotVideoOverlay.is-active {
  opacity: 1;
}

.hotspotVideoOverlay video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}


/*Swipe Help Animation*/
.swipeHelpOverlay {
  position: absolute;
  inset: 0;
  z-index: 6; /* above the canvas (4), below hotspotVideoOverlay (15) */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;   /* never blocks drag/click on the canvas beneath */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.swipeHelpOverlay img {
  width: 50%;
  max-width: 480px;
  height: auto;
}

.swipeHelpOverlay.is-visible {   
  opacity: 1;
}

/* video controls */


.hotspotVideoControls {
  position: absolute;
  right: clamp(16px, 2vw, 32px);
  bottom: clamp(16px, 2vw, 32px);
  z-index: 30;

  display: flex;
  gap: 12px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hotspotVideoOverlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hotspotVideoOverlay.is-active .hotspotVideoControls {
  opacity: 1;
  pointer-events: auto;
}

.videoControl {
  width: 52px;
  height: 52px;

  display: grid;
  place-items: center;

  border: 5px solid rgba(255,255,255,.4);
  border-radius: 50%;

  background: rgba(0,0,0,.45);
  backdrop-filter: blur(8px);

  cursor: pointer;
  transition: .25s;
}

.videoControl svg {
  width: 22px;
  height: 22px;

  fill: white;
  stroke: white;
  stroke-width: 3;
}

.videoControl:hover {
  background: rgba(0,118,192,.85);
  border-color: white;
}

.productOverlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  overflow: visible;
}

.productOverlay canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  background: transparent !important;
  opacity: 1;
  transition: opacity 0.45s ease;
}

.productOverlay.video-playing canvas {
  opacity: 0;
}

.productOverlay.video-playing .hotspot-pair {
  opacity: 0;
  pointer-events: none;
}


.teledyneLogo {
  position: absolute;
  bottom: clamp(12px, 2vw, 32px);
  right: clamp(12px, 2vw, 32px);
  z-index: 5;
  pointer-events: none;
}

.teledyneLogo img {
  display: block;
  width: clamp(160px, 20vw, 360px);
  height: auto;
}

.footerWindow {
  position: static; /* behaves like normal container */
}

.portraitTitle {
  display: none;
}

/* 3D CONTENT */

.hotspots {
  position: absolute;
  width: 30px;
  height: 30px;
  background-color: rgba(0, 118, 192, 0.75);
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.hotspot-pair {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index:5;
  transition: opacity 0.45s ease;
}

.hotspot-line {
  position: absolute;
  height: 2px;

  background: repeating-linear-gradient(
    to right,
    rgba(255,255,255,.9) 0 10px,
    transparent 10px 15px
  );

  opacity: .85;

  transform-origin: 0 50%;
  pointer-events: none;
}

.hotspot-icon {
  --hotspot-size: 64px;
  --icon-size: 140%;

  position: absolute;
  width: var(--hotspot-size);
  height: var(--hotspot-size);
  transform: translate(-50%, -50%);
  pointer-events: auto;
  overflow: visible;

  cursor: pointer; /* hand cursor */
  
}

.hotspot-icon:hover {
  transform: translate(-50%, -50%) scale(1.1); /* +5% */
}

.hotspot-icon:active {
  transform: translate(-50%, -50%) scale(0.98);
}

/* icon graphic */
.hotspot-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--icon-size);
  height: var(--icon-size);
  transform: translate(-50%, -50%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: auto;
}

/* line / circle graphic if needed */
.hotspot-icon.hotspot1::before {
  background-image: url("images/icons/hotspot1.png");
}

.hotspot-icon.hotspot2::before {
  background-image: url("images/icons/hotspot2.png");
}

.hotspot-icon.hotspot3::before {
  background-image: url("images/icons/hotspot3.png");
}

.hotspot-icon.hotspot4::before {
  background-image: url("images/icons/hotspot4.png");
}

.hotspot-icon.hotspot5::before {
  background-image: url("images/icons/hotspot5.png");
}
.hotspot-icon.hotspot6::before {
  background-image: url("images/icons/hotspot6.png");
}

.hotspot-icon.hotspot7::before {
  background-image: url("images/icons/hotspot7.png");
}

.hotspot-icon.hotspot8::before {
  background-image: url("images/icons/hotspot8.png");
}
.hotspot-icon.hotspot9::before {
  background-image: url("images/icons/hotspot9.png");
}
.hotspot-icon.hotspot10::before {
  background-image: url("images/icons/hotspot10.png");
}
.hotspot-icon.hotspot11::before {
  background-image: url("images/icons/hotspot11.png");
}
.hotspot-icon.hotspot12::before {
  background-image: url("images/icons/hotspot12.png");
}
.hotspot-icon.hotspot13::before {
  background-image: url("images/icons/hotspot13.png");
}
.hotspot-icon.hotspot14::before {
  background-image: url("images/icons/hotspot14.png");
}

/* visited state — recolour the icon to show it has been seen */
.hotspot-icon.is-seen::before {
  background-image: none;
  background-color: var(--hotspot-seen-color);
  -webkit-mask: var(--icon-url) center / contain no-repeat;
          mask: var(--icon-url) center / contain no-repeat;
}

.techIcons {
  display: flex;
  justify-content: flex-start;   /* Left justify */
  align-items: center;
  gap: 14px;

  margin-top: 22px;
  flex-wrap: wrap;
}

.techIcons img {
  width: clamp(43px, 3.75vw, 68px);  /* 25% larger */
  height: auto;
  display: block;
}



.hotspot-hover-label {
  position: absolute;
  transform: translate(-50%, -50%);

  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;

  opacity: 0;
  transition: opacity 0.2s ease;

  pointer-events: none;
  z-index: 6;
}

.hotspot-icon:hover + .hotspot-hover-label,
.hotspot-pair:hover .hotspot-hover-label {
  opacity: 1;
}



.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  
  display: flex;
  align-items: center;
  justify-content: center;

  
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;

  font-size: clamp(18px, 2vw, 28px);

  z-index: 10;
  pointer-events: none;
}


.toggleStack {
  position: absolute;
  top: clamp(16px, 2vw, 32px);
  right: clamp(16px, 2vw, 32px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: auto;
}

.hotspotToggle,
.explodeToggle,
.dimensionsToggle{
  position: static;
  display: flex;
  align-items: center;
  gap: 12px;
   
  font-weight: 400;
  font-size: clamp(14px, 1.1vw, 22px);
  letter-spacing: 0.02em;
  color: #ffffff;
  pointer-events: auto;
}

.hotspotToggleLabel,
.explodeToggleLabel,
.dimensionsToggleLabel {
  user-select: none;
}

/* Landscape-only grid of hotspot icons beneath the toggles */
.hotspotIconColumn {
  display: grid;
  grid-template-columns: repeat(2, clamp(44px, 3.9vw, 62px));
  gap: clamp(8px, 1vw, 14px);
  justify-content: end;
  margin-top: clamp(8px, 1.5vw, 18px);

  max-height: calc(100vh - 200px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hotspotIconColumn::-webkit-scrollbar {
  display: none;
}

.hotspot-menu-icon {
  width: 100%;
  aspect-ratio: 1 / 1;

  padding: 0;
  border: none;
  background: var(--icon-url) center / contain no-repeat;

  opacity: 0.85;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hotspot-menu-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

.hotspot-menu-icon:active {
  transform: scale(0.96);
}

/* visited state — solid recolour of the icon silhouette */
.hotspot-menu-icon.is-seen {
  opacity: 1;
  background: var(--hotspot-seen-color);
  -webkit-mask: var(--icon-url) center / contain no-repeat;
          mask: var(--icon-url) center / contain no-repeat;
}

.hotspotProgress {
  position: relative;

  /* match the 2-column icon grid so the % sits centred beneath it
     (2 tracks + 1 gap + the grid's 4px side padding) */
  width: calc(2 * clamp(44px, 3.9vw, 62px) + clamp(8px, 1vw, 14px) + 8px);

  margin-top: clamp(10px, 1.4vw, 18px);
  font-weight: 600;
  font-size: clamp(16px, 1.3vw, 23px);
  letter-spacing: 0.08em;
  color: #ffffff;
  text-align: center;
  user-select: none;
}

.hotspotProgress.is-complete {
  color: var(--hotspot-seen-color);
}

/* one-shot celebration burst, centred on the % readout */
.confettiBurst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(180px, 20vw, 300px);
  height: clamp(180px, 20vw, 300px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 30;
}

.featuresAccordion {
  position: absolute;
  top: calc(clamp(16px, 2vw, 32px) + 80px); /* sits under toggles */
  right: clamp(16px, 2vw, 32px);
  z-index: 20;

  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.featuresButton {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* align to right like toggles */
  gap: 12px;

  width: 100%;

  padding: 0;
  border: none;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-weight: 400;
  font-size: clamp(14px, 1.1vw, 22px);
  letter-spacing: 0.02em;
  cursor: pointer;
}


.burgerIcon {
  order: 2;
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.burgerIcon span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.featuresButton[aria-expanded="true"] .burgerIcon span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.featuresButton[aria-expanded="true"] .burgerIcon span:nth-child(2) {
  opacity: 0;
}

.featuresButton[aria-expanded="true"] .burgerIcon span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.featuresMenu {
  width: min(260px, 40vw);
  max-height: 0;
  overflow: hidden;
  margin-top: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  transition: max-height 0.3s ease;
}

.featuresAccordion.is-open .featuresMenu {
  max-height: 220px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* keep this */
}

.featuresLabel {
  order: 1;
  user-select: none;
}

.featuresMenuItem {
  padding: 12px 16px;
  color: #ffffff;
  font-size: clamp(13px, 1vw, 18px);
  font-weight: 300;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.featuresMenuItem:last-child {
  border-bottom: none;
}






.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  top: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.switch input:checked + .slider {
  background-color: #0076c0;
}

.switch input:checked + .slider::before {
  transform: translateX(22px);
}


.dimension-label {
  position: absolute;
  color: #ffffff;
  font-size: clamp(14px, 1.1vw, 22px);
  font-weight: 400;
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 7;
  opacity: 0;
  transform-origin: center center;
  transition: opacity 0.2s ease;
}

.dimension-label.is-visible {
  opacity: 1;
}



/* PORTRAIT MODE */


@media (orientation: portrait) {
  

body::after {
  display: none;
}


@media (orientation: portrait) {
  .layout {
    width: 100vw;
    height: 100vh;

    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;

    grid-template-areas:
      "portraitTitle"
      "productWindow"
      "contentWindow";
  }

  .productWindow {
    grid-area: productWindow;
    left: 0;
  }

  .contentWindow {
    grid-area: contentWindow;
  }

  .contentInner {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: 90%;
    margin: 0 auto;
    padding: 24px;
  }
}

  .portraitTitle {
    grid-area: portraitTitle;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: clamp(12px, 4vw, 32px);
    z-index: 30;
    pointer-events: none;
  }

  .portraitTitle img {
    display: block;
    width: 65%;
    height: auto;
  }

  .owlWindow {
    display: none;
  }

  .owlFrame {
    display: none;
  }

  .owlTitle {
    display: none;
  }

  .contentTitle {
    font-size: 6vw;
  }

  .contentParagraph {
    font-size: 5vw;
  }

 .contentWindow {
  grid-area: contentWindow;
  background: transparent;
  color: #ffffff;
  position: relative;
  overflow: visible;
  min-height: 0;
  z-index: 30;
}

.contentInner {
  box-sizing: border-box;
  width: 85%;
  height: auto;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 9;

  /* allows extra text to move upward */
  transform: translateY(-100px);
}



  .contentBottomLine {
    display: none;
  }

  .productWindow {
    grid-area: productWindow;
    position: relative;
    z-index: 10;
    overflow: visible;
    left:0;
  }

  .productWindow::after {
    display: none;
  }

  .productOverlay img {
    z-index: 4;
  }

.layout::after {
  display: none;
}

.footerWindow {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  display: flex;
  align-items: center;
justify-content: center;

  padding:
    0
    clamp(12px, 4vw, 32px)
    calc(env(safe-area-inset-bottom) + 16px);

  z-index: 50;
  pointer-events: none;
}



 .footerWindow .teledyneLogo img {
  width: clamp(110px, 26vw, 220px);
  max-width: 32vw;
  height: auto;
  display:none; /*hid when third toggle added */
}

.toggleStack {
  position: fixed;

  left: clamp(10px, 3vw, 24px);
  bottom: calc(env(safe-area-inset-bottom) + 12px);

  top: auto;
  right: auto;

  display: flex;
  flex-direction: row;
  align-items: center;

  gap: clamp(10px, 2vw, 20px);

  z-index: 50;

  max-width: 60vw;
}

.hotspotToggle,
.explodeToggle,
.dimensionsToggle {
  gap: clamp(6px, 1.5vw, 12px);

  font-size: clamp(11px, 2.8vw, 18px);
  line-height: 1;
  white-space: nowrap;
}

/* icon column + progress readout are landscape-only */
.hotspotIconColumn,
.hotspotProgress {
  display: none;
}

.switch {
  width: clamp(34px, 8vw, 46px);
  height: clamp(18px, 4.5vw, 24px);
}

.slider::before {
  width: clamp(14px, 3.6vw, 20px);
  height: clamp(14px, 3.6vw, 20px);
}

.switch input:checked + .slider::before {
  transform: translateX(clamp(16px, 4vw, 22px));
}

.featuresButton {
  justify-content: flex-end;
  width: auto;
}

.featuresAccordion {
  position: absolute;

  top: calc(clamp(12px, 4vw, 32px) + 18vw);
  right: 17.5%;

  left: auto;
  bottom: auto;

  z-index: 30;
  align-items: flex-end;
}

.featuresMenu {
  width: min(280px, 75vw);
  text-align: right;
}




  
}


/*Temp Dev Password*/

#passwordGate {
  position: fixed;
  inset: 0;
  background: black;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;


}

.passwordBox {
  text-align: center;
  color: white;
}

.passwordBox h2 {
  margin-bottom: 20px;
  font-weight: 600;
}

.passwordBox input {
  padding: 12px;
  font-size: 16px;
  width: 200px;
  margin-bottom: 12px;
  border: none;
  outline: none;
}

.passwordBox button {
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  background: #0076c0;
  color: white;
}

#passwordError {
  color: red;
  margin-top: 10px;
  font-size: 14px;
}