
/* Define CSS Variables */
:root {
  /* --primary-color: #ddd9de; */

}

@font-face {
  font-family: 'DatDot';
  src: url('fonts/DatDot-Regular.ttf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'TLOZ Awakening';
  src: url('fonts/TLOZ-Links-Awakening.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}



/* When in viewfinder mode, hide the system cursor over the 3D view only */
body.viewfinder-active #threejs-viewfinder {
  /* cursor: none !important; */
}

#tile-border-hover {
  position: fixed;
  pointer-events: none;
  border: 2px solid var(--primary-color);
  box-sizing: border-box;
  display: none;
  z-index: 2; /* above canvas, below HUD */
    animation: hudGlowPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 0.25px var(--primary-color)) drop-shadow(0 0 1px var(--primary-color));
     transition: opacity 0.35s ease;
}



#dev-controls {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999;
  background: rgba(0,0,0,0.75);
  color: #f3f0d0;
  font-family: monospace;
  font-size: 0.95em;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 0 10px #000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  display: none;
}
#dev-controls label {
  display: flex;
  align-items: center;
  gap: 10px;
}
#dev-controls input[type="range"] {
  flex: 1;
}
#dev-controls span {
  min-width: 2em;
  display: inline-block;
  text-align: right;
}



/* General Styles */
body {
  color: var(--primary-color);
  margin: 0;
  padding: 0;
  background-color: #000;
  overflow-x: hidden;
}

.viewfinder {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #f3f0d0;
}

/* Fullscreen splash over the 3D view, under the HUD */
#splash-image {
  position: fixed;
  inset: 0;
  z-index: 2;
  background-color: #000;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 1;                /* stays solid; we don't fade this for cycling */
  pointer-events: auto;
}

/* Hidden state when exploring */
#splash-image.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}
/* When we’re doing the GSAP shutter, kill the fade for .is-hidden */
body.shutter-instant #splash-image.is-hidden {
  transition: opacity 0s ease;
}


/* Black overlay used for fades between images / on Explore */
#splash-black {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2;                /* above splash-image (2), below HUD / Explore */
  opacity: 0;
  pointer-events: none;      /* never blocks clicks */
  transition: opacity 1s ease;
}

#splash-black.is-visible {
  opacity: 1;
}

/* Disabled Explore/Loading button */
#explore-btn[disabled] {
  cursor: default;
  opacity: 1;
}


.project-grid {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(7, 340px);
  grid-template-rows: repeat(4, 220px);
  gap: 40px;
  transition: transform 0.5s cubic-bezier(.42,0,.58,1);
  will-change: transform;
 left: 50%; top: 50%; transform: translate(-50%, -50%)
}

.project-tile {
  width: 320px;
  height: 200px;
  background: #222;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.2s;
}

.project-tile img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 1;
  filter: brightness(0.92) contrast(1.15);
  transition: filter 0.3s;
}

.project-tile:hover img {
  filter: brightness(1.07) contrast(1.18) saturate(1.1);
}

.viewfinder-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  /* mix-blend-mode: difference; */
}

.corner {
  width: 72px;
  height: 72px;
  border: 2.5px solid #f3f0d0;
  position: absolute;
    animation: hudGlowPulse 4s ease-in-out infinite;
      filter: drop-shadow(0 0 0.25px #f3f0d0) drop-shadow(0 0 1px #f3f0d0);

  /* border-radius: 2px; */
}
.corner.tl { left: 36px; top: 36px; border-right: none; border-bottom: none; }
.corner.tr { right: 36px; top: 36px; border-left: none; border-bottom: none; }
.corner.bl { left: 36px; bottom: 36px; border-right: none; border-top: none; }
.corner.br { right: 36px; bottom: 36px; border-left: none; border-top: none; }

#threejs-viewfinder {
  position: fixed;
  inset: 0;
  width: 100vw; height: 100vh;
  z-index: 1;
  pointer-events: auto;
  background-color: black;
}

.crosshair {
  position: fixed;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.1s linear;
  opacity: 0; /* hidden by default */
}

/* Visible when viewfinder is active */
body.viewfinder-active .crosshair {
  opacity: 1;
}

/* But hide it when hovering HUD elements */
body.viewfinder-active.hud-hovering .crosshair {
  opacity: 0;
}


.crosshair::before, .crosshair::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,0.75);
  border-radius: 2px;
}
.crosshair::before {
  left: 50%; top: 0;
  width: 2px; height: 100%;
  transform: translateX(-50%);
}
.crosshair::after {
  top: 50%; left: 0;
  width: 100%; height: 2px;
  transform: translateY(-50%);
}

#explore-btn {
  position: fixed;
  inset: 0;
  margin: auto;
  width: max-content;
  height: max-content;
  z-index: 100;
  /* padding: 0.6em 1.4em; */
  font-size: 1.25em;
  border-radius: 1.25em;
  border: none;
  background: none;
  color: #111;
  cursor: pointer;
  letter-spacing: 0.1em;
  /* transition: all 0.2s; */
  display: flex;
  font-family: 'TLOZ Awakening';
  font-family: "pt-mono", monospace;
font-weight: 400;
font-style: normal;
  align-items: center;
  justify-content: center;
   animation: hudGlowPulse 4s ease-in-out infinite;
}

#explore-btn:hover { background: #fff; }

.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  /* font-family: 'Share Tech Mono', 'Orbitron', 'DatDot', monospace, sans-serif;
  font-family: 'DatDot'; */
 font-family: "pt-mono", monospace;
font-weight: 400;
font-style: normal;
  color: var(--primary-color);
  user-select: none;
  animation: hudGlowPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 0.25px var(--primary-color)) drop-shadow(0 0 1px var(--primary-color));
     transition: opacity 0.35s ease; /* ADD THIS */
}

/* ✅ re-enable pointer events on interactive HUD elements */
.hud-icons,
.hud-site-title,
.hud-contact,
.hud-menu-toggle {
  pointer-events: auto;
}

.hud.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes hudGlowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 0.25px var(--primary-color)) drop-shadow(0 0 1px var(--primary-color));
  }
  50% {
    filter: drop-shadow(0 0 0.6px var(--primary-color)) drop-shadow(0 0 2.2px var(--primary-color));
  }
}

/* Category icons */
/* Transparent hover-bridge between Work and submenu */
.hud-bridge {
  position: absolute;
  top: 50%;
  left: calc(100% - 5px);  
  width: 20px;                 /* widen if still tricky */
  height: 50px;                /* tall enough to catch the cursor */
  transform: translateY(-50%);
  pointer-events: auto;        /* must be hoverable */
  background: rgba(255,0,0,0); /* fully invisible */
}

.hud-icons {
  position: absolute;
  left: 36px; 
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: auto;
  z-index: 10;
}

.hud-icon {
  background: var(--primary-color);               /* same base as #explore-btn */
  color: var(--accent-color);
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0.35em 1.2em;
  border-radius: 1.25em;             /* pill – matches explore-btn */
font-family: "pt-mono", monospace;
font-weight: 400;
font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  width: 100%;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  white-space: nowrap;
}

.hud-icon:hover,
.hud-icon:focus-visible {
  background: #ffffff;               /* same hover feel as explore-btn */
}

/* Keep WORK lit while submenu is open */
.hud-icon--work.is-open {
  background: #ffffff;   /* same as hover */
}


/* Wrapper around the "Work" button + its submenu */
.hud-main-item {
  position: relative;
}

/* Submenu that appears to the right of "Work" */
.hud-submenu {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translate(10px, -50%);
  display: none;             
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

/* When open */
.hud-submenu.is-open {
  display: flex;                 
  opacity: 1;
  pointer-events: auto;
  transform: translate(14px, -50%);
}


/* (optional) keep submenu text a touch smaller */
.hud-subitem {
  font-size: 0.8rem;
  padding: 0.3em 1.1em;
}

/* Style the Index icon ('i') to look like a badge/circle */
.icon-index {
  font-family: inherit;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  border: 2.5px solid #fff;
  border-radius: 50%;
  font-size: 1.1em;
  background: rgba(0,0,0,0.22);
  box-sizing: border-box;
}


/* Top center REC/ESC */
.hud-rec {
  position: absolute; top: 60px; right: 50px;
  /* transform: translateX(-50%); */
  letter-spacing: 0.18em;
  font-weight: 700;
  display: flex; align-items: right;
  font-size: 1.13em;
  pointer-events: none;
  user-select: none;
}
.rec-dot {
  display: inline-block;
  width: 11px; height: 11px;
  background: #f00; border-radius: 50%;
  margin-right: 8px;
  animation: rec-blink 1s steps(2, start) infinite;
}
@keyframes rec-blink { 0%, 100% { opacity: 1 } 50% { opacity: 0.2 } }

.hud-site-title {
  position: absolute; top: 36px; left: 36px;
   font-family: 'DatDot';
  background: none; border: none;
   font-size: 2em;
  padding: 0; margin: 0;
  display: flex; align-items: center;
  pointer-events: auto;
  color: var(--primary-color);
}
.hud-site-title a {
  color: inherit;
  text-decoration: none;
}
.hud-site-title a:hover {
  text-decoration: none;
}

/* Top right battery/menu */
.hud-battery {
  position: absolute; top: 34px; right: 54px;
  background: none; border: none;
  cursor: pointer; pointer-events: auto;
  padding: 0; margin: 0;
  display: flex; align-items: center;
}
.battery-icon {
  display: inline-block;
  width: 38px; height: 17px;
  background: #111;
  border: 2.5px solid #fff;
  border-radius: 3.5px;
  position: relative;
  margin-right: 4px;
  box-sizing: border-box;
}
.battery-icon::after {
  content: '';
  position: absolute; right: -6px; top: 4px;
  width: 6px; height: 9px;
  background: #fff; border-radius: 1.6px;
}
/* Fill bars inside battery (for visual effect) */
.battery-icon::before {
  content: '';
  display: block;
  position: absolute;
  left: 6px; top: 4px;
  width: 20px; height: 7px;
  background: #fff;
  border-radius: 2px;
}

/* Bottom right project info */
.hud-project {
   opacity: 0;
  transition: opacity 0.25s ease;
  position: fixed;
  bottom: 36px; right: 36px;
  text-align: right;
  line-height: 1.28;
  /* background: rgba(0,0,0,0.31); */
  border-radius: 7px;
  padding: 0.4em 1em 0.4em 1.3em;
  min-width: 180px;
  pointer-events: none;
  /* color: #fdfc00; */
  color: var(--primary-color);
  z-index: 2;
font-family: "pt-mono", monospace;
font-weight: 400;
font-style: normal;
}

.project-title {
  font-size: 1.12em;
  font-weight: 600;
  letter-spacing: 0.06em;
  display: block;
}
.project-client {
  font-size: 0.92em;
  /* color: #adadad; */
  letter-spacing: 0.05em;
  display: block;
}

/* Bottom left contact */
.hud-contact {
  position: absolute; left: 48px; bottom: 60px;
  background: none; border: none; color: var(--primary-color);
  font-size: 2em; opacity: 1;
  cursor: pointer; pointer-events: auto;
  transition: opacity 0.19s, filter 0.22s;
}
.hud-contact:hover,
.hud-contact:focus {
  opacity: 1; filter: drop-shadow(0 0 9px #0af8);
}

.cursor-project-bubble {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(20px, 0px); /* offset from pointer */
  pointer-events: none;
  z-index: 2;

  /* visual – piggyback on .hud-icon, but safe defaults: */

  font-size: 11px;
  line-height: 1.2;

  display: block;
  justify-content: baseline;
  flex-direction: column;
  gap: 2px;
width: auto;
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.cursor-project-bubble .cursor-project-title {
    /* padding: 6px 10px; */
  border-radius: 9999px;
text-transform: none;
  font-weight: 600;
    width: auto;
}

.cursor-project-bubble .cursor-project-client {
  opacity: 0.8;
     width: auto;
  text-transform: none;
  font-weight: 400;
    background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  margin-top: 2px;
}



/* Make sure default cursor is visible in viewfinder mode */
body.viewfinder-active {
  cursor: default;
}

/* Single Page */
.page-holder{
  background-color: #000;
  height: 100%;
  width: 100%;
}


/* Adjust selector if you have a custom post type, e.g. .single-project */
.single .project-full-video {
  /* min-height: 100vh; */
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: clamp(12px, 2vw, 32px); */
  box-sizing: border-box;
  justify-items: center;
  margin-top: 50px;
}

.project-full-video {
    justify-items: center;
}

/*
  This frame:
  - Uses a 16:9 aspect ratio (good default for video)
  - Width is limited so that:
    - It never goes wider than 100vw
    - It never becomes so wide that 16:9 height would exceed 100vh
*/
.project-full-video__frame {
  /* width: min(100vw, calc(16 / 9 * 100vh)); */
  aspect-ratio: 16 / 9;
  position: relative;
}

/* Make the embed fill the frame completely */
.project-full-video__frame iframe,
.project-full-video__frame video,
.project-full-video__frame embed,
.project-full-video__frame object {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-full-video__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;   /* or 'contain' if you prefer letterboxing */
  border: 0;
}

.project-full-video__frame-page img {
  /* position: absolute; */
  inset: 0;
  width: 100%;
  max-width: 1000px;
  height: auto;
  object-fit: cover;   /* or 'contain' if you prefer letterboxing */
  border: 0;
  padding-top: 20px;
  padding-bottom: 0px;
}

.video-desc img,
.video-desc iframe,
.video-desc video {
  max-width: 100%;
  height: auto;
  margin-top: 10px;
}



.video-info {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* width: min(100vw, calc(16 / 9 * 80vh), 1000px); */
  gap: 40px;
  align-items: start;
  /* max-width: 1200px; */
  margin-left: auto;
  margin-right: auto;
 font-family: "pt-mono", monospace;
font-weight: 400;
font-style: normal;
}

.video-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.video-desc {
  text-align: left;
}



.video-client, .video-title{
  color: var(--primary-color);
  font-family: "pt-mono", monospace;
font-weight: 400;
font-style: normal;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  width: fit-content;
  justify-self: center;
}


.video-desc{
   /* margin-top: 10px;
   margin-bottom: 20px; */
   line-height: 1.1;
}

.video-desc p{
  margin: 0;
  max-width: 800px;
  /* justify-self: center; */
}

.video-desc a{
  color: var(--primary-color);
}

.video-desc iframe {
  /* width: 100%; */
  aspect-ratio: 16 / 9;   /* keeps the shape */
  height: auto;
  display: block;
  max-width: 100%;
  border: 0;
}

.video-desc iframe + iframe {
  margin-top: 10px;
}

#initial-overlay {
  position: fixed;
  inset: 0;
  background: #000;        /* solid black */
  z-index: 3;            /* above splash + HUD + viewfinder */
  pointer-events: auto;
  transform: translateY(0); /* start fully covering the screen */
}



.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--accent-color);
  z-index: 3;
  pointer-events: none;
  transform: translateY(100%);
}

/* On the homepage, the overlay should start ON screen, covering everything */
.home .page-transition-overlay,
.front-page .page-transition-overlay {
  transform: translateY(0);    /* cover the screen on first paint */
  pointer-events: auto;        /* it can block clicks briefly */
}


/* Optional: prevent clicks during transition */
body.page-transitioning {
  pointer-events: none;
  cursor: wait;
}


.page-slide-wrapper {
  /* No transform/opacity here by default, so direct loads look normal */
  transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.page-slide-wrapper.page-slide-in {
  transform: translateY(0);
  opacity: 1;
}

.no-overflow{
  overflow: hidden;
  height: 100vh;
}

.page-transition{
  height: 200vh;
  background: #000;
}

/* MOBILE */
/*  Hidden on desktop */
.hud-menu-toggle {
  display: none;
}

/* Hidden by default (desktop) */
.splash-mobile-cta {
  display: none;
}

/*  Mobile HUD menu */
@media (max-width: 768px) {

  /* Hamburger button */
  .hud-menu-toggle {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1200;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: 1px solid var(--primary-color);
    background: 000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
  }

  .hud-menu-toggle span {
    display: block;
    width: 60%;
    height: 2px;
    background: var(--primary-color);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  /* X animation */
  body.hud-menu-open .hud-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  body.hud-menu-open .hud-menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  body.hud-menu-open .hud-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /*  Full-screen overlay, evenly spaced buttons */
 .hud-icons {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: #000;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 3rem 1.5rem;
    gap: 1.2rem;

    /* start off-screen to the right */
    transform: translateY(-100%);
    opacity: 1;
    pointer-events: none;
    transition:
      transform 0.5s cubic-bezier(.25,.8,.25,1),
      opacity   0.25s ease;
  }

  /* Slide in when menu is open */
  body.hud-menu-open .hud-icons {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Work + submenu as a vertical block */
  .hud-main-item {
    position: static;               /* override desktop relative */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  /* Submenu always visible, directly under Work */
  .hud-submenu,
  .hud-submenu.is-open {
    position: static;               /* no absolute positioning */
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    opacity: 1;
    pointer-events: auto;
  }

  /* No hover-bridge on mobile */
  .hud-bridge {
    display: none;
  }

  /* Slightly larger tap targets if you like */
  .hud-icon {
    font-size: 1rem;
    width: auto;
    min-width: 200px;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    justify-content: center;
  }

  /* Hide the old bottom-left Contact HUD button on mobile */
  .hud-contact {
    display: none;
  }

  /* Keep site title in top-left above overlay */
  .hud-site-title {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;
  }


  .hud-subitem{
        background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  }

  .entry-content{
    margin-top: 65px;
  }


  body:not(.viewfinder-active) .splash-mobile-cta {
    position: absolute;
    display: grid;
    gap: 10px;
    height: 100%;
    width: 100%;
    align-content: center;
    justify-content: center;
    z-index: 3; /* above splash, below HUD if needed */
    pointer-events: none;
  }

   body:not(.viewfinder-active) .splash-mobile-cta .splash-btn {
    font-size: 1rem;
    text-transform: uppercase;
    border-radius: 1.25em;
    background: none;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    outline: none;
    cursor: pointer;
    padding: 0.6rem 2rem;
font-family: "pt-mono", monospace;
font-weight: 400;
font-style: normal;
    pointer-events: auto;
    width: 200px;
  }

  .splash-btn--work {
    /* tweak if you want it to look primary */
    /* font-weight: 600; */
  } 

  .hud-project{
    bottom: 0px;
    right: 0px;
    padding: 20px;
  }

  .video-info{
    padding: 0 10px;
  }



  .video-info {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* .video-meta {
    align-items: center;
    text-align: center;
  }

  .video-desc {
    text-align: center;
  } */


}