/* ============================================
   UrbanPest — Base CSS
   Design tokens, reset, typography, utilities
   ============================================ */

/* --- Google Fonts Import --- */

/* --- Design Tokens --- */
:root {
  /* Colors - Primary Brand */
  --color-navy:           #0B1320;
  --color-navy-light:     #162438;
  --color-navy-dark:      #060B12;

  /* Colors - UrbanX Signature Crimson Red Accent */
  --color-accent:         #D91C24;
  --color-accent-light:   #EF3038;
  --color-accent-dark:    #B31219;
  --color-accent-bg:      #FEF2F2;
  --color-accent-border:  #FECACA;
  --color-accent-glow:    rgba(217, 28, 36, 0.16);

  /* Semantic Compatibility Tokens */
  --color-emerald:        #D91C24;
  --color-emerald-light:  #EF3038;
  --color-emerald-dark:   #B31219;
  --color-emerald-bg:     #FEF2F2;
  --color-emerald-glow:   rgba(217, 28, 36, 0.16);

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

  /* Colors - Semantic */
  --color-text:           #0F172A;
  --color-text-muted:     #5A6270;
  --color-text-light:     #8C939D;
  --color-text-inverse:   #FFFFFF;
  --color-border:         #E2E6EA;
  --color-bg-page:        #FFFFFF;
  --color-bg-alt:         #F8FAFC;
  --color-bg-dark:        #0B1320;

  /* Colors - Status */
  --color-success:        #10B981;
  --color-error:          #D91C24;
  --color-warning:        #F59E0B;
  --color-info:           #2563EB;

  /* Typography — Authoritative Corporate Grotesque */
  --font-heading:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body:            'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Font Sizes - Fluid Scale */
  --text-xs:              0.75rem;    /* 12px */
  --text-sm:              0.875rem;   /* 14px */
  --text-base:            1rem;       /* 16px */
  --text-md:              1.125rem;   /* 18px */
  --text-lg:              1.25rem;    /* 20px */
  --text-xl:              1.5rem;     /* 24px */
  --text-2xl:             1.875rem;   /* 30px */
  --text-3xl:             2.25rem;    /* 36px */
  --text-4xl:             3rem;       /* 48px */
  --text-5xl:             3.75rem;    /* 60px */

  /* Font Weights */
  --weight-light:         300;
  --weight-regular:       400;
  --weight-medium:        500;
  --weight-semibold:      600;
  --weight-bold:          700;

  /* Line Heights */
  --leading-tight:        1.2;
  --leading-snug:         1.35;
  --leading-normal:       1.6;
  --leading-relaxed:      1.75;

  /* Spacing Scale */
  --space-xs:             0.25rem;    /* 4px */
  --space-sm:             0.5rem;     /* 8px */
  --space-md:             1rem;       /* 16px */
  --space-lg:             1.5rem;     /* 24px */
  --space-xl:             2rem;       /* 32px */
  --space-2xl:            3rem;       /* 48px */
  --space-3xl:            4rem;       /* 64px */
  --space-4xl:            6rem;       /* 96px */
  --space-5xl:            8rem;       /* 128px */

  /* Border Radius */
  --radius-sm:            4px;
  --radius-md:            8px;
  --radius-lg:            12px;
  --radius-xl:            16px;
  --radius-2xl:           24px;
  --radius-full:          9999px;

  /* Shadows */
  --shadow-sm:            0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:            0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg:            0 12px 32px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl:            0 24px 48px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
  --shadow-glow:          0 0 24px rgba(217, 28, 36, 0.2);

  /* Transitions */
  --transition-fast:      150ms ease;
  --transition-base:      250ms ease;
  --transition-slow:      400ms ease;
  --transition-spring:    400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --z-dropdown:           100;
  --z-sticky:             200;
  --z-overlay:            300;
  --z-modal:              400;
  --z-toast:              500;

  /* Container */
  --container-max:        1280px;
  --container-wide:       1440px;
  --container-narrow:     860px;
  --container-padding:    1.5rem;

  /* Header */
  --header-height:        80px;
  --header-utility-height: 40px;
}


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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

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

/* Remove list styles on ul, ol */
ul, ol {
  list-style: none;
}

/* Reset links */
a {
  color: inherit;
  text-decoration: none;
}

/* Reset media */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* Reset form elements */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Reset table */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Accessibility — focus styles */
:focus-visible {
  outline: 2px solid var(--color-emerald);
  outline-offset: 2px;
}

/* 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;
}


/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-navy);
}

h1 {
  font-size: var(--text-4xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-3xl);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--text-2xl);
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-md);
}

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

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

strong, b {
  font-weight: var(--weight-semibold);
}

small {
  font-size: var(--text-sm);
}

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

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

.text-emerald,
.text-accent {
  color: var(--color-accent);
}

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

.text-white {
  color: var(--color-text-inverse);
}

/* Section heading pattern */
.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-emerald);
  margin-bottom: var(--space-sm);
}

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

.section-subtitle {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 640px;
  line-height: var(--leading-relaxed);
}

.section-subtitle.centered {
  margin-left: auto;
  margin-right: auto;
}


/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--color-emerald);
  color: var(--color-white);
  border-color: var(--color-emerald);
}

.btn-primary:hover {
  background: var(--color-emerald-dark);
  border-color: var(--color-emerald-dark);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-secondary:hover {
  background: var(--color-white);
  color: var(--color-navy);
}

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn-outline:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn-outline-emerald,
.btn-outline-accent {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline-emerald:hover,
.btn-outline-accent:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-ghost {
  background: transparent;
  color: var(--color-emerald);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}

.btn-ghost:hover {
  color: var(--color-emerald-dark);
  transform: none;
}

.btn-ghost .btn-arrow {
  transition: transform var(--transition-base);
}

.btn-ghost:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: var(--text-base);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}


/* --- Links with arrows --- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: var(--weight-medium);
  color: var(--color-emerald);
  transition: all var(--transition-base);
}

.link-arrow svg {
  transition: transform var(--transition-base);
}

.link-arrow:hover {
  color: var(--color-emerald-dark);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}


/* --- Badges / Tags --- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
}

.badge-emerald,
.badge-accent {
  background: var(--color-accent-bg);
  color: var(--color-accent-dark);
}

.badge-navy {
  background: var(--color-navy);
  color: var(--color-white);
}

/* --- Dividers --- */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  border: none;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out both;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out both;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }


/* --- Selection --- */
::selection {
  background: var(--color-emerald);
  color: var(--color-white);
}
