/* ═══════════════════════════════════════
   CSS CUSTOM PROPERTIES
   (Google Fonts loaded via <link> in HTML)
═══════════════════════════════════════ */
:root {
  --color-bg:          #0a0f1e;
  --color-surface:     #0d1426;
  --color-surface-2:   #111827;
  --color-accent:      #00d4ff;
  --color-accent-2:    #0099cc;
  --color-accent-dim:  rgba(0, 212, 255, 0.1);
  --color-white:       #ffffff;
  --color-text:        #e2e8f0;
  --color-muted:       #94a3b8;
  --color-border:      rgba(0, 212, 255, 0.15);
  --color-border-hover: rgba(0, 212, 255, 0.4);

  --font-heading: 'Plus Jakarta Sans', 'PlusJakartaSans-fallback', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', 'Inter-fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family: var(--font-body); /* keep for compat */

  /* Typography scale */
  --font-size-xs:   0.75rem;
  --font-size-sm:   0.875rem;
  --font-size-base: 1rem;
  --font-size-lg:   1.125rem;
  --font-size-xl:   1.25rem;
  --font-size-2xl:  1.5rem;
  --font-size-3xl:  1.875rem;
  --font-size-4xl:  2.25rem;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2rem;
  --space-xl:  3rem;
  --space-2xl: 5rem;

  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-full: 9999px;

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.15);

  /* Enhanced shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.3);
  --shadow-xl:   0 20px 60px rgba(0,0,0,0.4);
  --shadow-glow-strong: 0 0 60px rgba(0, 212, 255, 0.25);

  /* Gradient presets */
  --gradient-hero: linear-gradient(135deg, rgba(10,15,30,0.92) 0%, rgba(13,20,38,0.85) 50%, rgba(0,212,255,0.08) 100%);
  --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #0099cc 50%, #7b61ff 100%);
  --gradient-surface: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);

  --transition:      0.3s ease;
  --navbar-height:   72px;
}

/* ═══════════════════════════════════════
   FONT FALLBACK — reduce CLS/FOUT
   size-adjust matches Inter & Plus Jakarta Sans metrics
   so system-ui fallback takes up the same space
═══════════════════════════════════════ */
@font-face {
  font-family: 'Inter-fallback';
  size-adjust: 100.06%;
  ascent-override: 90%;
  src: local('Arial');
}
@font-face {
  font-family: 'PlusJakartaSans-fallback';
  size-adjust: 103%;
  ascent-override: 92%;
  src: local('Arial');
}

/* ═══════════════════════════════════════
   RESET
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ═══════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════ */
h1, h2, h3, h4 { font-family: var(--font-heading); }
h1 { font-size: clamp(2rem, 5vw, 3.75rem);  font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem);  font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.125rem; font-weight: 600; }
p  { line-height: 1.7; color: var(--color-text); }

.text-accent    { color: var(--color-accent); }
.text-muted     { color: var(--color-muted); }
.text-center    { text-align: center; }
.text-gradient  {
  background: linear-gradient(135deg, var(--color-accent) 0%, #7b61ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════
   LAYOUT
═══════════════════════════════════════ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}
@media (min-width: 768px)  { .container { padding: 0 var(--space-lg); } }
@media (min-width: 1280px) { .container { padding: 0 var(--space-xl); } }

.section     { padding: var(--space-xl) 0; }
.section--sm { padding: var(--space-lg)  0; }

@media (min-width: 768px) {
  .section     { padding: var(--space-2xl) 0; }
  .section--sm { padding: var(--space-xl)  0; }
}

.section__header   { text-align: center; margin-bottom: var(--space-xl); }

@media (min-width: 768px) {
  .section__header { margin-bottom: var(--space-2xl); }
}
.section__label    {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 100px;
  padding: 0.375rem 1rem;
}
.section__title    { margin-bottom: var(--space-sm); }
.section__subtitle { color: var(--color-muted); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

.grid    { display: grid; gap: var(--space-md); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

@media (min-width: 1024px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ═══════════════════════════════════════
   GLASSMORPHISM CARD
═══════════════════════════════════════ */
.card {
  background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  padding: var(--space-lg);
}
.card:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(0,212,255,0.15);
  transform: translateY(-4px);
}

/* ═══════════════════════════════════════
   DIVIDER
═══════════════════════════════════════ */
.divider {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  border-radius: var(--radius-full);
  margin: var(--space-sm) auto 0;
}
.divider--left { margin-left: 0; }

/* ═══════════════════════════════════════
   PAGE HERO (inner pages)
═══════════════════════════════════════ */
.page-hero {
  /* sticky navbar is in flow — no need to add its height */
  padding: var(--space-2xl) 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 212, 255, 0.07) 0%, transparent 70%);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.page-hero__label    { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--color-accent); margin-bottom: var(--space-sm); }
.page-hero__title    { margin-bottom: var(--space-sm); position: relative; }
.page-hero__subtitle { color: var(--color-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; position: relative; }

/* Offset anchor links below sticky navbar */
[id] { scroll-margin-top: calc(var(--navbar-height) + 8px); }

/* ═══════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible         { opacity: 1; transform: translateY(0); }
.reveal--delay-1        { transition-delay: 0.1s; }
.reveal--delay-2        { transition-delay: 0.2s; }
.reveal--delay-3        { transition-delay: 0.3s; }
.reveal--delay-4        { transition-delay: 0.4s; }
.reveal--delay-5        { transition-delay: 0.5s; }

/* ═══════════════════════════════════════
   UTILITIES
═══════════════════════════════════════ */
.hidden   { display: none !important; }
.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; }
.mt-sm    { margin-top: var(--space-sm); }
.mt-md    { margin-top: var(--space-md); }
.mt-lg    { margin-top: var(--space-lg); }
.mb-sm    { margin-bottom: var(--space-sm); }
.mb-md    { margin-bottom: var(--space-md); }
.flex     { display: flex; }
.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); }

/* ═══════════════════════════════════════
   SKIP LINK (accessibility)
═══════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ═══════════════════════════════════════
   FOCUS STYLES (accessibility)
═══════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover { transform: none; }
}
