@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Familjen+Grotesk:ital,wght@0,400..700;1,400..700&display=swap");

/* Global Stylesheet & Design Tokens */

:root {
  /* Color Palette */
  --color-bg: #0d0d0d; /* Base obsidian charcoal */
  --color-bg-deep: #050506; /* Matte black vignette edges */
  --color-text: #ffffff; /* Pristine white for main typography */
  --color-text-muted: #8c8c94; /* Soft grey for secondary detail text */
  --color-border: rgba(
    255,
    255,
    255,
    0.08
  ); /* Sophisticated ultra-thin borders */

  /* Typography */
  --font-primary:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-display: "Syne", sans-serif;

  /* Z-Indices */
  --z-canvas: 1;
  --z-content: 10;
  --z-cursor: 999999; /* Higher than entrance loaders (99999) and navbar wrappers (99950) */
}

/* 1. CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Force hide the browser's default system cursor globally on all elements */
  cursor: none !important;
}

html {
  width: 100%;
  overflow-x: hidden;
  overflow-y: scroll; /* Allow vertical scroll for immersive ScrollTrigger setup */
  scrollbar-gutter: stable;
  background-color: var(--color-bg);
}

body {
  width: 100%;
  min-height: 100%;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background-color: var(--color-text);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate3d(-50%, -50%, 0);
  opacity: 0;
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.3s ease;
  mix-blend-mode: difference; /* Luxury inversion effect on light backgrounds */
}

/* Class toggled by JS when mouse enters/leaves the window */
.custom-cursor.is-active {
  opacity: 1;
}

/* Selection highlight color */
::selection {
  background-color: rgba(86, 86, 86, 0.728);
  color: rgb(255, 255, 255);
}

/* Disable custom cursor and restore standard pointer cursors on mobile viewports */
@media screen and (max-width: 768px) {
  .custom-cursor {
    display: none !important;
  }
  *,
  *::before,
  *::after {
    cursor: auto !important;
  }
  a,
  button,
  [role="button"],
  .navbar-logo,
  .menu-link,
  .contact-btn {
    cursor: pointer !important;
  }
}

/* ==========================================================================
   Interactive Grid Background & Crosshair Overlay
   ========================================================================== */
.interactive-grid-bg {
  position: fixed; /* Keep it fixed in the viewport background */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 3; /* Sits behind text content but in front of background video and overlays */
  overflow: hidden;
  pointer-events: none;
}

.crosshair-h {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.01) 0%,
    rgba(255, 255, 255, 0.098) 50%,
    rgba(255, 255, 255, 0.128) 100%
  );
  transform: translate3d(0, -100px, 0);
  will-change: transform;
}

.crosshair-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.01) 0%,
    rgba(255, 255, 255, 0.084) 50%,
    rgba(255, 255, 255, 0.01) 100%
  );
  transform: translate3d(-100px, 0, 0);
  will-change: transform;
}

/* Hide interactive grid crosshairs on mobile viewports */
@media screen and (max-width: 768px) {
  .interactive-grid-bg {
    display: none !important;
  }
}
