/* ========================================
   DIGITAL EVIDENCES - Main Stylesheet
   Variables, Reset, Typography, Layout
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  /* Primary - Navy */
  --navy-900: #0A1628;
  --navy-800: #0E1F38;
  --navy-700: #122B4D;
  --navy-600: #163660;
  --navy-500: #1B3A5C;
  --navy-400: #2A5A8C;
  --navy-300: #3D6B9E;
  --navy-200: #6A9BC5;
  --navy-100: #E8EEF5;

  /* Accent - Gold (from logo binary spiral) */
  --gold-600: #A88E3A;
  --gold-500: #C4A84D;
  --gold-400: #D4BC6A;
  --gold-300: #E2D08E;
  --gold-100: #FBF6E8;

  /* Neutral */
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #CED4DA;
  --gray-400: #ADB5BD;
  --gray-500: #868E96;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;

  /* Functional */
  --success: #2D9E5C;
  --error: #DC3545;
  --cta-red: #C0392B;
  --cta-red-hover: #A93226;

  /* Typography */
  --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.25rem;
  --weight-regular: 400;
  --weight-semibold: 600;
  --weight-bold: 700;
  --leading-tight: 1.2;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --shadow-sm: 0 2px 8px rgba(10, 22, 40, 0.06);
  --shadow-md: 0 4px 16px rgba(10, 22, 40, 0.1);
  --shadow-lg: 0 8px 32px rgba(10, 22, 40, 0.12);
  --shadow-xl: 0 16px 48px rgba(10, 22, 40, 0.16);
  --transition: 0.3s ease;
}

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

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

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--gray-700);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--navy-400);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold-500);
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  background: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--gray-900);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

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

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

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

.section {
  padding: var(--space-3xl) 0;
}

.section--white { background-color: var(--white); }
.section--gray { background-color: var(--gray-50); }
.section--navy { background-color: var(--navy-900); color: var(--white); }
.section--navy h2,
.section--navy h3,
.section--navy h4 { color: var(--white); }

.text-center { text-align: center; }
.text-gold { color: var(--gold-500); }
.text-navy { color: var(--navy-500); }
.text-white { color: var(--white); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }

.section-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
  position: relative;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-600);
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
}

/* Gold underline accent for section titles */
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold-500);
  margin: var(--space-md) auto 0;
  border-radius: 2px;
}

.section-title.text-left::after {
  margin-left: 0;
}

/* --- Grid System --- */
.grid {
  display: grid;
  gap: var(--space-xl);
}

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

/* --- Flex Utilities --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* --- Skip to Content (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--navy-900);
  color: var(--white);
  padding: var(--space-sm) var(--space-md);
  z-index: 10000;
  border-radius: var(--border-radius);
  font-weight: var(--weight-semibold);
}

.skip-link:focus {
  top: var(--space-md);
  color: var(--white);
}

/* --- Lazy Load --- */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"][complete] {
  opacity: 1;
}

/* --- Selection --- */
::selection {
  background-color: var(--gold-100);
  color: var(--navy-900);
}

/* --- Scrollbar (webkit) --- */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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