/* gnlx-base.css — Custom properties, reset, typography foundations */

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Palette — Dark backgrounds */
  --gnlx-bg-dark-primary: #080F13;
  --gnlx-bg-dark-secondary: #0C1820;
  --gnlx-bg-dark-alt: #0F2030;

  /* Palette — Light backgrounds */
  --gnlx-bg-light-primary: #F4F7F5;
  --gnlx-bg-light-secondary: #EAF0EC;
  --gnlx-bg-white: #FFFFFF;

  /* Accent colors */
  --gnlx-accent-amber: #E8A93A;
  --gnlx-accent-teal: #1BBFB0;
  --gnlx-brand-teal-deep: #0A5C6B;

  /* Text — on dark backgrounds */
  --gnlx-on-dark-heading: #F0F8F5;
  --gnlx-on-dark-body: #A8C4BE;
  --gnlx-on-dark-muted: #5A8080;
  --gnlx-on-dark-accent: #E8A93A;

  /* Text — on light backgrounds */
  --gnlx-on-light-heading: #0A1A1F;
  --gnlx-on-light-body: #1E3A3A;
  --gnlx-on-light-muted: #5A7070;
  --gnlx-on-light-accent: #0A5C6B;

  /* Borders */
  --gnlx-border-dark: rgba(27, 191, 176, 0.18);
  --gnlx-border-light: rgba(10, 92, 107, 0.20);

  /* Typography */
  --gnlx-font-heading: 'DM Serif Display', Georgia, serif;
  --gnlx-font-body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --gnlx-font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Spacing */
  --gnlx-section-pad-desktop: 96px 0;
  --gnlx-section-pad-mobile: 64px 0;
  --gnlx-container-max: 1200px;
  --gnlx-content-narrow: 760px;

  /* Transitions */
  --gnlx-transition-base: 200ms ease;
  --gnlx-transition-slow: 400ms ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--gnlx-font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  background-color: var(--gnlx-bg-dark-primary);
  color: var(--gnlx-on-dark-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Light-top page overrides body base */
body.gnlx-page--light-top {
  background-color: var(--gnlx-bg-light-primary);
  color: var(--gnlx-on-light-body);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--gnlx-font-heading);
  font-weight: 400;
  line-height: 1.15;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

.gnlx-text-mono {
  font-family: var(--gnlx-font-mono);
}

.gnlx-text-display-italic {
  font-family: var(--gnlx-font-heading);
  font-style: italic;
}

/* ============================================================
   FADE-IN ANIMATION (IntersectionObserver)
   ============================================================ */
.gnlx-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.gnlx-fade-in.gnlx-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Failsafe — force visible after 600ms */
.gnlx-fade-in.gnlx-force-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

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

:focus-visible {
  outline: 2px solid var(--gnlx-accent-teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background-color: var(--gnlx-accent-teal);
  color: var(--gnlx-bg-dark-primary);
}
