/* ==========================================================================
   OMNIFLONEX AI — ULTRA-LUXURY BASE STYLES, 3D WEBGL LAYERS & RESET
   Unified with OmniflonexAi.com Main Website
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: auto; /* Handled smoothly by Lenis */
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  font-family: var(--font-b);
  font-size: 1rem;
  line-height: 1.65;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  cursor: default;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-h);
  color: var(--text-primary);
  letter-spacing: -0.025em;
  font-weight: 700;
  line-height: 1.2;
}

p {
  color: var(--text-secondary);
  line-height: 1.65;
}

/* GPU Accelerated Layers & 120FPS Performance Booster */
.project-editorial-card,
.showcase-card,
.discipline-card,
.proof-card-3d,
.case-study-modal,
.hero-sculpture-card,
.cursor-dot,
.cursor-ring,
#global-3d-canvas {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

::selection {
  background: var(--emerald);
  color: #FFFFFF;
}

/* Luxury Gradient Scrollbar matching Main Site */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #059669, #10b981, #d4af37);
  border-radius: 99px;
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #10b981, #34d399, #f59e0b);
}

img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
  cursor: pointer;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  user-select: none;
  font-family: var(--font-b);
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   01. GLOBAL 3D THREE.JS WEBGL BACKGROUND CANVAS & LUXURY AMBIENT MESH
   ========================================================================== */
#global-3d-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
  display: block !important;
}

/* Ambient Radial Mesh Background Layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  background:
    radial-gradient(circle at 15% 15%, rgba(5, 150, 105, 0.16) 0%, transparent 35rem),
    radial-gradient(circle at 85% 35%, rgba(212, 175, 55, 0.18) 0%, transparent 40rem),
    radial-gradient(circle at 20% 65%, rgba(16, 185, 129, 0.15) 0%, transparent 38rem),
    radial-gradient(circle at 80% 85%, rgba(212, 175, 55, 0.16) 0%, transparent 36rem);
  transition: opacity 0.5s ease;
}

:root[data-theme="dark"] body::before,
[data-theme="dark"] body::before {
  opacity: 0.95;
  background:
    radial-gradient(circle at 15% 15%, rgba(5, 150, 105, 0.28) 0%, transparent 35rem),
    radial-gradient(circle at 85% 35%, rgba(212, 175, 55, 0.22) 0%, transparent 40rem),
    radial-gradient(circle at 20% 65%, rgba(16, 185, 129, 0.25) 0%, transparent 38rem),
    radial-gradient(circle at 80% 85%, rgba(212, 175, 55, 0.20) 0%, transparent 36rem);
}

/* Section Transparency for 3D Background Visibility */
section,
.section-padding,
#showreel,
#before-after,
#proof-wall,
#how-we-build,
#disciplines,
#faq,
#selected-work,
.hero-section {
  position: relative;
  z-index: 2;
  background-color: transparent !important;
}

/* Ambient Floating Mesh Gradient Orbs */
.mesh-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
  transition: opacity 0.5s ease;
}

.mesh-orb-1 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.18), transparent 70%);
  top: -100px;
  left: -150px;
}

.mesh-orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.20), transparent 70%);
  top: 35%;
  right: -150px;
}

.mesh-orb-3 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16), transparent 70%);
  bottom: 15%;
  left: 10%;
}

.mesh-orb-4 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18), transparent 70%);
  bottom: -150px;
  right: 15%;
}

/* ==========================================================================
   02. ULTRA-LUXURY PRELOADER (IDENTICAL TO MAIN WEBSITE)
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #FAFBF9;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

[data-theme="dark"] .preloader {
  background: #021714;
}

.preloader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.preloader-logo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(5, 150, 105, 0.4));
  animation: preloaderLogoPulse 1.5s ease-in-out infinite;
}

@keyframes preloaderLogoPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(5, 150, 105, 0.4)) drop-shadow(0 0 40px rgba(212, 175, 55, 0.3));
  }
  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 32px rgba(5, 150, 105, 0.7)) drop-shadow(0 0 60px rgba(212, 175, 55, 0.5));
  }
}

.preloader-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: spinRing 2s linear infinite;
}

.ring-1 {
  inset: -12px;
  border-top-color: #059669;
  border-right-color: transparent;
  animation-duration: 2s;
}

.ring-2 {
  inset: -22px;
  border-bottom-color: #047857;
  border-left-color: transparent;
  animation-direction: reverse;
  animation-duration: 2.8s;
}

.ring-3 {
  inset: -34px;
  border-top-color: #D4AF37;
  border-right-color: transparent;
  animation-duration: 4s;
}

@keyframes spinRing {
  to {
    transform: rotate(360deg);
  }
}

.preloader-brand {
  font-family: var(--font-h);
  font-size: 1.3rem;
  font-weight: 800;
  color: #064E3B;
  background: linear-gradient(135deg, #059669, #D4AF37);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.preloader-bar-wrap {
  width: 200px;
  height: 3px;
  background: rgba(6, 78, 59, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

[data-theme="dark"] .preloader-bar-wrap {
  background: rgba(255, 255, 255, 0.15);
}

.preloader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #059669, #D4AF37, #047857);
  border-radius: 99px;
  transition: width 0.05s linear;
}

.preloader-pct {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   03. ULTRA-LUXURY FLUID MAGNETIC CUSTOM CURSOR
   ========================================================================== */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #10B981, #D4AF37);
  border-radius: 50%;
  pointer-events: none !important;
  z-index: 999999;
  transform: translate3d(-50%, -50%, 0);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.9), 0 0 20px rgba(212, 175, 55, 0.7);
  will-change: transform;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(16, 185, 129, 0.55);
  background: rgba(5, 150, 105, 0.03);
  border-radius: 50%;
  pointer-events: none !important;
  z-index: 999998;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
  opacity: 0;
  transition: opacity 0.35s ease, width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 20px rgba(5, 150, 105, 0.2), inset 0 0 12px rgba(212, 175, 55, 0.08);
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
}

body.cursor-active .cursor-dot,
body.cursor-active .cursor-ring {
  opacity: 1;
}

body.cursor-hover .cursor-dot {
  width: 8px;
  height: 8px;
  background: #D4AF37;
  box-shadow: 0 0 14px #D4AF37, 0 0 28px rgba(212, 175, 55, 0.8);
}

body.cursor-hover .cursor-ring {
  width: 58px;
  height: 58px;
  border-color: rgba(212, 175, 55, 0.85);
  background: rgba(212, 175, 55, 0.06);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3), 0 0 50px rgba(5, 150, 105, 0.2), inset 0 0 20px rgba(212, 175, 55, 0.15);
}

body.cursor-click .cursor-dot {
  transform: translate3d(-50%, -50%, 0) scale(1.4);
}

body.cursor-click .cursor-ring {
  transform: translate3d(-50%, -50%, 0) scale(0.75);
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.55);
}

@media (pointer: coarse), (max-width: 768px) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
  body, html, * {
    cursor: auto !important;
  }
}

/* ==========================================================================
   04. TYPOGRAPHY & LAYOUT FOUNDATIONS
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-h);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.6rem, 5.8vw, 4.85rem);
  font-weight: 900;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 700;
}

h4 {
  font-size: 1.25rem;
  font-weight: 700;
}

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.7;
}

p.lead {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.6;
  color: var(--text-secondary);
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 3rem);
  padding-right: clamp(1.25rem, 4vw, 3rem);
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

.container-wide {
  max-width: var(--max-width-wide);
}

.section-padding {
  padding-top: clamp(4.5rem, 8vw, 8.5rem);
  padding-bottom: clamp(4.5rem, 8vw, 8.5rem);
  position: relative;
  z-index: 1;
}

.section-padding-sm {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
  position: relative;
  z-index: 1;
}

/* Section Header Structure */
.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-header.text-center {
  text-align: center;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-full);
  color: var(--emerald-deep);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 15px rgba(5, 150, 105, 0.12);
}

[data-theme="dark"] .section-eyebrow {
  background: rgba(16, 185, 129, 0.12);
  color: #6EE7B7;
}

.section-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

.section-title {
  margin-bottom: 1.1rem;
}

.section-desc {
  max-width: 660px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.text-center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* ── Screen-reader / crawler-only text (audit fix) ───────────────────────── */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}
.sr-only-focusable:focus,.sr-only-focusable:active{position:static!important;width:auto;
  height:auto;margin:0;overflow:visible;clip:auto;clip-path:none;white-space:normal}

/* ── ACCESSIBILITY: visible keyboard focus + reduced motion (launch fix 17 Sep 2026) ── */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #059669 !important;
  outline-offset: 2px !important;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
