/* ============================================================
   NWC Main Site — Global Styles
   style.css: tokens, resets, typography, layout utilities
   ============================================================ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Clash Display via Fontshare ─── */
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&display=swap');

/* ─── CSS Custom Properties ─── */
:root {
  /* Brand */
  --color-primary:    #3C7BFC;
  --color-secondary:  #2AA7FF;
  --color-glow:       #5B9BFF;

  /* Gradients */
  --gradient-brand:   linear-gradient(135deg, #3C7BFC 0%, #2AA7FF 100%);
  --gradient-hero:    linear-gradient(135deg, #3C7BFC 0%, #06B6D4 50%, #2AA7FF 100%);
  --gradient-glow:    radial-gradient(ellipse at center, rgba(60,123,252,0.15) 0%, transparent 70%);

  /* Light Mode (default) */
  --bg:               #F5F8FF;
  --bg-card:          #FFFFFF;
  --bg-tint:          #EAF1FF;
  --bg-elevated:      #FFFFFF;
  --text-primary:     #0A1628;
  --text-secondary:   #4A6494;
  --text-muted:       #8BA4C8;
  --border:           #C8D8F5;
  --border-subtle:    #E2EAFE;
  --shadow-sm:        0 1px 3px rgba(10,22,40,0.08);
  --shadow-md:        0 4px 16px rgba(10,22,40,0.10);
  --shadow-lg:        0 8px 32px rgba(10,22,40,0.12);
  --shadow-glow:      0 0 40px rgba(60,123,252,0.20);

  /* Typography */
  --font-display:     'Clash Display', 'Inter', sans-serif;
  --font-body:        'Inter', sans-serif;

  /* Spacing */
  --section-py:       5rem;
  --container-px:     1.5rem;
  --max-width:        1200px;

  /* Radius */
  --radius-sm:        0.5rem;
  --radius-md:        1rem;
  --radius-lg:        1.5rem;
  --radius-xl:        2rem;
  --radius-full:      9999px;

  /* Transitions */
  --transition-fast:  150ms ease;
  --transition-base:  300ms ease;
  --transition-slow:  500ms ease;

  /* Navbar */
  --navbar-h:         70px;
}

[data-theme="dark"] {
  --bg:               #04060F;
  --bg-card:          #0A1628;
  --bg-tint:          #0D1E38;
  --bg-elevated:      #0F1F3D;
  --text-primary:     #FFFFFF;
  --text-secondary:   #A8BCDF;
  --text-muted:       #5A7299;
  --border:           #1A2F56;
  --border-subtle:    #142240;
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.30);
  --shadow-md:        0 4px 16px rgba(0,0,0,0.40);
  --shadow-lg:        0 8px 32px rgba(0,0,0,0.50);
  --shadow-glow:      0 0 60px rgba(60,123,252,0.25);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

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

/* ─── Typography Scale ─── */
.font-display { font-family: var(--font-display); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.1;
  font-weight: 700;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { color: var(--text-secondary); }

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

.container--wide {
  max-width: 1400px;
}

.section {
  padding-block: var(--section-py);
}

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

.section--dark {
  background-color: var(--bg-card);
}

/* ─── Grid Utilities ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
  :root { --section-py: 3.5rem; }
}

/* ─── Flex Utilities ─── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.gap-1        { gap: 0.5rem; }
.gap-2        { gap: 1rem; }
.gap-3        { gap: 1.5rem; }
.gap-4        { gap: 2rem; }

/* ─── Spacing Utilities ─── */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ─── Text Alignment ─── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* ─── Section Header ─── */
.section-header {
  max-width: 640px;
  margin-bottom: 3rem;
}

.section-header--center {
  margin-inline: auto;
  text-align: center;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.875rem;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-title {
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ─── Page Hero (inner pages) ─── */
.page-hero {
  padding-top: calc(var(--navbar-h) + 4rem);
  padding-bottom: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(60,123,252,0.1);
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(60,123,252,0.2);
  margin-bottom: 1.25rem;
}

.page-hero__title {
  margin-bottom: 1.25rem;
}

.page-hero__desc {
  font-size: 1.125rem;
  max-width: 580px;
  margin-inline: auto;
  line-height: 1.7;
}

/* ─── Divider ─── */
.divider {
  height: 1px;
  background: var(--border);
  margin-block: 2rem;
}

/* ─── Screen Reader Only ─── */
.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;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ─── Selection ─── */
::selection {
  background: rgba(60,123,252,0.2);
  color: var(--color-primary);
}
