/* =========================================================
   AIDigitaLife — Base Styles
   Variables, typography, layout primitives, background
   ========================================================= */

:root {
  /* Brand colors — extracted from company deck */
  --bg-deep:        #051634;
  --bg-mid:         #0A2168;
  --bg-light:       #143289;
  --accent:         #00C8FF;
  --accent-soft:    #4FD8FF;
  --accent-glow:    rgba(0, 200, 255, 0.35);
  --text:           #E8F1FF;
  --text-muted:     #9CB3D4;
  --text-dim:       #6B82A6;
  --border:         rgba(0, 200, 255, 0.18);
  --border-strong:  rgba(0, 200, 255, 0.45);
  --card-bg:        rgba(11, 35, 90, 0.45);
  --card-bg-hover:  rgba(15, 48, 120, 0.6);

  /* Typography */
  --font-display: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body:    'Manrope', system-ui, -apple-system, sans-serif;

  /* Sizing */
  --container:    1280px;
  --radius-sm:    8px;
  --radius:       16px;
  --radius-lg:    24px;

  /* Easings */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Atmospheric background layer ----- */
.bg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(0, 200, 255, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(20, 80, 200, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 120, 200, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 50%, var(--bg-deep) 100%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  pointer-events: none;
}

/* Floating particles canvas */
#particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

section {
  position: relative;
  padding: 120px 0;
}

@media (max-width: 768px) {
  section { padding: 80px 0; }
  .container { padding: 0 20px; }
}

@media (max-width: 480px) {
  section { padding: 64px 0; }
  .container { padding: 0 16px; }
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

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

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: 24px;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  margin-bottom: 12px;
}

h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

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

.accent { color: var(--accent); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(0, 200, 255, 0.05);
  margin-bottom: 24px;
}

.section-intro {
  max-width: 760px;
  margin-bottom: 64px;
}

.section-intro p {
  font-size: 1.1rem;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

a:hover { color: var(--accent-soft); }

/* ----- Reveal animations ----- */
/* Reveals only hide content once JS has loaded — graceful degradation */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js-ready .reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.js-ready .reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.js-ready .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.js-ready .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.js-ready .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
.js-ready .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
.js-ready .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }
.js-ready .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; }
.js-ready .reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.47s; }
.js-ready .reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.54s; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(0, 200, 255, 0.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Selection */
::selection {
  background: var(--accent);
  color: var(--bg-deep);
}
