/* ============================================================
   NeuAnalytics 2026, Base Styles
   Reset + Typography + Global Elements
   ============================================================ */

/* ---- Self-hosted Fonts (GDPR-compliant, no external requests to Google) ---- */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/poppins-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-700.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-weight: var(--weight-regular);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--text-heading);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
}

h4 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

h5 {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--signal-teal);
}

strong, b {
  font-weight: var(--weight-semibold);
}

/* Data / Metrics display */
.text-metric {
  font-family: var(--font-primary);
  font-size: var(--text-5xl);
  font-weight: var(--weight-light);
  color: var(--neu-blue);
  line-height: 1;
}

.text-metric-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Monospace for data/code */
.text-mono {
  font-family: var(--font-mono);
}

/* Eyebrow / Overline text */
.text-eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--neu-blue);
  margin-bottom: var(--space-3);
  display: block;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

section {
  padding: var(--space-24) 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.btn--primary:hover {
  background-color: var(--btn-primary-hover);
  color: var(--btn-primary-text);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(4, 152, 254, 0.35);
}

.btn--secondary {
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border: 1px solid var(--btn-secondary-border);
}

.btn--secondary:hover {
  background-color: var(--btn-secondary-hover-bg);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* Equal-weight outline button (CPRA cookie consent dark pattern compliance) */
.btn--outline {
  background-color: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.40);
}

.btn--outline:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.60);
  transform: translateY(-1px);
}

.btn--lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
}

.btn--sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
}

/* Button with arrow icon */
.btn .btn-arrow {
  transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ---- Lists ---- */
ul, ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

li {
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}

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

/* ---- Dividers ---- */
hr {
  border: none;
  height: 1px;
  background: var(--border-default);
  margin: var(--space-12) 0;
}

/* ---- Selection ---- */
::selection {
  background-color: rgba(4, 152, 254, 0.25);
  color: var(--text-heading);
}

/* ---- Focus styles (accessibility) ---- */
:focus-visible {
  outline: 2px solid var(--neu-blue);
  outline-offset: 2px;
}

/* ---- Screen reader only utility ---- */
.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;
}

/* ---- Skip link (visible on focus for keyboard users) ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--neu-blue);
  color: white;
  text-decoration: none;
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  border-radius: 0 0 var(--border-radius-sm) 0;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--neu-blue);
  outline-offset: 2px;
}

/* ---- Utility classes ---- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-12 { margin-bottom: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }
.mb-16 { margin-bottom: var(--space-16); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
