/* ==========================================================================
   OpenBird Solutions Design System — Base Styles & Typography
   ========================================================================== */

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  background: var(--bg-primary);
}

/* Subtle background ambient mesh glow */
body::before {
  content: "";
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  height: 60vh;
  max-width: 1200px;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.08) 0%, rgba(41, 151, 255, 0.03) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}

main {
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Typography Hierarchy (Apple Style) */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.text-display {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.text-headline {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.text-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.text-subtitle {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-secondary);
}

p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.62;
  letter-spacing: -0.01em;
}

.p-lead {
  font-size: clamp(1.125rem, 1.8vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.55;
  font-weight: 400;
}

.text-small {
  font-size: 0.9375rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.text-micro {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, #1d1d1f 20%, #0066cc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-blue {
  background: linear-gradient(135deg, #0071e3 0%, #2997ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-subtle {
  background: linear-gradient(180deg, #1d1d1f 40%, #6e6e73 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2rem);
  padding-right: clamp(1.25rem, 4vw, 2rem);
}

/* Section Spacing */
.section {
  padding-top: clamp(4rem, 8vw, 7.5rem);
  padding-bottom: clamp(4rem, 8vw, 7.5rem);
  position: relative;
}

.section-sm {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header.text-center {
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Section Tag / Eyebrow Pill */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 102, 204, 0.08);
  border: 1px solid rgba(0, 102, 204, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  margin-bottom: var(--space-md);
}

.section-tag-dot {
  width: 6px;
  height: 6px;
  background: var(--brand-vibrant);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--brand-sky);
  animation: pulseDot 2.2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 1; }
}

/* Links & Buttons Reset */
a {
  color: var(--brand-vibrant);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-primary-hover);
}

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

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

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: #c7c7cc;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a6;
}

/* Accessibility Focus Ring */
:focus-visible {
  outline: 2px solid var(--brand-sky);
  outline-offset: 3px;
}

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