/* ============================================================
   NEXPONENCIAL 2.0 — Design System
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --nx-bg:         #F5F3F0;
  --nx-bg-alt:     #EDEAE6;
  --nx-carbon:     #171719;
  --nx-carbon-soft:#1E1E21;
  --nx-burgundy:   #641F2B;
  --nx-red:        #B42D40;
  --nx-red-hover:  #C83A4E;
  --nx-white:      #FAFAF8;
  --nx-gray:       #8A8A8E;
  --nx-gray-light: #C4C4C8;
  --nx-gray-dark:  #4A4A4E;
  --nx-border:     rgba(23, 23, 25, 0.08);
  --nx-border-dark:rgba(250, 250, 248, 0.10);

  /* Typography */
  --nx-font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nx-font-heading:  'Outfit', 'Inter', sans-serif;
  --nx-font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  /* Type scale */
  --nx-text-xs:    0.75rem;    /* 12px */
  --nx-text-sm:    0.875rem;   /* 14px */
  --nx-text-base:  1rem;       /* 16px */
  --nx-text-lg:    1.125rem;   /* 18px */
  --nx-text-xl:    1.25rem;    /* 20px */
  --nx-text-2xl:   1.5rem;     /* 24px */
  --nx-text-3xl:   1.875rem;   /* 30px */
  --nx-text-4xl:   2.25rem;    /* 36px */
  --nx-text-5xl:   3rem;       /* 48px */
  --nx-text-6xl:   3.75rem;    /* 60px */
  --nx-text-hero:  clamp(2.5rem, 5vw + 1rem, 4.5rem);

  /* Spacing */
  --nx-space-xs:   0.5rem;
  --nx-space-sm:   1rem;
  --nx-space-md:   1.5rem;
  --nx-space-lg:   2rem;
  --nx-space-xl:   3rem;
  --nx-space-2xl:  4rem;
  --nx-space-3xl:  6rem;
  --nx-space-4xl:  8rem;
  --nx-space-section: clamp(4rem, 8vw, 8rem);

  /* Layout */
  --nx-max-width:   1280px;
  --nx-max-narrow:  900px;
  --nx-gutter:      clamp(1.25rem, 3vw, 2.5rem);
  --nx-radius:      6px;
  --nx-radius-lg:   12px;

  /* Transitions */
  --nx-ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --nx-duration:   0.35s;
  --nx-duration-fast: 0.2s;

  /* Shadows */
  --nx-shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --nx-shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --nx-shadow-lg:  0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --nx-shadow-card:0 2px 12px rgba(0,0,0,0.06);
}


/* ============================================================
   2. 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(--nx-font-body);
  font-size: var(--nx-text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--nx-carbon);
  background-color: var(--nx-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--nx-red);
  text-decoration: none;
  transition: color var(--nx-duration-fast) var(--nx-ease);
}
a:hover { color: var(--nx-red-hover); }
a:focus-visible {
  outline: 2px solid var(--nx-red);
  outline-offset: 3px;
  border-radius: 2px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
button:focus-visible {
  outline: 2px solid var(--nx-red);
  outline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--nx-font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--nx-carbon);
  letter-spacing: -0.01em;
}

ul, ol { list-style: none; }

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}


/* ============================================================
   3. LAYOUT
   ============================================================ */
.nx-container {
  width: 100%;
  max-width: var(--nx-max-width);
  margin: 0 auto;
  padding: 0 var(--nx-gutter);
}

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

.nx-section {
  padding: var(--nx-space-section) 0;
  position: relative;
}

.nx-section--dark {
  background-color: var(--nx-carbon);
  color: var(--nx-white);
}
.nx-section--dark h1,
.nx-section--dark h2,
.nx-section--dark h3,
.nx-section--dark h4 {
  color: var(--nx-white);
}
.nx-section--dark p,
.nx-section--dark li {
  color: var(--nx-gray-light);
}

.nx-section--alt {
  background-color: var(--nx-bg-alt);
}

.nx-grid {
  display: grid;
  gap: var(--nx-space-lg);
}

.nx-grid--2 { grid-template-columns: 1fr; }
.nx-grid--3 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .nx-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .nx-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.nx-flex {
  display: flex;
  align-items: center;
  gap: var(--nx-space-md);
}

.nx-text-center { text-align: center; }
.nx-text-small  { font-size: var(--nx-text-sm); color: var(--nx-gray); }
.nx-text-mono   { font-family: var(--nx-font-mono); font-size: var(--nx-text-sm); }


/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */
.nx-pretitle {
  font-family: var(--nx-font-mono);
  font-size: var(--nx-text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nx-red);
  margin-bottom: var(--nx-space-sm);
}
.nx-section--dark .nx-pretitle {
  color: var(--nx-red-hover);
}

.nx-h1 {
  font-size: var(--nx-text-hero);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: var(--nx-space-md);
}

.nx-h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  margin-bottom: var(--nx-space-md);
}

.nx-h3 {
  font-size: var(--nx-text-2xl);
  font-weight: 600;
  margin-bottom: var(--nx-space-sm);
}

.nx-h4 {
  font-size: var(--nx-text-lg);
  font-weight: 600;
  margin-bottom: var(--nx-space-xs);
}

.nx-subtitle {
  font-size: var(--nx-text-lg);
  line-height: 1.55;
  color: var(--nx-gray-dark);
  max-width: 600px;
}
.nx-section--dark .nx-subtitle {
  color: var(--nx-gray-light);
}

.nx-lead {
  font-size: var(--nx-text-xl);
  line-height: 1.6;
  color: var(--nx-gray-dark);
}


/* ============================================================
   5. ANIMATIONS (respect prefers-reduced-motion)
   ============================================================ */
.nx-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--nx-ease), transform 0.7s var(--nx-ease);
}
.nx-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.nx-reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s var(--nx-ease), transform 0.7s var(--nx-ease);
}
.nx-reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.nx-reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s var(--nx-ease), transform 0.7s var(--nx-ease);
}
.nx-reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.nx-stagger > * { transition-delay: calc(var(--nx-i, 0) * 0.1s); }

@media (prefers-reduced-motion: reduce) {
  .nx-reveal,
  .nx-reveal-left,
  .nx-reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}


/* ============================================================
   6. RESPONSIVE UTILITIES
   ============================================================ */
.nx-hide-mobile  { display: none; }
.nx-hide-desktop { display: block; }

@media (min-width: 768px) {
  .nx-hide-mobile  { display: block; }
  .nx-hide-desktop { display: none; }
}

.nx-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;
}
