/* ===================================================================
   PEARL CODE - CORE DESIGN SYSTEM & STYLESHEET
   High-Precision Engineering Studio
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-darkest: #05080f;
  --bg-darker: #080d1a;
  --bg-dark: #0b1122;
  --bg-card: #0f172a;
  --bg-card-hover: #141f36;
  --bg-card-inner: #0a0f1d;
  --bg-glass: rgba(15, 23, 42, 0.75);
  
  /* Accents */
  --cyan-primary: #00f2fe;
  --cyan-secondary: #00c6ff;
  --cyan-dark: #0284c7;
  --cyan-glow: rgba(0, 242, 254, 0.25);
  --cyan-glow-subtle: rgba(0, 242, 254, 0.1);
  
  --teal-accent: #00f5d4;
  --teal-glow: rgba(0, 245, 212, 0.2);
  
  --amber-primary: #f59e0b;
  --amber-secondary: #fbbf24;
  --amber-glow: rgba(245, 158, 11, 0.2);
  --amber-bg: rgba(245, 158, 11, 0.08);
  --amber-border: rgba(245, 158, 11, 0.3);

  --purple-accent: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.2);

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-faint: #475569;

  /* Borders */
  --border-light: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-cyan: rgba(0, 242, 254, 0.25);
  --border-cyan-bright: rgba(0, 242, 254, 0.5);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-cyan: 0 0 25px rgba(0, 242, 254, 0.2);
  --shadow-cyan-lg: 0 0 40px rgba(0, 242, 254, 0.35);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Spacing */
  --max-width: 1240px;
  --max-width-narrow: 1000px;
  --header-height: 76px;
}

/* ===================================================================
   Reset & Base Styles
   =================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-darkest);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 242, 254, 0.07) 0%, transparent 60%),
    radial-gradient(circle at 90% 40%, rgba(0, 198, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 10% 70%, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

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

a:hover {
  color: var(--cyan-secondary);
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: var(--max-width-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Sections */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-hero {
  padding: 4rem 0 6rem 0;
  position: relative;
}

/* Text Gradients */
.text-gradient-cyan {
  background: linear-gradient(135deg, #00f2fe 0%, #38bdf8 60%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.text-gradient-amber {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-header h2 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* Section Tag Pills */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: var(--cyan-primary);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.section-tag.tag-amber {
  background: var(--amber-bg);
  border-color: var(--amber-border);
  color: var(--amber-secondary);
}

.section-tag.tag-teal {
  background: rgba(0, 245, 212, 0.08);
  border-color: rgba(0, 245, 212, 0.3);
  color: var(--teal-accent);
}

.section-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #00f2fe 0%, #0284c7 100%);
  color: #05080f;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0369a1 100%);
  color: #05080f;
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.55);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
  transform: translateY(-2px);
}

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

.btn-outline-cyan:hover {
  background: rgba(0, 242, 254, 0.1);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  border-radius: 10px;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--border-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 242, 254, 0.1);
  transform: translateY(-3px);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Media Queries for responsive grids */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 4rem 0;
  }
}
