/* ============================================
   Engine Labs - Main Stylesheet
   ============================================ */

/* ============================================
   Design System Tokens
   ============================================ */
:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-bg-light: rgba(22, 21, 25, 0.15);
  --color-text-secondary: rgba(22, 21, 25, 0.7);
  --color-text-tertiary: rgba(22, 21, 25, 0.5);
  --color-text-muted: rgba(22, 21, 25, 0.6);
  
  /* Typography Scale */
  --text-xs: 0.75rem;       /* 12px — small / captions */
  --text-sm: 0.875rem;      /* 14px — body */
  --text-md: 1.25rem;       /* 20px — subhead */
  --text-base: 0.875rem;    /* 14px — body */
  --text-lg: 2.0625rem;     /* 33px — heading / main */
  --text-xl: 3.3125rem;     /* 53px — display / x-large */
  --text-2xl: 4rem;         /* 64px — hero / extra-large */

  /* Legacy support */
  --font-size: 18px;
  --font-size-large: var(--text-xl);
  
  /* Spacing */
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
  
  /* Border Radius */
  --border-radius-sm: 2px;
  --border-radius-md: 40px;
  --border-radius-lg: 60px;
  --border-radius-full: 100px;
  
  /* Transitions */
  --transition-base: 0.15s ease-out;
  --transition-slow: 0.25s ease-out;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --transition-color: 0.15s ease;
  --transition-transform: 0.15s var(--ease-out);
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  background-color: var(--color-bg);
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  color: #161519;
  font-family: 'Neue Haas Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--font-size);
  font-weight: 700;
  line-height: 130%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100%;
  width: 100%;
  background-color: var(--color-bg);
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><circle cx="8" cy="8" r="8" fill="%23000000"/></svg>') 8 8, auto;
  overflow-x: hidden;
}

.cursor-custom {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><circle cx="8" cy="8" r="8" fill="%23000000"/></svg>') 8 8, auto;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  color: rgba(22, 21, 25, 1);
}

main > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
}


/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  color: #161519;
  line-height: 150%;
  font-size: var(--font-size);
  font-weight: 700;
}

h1, h2 {
  font-size: 33px;
  line-height: 150%;
}

@media screen and (max-width: 767px) {
  h1, h2 {
    font-size: 28px;
    line-height: 115%;
  }

  h3 {
    font-size: 16px;
  }

  body {
    font-size: 16px;
    line-height: 150%;
  }
}

h3 {
  font-size: 18px;
}

p {
  color: #161519;
  font-weight: 700;
}

a {
  color: rgba(22, 21, 25, 0.75);
  text-decoration: none;
  transition: color var(--transition-color);
  font-weight: 700;
}

a:hover,
a:focus {
  color: #161519;
}

strong,
b {
  font-weight: 700;
}

em {
  font-weight: 700;
  font-style: normal;
}

button {
  font-weight: 700;
}

img {
  border-radius: 4px;
  width: 100%;
  height: auto;
  display: inline-block;
  max-width: 100%;
}

/* Text Selection */
::selection {
  background-color: #abd119;
  color: #161519;
}

/* ============================================
   Layout
   ============================================ */
.container {
  width: 100%;
  max-width: 580px;
  margin-inline: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Ensure proper text wrapping on all devices */
body,
main,
section,
div,
p,
h1,
h2,
h3,
h4,
h5,
h6,
a,
span {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   Reduced Motion - Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  /* Disable scroll-reveal entrance animations (translateY motion) */
  .fade-in:not(.available-now-badge),
  .hero-title,
  .cta-button:not(.services-modal-trigger),
  .section-title.fade-in,
  .process > .container,
  .services-section > .container,
  .project-section > .container,
  .hero-grid > div.fade-in,
  .content-grid > div.fade-in,
  .faq-section,
  .nav-logo {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .project-image {
    opacity: 1 !important;
    transform: none !important;
  }


  /* Preserve subtle decorative animations (no motion sickness risk) */
  .available-now-badge {
    animation: border-rotate 3s linear infinite !important;
  }

  .available-now-icon-blur {
    animation: pulse-scale 2s ease-in-out infinite !important;
  }
}
