/* =========================================
   ROOT & RESET
========================================= */

:root {
  --accent: #7dd3fc;
  --muted: rgba(255, 255, 255, 0.65);
  --footer-height: 48px;

  /* ARTEFACT session grading (subtle) */
  --artefact-hue: 0deg;
  --artefact-sat: 1;
  --artefact-contrast: 1;
  --artefact-drift: 0px;
  --artefact-bright: 1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* Base body – home/gallery refine this with classes */
body {
  font-family: Inter, system-ui, Segoe UI, Roboto, "Helvetica Neue", Arial;
  color: #fff;
  background: #000;
  overflow: hidden;
}

/* =========================================
   PAGE MODES
========================================= */

/* HOME PAGE – centred card, no scroll */
body.page-home {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* GALLERY PAGE – standard scrolling document */
body.page-gallery {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Boot state – allow starfield + boot, but keep layout rules */
body.booting {
  /* no special layout needed; JS just fades in content */
}

/* =========================================
   ARTEFACTS — gentle session grading
========================================= */
body.artefact-tick {
  --artefact-bright: 1.03;
}

body[data-artefact] .card,
body[data-artefact] .gallery-container,
body[data-artefact] .footer,
body[data-artefact] #controls {
  filter: hue-rotate(var(--artefact-hue))
          saturate(var(--artefact-sat))
          contrast(var(--artefact-contrast))
          brightness(var(--artefact-bright));}



/* =========================================
   ARTEFACT STATUS — pixel telemetry
========================================= */
#artefactStatus {
  margin-top: 6px;
  font-family: 'TopazA500', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  opacity: 0.6;
  user-select: none;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#artefactStatus.flash {
  opacity: 0.95;
}

#artefactStatus .hint {
  opacity: 0.55;
  margin-left: 6px;
}

[data-artefact] #artefactStatus {
  opacity: 0.75;
}
/* =========================================
   CANVASES / BACKGROUND LAYERS
========================================= */

#boot-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: block;
  image-rendering: pixelated;
}

#starfield-back,
#starfield-front {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -2;
  image-rendering: pixelated;
}

#starfield-front {
  z-index: -1;
}

/* =========================================
   CRT MODE — overlay only, safe for animations
========================================= */

body.crt-active {
  position: relative;
  overflow: hidden;

  /* screen curvature only (no animation, no filter here) */
  transform: perspective(900px) translateZ(0) scale(1.004);

  /* soft bloom on text */
  text-shadow:
    0 0 2px rgba(255,255,255,0.25),
    0 0 5px rgba(120,180,255,0.12);
}

/* Horizontal scanlines + chromatic aberration + flicker */
body.crt-active::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999999;

  /* pixel-perfect 1084S horizontal lines */
  background-image: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0,
    rgba(0,0,0,0) 1px,
    rgba(0,0,0,0.25) 1px,
    rgba(0,0,0,0.25) 2px
  );
  background-size: 100% 2px;

  mix-blend-mode: multiply;
  opacity: 0.6;

  /* slight channel wobble/flicker simulated via brightness */
  animation: crt-flicker 0.09s infinite linear;
}

/* Noise mask */
body.crt-active::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999998;

  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAADUlEQVQI12NgYGD4DwABBAEA0dWL9wAAAABJRU5ErkJggg==");
  opacity: 0.12;
  mix-blend-mode: soft-light;
  animation: crt-noise 0.32s steps(2) infinite;
}

/* Vignette */
body.crt-active .vignette,
body.crt-active .crt-vignette {
  content: "";
  position: fixed;
  pointer-events: none;
  inset: 0;
  z-index: 999997;
  background:
    radial-gradient(
      ellipse at center,
      rgba(0,0,0,0) 35%,
      rgba(0,0,0,0.35) 90%
    );
}

/* Flicker + noise keyframes (unchanged) */
@keyframes crt-flicker {
  0%   { opacity: 1; }
  50%  { opacity: 0.985; }
  100% { opacity: 1; }
}

@keyframes crt-noise {
  0%   { background-position: 0 0; }
  100% { background-position: 2px 2px; }
}

/* ==========================================================
   OPTIONAL: Slight scanline "wobble" (looks VERY real)
   Uncomment if you want it.
   ========================================================== */

body.crt-active {
  animation:
    crt-flicker 0.09s infinite linear,
    crt-hum 0.6s infinite ease-in-out;
}

@keyframes crt-hum {
  0%   { filter: brightness(1) contrast(1); }
  50%  { filter: brightness(0.98) contrast(0.98); }
  100% { filter: brightness(1) contrast(1); }
}




/* CRT toggle button */
/* Position container where CRT button used to sit */
#controls {
  position: fixed;
  top: 20px;      /* adjust to taste */
  right: 20px;    /* adjust to taste */
  display: flex;  
  gap: 10px;      /* space between CRT and zen */
  z-index: 999999; 
}

body.is-touch #artefact-toggle,
body.is-touch #artefactStatus {
  display: none !important;
}
/* Matching button style */
#controls > div {
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  color: #fff;
  user-select: none;
  transition: background 0.2s, opacity 0.3s;
}

#controls > div:hover {
  background: rgba(255,255,255,0.15);
}

/* Optional: active/pressed effect */
body.crt-active #crt-toggle {
  background: rgba(255,255,255,0.25);
}

body.zen-mode #zen-toggle {
  background: rgba(255,255,255,0.25);
}

/*#crt-toggle:hover {
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.9);
}*/

/* =========================================
   NIBLET
========================================= */
/* Ensure CRT never pauses zen logo animation */
body.crt-active body.zen-mode #logo-wrap img,
body.crt-active body.zen-mode #logo-wrap .logo {
  animation-play-state: running !important;
}
#niblet {
  position: fixed;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition:
    bottom 1.4s ease-out,
    opacity 1s ease-out;
  z-index: 1001;
  pointer-events: none;
  image-rendering: pixelated;
  animation: nibFloat 3.2s ease-in-out infinite;
  animation-play-state: paused; /* only bob when active */
}

#niblet.active {
  bottom: 48px;
  opacity: 1;
  animation-play-state: running;
}

@keyframes nibFloat {
  0%   { transform: translateX(-50%) translateY(0px); }
  50%  { transform: translateX(-50%) translateY(-4px); }
  100% { transform: translateX(-50%) translateY(0px); }
}

/* =========================================
   PIXEL FONT
========================================= */

@font-face {
  font-family: 'TopazA500';
  src: url('/fonts/TopazA500.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

.pixel {
  font-family: 'TopazA500', monospace;
  letter-spacing: 0.4px;
  font-size: 14px;
}

/* =========================================
   HOME CARD (index.php)
========================================= */

/* Dynamic scaling: width follows viewport, clamped */
.card {
  position: relative;
  text-align: center;
  padding: 48px 36px;
  border-radius: 14px;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.46);
  box-shadow:
    0 18px 45px rgba(2, 6, 23, 0.9),
    0 0 32px rgba(90, 180, 255, 0.24);

  /* The magic: scale with viewport, but never too huge */
  width: min(90vw, 820px);
  margin: 0 auto;
  overflow: hidden;
}

/* Glow */
.card::before {
  content: "";
  position: absolute;
  inset: -25%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%,
      rgba(125, 211, 252, 0.32) 0,
      transparent 55%);
  opacity: 0.35;
  mix-blend-mode: screen;
  z-index: -1;
}

/* Noise */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1' numOctaves='2' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  background-size: 40px 40px;
  z-index: 1;
}

.card > * {
  position: relative;
  z-index: 2;
}

/* Boot fade-in */
body.booting .card {
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.4s ease-out 0.15s,
    transform 0.4s ease-out 0.15s;
}
body.booting #controls {
  display: none;
}
body.boot-done .card {
  opacity: 1;
  transform: scale(1);
}

/* Logo inside card – safe on mobile, not huge */
.card .logo {
  max-width: 260px;
  width: 60%;
  height: auto;
  display: block;
  margin: 0 auto 12px;
}

/* Home text/links */
h1 {
  margin: 0 0 18px;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -1px;
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 0 8px rgba(125, 211, 252, 0.5);
}

.subtitle {
  color: var(--muted);
  margin-bottom: 22px;
  font-weight: 400;
}

.links {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.link:hover,
.link:focus {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(125, 211, 252, 0.4);
  background: rgba(125, 211, 252, 0.15);
}

/* Prevent iframe pretending to be a button */
.no-float {
  transform: none !important;
  transition: none !important;
}

.tagline {
  margin-top: 20px;
}

/* Video */
/* Small inner card that holds the video */
.video-card {
  margin-top: 18px;
  width: 100%;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;

  padding: 0 12px 12px 12px;   /* top = 0, sides & bottom = 12px */

  border-radius: 14px;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(6px);

  box-shadow:
    0 12px 28px rgba(2, 6, 23, 0.7),
    0 0 22px rgba(90, 180, 255, 0.25);
}

/* Actual 16:9 video area inside that card */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
}

.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.home-blog-panel {
  margin-top: 18px;
  width: 100%;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(6px);
  box-shadow:
    0 12px 28px rgba(2, 6, 23, 0.7),
    0 0 22px rgba(90, 180, 255, 0.2);
  text-align: left;
  overflow: hidden;
}

.home-blog-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  user-select: none;
}

.home-blog-summary::-webkit-details-marker {
  display: none;
}

.home-blog-summary::after {
  content: "+";
  float: right;
  opacity: 0.7;
}

.home-blog-panel[open] .home-blog-summary::after {
  content: "-";
}

.home-blog-content {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.home-blog-thumb-link {
  display: block;
}

.home-blog-thumb-frame {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 16 / 7;
}

.home-blog-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--header-focus-x, 50%) var(--header-focus-y, 50%);
  transform: scale(var(--header-zoom, 1));
  transform-origin: center;
}

.home-blog-date {
  margin-bottom: 8px;
  opacity: 0.72;
}

.home-blog-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 800;
}

.home-blog-title a,
.home-blog-read-more a {
  color: #fff;
  text-decoration: none;
}

.home-blog-title a:hover,
.home-blog-title a:focus,
.home-blog-read-more a:hover,
.home-blog-read-more a:focus {
  color: var(--accent);
}

.home-blog-excerpt,
.home-blog-empty {
  margin: 0;
  color: rgba(255,255,255,0.86);
}

.home-blog-read-more {
  margin: 12px 0 0;
}



/* =========================================
   FOOTER
========================================= */

.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-align: center;
  padding: 8px 0;
  font-family: 'TopazA500', monospace;
  letter-spacing: 0.4px;
  font-size: 14px;
  z-index: 10;
}

/* On gallery page, footer flows at bottom of content */
body.page-gallery .footer {
  position: static;
  margin-top: 40px;
}

/* =========================================
   GALLERY (gallery.php)
========================================= */

h1.pixel {
  font-size: 54px;
  text-align: center;
  margin: 24px 0;
}

.gallery-container {
  max-width: 1024px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 16px 0;
}

/* Back arrow */
.back-arrow {
  position: fixed;
  top: 20px;
  left: 20px;
  font-size: 32px;
  color: #fff;
  text-decoration: none;
  z-index: 20;
}

.back-arrow:hover {
  color: var(--accent);
}

/* Grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding-bottom: 20px;
}

.gallery img {
  width: 100%;
  height: 225px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery img:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 10px 30px rgba(125, 211, 252, 0.3);
}

/* =========================================
   LIGHTBOX
========================================= */

#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 999;
}

#lightbox.show {
  display: flex;
}

#lightbox-img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(125, 211, 252, 0.3);
}

#lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 32px;
  cursor: pointer;
  color: #fff;
  font-weight: bold;
}

#lightbox .close:hover {
  color: var(--accent);
}

#lightbox .exif {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
}

/* =========================================
   RESPONSIVE TWEAKS
========================================= */

@media (max-width: 768px) {
  .card {
    padding: 32px 20px;
    width: min(94vw, 820px); /* slightly closer to edges on small screens */
  }

  .card .logo {
    width: 70%;
    max-width: 220px;
  }

  h1 {
    font-size: 44px;
  }

  h1.pixel {
    font-size: 42px;
  }

  .gallery-container {
    padding-top: 32px;
  }

  .home-blog-title {
    font-size: 20px;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery img {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .card {
    width: 94vw;
  }

  .card .logo {
    width: 75%;
    max-width: 200px;
  }
}

/* ============================================================
   GALLERY PAGE — FINAL CLEAN, ISOLATED LAYOUT
============================================================ */

body.page-gallery {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.page-gallery .gallery-container {
  flex: 1 0 auto !important;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 40px !important;
}

body.page-gallery .footer {
  position: relative !important;
  flex-shrink: 0 !important;
  margin-top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
}
/* ==========================================================
   ZEN MODE — hide card, keep logo, move it downward
   ========================================================== */

/* Hide controls during boot */
body.booting #controls {
  display: none !important;
}

/* Hide all card children except the logo */
body.zen-mode .card > *:not(#logo-wrap) {
  opacity: 0 !important;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.3, 0.7, 0.3, 1);
  pointer-events: none;
}

/* Remove background/noise layers */
body.zen-mode .card {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
body.zen-mode .card::before,
body.zen-mode .card::after {
  opacity: 0 !important;
}

/* Additional card text elements */
body.zen-mode .links-wrap,
body.zen-mode .tagline,
body.zen-mode .pixel.tagline {
  opacity: 0 !important;
  transform: translateY(25px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Logo container */
#logo-wrap {
  position: relative;
  display: inline-block;
  z-index: 5;
  transition: transform 0.8s cubic-bezier(0.3, 0.7, 0.3, 1),
              opacity 0.5s ease;
}

/* Zen mode: move logo + isolate it */
body.zen-mode #logo-wrap {
  transform: translateY(20vh);
  opacity: 1 !important;
  z-index: 99999 !important;
  pointer-events: none;
}

/* Dark halo behind logo (for any background) */
body.zen-mode #logo-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 240px;
  height: 240px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.32) 40%,
    rgba(0,0,0,0.0) 100%
  );
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}
/*
body.zen-mode #logo-wrap img,
body.zen-mode #logo-wrap .logo {
  animation:
    zen-float 5.4s ease-in-out infinite,
    zen-glow 3.8s ease-in-out infinite,
    zen-hue 35s ease-in-out infinite;

  will-change: transform, filter;
  transform: translate3d(0,0,0);
}
*/
body.zen-mode #logo-wrap img,
body.zen-mode #logo-wrap .logo {
  image-rendering: pixelated;
  animation:
    zen-glow 3.8s ease-in-out infinite,
    zen-hue 35s ease-in-out infinite;
  will-change: transform, filter;
}

/* ==========================================================
   ZEN — LOGO ANIMATIONS (float, glow, hue shift)
   ========================================================== */

/* These run *even when CRT mode is active* */
body.zen-mode #logo-wrap img,
body.zen-mode #logo-wrap .logo {
  image-rendering: pixelated;

  /* Combined animations — order matters */
  animation:
    zen-float 5.4s ease-in-out infinite,
    zen-glow 3.8s ease-in-out infinite,
    zen-hue 18s ease-in-out infinite; /* STRONG colour shift */
}

/* Pixel-perfect vertical float */

@keyframes zen-float {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(0, -2px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}



@keyframes zen-glow {
  0%   { filter: drop-shadow(0 0 0px rgba(80,160,255,0.0)); }
  50%  { filter: drop-shadow(0 0 4px rgba(80,160,255,0.35)); }
  100% { filter: drop-shadow(0 0 0px rgba(80,160,255,0.0)); }
}

/* STRONG colour cycle — demoscene style */
@keyframes zen-hue {
  0%   { filter: hue-rotate(0deg); }
  33%  { filter: hue-rotate(60deg); }
  66%  { filter: hue-rotate(120deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Dim buttons when relaxing */
body.zen-mode #crt-toggle,
body.zen-mode #zen-toggle {
  opacity: 0.7;
}

#logo-wrap img,
#logo-wrap .logo {
  will-change: transform, filter;
  transform: translate3d(0,0,0);
}
/* ============================================================
   HOME PAGE — FINAL RESTORATION
============================================================ */

body.page-home {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100svh; /* important */
  overflow: hidden;
  flex-direction: column;
  padding-top: 0;
}

body.page-home .footer {
  position: fixed !important;
  bottom: 0;
  left: 0;
  width: 100%;
}
.card .video-container {
  margin-top: 20px;     /* restore spacing */
}


/* FORCE subcard styling */
.subcard {
  margin-top: 24px !important;
  padding: 20px !important;
  border-radius: 14px !important;
  background: rgba(0, 0, 0, 0.38) !important;
  backdrop-filter: blur(6px) !important;
  box-shadow:
    0 12px 28px rgba(2, 6, 23, 0.7),
    0 0 22px rgba(90, 180, 255, 0.25) !important;

  width: 100%;
  max-width: 560px;
  margin-left: auto !important;
  margin-right: auto !important;
}
#logo-wrap {
    display: inline-block;
    position: relative;
     z-index: 5; 
}
body.zen-mode #logo-wrap {
  z-index: 9999; /* zen mode */
}

#diz-window {
    position: fixed;
    display: none;
    pointer-events: none;
    z-index: 9999;

    background: #0050a0;
    border: 2px solid #ffffff;
    border-radius: 2px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.6);

    min-width: 180px;
    max-width: 420px;
}

@media (max-width: 768px) {
  body.page-home,
  body.is-touch.page-home {
    display: block;
    min-height: 100svh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 16px calc(var(--footer-height) + 24px);
  }

  body.page-home .card,
  body.is-touch.page-home .card {
    width: min(100%, 820px);
    margin: 0 auto;
  }

  body.page-home .footer,
  body.is-touch.page-home .footer {
    position: static !important;
    width: 100%;
    margin-top: 20px;
  }
}

.diz-titlebar, .diz-content {
    font-family: 'TopazA500', monospace !important;
}

/* Lazy YouTube */
.yt-lazy {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255,255,255,0.05);
}

.yt-lazy img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  filter: brightness(0.85);
  transition: filter 0.25s;
  image-rendering: auto;
}

.yt-lazy:hover img {
  filter: brightness(1);
}

.yt-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(0,0,0,0.6);
}

.yt-play-button::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 18px;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent #fff;
}

#logo-wrap {
    position: relative;
}

#zen-tagline {
  position: absolute;
  top: calc(60% + 16px);
  left: 50%;                 /* this will be overridden by JS, but harmless */
  transform: translateX(-50%);
  margin-top: 10px;
  opacity: 0;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  color: rgba(255,255,255,0.9);
  text-shadow:
    0 0 12px rgba(255,255,255,0.65),
    0 0 24px rgba(120,120,255,0.55);

  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

/* hidden by default */
#zen-tagline {
  display: none;
}


body.zen-mode #zen-tagline {
  display: block !important;
  opacity: 1 !important;
}

#zen-tagline {
    position: absolute;
    z-index: 999999 !important;
}
#starfield-back,
#starfield-front {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1 !important;
    pointer-events: none; /* Already probably set */
}


/* =========================================
   CRT — very slow warmth drift (subtle)
   Applies to starfield only to avoid filter conflicts
========================================= */
body.crt-active #starfield-back,
body.crt-active #starfield-front {
  animation: crt-warmth 45s ease-in-out infinite;
}
#starfield-back,
#starfield-front {
  pointer-events: none;
}

@keyframes crt-warmth {
  0%   { filter: hue-rotate(0deg); }
  50%  { filter: hue-rotate(2deg); }
  100% { filter: hue-rotate(0deg); }
}
