/* ============================================
   Base Styles — Reset, Variables, Typography
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* Canela (self-hosted) */
@font-face {
  font-family: 'Canela';
  src: url('../fonts/Canela-Regular.woff2') format('woff2'),
       url('../fonts/Canela-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* CSS Custom Properties */
:root {
  /* Colors */
  --color-bg: #12141D;
  --color-text-primary: #FAFAFA;
  --color-text-secondary: #E4E4E4;
  --color-text-muted: #808080;
  --color-button-bg: #FAFAFA;
  --color-button-text: #12141D;
  --color-white: #FFFFFF;

  /* Typography */
  --font-display: 'Canela', serif;
  --font-body: 'DM Sans', sans-serif;

  /* Spacing */
  --container-max-width: 1400px;
  --container-padding: 80px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

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

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Typography Scale */
.heading-xl {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -2px;
  color: var(--color-text-primary);
}

.heading-lg {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -1px;
  color: var(--color-text-primary);
}

.heading-md {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -1px;
  color: var(--color-text-primary);
}

.heading-sm {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -1px;
  color: var(--color-text-primary);
}

.body-lg {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.body-md {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.body-sm {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.body-xs {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-primary {
  color: var(--color-text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  border-radius: 24px;
  white-space: nowrap;
  outline: 1px solid transparent;
  outline-offset: -1px;
  transition: background-color 0.2s ease, color 0.2s ease, outline 0.2s ease;
}

.btn-primary {
  background-color: var(--color-button-bg);
  color: var(--color-button-text);
  padding: 11px 24px 12px;
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--color-text-primary);
  outline: 1px solid #2E2E2E;
}

.btn-nav {
  background-color: var(--color-button-bg);
  color: var(--color-button-text);
  padding: 7px 16px 8px;
}

.btn-nav:hover {
  background-color: transparent;
  color: var(--color-text-primary);
  outline: 1px solid #2E2E2E;
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays */
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }

/* Section spacing */
.section {
  padding: 80px 0;
}

/* Full-width image */
.full-width-image {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

/* Stat number (used in Hetrics) */
.stat-number {
  font-family: var(--font-body);
  font-size: 48px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* ============================================
   Responsive Breakpoints
   ============================================ */

@media (max-width: 1024px) {
  :root {
    --container-padding: 32px;
  }

  .heading-xl {
    font-size: 48px;
  }

  .heading-lg {
    font-size: 42px;
  }

  .heading-md {
    font-size: 36px;
  }

  .heading-sm {
    font-size: 28px;
  }

  .body-lg {
    font-size: 20px;
  }

  .stat-number {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 20px;
  }

  .heading-xl {
    font-size: 36px;
    line-height: 48px;
    letter-spacing: -1px;
  }

  .heading-lg {
    font-size: 36px;
  }

  .heading-md {
    font-size: 32px;
  }

  .heading-sm {
    font-size: 24px;
  }

  .body-lg {
    font-size: 18px;
  }

  .body-md {
    font-size: 18px;
  }

  .section {
    padding: 60px 0;
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: 20px;
  }

  .section {
    padding: 40px 0;
  }

  .heading-xl {
    font-size: 36px;
    line-height: 48px;
  }
}
