/* ============================================
   NEVORTH — BASE.CSS
   Design tokens, reset, and foundation styles
   ============================================ */

/* --------------------------------------------
   CSS VARIABLES / DESIGN TOKENS
   -------------------------------------------- */
:root {
  /* Dark palette (for dark backgrounds) */
  --d1: #08090b;   /* Primary dark - near black */
  --d2: #0e1015;   /* Secondary dark */
  --d3: #161920;   /* Tertiary dark */
  --d4: #1e222b;   /* Quaternary dark */

  /* Light palette (for light backgrounds) */
  --l1: #f8f8f6;   /* Primary light - off-white */
  --l2: #f0f0ec;   /* Secondary light */
  --l3: #e4e4de;   /* Tertiary light */
  --l4: #d0d0c8;   /* Quaternary light */

  /* Text on dark backgrounds */
  --td: #eaeae6;   /* Primary text (light on dark) */
  --td2: #8e9099;  /* Secondary text (muted) */
  --td3: #555861;  /* Tertiary text (subtle) */

  /* Text on light backgrounds */
  --tl: #1a1c22;   /* Primary text (dark on light) */
  --tl2: #5c5e66;  /* Secondary text (muted) */
  --tl3: #9496a0;  /* Tertiary text (subtle) */

  /* Accent color - controlled usage for CTAs only */
  --accent: #E4572E;           /* Primary accent (red-orange, selective brand accent) */
  --accent-hover: #C94722;     /* Accent hover state */
  --accent-light: #F08A5D;     /* Light variant for dark backgrounds */
  --accent-bg: rgba(228, 87, 46, 0.1);  /* Subtle accent background */
  --accent-border: rgba(228, 87, 46, 0.22);  /* Accent border */

  /* Semantic colors */
  --success: #10b981;          /* Green - positive signals */
  --warning: #f59e0b;          /* Amber - caution signals */
  --error: #ef4444;            /* Red - negative signals */

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --font-display: var(--font-sans);

  /* Font sizes (fluid typography) */
  --text-xs: 0.75rem;          /* 12px */
  --text-sm: 0.875rem;         /* 14px */
  --text-base: 1rem;           /* 16px */
  --text-lg: 1.125rem;         /* 18px */
  --text-xl: 1.25rem;          /* 20px */
  --text-2xl: 1.5rem;          /* 24px */
  --text-3xl: clamp(1.5rem, 3.2vw, 2.25rem);   /* 24-36px */
  --text-4xl: clamp(2rem, 4.5vw, 3rem);        /* 32-48px */
  --text-5xl: clamp(2.5rem, 6vw, 4rem);        /* 40-64px */

  /* Font weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line heights */
  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;
  --leading-loose: 1.85;

  /* Spacing scale */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */

  /* Container widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1140px;
  --container-2xl: 1320px;
  --container-max: var(--container-xl);

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-2xl: 20px;
  --radius-full: 100px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 20px 60px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 28px rgba(228, 87, 46, 0.24);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-slower: 0.4s ease;

  /* Z-index scale */
  --z-dropdown: 100;
  --z-sticky: 150;
  --z-fixed: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-tooltip: 500;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--td);
  background: var(--d1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

.footer {
  margin-top: auto;
}

/* Remove default list styles */
ul, ol {
  list-style: none;
}

/* Remove default link styles */
a {
  color: inherit;
  text-decoration: none;
}

/* Images and media */
img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form elements */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

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

/* Remove default fieldset styles */
fieldset {
  border: none;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* --------------------------------------------
   BASE TYPOGRAPHY
   -------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
  color: inherit;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  line-height: var(--leading-relaxed);
}

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

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
}

code, kbd, pre {
  font-family: var(--font-mono);
}

/* --------------------------------------------
   LAYOUT UTILITIES
   -------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}

/* Alias for existing class */
.ctr {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}

@media (max-width: 768px) {
  .container,
  .ctr {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
  }
}

/* --------------------------------------------
   SECTION STYLES
   -------------------------------------------- */
/* Light section */
.ls {
  background: var(--l1);
  color: var(--tl);
  padding: var(--space-24) 0;
}

.ls .st { color: var(--tl); }
.ls .ss { color: var(--tl2); }

/* Dark section */
.ds {
  background: var(--d1);
  color: var(--td);
  padding: var(--space-24) 0;
}

.ds .st { color: var(--td); }
.ds .ss { color: var(--td2); }

/* Section title */
.st {
  font-weight: var(--font-extrabold);
  font-size: var(--text-3xl);
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
}

/* Section subtitle */
.ss {
  font-size: 1.03rem;
  line-height: var(--leading-loose);
  margin-top: var(--space-3);
  max-width: 600px;
  font-weight: var(--font-normal);
}

/* --------------------------------------------
   SELECTION STYLES
   -------------------------------------------- */
::selection {
  background: var(--accent);
  color: white;
}

/* --------------------------------------------
   FOCUS STYLES
   -------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------
   SCROLLBAR STYLES (optional)
   -------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--d2);
}

::-webkit-scrollbar-thumb {
  background: var(--d4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--td3);
}

/* ============================================
   GLOBAL LAYOUT FIX — STICK FOOTER TO BOTTOM
   ============================================ */

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.footer {
  margin-top: auto;
}