/* ============================================================
   CSS Variables
   ============================================================ */
:root {
  --bg:          #0a0a0f;
  --bg-card:     #12121a;
  --bg-card-2:   #0f0f18;
  --cyan:        #00d4ff;
  --purple:      #7b2fff;
  --cyan-glow:   rgba(0, 212, 255, 0.15);
  --purple-glow: rgba(123, 47, 255, 0.15);
  --border:      rgba(0, 212, 255, 0.15);
  --border-hover:rgba(0, 212, 255, 0.45);
  --text:        #ffffff;
  --text-muted:  #94a3b8;
  --text-dim:    #64748b;
  --radius:      12px;
  --radius-lg:   20px;
  --transition:  0.3s ease;
  --font-head:   'Space Grotesk', sans-serif;
  --font-body:   'Inter', sans-serif;
  --nav-h:       72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   Utility Classes
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-sm {
  padding: 60px 0;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section label */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
}

/* Section header */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header p {
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  color: #000;
  box-shadow: 0 0 0 rgba(0, 212, 255, 0);
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--cyan);
  border: 1.5px solid var(--border-hover);
}

.btn-secondary:hover {
  background: var(--cyan-glow);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 32px var(--cyan-glow);
  transform: translateY(-4px);
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--cyan-glow);
  color: var(--cyan);
  border: 1px solid rgba(0, 212, 255, 0.25);
}

.tag-purple {
  background: var(--purple-glow);
  color: #b47fff;
  border-color: rgba(123, 47, 255, 0.25);
}

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* Divider */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 3px;
  margin: 20px auto;
}

/* Icon box */
.icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan-glow);
  border: 1px solid rgba(0, 212, 255, 0.2);
  margin-bottom: 20px;
  flex-shrink: 0;
}

.icon-box svg {
  width: 24px;
  height: 24px;
  stroke: var(--cyan);
}

.icon-box-purple {
  background: var(--purple-glow);
  border-color: rgba(123, 47, 255, 0.2);
}

.icon-box-purple svg {
  stroke: #b47fff;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 140px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  margin-bottom: 20px;
}

.page-hero p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-bottom a {
  color: var(--text-dim);
  transition: var(--transition);
}

.footer-bottom a:hover {
  color: var(--cyan);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .btn { padding: 12px 22px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}

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

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
}
