/*
 Theme Name:   Digital Rivets Child
 Theme URI:    https://digitalrivets.net
 Description:  Digital Rivets child theme for GeneratePress
 Author:       Eric
 Template:     generatepress
 Version:      2.0.0
 Text Domain:  digitalrivets-child
*/

/* Google Fonts loaded via wp_enqueue_style in inc/enqueue.php */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --black:      #0a0a08;
  --dark:       #111210;
  --plate:      #1a1c18;
  --green:      #39ff14;
  --green-dim:  #1f8c08;
  --rust:       #b05a20;
  --rust-light: #d4784a;
  --offwhite:   #e8e4dc;
  --grey:       #8a8880;
  --font-mono:  'Share Tech Mono', monospace;
  --font-head:  'Oswald', sans-serif;
  --font-body:  'Rajdhani', sans-serif;
}

/* ============================================
   GLOBAL RESET
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  overflow-x: hidden !important;
}

body {
  background: var(--black) !important;
  color: var(--offwhite) !important;
  font-family: var(--font-body) !important;
  font-size: 17px;
  line-height: 1.6;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--green-dim); border-radius: 3px; }

/* ============================================
   SITE WRAPPER - NO WHITE SIDES
   ============================================ */
#page,
.site,
.site-content,
.inside-site-content {
  background: var(--black) !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Kill GP grid container constraints on homepage */
.home .grid-container,
.home .inside-site-content {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ============================================
   HEADER - DARK, FIXED, FULL WIDTH
   ============================================ */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: rgba(10,10,8,0.97) !important;
  border-bottom: 1px solid rgba(57,255,20,0.15) !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.site-header .inside-header {
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 1.25rem 0 1.5rem !important;
  height: 64px !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* ── Site title / branding ── */
.site-branding {
  display: flex !important;
  align-items: center !important;
}

.site-branding .site-title {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.site-branding .site-title a {
  font-family: var(--font-mono) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: var(--green) !important;
  letter-spacing: 4px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  text-shadow: 0 0 10px rgba(57,255,20,0.4) !important;
}

.site-branding .site-description {
  display: none !important;
}

/* ── Navigation ── */
.site-header .main-navigation,
#site-navigation {
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
}

/* The ul GP renders inside .main-nav */
.site-header .main-navigation ul,
.site-header .main-navigation .main-nav ul,
#site-navigation ul {
  background: transparent !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 1.4rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

.site-header .main-navigation ul li,
#site-navigation ul li {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* All nav links - override GP's blue default */
.site-header .main-navigation ul li a,
.site-header .main-navigation ul li a:link,
.site-header .main-navigation ul li a:visited,
#site-navigation ul li a,
#site-navigation ul li a:link,
#site-navigation ul li a:visited {
  font-family: 'Oswald', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: #8a8880 !important;
  text-decoration: none !important;
  background: transparent !important;
  padding: 4px 0 !important;
  display: inline-block !important;
  transition: color 0.2s !important;
  border: none !important;
  box-shadow: none !important;
}

.site-header .main-navigation ul li a:hover,
.site-header .main-navigation ul li a:active,
.site-header .main-navigation ul li a:focus,
.site-header .main-navigation ul li.current-menu-item > a,
#site-navigation ul li a:hover,
#site-navigation ul li a:active,
#site-navigation ul li a:focus {
  color: #e8e4dc !important;
  -webkit-text-fill-color: #e8e4dc !important;
  background: transparent !important;
}

/* Last nav item = Contact = green bordered button */
.site-header .main-navigation ul li:last-child,
#site-navigation ul li:last-child {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}
.site-header .main-navigation ul li:last-child > a,
.site-header .main-navigation ul li:last-child > a:link,
.site-header .main-navigation ul li:last-child > a:visited,
#site-navigation ul li:last-child > a {
  border: 1px solid #39ff14 !important;
  color: #39ff14 !important;
  padding: 6px 16px !important;
  font-family: 'Share Tech Mono', monospace !important;
  font-size: 11px !important;
  letter-spacing: 2px !important;
  transition: background 0.2s, color 0.2s !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  min-width: 90px !important;
  text-align: center !important;
}

.site-header .main-navigation ul li:last-child > a:hover,
#site-navigation ul li:last-child > a:hover {
  background: #39ff14 !important;
  color: #0a0a08 !important;
}

/* Prevent nav squish at intermediate widths 769-900px */
@media (max-width: 900px) and (min-width: 769px) {
  .site-header .main-navigation ul,
  .site-header .main-navigation .main-nav ul {
    gap: 16px !important;
  }
  .site-header .inside-header {
    padding: 0 0.75rem 0 1rem !important;
  }
}

/* ── Short viewport: shrink hero content so button always shows ── */
@media (max-height: 700px) {
  .dr-hero-logo    { width: min(180px, 35vw) !important; margin-bottom: 1rem !important; }
  .dr-hero-tagline { display: none !important; }
  .dr-hero-headline{ font-size: clamp(22px, 4vw, 36px) !important; margin-bottom: 0.6rem !important; }
  .dr-hero-sub     { font-size: clamp(12px, 2vw, 14px) !important; margin-bottom: 1.5rem !important; }
  .dr-hero         { padding: 1.5rem 0 !important; }
}
@media (max-height: 550px) {
  .dr-hero-logo    { display: none !important; }
  .dr-hero-tagline { display: none !important; }
  .dr-hero-headline{ font-size: clamp(18px, 3.5vw, 28px) !important; margin-bottom: 0.5rem !important; }
  .dr-hero-sub     { display: none !important; }
  .dr-hero         { padding: 1rem 0 !important; align-items: center !important; }
}

/* ============================================
   HOMEPAGE CONTENT RESET
   ============================================ */
.home .content-area,
.home #primary,
.home .site-main,
.home article,
.home .inside-article,
.home .entry-content,
.home .entry-header,
.home .page-header {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  float: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Hide page title on homepage */
.home .entry-header,
.home h1.entry-title {
  display: none !important;
}

/* Hide sidebar on homepage */
.home #secondary,
.home .widget-area {
  display: none !important;
}

/* Push content below fixed header */
.home .site-content {
  padding-top: 64px !important;
}

/* ============================================
   HERO SECTION
   ============================================ */
.dr-hero {
  width: 100% !important;
  /* Always tall enough to show all content */
  min-height: calc(100vh - 64px) !important;
  height: auto !important;
  background: var(--dark) !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  /* No overflow:hidden here — that was clipping the button */
  overflow: visible !important;
  margin: 0 !important;
  padding: 3rem 0 !important;
  box-sizing: border-box !important;
}

#dr-matrix-canvas {
  position: absolute !important;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0.18;
  pointer-events: none !important;
  /* Canvas clips itself to the hero bounds */
  overflow: hidden !important;
}

.dr-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 2rem 2.5rem !important;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.dr-hero-logo {
  width: min(420px, 70vw) !important;
  margin: 0 auto 2rem !important;
  display: block !important;
  animation: dr-fadeUp 1s ease both;
}

.dr-hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: dr-fadeUp 1s 0.65s ease both;
  /* Prevent buttons from ever being the first thing clipped */
  padding-bottom: 0.5rem;
}

.dr-hero-tagline {
  font-family: var(--font-mono) !important;
  font-size: clamp(11px, 2vw, 13px) !important;
  color: var(--green) !important;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 1rem !important;
  animation: dr-fadeUp 1s 0.2s ease both;
  text-shadow: 0 0 12px rgba(57,255,20,0.4);
}

.dr-hero-headline {
  font-family: var(--font-head) !important;
  font-size: clamp(28px, 5vw, 54px) !important;
  font-weight: 700 !important;
  color: var(--offwhite) !important;
  line-height: 1.1 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  margin-bottom: 1.2rem !important;
  animation: dr-fadeUp 1s 0.35s ease both;
}

.dr-hero-headline span {
  color: var(--rust-light) !important;
}

.dr-hero-sub {
  font-family: var(--font-body) !important;
  font-size: clamp(14px, 2.5vw, 17px) !important;
  color: var(--grey) !important;
  max-width: 520px;
  margin: 0 auto 2.5rem !important;
  animation: dr-fadeUp 1s 0.5s ease both;
}

/* GET IN TOUCH - always green, never changes */
a.dr-btn-primary,
a.dr-btn-primary:link,
a.dr-btn-primary:visited,
a.dr-btn-primary:active,
a.dr-btn-primary:focus {
  font-family: var(--font-mono) !important;
  font-size: 13px !important;
  letter-spacing: 2px !important;
  background: var(--green) !important;
  background-color: #39ff14 !important;
  color: #0a0a08 !important;
  border: none !important;
  padding: 14px 32px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  display: inline-block !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-text-fill-color: #0a0a08 !important;
  transition: background 0.2s, color 0.2s, transform 0.15s !important;
  position: relative !important;
}

a.dr-btn-primary:hover {
  background: #9b30ff !important;
  background-color: #9b30ff !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  transform: translateY(-1px) !important;
}


a.dr-btn-secondary,
a.dr-btn-secondary:link,
a.dr-btn-secondary:visited,
a.dr-btn-secondary:active {
  font-family: var(--font-mono) !important;
  font-size: 13px !important;
  letter-spacing: 2px !important;
  background: transparent !important;
  color: var(--rust-light) !important;
  border: 1px solid var(--rust) !important;
  padding: 14px 32px !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  display: inline-block !important;
  transition: background 0.2s, color 0.2s !important;
}

a.dr-btn-secondary:hover {
  background: var(--rust) !important;
  color: var(--offwhite) !important;
}

.dr-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.dr-scroll-hint span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--grey);
  text-transform: uppercase;
}

.dr-scroll-arrow {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--green), transparent);
  animation: dr-scrollPulse 2s infinite;
}

/* ============================================
   SERVICE PANELS - 3 COLUMN
   ============================================ */
.dr-panels {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--black);
  content-visibility: auto;
  contain-intrinsic-size: auto 700px;
}

.dr-panel {
  position: relative !important;
  min-height: 85vh !important;
  max-height: 700px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  overflow: hidden !important;
  cursor: pointer !important;
  contain: layout style paint;
}

.dr-panel-privacy {
  background:
    linear-gradient(to top, rgba(0,0,0,0.90) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.45) 100%),
    radial-gradient(ellipse at 30% 60%, rgba(57,255,20,0.22) 0%, transparent 55%),
    linear-gradient(135deg, #020d02 0%, #051505 40%, #000 100%);
}

.dr-panel-hardware {
  background:
    linear-gradient(to top, rgba(0,0,0,0.90) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.45) 100%),
    radial-gradient(ellipse at 60% 40%, rgba(180,90,30,0.28) 0%, transparent 55%),
    linear-gradient(135deg, #120800 0%, #1a0e03 40%, #080400 100%);
}

.dr-panel-it {
  background:
    linear-gradient(to top, rgba(0,0,0,0.90) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.45) 100%),
    radial-gradient(ellipse at 50% 30%, rgba(40,100,180,0.22) 0%, transparent 55%),
    linear-gradient(135deg, #020510 0%, #030812 40%, #000 100%);
}

/* Grid texture overlay */
.dr-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(57,255,20,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,255,20,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: 1;
  pointer-events: none;
}

/* Panel separators */
.dr-panel:not(:last-child) {
  border-right: 1px solid rgba(57,255,20,0.1) !important;
}

/* Full-panel clickable overlay */
.dr-panel-link-wrap {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 3 !important;
  display: block !important;
  cursor: pointer !important;
  text-decoration: none !important;
  background: transparent !important;
}

/* Make explore link sit above the full-panel overlay */
.dr-panel-content {
  pointer-events: none !important;
}

.dr-panel-content a.dr-panel-link {
  pointer-events: all !important;
  position: relative !important;
  z-index: 10 !important;
}

/* SVG scene illustration — 3D CAD wireframe models */
.dr-panel-scene {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 42%;
  padding-top: 3.5%;
  z-index: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0.62;
  transition: opacity 0.15s ease;
  pointer-events: none;
  will-change: opacity;
  overflow: hidden;
  box-sizing: border-box;
  transform: none !important;
}
.dr-panel:hover .dr-panel-scene {
  opacity: 0.95;
  transform: none !important;
}
.dr-panel-scene svg {
  width: 82%; height: 82%;
  max-width: none; max-height: none;
  flex-shrink: 0;
  transition: transform 0.2s ease, filter 0.15s ease;
  will-change: transform;
}
.dr-panel:hover .dr-panel-scene svg {
  transform: scale(2.5) !important;
  filter: brightness(1.15);
}
.dr-scene-hardware svg { transform: scale(1.6); transform-origin: 50% 50%; }
.dr-scene-it svg { transform: scale(1.4); transform-origin: 50% 55%; }

/* Lock: single animated SVG (shackle swings open→closed on loop) */
.dr-lock {
  position: absolute;
  top: 3.5%; left: 9%;
  width: 82%; height: 82%;
  transform: scale(1.8);
  transform-origin: 50% 50%;
  opacity: 1;
}

/* Panel text content */
.dr-panel-content {
  position: relative !important;
  z-index: 4 !important;
  padding: 2.5rem 2rem !important;
  overflow: hidden;
}

/* ============================================
   FULL CRT GLITCH — RGB layer separation on
   ALL text in the panel content on hover.
   Every text element gets ::before/::after
   color-channel ghosts + horizontal tearing.
   ============================================ */

/* --- Shared setup for all glitchable text --- */
.dr-panel-number,
.dr-panel-title,
.dr-panel-desc,
a.dr-panel-link {
  position: relative !important;
  will-change: transform;
}

/* --- Cyan ghost layer (::before) on all text --- */
.dr-panel-title::before,
.dr-panel-number::before,
.dr-panel-desc::before,
a.dr-panel-link::before {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  will-change: transform, opacity;
}

/* --- Magenta ghost layer (::after) on all text --- */
.dr-panel-title::after,
.dr-panel-desc::after {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  will-change: transform, opacity;
}

/* --- Set content for each element's ghosts --- */
.dr-panel-title::before,
.dr-panel-title::after {
  content: attr(data-text);
}

.dr-panel-number::before {
  content: attr(data-text);
}

.dr-panel-desc::before,
.dr-panel-desc::after {
  content: attr(data-text);
}

/* Panel link already has ::after for "→", so only use ::before for it */
a.dr-panel-link::before {
  content: attr(data-text);
}

/* ============================================
   ACTIVATE on hover — all ghosts come alive
   ============================================ */

/* --- Title: full RGB split --- */
.dr-panel:hover .dr-panel-title::before {
  color: rgba(0, 255, 220, 0.8) !important;
  -webkit-text-fill-color: rgba(0, 255, 220, 0.8) !important;
  opacity: 1;
  animation: dr-glitch-cyan-hard 2.5s steps(1) infinite;
}
.dr-panel:hover .dr-panel-title::after {
  color: rgba(255, 0, 80, 0.7) !important;
  -webkit-text-fill-color: rgba(255, 0, 80, 0.7) !important;
  opacity: 1;
  animation: dr-glitch-magenta-hard 2.5s steps(1) infinite 0.15s;
}
.dr-panel:hover .dr-panel-title {
  animation: dr-base-text-tear 2.5s steps(1) infinite;
}

/* --- Number: cyan ghost + base shift --- */
.dr-panel:hover .dr-panel-number::before {
  color: rgba(0, 255, 220, 0.7) !important;
  -webkit-text-fill-color: rgba(0, 255, 220, 0.7) !important;
  opacity: 1;
  animation: dr-glitch-cyan-med 3s steps(1) infinite 0.3s;
}
.dr-panel:hover .dr-panel-number {
  animation: dr-base-text-tear 3s steps(1) infinite 0.3s;
}

/* --- Description: both ghosts + base shift --- */
.dr-panel:hover .dr-panel-desc::before {
  color: rgba(0, 255, 220, 0.6) !important;
  -webkit-text-fill-color: rgba(0, 255, 220, 0.6) !important;
  opacity: 1;
  animation: dr-glitch-cyan-med 3.5s steps(1) infinite 0.5s;
}
.dr-panel:hover .dr-panel-desc::after {
  color: rgba(255, 0, 80, 0.5) !important;
  -webkit-text-fill-color: rgba(255, 0, 80, 0.5) !important;
  opacity: 1;
  animation: dr-glitch-magenta-med 3.5s steps(1) infinite 0.7s;
}
.dr-panel:hover .dr-panel-desc {
  animation: dr-base-text-tear 3.5s steps(1) infinite 0.5s;
}

/* --- Link: cyan ghost + base shift --- */
.dr-panel:hover a.dr-panel-link::before {
  color: rgba(0, 255, 220, 0.7) !important;
  -webkit-text-fill-color: rgba(0, 255, 220, 0.7) !important;
  opacity: 1;
  animation: dr-glitch-cyan-med 3s steps(1) infinite 0.1s;
}
.dr-panel:hover a.dr-panel-link {
  animation: dr-base-text-tear 3s steps(1) infinite 0.1s;
}

/* --- Divider: horizontal displacement + color shift --- */
.dr-panel:hover .dr-divider {
  width: 80px;
  animation: dr-divider-glitch 2.5s steps(1) infinite;
}

/* ============================================
   KEYFRAMES — steps(1) for sharp digital snaps
   ============================================ */

/* Hard cyan ghost — aggressive clip-path slicing + big horizontal shift */
@keyframes dr-glitch-cyan-hard {
  0%  { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  2%  { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  78% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  80% { transform: translate(-4px, 0); clip-path: inset(10% 0 65% 0); opacity: 1; }
  82% { transform: translate(5px, 0); clip-path: inset(50% 0 20% 0); opacity: 1; }
  84% { transform: translate(-6px, 0); clip-path: inset(25% 0 45% 0); opacity: 1; }
  86% { transform: translate(3px, 0); clip-path: inset(70% 0 5% 0); opacity: 1; }
  88% { transform: translate(-2px, 1px); clip-path: inset(5% 0 75% 0); opacity: 1; }
  90% { transform: translate(4px, -1px); clip-path: inset(40% 0 35% 0); opacity: 1; }
  92% { transform: translate(-3px, 0); clip-path: inset(60% 0 15% 0); opacity: 1; }
  94% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  100% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
}

/* Hard magenta ghost — offset timing from cyan */
@keyframes dr-glitch-magenta-hard {
  0%  { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  78% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  80% { transform: translate(5px, 0); clip-path: inset(45% 0 25% 0); opacity: 1; }
  82% { transform: translate(-3px, 1px); clip-path: inset(15% 0 55% 0); opacity: 1; }
  84% { transform: translate(6px, 0); clip-path: inset(65% 0 10% 0); opacity: 1; }
  86% { transform: translate(-4px, -1px); clip-path: inset(30% 0 40% 0); opacity: 1; }
  88% { transform: translate(3px, 0); clip-path: inset(75% 0 0% 0); opacity: 1; }
  90% { transform: translate(-5px, 1px); clip-path: inset(8% 0 70% 0); opacity: 1; }
  92% { transform: translate(2px, 0); clip-path: inset(55% 0 20% 0); opacity: 1; }
  94% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  100% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
}

/* Medium cyan — for number, desc, link */
@keyframes dr-glitch-cyan-med {
  0%  { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  82% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  84% { transform: translate(-3px, 0); clip-path: inset(0% 0 50% 0); opacity: 1; }
  86% { transform: translate(4px, 0); clip-path: inset(40% 0 20% 0); opacity: 1; }
  88% { transform: translate(-2px, 0); clip-path: inset(15% 0 60% 0); opacity: 1; }
  90% { transform: translate(3px, 0); clip-path: inset(70% 0 0% 0); opacity: 1; }
  92% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  100% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
}

/* Medium magenta — for desc */
@keyframes dr-glitch-magenta-med {
  0%  { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  82% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  84% { transform: translate(4px, 0); clip-path: inset(30% 0 40% 0); opacity: 1; }
  86% { transform: translate(-3px, 0); clip-path: inset(60% 0 10% 0); opacity: 1; }
  88% { transform: translate(2px, 1px); clip-path: inset(5% 0 70% 0); opacity: 1; }
  90% { transform: translate(-4px, 0); clip-path: inset(50% 0 25% 0); opacity: 1; }
  92% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
  100% { transform: translate(0); clip-path: inset(0 0 0 0); opacity: 0; }
}

/* Base text horizontal tear — shifts and skews with chromatic text-shadow */
@keyframes dr-base-text-tear {
  0%  { transform: translate(0) skewX(0); text-shadow: none; }
  78% { transform: translate(0) skewX(0); text-shadow: none; }
  80% { transform: translate(-2px, 0) skewX(-0.5deg); text-shadow: 3px 0 rgba(255,0,80,0.5), -3px 0 rgba(0,255,220,0.5); }
  82% { transform: translate(3px, 0) skewX(0.8deg); text-shadow: -4px 0 rgba(255,0,80,0.6), 4px 0 rgba(0,255,220,0.6); }
  84% { transform: translate(-1px, 1px) skewX(-1deg); text-shadow: 2px 0 rgba(255,0,80,0.4), -2px 0 rgba(0,255,220,0.4); }
  86% { transform: translate(2px, -1px) skewX(0.6deg); text-shadow: -3px 0 rgba(255,0,80,0.7), 3px 0 rgba(0,255,220,0.7); }
  88% { transform: translate(-3px, 0) skewX(-0.3deg); text-shadow: 5px 0 rgba(255,0,80,0.5), -5px 0 rgba(0,255,220,0.5); }
  90% { transform: translate(1px, 0) skewX(0.5deg); text-shadow: -2px 0 rgba(255,0,80,0.3), 2px 0 rgba(0,255,220,0.3); }
  92% { transform: translate(-1px, 0) skewX(-0.2deg); text-shadow: 1px 0 rgba(255,0,80,0.2), -1px 0 rgba(0,255,220,0.2); }
  94% { transform: translate(0) skewX(0); text-shadow: none; }
  100% { transform: translate(0) skewX(0); text-shadow: none; }
}

/* Divider glitch — displacement + color shift */
@keyframes dr-divider-glitch {
  0%  { opacity: 1; transform: translateX(0) scaleX(1); box-shadow: 0 0 8px rgba(57,255,20,0.5); }
  78% { opacity: 1; transform: translateX(0) scaleX(1); box-shadow: 0 0 8px rgba(57,255,20,0.5); }
  80% { transform: translateX(-5px) scaleX(1.2); box-shadow: 0 0 15px rgba(0,255,220,0.9); }
  82% { transform: translateX(6px) scaleX(0.8); opacity: 0.6; box-shadow: 0 0 12px rgba(255,0,80,0.7); }
  84% { transform: translateX(-3px) scaleX(1.1); box-shadow: 0 0 18px rgba(180,40,255,0.8); }
  86% { transform: translateX(4px) scaleX(0.9); opacity: 0.4; }
  88% { transform: translateX(-2px) scaleX(1.3); box-shadow: 0 0 25px rgba(0,255,220,1); }
  90% { transform: translateX(1px) scaleX(1.05); opacity: 0.8; }
  92% { transform: translateX(0) scaleX(1); opacity: 1; box-shadow: 0 0 8px rgba(57,255,20,0.5); }
  100% { opacity: 1; transform: translateX(0) scaleX(1); box-shadow: 0 0 8px rgba(57,255,20,0.5); }
}

.dr-panel-number {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 4px !important;
  color: var(--green) !important;
  text-shadow: 0 0 8px rgba(57,255,20,0.5) !important;
  margin-bottom: 0.75rem !important;
  display: block !important;
}

.dr-panel-title {
  font-family: var(--font-head) !important;
  font-size: clamp(24px, 2.8vw, 36px) !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: var(--offwhite) !important;
  margin-bottom: 1rem !important;
  line-height: 1.1 !important;
}

.dr-divider {
  width: 40px;
  height: 2px;
  background: var(--green);
  margin-bottom: 1rem;
  transition: width 0.15s ease;
  box-shadow: 0 0 8px rgba(57,255,20,0.5);
}

.dr-panel-desc {
  font-family: var(--font-body) !important;
  font-size: 15px !important;
  color: var(--grey) !important;
  line-height: 1.7 !important;
  margin-bottom: 1.5rem !important;
}

a.dr-panel-link,
a.dr-panel-link:visited {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  color: var(--green) !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: gap 0.2s !important;
  position: relative !important;
  z-index: 5 !important;
}

a.dr-panel-link::after {
  content: "→";
}

a.dr-panel-link:hover {
  gap: 14px !important;
}

/* ============================================
   INNER PAGES (About, Contact, Services)
   ============================================ */
.page:not(.home) .site-content {
  background: var(--dark) !important;
  padding-top: 64px !important;
}

.page:not(.home) .content-area,
.page:not(.home) #primary {
  max-width: 860px !important;
  margin: 0 auto !important;
  padding: 4rem 2rem !important;
  float: none !important;
  width: 100% !important;
}

.page:not(.home) #secondary {
  display: none !important;
}

.page:not(.home) article,
.page:not(.home) .inside-article {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.page:not(.home) h1.entry-title {
  font-family: var(--font-head) !important;
  font-size: clamp(32px, 5vw, 52px) !important;
  font-weight: 700 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  color: var(--offwhite) !important;
  margin-bottom: 2rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 2px solid var(--green) !important;
}

.page:not(.home) .entry-content {
  font-family: var(--font-body) !important;
  font-size: 17px !important;
  line-height: 1.8 !important;
  color: var(--grey) !important;
}

.page:not(.home) .entry-content h2 {
  font-family: var(--font-head) !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: var(--offwhite) !important;
  margin: 2.5rem 0 1rem !important;
}

.page:not(.home) .entry-content h3 {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  letter-spacing: 3px !important;
  color: var(--green) !important;
  text-transform: uppercase !important;
  margin: 2rem 0 0.5rem !important;
}

.page:not(.home) .entry-content p {
  margin-bottom: 1.2rem !important;
  color: var(--grey) !important;
}

.page:not(.home) .entry-content ul {
  padding-left: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

.page:not(.home) .entry-content ul li {
  color: var(--grey) !important;
  margin-bottom: 0.5rem !important;
}

.page:not(.home) .entry-content ul li::marker {
  color: var(--green) !important;
}

.page:not(.home) .entry-content a {
  color: var(--green) !important;
  text-decoration: none !important;
  border-bottom: 1px solid var(--green-dim) !important;
}

.page:not(.home) .entry-content a:hover {
  color: #fff !important;
  border-color: #fff !important;
}

/* Lead paragraph styling */
.dr-about-lead,
.dr-service-content > p:first-child {
  font-size: 20px !important;
  color: var(--offwhite) !important;
  line-height: 1.7 !important;
  margin-bottom: 2rem !important;
  padding-bottom: 2rem !important;
  border-bottom: 1px solid rgba(57,255,20,0.1) !important;
}

/* Contact blocks */
.dr-contact-wrap { margin-top: 1rem; }

.dr-contact-email-block {
  background: var(--plate);
  border: 1px solid rgba(57,255,20,0.15);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.dr-contact-email-block p {
  color: var(--grey) !important;
  margin: 0 !important;
}

.dr-contact-label {
  color: var(--offwhite) !important;
  font-family: var(--font-head);
  letter-spacing: 2px;
  text-transform: uppercase;
}

a.dr-email-link,
a.dr-email-link:visited {
  font-family: var(--font-mono) !important;
  font-size: 15px !important;
  color: var(--green) !important;
  text-decoration: none !important;
  border-bottom: 1px solid var(--green-dim) !important;
  transition: color 0.2s !important;
}

a.dr-email-link:hover {
  color: #fff !important;
  border-color: #fff !important;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--dark) !important;
  border-top: 1px solid rgba(57,255,20,0.08) !important;
  color: var(--grey) !important;
}

.site-footer,
.site-footer a {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 1px !important;
  color: rgba(138,136,128,0.6) !important;
}

.site-footer a:hover {
  color: var(--green) !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes dr-fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes dr-scrollPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
  .dr-panels {
    grid-template-columns: 1fr !important;
  }

  .dr-panel {
    min-height: 70vh !important;
  }

  .dr-panel:not(:last-child) {
    border-right: none !important;
    border-bottom: 1px solid rgba(57,255,20,0.08) !important;
  }

  .page:not(.home) .content-area,
  .page:not(.home) #primary {
    padding: 2rem 1.25rem !important;
  }

  .main-navigation .main-nav ul {
    gap: 1rem !important;
  }
}

/* ============================================
   HIDE STRAY GP CONTENT / TEXT LEAKS
   ============================================ */

/* Hide anything directly in .entry-content that isn't our shortcode output */
.home .entry-content > p,
.home .entry-content > div:not(.dr-hero):not(.dr-panels),
.home .entry-content > span,
.home .entry-content > br {
  display: none !important;
}

/* scroll hint removed */

/* ============================================
   HEADER NAV - FORCE VISIBLE WITH JS FALLBACK
   ============================================ */

/* Make sure GP nav wrapper is visible */
.main-navigation,
.nav-float-right,
.nav-float-left,
.nav-below-header,
.nav-above-header,
#site-navigation {
  display: block !important;
  background: transparent !important;
}

.main-navigation .main-nav,
.main-navigation .main-nav > ul {
  display: flex !important;
  align-items: center !important;
}

/* ============================================
   GAMES HUB PAGE
   ============================================ */
.dr-games-hub {
  padding: 3rem 2rem 4rem !important;
  max-width: 1100px !important;
  margin: 0 auto !important;
}

.dr-games-header {
  text-align: center;
  margin-bottom: 3rem;
}

.dr-games-tagline {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  color: var(--green) !important;
  letter-spacing: 5px !important;
  margin-bottom: 0.5rem !important;
}

.dr-games-title {
  font-family: var(--font-head) !important;
  font-size: clamp(32px, 5vw, 52px) !important;
  font-weight: 700 !important;
  color: var(--offwhite) !important;
  letter-spacing: 4px !important;
  text-transform: uppercase !important;
  margin-bottom: 0.75rem !important;
}

.dr-games-desc {
  font-family: var(--font-body) !important;
  font-size: 16px !important;
  color: var(--grey) !important;
}

/* Game grid */
.dr-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Game card */
.dr-game-card {
  background: var(--plate);
  border: 1px solid rgba(57,255,20,0.12);
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.2s;
}

.dr-game-card:hover {
  border-color: rgba(57,255,20,0.4);
  transform: translateY(-3px);
}

.dr-game-card-soon {
  opacity: 0.6;
}

.dr-game-card-soon:hover {
  transform: none;
  border-color: rgba(57,255,20,0.12);
}

/* Thumbnail area */
.dr-game-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
}

.dr-game-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.dr-game-preview {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Zero Proof Tilt preview thumbnail */
.zpt-preview {
  background: linear-gradient(to bottom, #1a1400, #c8900a, #e8b020);
}

.zpt-board {
  position: absolute;
  inset: 0;
}

.zpt-hole {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1000 60%, #000 100%);
  border: 1px solid rgba(60,40,0,0.8);
  transform: translate(-50%, -50%);
}

.zpt-hole-target {
  background: radial-gradient(circle, #ff6600 40%, #aa3300 70%, #000 100%);
  border: 2px solid #ffaa00;
  box-shadow: 0 0 8px rgba(255,170,0,0.8);
  width: 16px;
  height: 16px;
  animation: thumbFlash 0.8s infinite;
}

@keyframes thumbFlash {
  0%, 100% { box-shadow: 0 0 8px rgba(255,170,0,0.8); }
  50% { box-shadow: 0 0 16px rgba(255,220,0,1); border-color: #ffee00; }
}

.zpt-rod {
  position: absolute;
  bottom: 28%;
  left: 8%;
  right: 8%;
  height: 4px;
  background: linear-gradient(to bottom, #ffdd88, #cc8800);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255,170,0,0.5);
  transform: rotate(-4deg);
}

.zpt-ball {
  position: absolute;
  bottom: 30%;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #aaaacc 50%, #333366);
  box-shadow: 0 0 6px rgba(150,150,255,0.5);
  transform: translateX(-50%);
}

.dr-game-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--green);
  letter-spacing: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  text-shadow: 0 0 12px var(--green);
}

.dr-game-thumb:hover .dr-game-play-btn {
  opacity: 1;
}

/* Coming soon preview */
.coming-soon-preview {
  background: linear-gradient(135deg, #0a0a08, #1a1c18);
}

.cs-text {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: rgba(57,255,20,0.2);
  letter-spacing: 4px;
  text-align: center;
  line-height: 1.4;
}

/* Throw Me A Bone thumbnail */
.tmab-preview {
  background: #06080a;
  overflow: hidden;
}

.tmab-thumb-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* Card info section */
.dr-game-info {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

h2.dr-game-title {
  font-family: var(--font-head) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--offwhite) !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.dr-game-blurb {
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  color: var(--grey) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

.dr-game-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dr-game-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--green-dim);
  border: 1px solid var(--green-dim);
  padding: 2px 8px;
  text-transform: uppercase;
}

a.dr-game-cta,
a.dr-game-cta:visited {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 3px !important;
  color: var(--green) !important;
  text-decoration: none !important;
  border: none !important;
  margin-top: auto !important;
  transition: letter-spacing 0.2s !important;
}

a.dr-game-cta:hover {
  letter-spacing: 5px !important;
  color: var(--offwhite) !important;
}

@media (max-width: 768px) {
  .dr-games-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Matrix Snake thumbnail ── */
.ms-preview {
  background: #000300;
  position: relative;
}

.ms-thumb-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ============================================
   PANEL SCENE ANIMATIONS
   ============================================ */

/* ── Padlock shackle: mechanically correct open/close ──
   Left leg (x=76) is FIXED PIVOT — always stays in body collar.
   In OPEN (default): whole U rotated ~40deg clockwise on left pivot,
   so right leg lifts up and away from the body.
   On HOVER (closing): rotates back to 0 with a bounce/click snap.
   transform-origin = left leg entry into body top (76px, 95px)
*/
/* Shackle default = open (rotated ~42deg off right pivot)
   All panel SVG animations are now self-contained inside the SVGs.
   Lock animates open→closed on loop.
   PC fans spin with rainbow RGB, tubes pulse, CPU glows.
   Router wifi rings grow, LEDs blink, antennas glow. */

a.dr-btn-primary canvas { display: none !important; }
/* ============================================
   GET IN TOUCH BUTTON — GPU-only glitch
   No text-shadow (causes full repaint per frame
   and kills Firefox). Uses transform only.
   ============================================ */

@keyframes dr-btn-glitch {
  0%,89%,100% {
    transform: translateY(-1px) translateX(0);
  }
  90% { transform: translateY(-1px) translateX(-2px); }
  91% { transform: translateY(-2px) translateX(2px); }
  92% { transform: translateY(-1px) translateX(-1px); }
  93% { transform: translateY(-1px) translateX(0); }
  95% { transform: translateY(-1px) translateX(1px); }
  96% { transform: translateY(-1px) translateX(0); }
}

a.dr-btn-primary:hover {
  background: #8822ee !important;
  background-color: #8822ee !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 20px rgba(140,40,255,0.45), inset 0 0 20px rgba(100,0,200,0.15) !important;
  animation: dr-btn-glitch 3s ease-in-out infinite !important;
}


/* ============================================
   NAV GLITCH — chromatic-aberration on hover
   GPU-composited: transform + opacity + clip-path
   ============================================ */

/* Base — ALL nav links are glitch-ready */
.site-branding .site-title a,
.site-header .main-navigation ul li > a,
#site-navigation ul li > a {
  position: relative !important;
}

/* Pseudo-elements for ALL nav links */
.site-branding .site-title a::before,
.site-branding .site-title a::after,
.site-header .main-navigation ul li > a::before,
.site-header .main-navigation ul li > a::after,
#site-navigation ul li > a::before,
#site-navigation ul li > a::after {
  content: attr(data-text) !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  background: none !important;
  border: none !important;
}

/* Cyan ghost */
.site-branding .site-title a::before,
.site-header .main-navigation ul li > a::before,
#site-navigation ul li > a::before {
  color: rgba(0,255,220,0.75) !important;
  -webkit-text-fill-color: rgba(0,255,220,0.75) !important;
  clip-path: polygon(0 15%, 100% 15%, 100% 40%, 0 40%) !important;
  z-index: 1 !important;
}

/* Magenta ghost */
.site-branding .site-title a::after,
.site-header .main-navigation ul li > a::after,
#site-navigation ul li > a::after {
  color: rgba(255,0,180,0.65) !important;
  -webkit-text-fill-color: rgba(255,0,180,0.65) !important;
  clip-path: polygon(0 55%, 100% 55%, 100% 80%, 0 80%) !important;
  z-index: 1 !important;
}

/* Nav link pseudo-element typography — match parent so glitch text aligns */
.site-header .main-navigation ul li > a::before,
.site-header .main-navigation ul li > a::after,
#site-navigation ul li > a::before,
#site-navigation ul li > a::after {
  font-family: 'Oswald', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  padding: 4px 0 !important;
}

/* Logo pseudo-element typography */
.site-branding .site-title a::before,
.site-branding .site-title a::after {
  font-family: 'Share Tech Mono', monospace !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  color: rgba(0,255,220,0.7) !important;
  -webkit-text-fill-color: rgba(0,255,220,0.7) !important;
}
.site-branding .site-title a::after {
  color: rgba(255,0,180,0.6) !important;
  -webkit-text-fill-color: rgba(255,0,180,0.6) !important;
}

/* ── Hover glitch — burst fires immediately, repeats every 2.5s ── */
/* Same chromatic splits as current-menu-item but front-loaded so the
   first burst is visible within ~75ms of hover. At 2.5s each 3% ≈ 75ms. */
@keyframes dr-nav-hover-r {
  0%      { transform: translateX(0); opacity: 0; }
  3%      { transform: translateX(-3px); opacity: 1; clip-path: polygon(0 10%, 100% 10%, 100% 35%, 0 35%); }
  6%      { transform: translateX(2px);  opacity: 1; clip-path: polygon(0 60%, 100% 60%, 100% 75%, 0 75%); }
  9%      { transform: translateX(-4px); opacity: 1; clip-path: polygon(0 20%, 100% 20%, 100% 45%, 0 45%); }
  12%     { transform: translateX(0);    opacity: 1; clip-path: polygon(0 5%,  100% 5%,  100% 30%, 0 30%); }
  15%     { transform: translateX(3px);  opacity: 1; clip-path: polygon(0 40%, 100% 40%, 100% 65%, 0 65%); }
  18%,100%{ transform: translateX(0); opacity: 0; }
}
@keyframes dr-nav-hover-b {
  0%      { transform: translateX(0); opacity: 0; }
  3%      { transform: translateX(4px);  opacity: 1; clip-path: polygon(0 50%, 100% 50%, 100% 75%, 0 75%); }
  6%      { transform: translateX(-2px); opacity: 1; clip-path: polygon(0 15%, 100% 15%, 100% 40%, 0 40%); }
  9%      { transform: translateX(3px);  opacity: 1; clip-path: polygon(0 65%, 100% 65%, 100% 90%, 0 90%); }
  12%     { transform: translateX(-3px); opacity: 1; clip-path: polygon(0 30%, 100% 30%, 100% 55%, 0 55%); }
  15%     { transform: translateX(0);    opacity: 1; clip-path: polygon(0 45%, 100% 45%, 100% 70%, 0 70%); }
  18%,100%{ transform: translateX(0); opacity: 0; }
}

/* All nav items + logo: glitch on hover AND click */
.site-branding .site-title a:hover::before,
.site-branding .site-title a:active::before,
.site-header .main-navigation ul li > a:hover::before,
.site-header .main-navigation ul li > a:active::before,
#site-navigation ul li > a:hover::before,
#site-navigation ul li > a:active::before {
  animation: dr-nav-hover-r 2.5s infinite !important;
}
.site-branding .site-title a:hover::after,
.site-branding .site-title a:active::after,
.site-header .main-navigation ul li > a:hover::after,
.site-header .main-navigation ul li > a:active::after,
#site-navigation ul li > a:hover::after,
#site-navigation ul li > a:active::after {
  animation: dr-nav-hover-b 2.5s infinite 0.04s !important;
}

/* ── Current menu item: continuous slow glitch ── */
@keyframes dr-nav-glitch-r {
  0%,89%  { transform: translateX(0); opacity: 0; }
  90%     { transform: translateX(-3px); opacity: 1; clip-path: polygon(0 10%, 100% 10%, 100% 35%, 0 35%); }
  91%     { transform: translateX(2px);  opacity: 1; clip-path: polygon(0 60%, 100% 60%, 100% 75%, 0 75%); }
  92%     { transform: translateX(-4px); opacity: 1; clip-path: polygon(0 20%, 100% 20%, 100% 45%, 0 45%); }
  93%     { transform: translateX(0);    opacity: 1; clip-path: polygon(0 5%,  100% 5%,  100% 30%, 0 30%); }
  94%     { transform: translateX(3px);  opacity: 1; clip-path: polygon(0 40%, 100% 40%, 100% 65%, 0 65%); }
  95%,100%{ transform: translateX(0); opacity: 0; }
}
@keyframes dr-nav-glitch-b {
  0%,89%  { transform: translateX(0); opacity: 0; }
  90%     { transform: translateX(4px);  opacity: 1; clip-path: polygon(0 50%, 100% 50%, 100% 75%, 0 75%); }
  91%     { transform: translateX(-2px); opacity: 1; clip-path: polygon(0 15%, 100% 15%, 100% 40%, 0 40%); }
  92%     { transform: translateX(3px);  opacity: 1; clip-path: polygon(0 65%, 100% 65%, 100% 90%, 0 90%); }
  93%     { transform: translateX(-3px); opacity: 1; clip-path: polygon(0 30%, 100% 30%, 100% 55%, 0 55%); }
  94%     { transform: translateX(0);    opacity: 1; clip-path: polygon(0 45%, 100% 45%, 100% 70%, 0 70%); }
  95%,100%{ transform: translateX(0); opacity: 0; }
}

.site-header .main-navigation ul li.current-menu-item > a::before,
#site-navigation ul li.current-menu-item > a::before {
  animation: dr-nav-glitch-r 3.5s infinite !important;
}
.site-header .main-navigation ul li.current-menu-item > a::after,
#site-navigation ul li.current-menu-item > a::after {
  animation: dr-nav-glitch-b 3.5s infinite 0.15s !important;
}

/* ── Contact nav button pseudo-element typography override ── */
.site-header .main-navigation ul li:last-child > a::before,
.site-header .main-navigation ul li:last-child > a::after,
#site-navigation ul li:last-child > a::before,
#site-navigation ul li:last-child > a::after {
  font-family: 'Share Tech Mono', monospace !important;
  font-size: 11px !important;
  letter-spacing: 2px !important;
  padding: 6px 16px !important;
}

/* ── Contact nav button: glitch matches Get In Touch style ── */
/* Same chromatic split from ::before/::after + subtle transform jitter */
.site-header .main-navigation ul li:last-child > a:hover,
.site-header .main-navigation ul li:last-child > a:active,
#site-navigation ul li:last-child > a:hover,
#site-navigation ul li:last-child > a:active {
  animation: dr-btn-glitch 2s ease-in-out infinite !important;
}

/* ── Ensure current-menu-item on last child (Contact) doesn't break ── */
.site-header .main-navigation ul li:last-child.current-menu-item > a,
#site-navigation ul li:last-child.current-menu-item > a {
  background: rgba(57,255,20,0.15) !important;
  border-color: #39ff14 !important;
  color: #39ff14 !important;
  -webkit-text-fill-color: #39ff14 !important;
}

/* Key overlay — outside panel-scene to bypass 0.62 opacity */
.dr-key-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 42%;
  padding-top: 3.5%;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
  box-sizing: border-box;
  opacity: 0.85;
  transition: opacity 0.15s ease;
  will-change: opacity;
}
.dr-panel:hover .dr-key-overlay {
  opacity: 1;
}
.dr-key-svg {
  width: 82%; height: 82%;
  max-width: none; max-height: none;
  flex-shrink: 0;
  transform: scale(1.8);
  transform-origin: 50% 50%;
  transition: transform 0.2s ease, filter 0.15s ease;
  will-change: transform;
}
.dr-panel:hover .dr-key-svg {
  transform: scale(2.5) !important;
  filter: brightness(1.15);
}

/* ============================================
   FIREFOX-SPECIFIC — nuclear lightweight path
   ============================================
   Uses @supports (-moz-appearance:none) for
   INSTANT CSS-only detection (no JS needed).
   Kills every animation, transition, filter,
   pseudo-element overlay, will-change, and
   heavy SVG transform. Hover = instant color
   change only. JS also pauses 120 SMIL anims.
   ============================================ */
@supports (-moz-appearance: none) {

  /* ── NUCLEAR: kill ALL animations and transitions site-wide ── */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
  }

  /* ── Hide matrix canvas — no JS canvas ops needed in Firefox ── */
  #dr-matrix-canvas { display: none !important; }

  /* ── Kill every pseudo-element glitch layer ── */
  .dr-panel-title::before,
  .dr-panel-title::after,
  .dr-panel-number::before,
  .dr-panel-desc::before,
  .dr-panel-desc::after,
  a.dr-panel-link::before,
  .site-branding .site-title a::before,
  .site-branding .site-title a::after,
  .site-header .main-navigation ul li > a::before,
  .site-header .main-navigation ul li > a::after,
  #site-navigation ul li > a::before,
  #site-navigation ul li > a::after {
    display: none !important;
  }

  /* ── Kill panel grid texture overlay ── */
  .dr-panel::before {
    display: none !important;
  }

  /* ── Remove contain / content-visibility ── */
  .dr-panels {
    content-visibility: visible !important;
    contain-intrinsic-size: auto !important;
  }
  .dr-panel {
    contain: none !important;
  }

  /* ── SVG scenes: no scale zoom on hover, no filter, instant opacity ── */
  .dr-panel-scene {
    transition: none !important;
  }
  .dr-panel:hover .dr-panel-scene {
    opacity: 0.85 !important;
  }
  .dr-panel-scene svg {
    transition: none !important;
  }
  /* Override the scale(2.5) hover — gentle zoom from base scale.
     Full 2.5x kills Firefox; a small bump is still interactive. */
  .dr-panel:hover .dr-panel-scene svg {
    transform: scale(1.15) !important;
    filter: none !important;
  }
  .dr-panel:hover .dr-scene-hardware svg {
    transform: scale(1.85) !important;
  }
  .dr-panel:hover .dr-scene-it svg {
    transform: scale(1.6) !important;
  }
  /* Lock is inside .dr-panel-scene — needs higher specificity */
  .dr-panel:hover .dr-panel-scene svg.dr-lock {
    transform: scale(2.05) !important;
  }
  /* Key overlay SVG — separate container, gentle zoom */
  .dr-panel:hover .dr-key-svg {
    transform: scale(2.05) !important;
    filter: none !important;
  }
  .dr-key-overlay {
    transition: none !important;
  }

  /* ── Panel hover: instant text-shadow (no animation) ── */
  .dr-panel:hover .dr-panel-title {
    text-shadow: -2px 0 rgba(0,255,220,0.5), 2px 0 rgba(255,0,80,0.4) !important;
  }
  .dr-panel:hover .dr-panel-number {
    text-shadow: -1px 0 rgba(0,255,220,0.4), 1px 0 rgba(255,0,80,0.3) !important;
  }
  .dr-panel:hover .dr-panel-desc {
    text-shadow: -1px 0 rgba(0,255,220,0.3), 1px 0 rgba(255,0,80,0.25) !important;
  }
  .dr-panel:hover a.dr-panel-link {
    text-shadow: -1px 0 rgba(0,255,220,0.4), 1px 0 rgba(255,0,80,0.3) !important;
  }

  /* ── Divider: instant width + glow ── */
  .dr-panel:hover .dr-divider {
    width: 80px !important;
    box-shadow: 0 0 15px rgba(57,255,20,0.8) !important;
  }

  /* ── Nav + logo hover: instant color + subtle text-shadow ── */
  .site-branding .site-title a:hover,
  .site-branding .site-title a:active,
  .site-header .main-navigation ul li > a:hover,
  .site-header .main-navigation ul li > a:active,
  .site-header .main-navigation ul li > a:focus,
  #site-navigation ul li > a:hover,
  #site-navigation ul li > a:active,
  #site-navigation ul li > a:focus {
    color: #e8e4dc !important;
    -webkit-text-fill-color: #e8e4dc !important;
    text-shadow: -1px 0 rgba(0,255,220,0.5), 1px 0 rgba(255,0,80,0.4) !important;
  }

  /* ── Current menu item glow ── */
  .site-header .main-navigation ul li.current-menu-item > a,
  #site-navigation ul li.current-menu-item > a {
    text-shadow: -1px 0 rgba(0,255,220,0.35), 1px 0 rgba(255,0,80,0.25) !important;
  }

  /* ── Contact nav button: instant hover ── */
  .site-header .main-navigation ul li:last-child > a:hover,
  #site-navigation ul li:last-child > a:hover {
    text-shadow: none !important;
  }

  /* ── Get In Touch button: no animation ── */
  a.dr-btn-primary:hover {
    box-shadow: 0 0 20px rgba(140,40,255,0.45) !important;
  }

  /* ── Scroll arrow: static ── */
  .dr-scroll-arrow {
    background: var(--green) !important;
  }

  /* ── Hide SVG SMIL animations via CSS until JS can pause them ── */
  .dr-panel svg animate,
  .dr-panel svg animateTransform {
    display: none !important;
  }

}

/* ============================================
   REDUCED MOTION — accessibility + performance
   Disables all continuous animations; preserves
   static layout and hover state changes.
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #dr-matrix-canvas { display: none !important; }
  .dr-scroll-arrow { animation: none !important; background: var(--green) !important; }
}
