/* ============================================================
   GNEXZ — BASE
   Reset, body defaults, scrollbar, grain texture, animations.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--blue-900);
  color: var(--neutral-200);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--blue-900); }
::-webkit-scrollbar-thumb { background: var(--blue-700); border-radius: 4px; }

/* ── GRAIN / NOISE TEXTURE ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
  z-index: 9999;
}

/* ── SELECTION ── */
::selection {
  background: rgba(242, 183, 5, 0.2);
  color: var(--white);
}

/* ── BASE TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--white);
}

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

p {
  font-size: var(--text-body);
  color: var(--neutral-500);
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

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

ul, ol {
  list-style: none;
}

/* ── KEYFRAME ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes demoPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.95); }
  50%      { opacity: 1; transform: scale(1); }
}

@keyframes demoSlide {
  0%, 100% { transform: translateX(-10px); opacity: 0.3; }
  50%      { transform: translateX(10px); opacity: 1; }
}

/* ── LIGHT SECTION OVERRIDES ── */
.section-light {
  background: var(--neutral-100);
  color: var(--neutral-900);
}

.section-light h1,
.section-light h2,
.section-light h3,
.section-light h4 {
  color: var(--neutral-900);
}

.section-light p {
  color: var(--neutral-800);
}

/* ── SR-ONLY (accessibility) ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
