/**
 * ====================================================================================================
 *   NIGAMA CONNECT — MODERN CSS RESET & BASE TYPOGRAPHY
 *   File: css/reset.css
 *   Architecture: Zero-Bloat Universal Box Reset, Fluid Viewport & Touch Ergonomics
 * ====================================================================================================
 */

/* Universal Box-Sizing & Margin Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Viewport Root & Scroll Containment */
html {
  font-size: 16px;
  /* NOTE: scroll-behavior:smooth is intentionally NOT set here.
   * Setting it on html/root forces iOS/Android to route ALL scroll events
   * through the JavaScript thread instead of the GPU compositor, causing
   * the characteristic sticky low-FPS scrolling on physical devices.
   * Smooth scroll for anchor links is handled programmatically in router.js. */
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
  min-height: 100%;
  background-color: var(--nc-bg-main);
  color: var(--nc-text-primary);
  font-family: var(--nc-font-sans);
  line-height: var(--nc-lh-normal);
  transition: background-color var(--nc-dur-base) ease, color var(--nc-dur-base) ease;
}

body {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  background-color: transparent;
  font-family: var(--nc-font-sans);
  font-size: var(--nc-fs-body);
  color: var(--nc-text-primary);
  line-height: var(--nc-lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fixed ambient mesh gradient via html pseudo-element — GPU composited, zero scroll cost */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--nc-mesh-gradient);
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: -1;
  /* Force own GPU layer so scroll never triggers a repaint */
  will-change: transform;
  transform: translateZ(0);
}

/* Headings Base Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--nc-font-display);
  font-weight: 700;
  line-height: var(--nc-lh-snug);
  color: var(--nc-text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--nc-fs-h1); }
h2 { font-size: var(--nc-fs-h2); }
h3 { font-size: var(--nc-fs-h3); }
h4 { font-size: var(--nc-fs-h4); }

p {
  color: var(--nc-text-secondary);
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* Links & Anchors */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--nc-dur-fast) ease, opacity var(--nc-dur-fast) ease;
}

/* Images & Embedded Media */
img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Lists */
ul, ol {
  list-style: none;
}

/* Buttons & Interactive Elements */
button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

/* Accessibility Focus States */
:focus-visible {
  outline: 2px solid var(--nc-brand-primary);
  outline-offset: 3px;
  border-radius: var(--nc-radius-sm);
}

/* High-Contrast Selection */
::selection {
  background-color: rgba(15, 163, 217, 0.35);
  color: var(--nc-text-primary);
}

/* Accessible Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: var(--nc-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--nc-brand-primary);
}
