/*
  XERV Optimized Stylesheet
  Technical SEO & Performance Focus
*/

:root {
  --emerald-primary: #10b981;
  --emerald-hover: #059669;
  --bg-black: #000;
  --text-white: #fff;
  --transition-speed: 0.3s;
}

/* Base resets & typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: 'Be Vietnam Pro Fallback';
  src: local('Arial');
  ascent-override: 95%;
  descent-override: 20%;
  line-gap-override: 0%;
  size-adjust: 97%;
}

body {
  background-color: var(--bg-black);
  color: var(--text-white);
  font-family: 'Be Vietnam Pro', 'Be Vietnam Pro Fallback', sans-serif;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Performance Utilities */
.contain-paint { contain: paint; }
.contain-layout { contain: layout; }
.sub-fold {
  content-visibility: auto;
  contain-intrinsic-size: 1px 500px;
}

/* Hardware Acceleration */
.hardware-accelerated {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Layout Stability */
img, video {
  max-width: 100%;
  height: auto;
  aspect-ratio: attr(width) / attr(height);
}

/* Navigation Styles */
header nav {
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Semantic Content Styling */
main article {
  line-height: 1.6;
}

main h1, main h2, main h3 {
  font-family: 'Raleway', sans-serif;
  text-wrap: balance;
}

p {
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}

/* Accessibility: Focus States */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--emerald-primary);
  outline-offset: 4px;
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .mobile-hide { display: none !important; }
}

/* Animation isolation */
.panel-transition {
  transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Cursor styles */
[data-cursor-text],
[data-cursor-text] * {
  cursor: none !important;
}

.cursor-circle {
  width: 0;
  height: 0;
  background-color: #ffffff;
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.25s ease,
              width 0.35s cubic-bezier(0.25, 1, 0.5, 1),
              height 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Text inside circle */
.cursor-text {
  font-family: 'Be Vietnam Pro', 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #000000;
  opacity: 0;
  text-transform: capitalize;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

/* Hover states */
.cursor-circle.is-hovering {
  width: 80px;
  height: 80px;
  opacity: 1; /* Visible when hovering over headings */
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.cursor-circle.is-hovering .cursor-text {
  opacity: 1;
}

/* If hover state is scrollable, add indicator pulse */
.cursor-circle.is-scrollable {
  animation: cursorPulse 2s infinite ease-in-out;
}

@keyframes cursorPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
  }
}
