/*
Theme Name: G1-DESIGN
Theme URI: https://example.com/
Author: G1-DESIGN
Description: Landing page theme preserving original Tailwind markup.
Version: 1.3.9
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: g1-oscillator
*/

/*
 * Colour system: space-separated RGB triplets for Tailwind
 * (theme.extend colours use rgb(var(--g1-c-<name>) / <alpha-value>)).
 * Edit tokens in :root / body.g1-palette-service only.
 * inc/tw-default.json + inc/tw-service.json supply the union of token *names* for PHP;
 * hex values in those JSON files are ignored.
 * Similar greys (#0e0e0e / #131313) and cyans (#59daca / #a1faff) are merged in :root.
 */
:root {
  --g1-c-background: 19 19 19;
  --g1-c-error: 255 180 171;
  --g1-c-error-container: 147 0 10;
  --g1-c-error-dim: 215 56 59;
  --g1-c-inverse-on-surface: 48 48 48;
  --g1-c-inverse-primary: 0 106 97;
  --g1-c-inverse-surface: 226 226 226;
  --g1-c-on-background: 226 226 226;
  --g1-c-on-error: 105 0 5;
  --g1-c-on-error-container: 255 218 214;
  --g1-c-on-primary: 0 55 50;
  --g1-c-on-primary-container: 0 53 47;
  --g1-c-on-primary-fixed: 0 32 28;
  --g1-c-on-primary-fixed-variant: 0 80 72;
  --g1-c-on-secondary: 48 48 48;
  --g1-c-on-secondary-container: 182 181 180;
  --g1-c-on-secondary-fixed: 27 28 28;
  --g1-c-on-secondary-fixed-variant: 71 71 71;
  --g1-c-on-surface: 226 226 226;
  --g1-c-on-surface-variant: 187 201 198;
  --g1-c-on-tertiary: 0 55 50;
  --g1-c-on-tertiary-container: 0 53 48;
  --g1-c-on-tertiary-fixed: 0 32 28;
  --g1-c-on-tertiary-fixed-variant: 0 80 73;
  --g1-c-outline: 134 148 144;
  --g1-c-outline-variant: 60 73 71;
  --g1-c-primary: 89 218 202;
  --g1-c-primary-container: 0 168 153;
  --g1-c-primary-dim: 0 229 238;
  --g1-c-primary-fixed: 121 247 230;
  --g1-c-primary-fixed-dim: 89 218 202;
  --g1-c-secondary: 200 198 198;
  --g1-c-secondary-container: 71 71 71;
  --g1-c-secondary-dim: 200 198 198;
  --g1-c-secondary-fixed: 228 226 225;
  --g1-c-secondary-fixed-dim: 200 198 198;
  --g1-c-surface: 19 19 19;
  --g1-c-surface-bright: 57 57 57;
  --g1-c-surface-container: 31 31 31;
  --g1-c-surface-container-high: 42 42 42;
  --g1-c-surface-container-highest: 53 53 53;
  --g1-c-surface-container-low: 27 27 27;
  --g1-c-surface-container-lowest: 14 14 14;
  --g1-c-surface-dim: 19 19 19;
  --g1-c-surface-tint: 89 218 202;
  --g1-c-surface-variant: 53 53 53;
  --g1-c-tertiary: 43 221 203;
  --g1-c-tertiary-container: 0 168 153;
  --g1-c-tertiary-dim: 43 221 203;
  --g1-c-tertiary-fixed: 87 250 231;
  --g1-c-tertiary-fixed-dim: 43 221 203;
}

/* Neon / service detail pages: magenta, lime, brighter surfaces */
body.g1-palette-service {
  --g1-c-outline-variant: 73 72 71;
  --g1-c-on-primary: 0 97 101;
  --g1-c-primary-container: 0 244 254;
  --g1-c-on-background: 255 255 255;
  --g1-c-tertiary-fixed-dim: 190 238 0;
  --g1-c-surface-variant: 38 38 38;
  --g1-c-on-tertiary-fixed-variant: 82 105 0;
  --g1-c-on-surface: 255 255 255;
  --g1-c-surface-container-high: 32 31 31;
  --g1-c-surface-container: 26 25 25;
  --g1-c-background: 14 14 14;
  --g1-c-outline: 119 117 117;
  --g1-c-tertiary-dim: 190 238 0;
  --g1-c-tertiary: 243 255 202;
  --g1-c-on-primary-fixed-variant: 0 98 102;
  --g1-c-on-secondary-container: 255 245 249;
  --g1-c-secondary-fixed: 255 189 243;
  --g1-c-on-tertiary-container: 74 94 0;
  --g1-c-on-secondary: 64 0 64;
  --g1-c-error: 255 113 108;
  --g1-c-secondary: 255 81 250;
  --g1-c-primary-fixed-dim: 0 229 238;
  --g1-c-surface-container-lowest: 0 0 0;
  --g1-c-error-dim: 215 56 59;
  --g1-c-secondary-dim: 255 81 250;
  --g1-c-secondary-fixed-dim: 255 166 243;
  --g1-c-surface-container-low: 19 19 19;
  --g1-c-primary-dim: 0 229 238;
  --g1-c-primary-fixed: 0 244 254;
  --g1-c-secondary-container: 169 0 169;
  --g1-c-surface-bright: 44 44 44;
  --g1-c-on-primary-fixed: 0 67 70;
  --g1-c-on-secondary-fixed-variant: 146 0 145;
  --g1-c-inverse-primary: 0 106 110;
  --g1-c-on-secondary-fixed: 98 0 97;
  --g1-c-on-error: 73 0 6;
  --g1-c-on-tertiary: 81 103 0;
  --g1-c-surface-container-highest: 38 38 38;
  --g1-c-surface: 14 14 14;
  --g1-c-inverse-on-surface: 86 85 84;
  --g1-c-on-surface-variant: 173 170 170;
  --g1-c-tertiary-container: 202 253 0;
  --g1-c-error-container: 159 5 25;
  --g1-c-tertiary-fixed: 202 253 0;
  --g1-c-on-error-container: 255 168 163;
  --g1-c-surface-dim: 14 14 14;
  --g1-c-on-primary-container: 0 87 91;
  --g1-c-on-tertiary-fixed: 58 74 0;
  --g1-c-inverse-surface: 252 248 248;
}

/* --- Global utilities (non-Tailwind) --- */
.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  display: inline-block;
  vertical-align: middle;
}

.kinetic-bg {
  background: radial-gradient(circle at 50% 50%, rgb(var(--g1-c-primary) / 0.05) 0%, transparent 70%);
}

.text-glow {
  text-shadow: 0 0 20px rgb(var(--g1-c-primary) / 0.3);
}

.glass-card {
  background: rgb(var(--g1-c-surface-variant) / 0.6);
  backdrop-filter: blur(12px);
}

/* Header bar (translucent → solid on hover) */
.g1-site-header {
  background: color-mix(in srgb, rgb(var(--g1-c-surface-container)) 15%, transparent);
  border-bottom-color: transparent;
}

.g1-site-header:hover {
  background: rgb(var(--g1-c-surface-container));
  border-bottom-color: color-mix(in srgb, #fff 6%, transparent);
  box-shadow: 0 32px 64px rgb(var(--g1-c-inverse-surface) / 0.08);
}

.g1-text-brand {
  color: rgb(var(--g1-c-primary));
}

.g1-nav-active {
  color: rgb(var(--g1-c-primary));
  border-bottom: 2px solid rgb(var(--g1-c-primary-container));
  padding-bottom: 0.25rem;
}

.g1-nav-idle {
  color: rgb(var(--g1-c-on-surface));
  transition: color 0.2s ease;
}

.g1-nav-idle:hover {
  color: rgb(var(--g1-c-primary));
}

.g1-menu-toggle {
  color: rgb(var(--g1-c-on-surface));
  border-color: rgb(var(--g1-c-outline-variant) / 0.4);
}

.g1-menu-toggle:hover {
  color: rgb(var(--g1-c-primary));
  border-color: rgb(var(--g1-c-primary) / 0.4);
}

.g1-mobile-panel {
  background: rgb(var(--g1-c-surface) / 0.95);
  border-top-color: rgb(var(--g1-c-outline-variant) / 0.2);
}

.g1-cta-glow:hover {
  box-shadow: 0 0 30px rgb(var(--g1-c-primary) / 0.4);
}

.g1-cta-glow-sm:hover {
  box-shadow: 0 0 20px rgb(var(--g1-c-primary) / 0.4);
}

/* Contact page */
.g1-kinetic-pulse-bg {
  background: radial-gradient(circle at 50% 50%, rgb(var(--g1-c-surface-container) / 1) 0%, rgb(var(--g1-c-background) / 1) 100%);
}

.g1-contact-glass {
  background: rgb(var(--g1-c-surface-container) / 0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

.g1-glow-primary:hover {
  box-shadow: 0 0 20px rgb(var(--g1-c-primary) / 0.3);
}

.g1-text-glow-secondary {
  text-shadow: 0 0 10px rgb(var(--g1-c-secondary) / 0.4);
}

.g1-enquiry-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgb(var(--g1-c-outline-variant) / 0.35);
  background: rgb(var(--g1-c-surface-container-high));
  color: rgb(var(--g1-c-on-surface-variant));
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.g1-enquiry-btn:hover {
  color: #fff;
}

.g1-enquiry-btn[aria-pressed="true"] {
  background: rgb(var(--g1-c-primary) / 0.12);
  border-color: rgb(var(--g1-c-primary));
  color: rgb(var(--g1-c-primary));
}

/* About */
.g1-kinetic-gradient-text {
  background: linear-gradient(to right, rgb(var(--g1-c-primary-fixed)), rgb(var(--g1-c-primary-container)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.g1-about-glass {
  background: rgb(var(--g1-c-surface-container) / 0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

/* Services hub: hero full-bleed (edges + top under transparent header). */
body.page-services,
body.g1-page-services-hub {
  overflow-x: hidden;
}

body.page-services .g1-services-main,
body.g1-page-services-hub .g1-services-main {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

/* 100vw + centering works when main is full width (calc(50% - 50vw) alone does not). */
body.page-services .g1-services-hero,
body.g1-page-services-hub .g1-services-hero {
  width: 100vw;
  max-width: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
}

/* Pull hero under fixed header when admin bar adds top offset (matches -mt-32 + admin bar). */
body.admin-bar.page-services .g1-services-hero,
body.admin-bar.g1-page-services-hub .g1-services-hero {
  margin-top: calc(-8rem - var(--wp-admin--admin-bar--height, 32px));
}

/* Scene / gradient layer fills hero edge-to-edge */
body.page-services .g1-services-hero .g1-scene-hero-layer,
body.g1-page-services-hub .g1-services-hero .g1-scene-hero-layer {
  width: 100%;
  left: 0;
  right: 0;
}

/* Services listing */
.g1-glow-primary-soft:hover {
  box-shadow: 0 0 20px 2px rgb(var(--g1-c-primary) / 0.15);
}

.g1-bg-gradient-mesh {
  background-color: rgb(var(--g1-c-background));
  background-image:
    radial-gradient(at 0% 0%, rgb(var(--g1-c-primary) / 0.05) 0, transparent 50%),
    radial-gradient(at 100% 100%, rgb(var(--g1-c-secondary) / 0.05) 0, transparent 50%);
}

/* Service detail utilities */
body.g1-palette-service .kinetic-gradient {
  background: linear-gradient(135deg, rgb(var(--g1-c-primary)) 0%, rgb(var(--g1-c-primary-fixed)) 100%);
}

body.page-service-digital-assets.g1-palette-service .kinetic-gradient {
  background: linear-gradient(135deg, rgb(var(--g1-c-primary)) 0%, rgb(var(--g1-c-inverse-primary)) 100%);
}

body.g1-palette-service .glass-panel {
  background: rgb(var(--g1-c-surface-container) / 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body.page-service-web-design.g1-palette-service .glass-panel {
  backdrop-filter: blur(40px);
}

body.g1-palette-service .text-glow-primary {
  text-shadow: 0 0 14px rgb(var(--g1-c-primary) / 0.4);
}

body.g1-palette-service .neon-glow-primary:hover {
  box-shadow: 0 0 15px rgb(var(--g1-c-primary) / 0.3);
}

body.g1-palette-service .g1-neon-static {
  box-shadow: 0 0 15px -2px rgb(var(--g1-c-primary) / 0.3);
}

body.g1-palette-service .neon-glow-primary-soft:hover {
  box-shadow: 0 0 20px rgb(var(--g1-c-primary) / 0.15);
}

body.g1-palette-service .glass-morphism {
  background: rgb(var(--g1-c-surface-container) / 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

body.g1-palette-service .text-glow {
  text-shadow: 0 0 15px rgb(var(--g1-c-primary) / 0.4);
}

body.g1-palette-service .kinetic-glow:hover {
  box-shadow: 0 0 20px rgb(var(--g1-c-primary) / 0.15);
}

body.g1-palette-service .g1-svc-cta-glow:hover {
  box-shadow: 0 0 30px rgb(var(--g1-c-primary) / 0.3);
}

/* About CTA */
.g1-about-cta-glow {
  box-shadow: 0 0 40px rgb(var(--g1-c-primary) / 0.25);
}

/* Services listing typography */
.g1-kinetic-title {
  letter-spacing: -0.05em;
  line-height: 0.9;
}

/* Login block */
.g1-login-panel {
  background: rgb(var(--g1-c-surface-container) / 0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

/* Home hero Ken Burns background (optional; see G1 Content → Home) */
.g1-hero-kb__layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 0;
  pointer-events: none;
}
.g1-hero-kb__layer.is-active {
  opacity: 1;
  z-index: 1;
}
.g1-hero-kb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 50% 42%;
  will-change: transform;
}
.g1-hero-kb__layer:not(.is-active) .g1-hero-kb__img {
  animation-play-state: paused !important;
}

@keyframes g1-kb-a {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.14) translate(-3%, -2.5%);
  }
}
@keyframes g1-kb-b {
  0% {
    transform: scale(1.04) translate(2%, 1%);
  }
  100% {
    transform: scale(1.12) translate(1.5%, -4%);
  }
}
@keyframes g1-kb-c {
  0% {
    transform: scale(1.02) translate(-1.5%, 2%);
  }
  100% {
    transform: scale(1.15) translate(3.5%, 1%);
  }
}

.g1-hero-kb__layer--a .g1-hero-kb__img {
  animation: g1-kb-a var(--g1-hero-kb, 12s) ease-out forwards;
}
.g1-hero-kb__layer--b .g1-hero-kb__img {
  animation: g1-kb-b var(--g1-hero-kb, 12s) ease-out forwards;
}
.g1-hero-kb__layer--c .g1-hero-kb__img {
  animation: g1-kb-c var(--g1-hero-kb, 12s) ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .g1-hero-kb .g1-hero-kb__layer ~ .g1-hero-kb__layer {
    display: none !important;
  }
  .g1-hero-kb .g1-hero-kb__layer.is-active {
    opacity: 1 !important;
  }
  .g1-hero-kb__img {
    animation: none !important;
    transform: none !important;
  }
}

/* Scene-backed hero layer (from g1-proofing) */
.g1-scene-hero-layer .rs-app {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: none;
}

/* Public viewer inside hero: override proofing.css .rs-mode-view.rs-app (82dvh / margins) */
.g1-scene-hero-layer .rs-app.rs-mode-view {
  height: 100% !important;
  min-height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
}

/* Theme hero: no viewer chrome (proofing.css also hides for load-order safety). */
.g1-scene-hero-layer #g1-proofing-app .rs-view-controls,
.g1-scene-hero-layer .rs-view-controls {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.g1-scene-hero-layer .rs-canvas-mount canvas {
  cursor: grab;
}

.g1-scene-hero-layer .rs-canvas-mount canvas:active {
  cursor: grabbing;
}
