/* ==========================================================================
   MAKEITBRIGHT DESIGN SYSTEM
   Standardized Design System Tokens & Base Reset
   ========================================================================== */

/* Google Fonts Import: Platypi (Headings) & Inter (Body) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Platypi:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600;1,700&display=swap');

:root {
  /* Surfaces */
  --mib-color-bg-dark:            #0c0d11;
  --mib-color-bg-charcoal:        #24262b;
  --mib-color-bg-card-dark:       #15161b;
  --mib-color-bg-media:           #121318;
  --mib-color-bg-footer:          #0a0b0e;
  --mib-color-bg-light:           #fafafc;
  --mib-color-bg-light-subtle:    #f2f3f6;
  --mib-color-bg-light-card:      #f4f5f8;
  --mib-color-bg-light-muted:     #e8e9ed;
  --mib-color-hero-scrim:         rgba(12, 13, 17, 0.68);

  /* Monochromatic Stepped Transition Horizon */
  --mib-color-ramp-step-1:        #494c54;
  --mib-color-ramp-step-2:        #7f848f;
  --mib-color-ramp-step-3:        #d2d5dc;

  /* Typography - Dark Canvas (Sections 1-4) */
  --mib-color-text-dark-primary:   #f7f7f8;
  --mib-color-text-dark-secondary: #fafafc;
  --mib-color-text-dark-subtle:    #c4c6cb;
  --mib-color-text-dark-muted:     #a0a3ab;

  /* Typography - Light Canvas (Sections 6-8) */
  --mib-color-text-light-primary:   #0c0d11;
  --mib-color-text-light-secondary: #24262b;
  --mib-color-text-light-muted:     #636773;

  /* Primary Brand Accent (Bold Red / Crimson) */
  --mib-color-accent:              #cc3300;
  --mib-color-accent-subtle:       rgba(204, 51, 0, 0.14);
  --mib-color-accent-hover:        #b32d00;

  /* Secondary / Status Accents */
  --mib-color-status-success:      #10b981;
  --mib-color-status-success-dim:  rgba(16, 185, 129, 0.12);
  --mib-color-status-success-text: #a7f3d0;
  --mib-color-status-danger:       #ef4444;
  --mib-color-status-danger-dim:   rgba(239, 68, 68, 0.12);
  --mib-color-status-danger-text:  #fca5a5;

  /* Interactive Elements */
  --mib-color-btn-bg-primary:         #fafafc;
  --mib-color-btn-bg-primary-hover:   #eceef2;
  --mib-color-btn-bg-secondary:       #f2f3f7;
  --mib-color-btn-bg-secondary-hover: #e4e6ed;
  --mib-color-btn-text:               #0c0d11;
  --mib-color-focus-ring-dark:        #fafafc;
  --mib-color-focus-ring-light:       #0c0d11;
  --mib-color-border-dark:            rgba(255, 255, 255, 0.12);
  --mib-color-border-dark-active:     rgba(255, 255, 255, 0.28);
  --mib-color-border-light:           rgba(0, 0, 0, 0.08);

  /* Typography */
  --mib-font-family-heading: 'Platypi', Georgia, serif;
  --mib-font-family-body:    'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Modular Scale (Major Third 1.25) */
  --mib-font-size-display: 3.0rem;    /* 48px */
  --mib-font-size-h2:      2.0rem;    /* 32px */
  --mib-font-size-h3:      1.5rem;    /* 24px */
  --mib-font-size-lead:    1.25rem;   /* 20px */
  --mib-font-size-body:    1.0rem;    /* 16px */
  --mib-font-size-sm:      0.875rem;  /* 14px */
  --mib-font-size-xs:      0.75rem;   /* 12px */

  /* Line Heights */
  --mib-line-height-tight:  1.1;
  --mib-line-height-normal: 1.4;
  --mib-line-height-loose:  1.5;

  /* Letter Spacing (Tracking) */
  --mib-tracking-tight:  -0.03em;
  --mib-tracking-normal: -0.02em;
  --mib-tracking-button: -0.015em;

  /* 8pt Spacing Scale */
  --mib-space-1:   4px;
  --mib-space-2:   8px;
  --mib-space-3:  12px;
  --mib-space-4:  16px;
  --mib-space-6:  24px;
  --mib-space-8:  32px;
  --mib-space-10: 40px;
  --mib-space-12: 48px;
  --mib-space-16: 64px;
  --mib-space-20: 80px;
  --mib-space-24: 96px;
  --mib-space-28: 112px;

  /* Layout Containers & Typography Constraints */
  --mib-container-max:    1200px;
  --mib-container-narrow: 1072px;
  --mib-container-text:    660px;
  --mib-max-ch:           65ch;   /* Optimal reading line measure */

  /* Density-Scaled Section & Grid Spacing */
  --mib-section-space-hero:     clamp(80px, 12vh, 140px);
  --mib-section-space-spacious: clamp(64px, 8vw, 112px);
  --mib-section-space-medium:   clamp(48px, 6vw, 80px);
  --mib-section-space-compact:  clamp(32px, 4vw, 48px);
  --mib-gap-editorial:          clamp(24px, 4vw, 48px);
  --mib-gap-dense:              var(--mib-space-4);

  /* Scaled Proportional Corner Radii */
  --mib-radius-xs:   4px;  /* Micro tags, subtle accents */
  --mib-radius-sm:   6px;  /* Inputs, chips, subtle inner items */
  --mib-radius-md:   10px; /* Buttons, dropdowns, small controls */
  --mib-radius-lg:   14px; /* Standard cards, project cards, marquee, gallery */
  --mib-radius-xl:   18px; /* Large focal media containers, video showcase */
  --mib-radius-card: var(--mib-radius-lg); /* 14px refined card radius */
  --mib-radius-full: 9999px; /* Strictly for circular indicators/dots */

  /* Transitions */
  --mib-transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --mib-transition-base: 300ms cubic-bezier(0.16, 1, 0.3, 1);
  --mib-transition-slow: 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--mib-color-bg-dark);
  /* Hide standard browser scrollbar across all modern browsers */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE / Edge */
}

/* Hide webkit scrollbars */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  font-family: var(--mib-font-family-body);
  font-size: var(--mib-font-size-body);
  line-height: var(--mib-line-height-loose);
  color: var(--mib-color-text-dark-primary);
  background-color: var(--mib-color-bg-dark);
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--mib-font-family-heading);
  font-weight: 700;
  line-height: var(--mib-line-height-tight);
  letter-spacing: var(--mib-tracking-tight);
}

p {
  letter-spacing: var(--mib-tracking-normal);
}

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

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

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

/* Selection */
::selection {
  background-color: var(--mib-color-selection-bg, var(--mib-color-text-dark-secondary));
  color: var(--mib-color-selection-text, var(--mib-color-bg-dark));
}

/* Accessibility: Focus Visible */
:focus-visible {
  outline: 2px solid var(--mib-color-focus-ring-dark);
  outline-offset: 3px;
}

/* ==========================================================================
   Lenis Smooth Scroll Engine
   ========================================================================== */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Scroll margin offset for fixed header anchors */
[id] {
  scroll-margin-top: 96px;
}

/* prefers-reduced-motion standard */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  html.lenis {
    scroll-behavior: auto !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

