/* ============================================
   BLUEPRINTS TECHNOLOGY LIMITED
   Design System v2.0 — Modern Enterprise
   ============================================ */

/* ============================================
   1. CSS RESET & BASE
   ============================================ */

*,
*::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;
  text-rendering: optimizeLegibility;
}

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

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

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* ============================================
   2. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================ */

:root {
  /* Color Palette — Deep Ocean Premium */
  --color-primary: #0c2d48;
  --color-primary-light: #14405e;
  --color-primary-dark: #071e32;
  --color-secondary: #145a52;
  --color-secondary-light: #1a7a6f;
  --color-secondary-dark: #0f4039;
  --color-accent: #2dd4a8;
  --color-accent-light: #5ce5c3;
  --color-accent-dark: #1fb890;
  --color-accent-glow: rgba(45, 212, 168, 0.15);
  --color-warm: #f59e0b;
  --color-warm-light: #fbbf24;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Backgrounds */
  --bg-primary: #fafbfc;
  --bg-secondary: var(--white);
  --bg-tertiary: var(--gray-50);
  --bg-dark: var(--color-primary);
  --bg-dark-secondary: var(--color-primary-light);
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-dark: rgba(12, 45, 72, 0.85);

  /* Text */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-400);
  --text-white: #ffffff;
  --text-white-muted: rgba(255, 255, 255, 0.85);
  --text-accent: var(--color-secondary);

  /* Typography — Fluid Scale */
  --font-heading: "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.775rem + 0.2vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.6rem + 1.4vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.8rem + 2.2vw, 3.25rem);
  --text-5xl: clamp(2.75rem, 2rem + 3.8vw, 4.5rem);

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Spacing System — 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-40: 10rem;

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 960px;
  --container-wide: 1440px;

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;
  --border-color: var(--gray-200);
  --border-color-light: var(--gray-100);
  --border-color-accent: rgba(45, 212, 168, 0.3);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-2xl: 0 24px 64px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 24px rgba(45, 212, 168, 0.15);
  --shadow-glow-strong: 0 0 40px rgba(45, 212, 168, 0.25);
  --shadow-dark: 0 8px 32px rgba(12, 45, 72, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 450ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Z-index layers */
  --z-base: 0;
  --z-above: 10;
  --z-dropdown: 100;
  --z-sticky: 500;
  --z-overlay: 900;
  --z-modal: 1000;
}

/* ============================================
   3. TYPOGRAPHY SYSTEM
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
}

h3 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: 1.3;
}

h4 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  line-height: 1.4;
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  line-height: 1.7;
}

strong {
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

/* ============================================
   4. LAYOUT SYSTEM
   ============================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-10);
  }
}

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

@media (max-width: 768px) {
  .section {
    padding: var(--space-16) 0;
  }
}

/* ============================================
   5. BUTTON COMPONENTS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: 1.5;
  text-align: center;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--color-secondary-light);
  border-color: var(--color-secondary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

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

.btn-secondary:hover {
  background: var(--color-secondary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

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

.btn-white:hover {
  background: var(--gray-100);
  border-color: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* ============================================
   6. SECTION TITLES
   ============================================ */

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.section-label::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-4);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--text-lg);
  margin-bottom: var(--space-12);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   7. ANIMATION UTILITIES
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.3s; }
.stagger-7 { transition-delay: 0.35s; }
.stagger-8 { transition-delay: 0.4s; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   8. RESPONSIVE HELPERS
   ============================================ */

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ============================================
   9. UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-accent { color: var(--color-accent); }
.text-white { color: var(--white); }

.mx-auto { margin-left: auto; margin-right: auto; }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ============================================
   10. ACCESSIBILITY
   ============================================ */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.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;
}

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

  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   11. PRINT STYLES
   ============================================ */

@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
  }

  .site-header, .site-footer, .hero, .page-hero { display: none; }

  a[href]:after { content: " (" attr(href) ")"; }
}
