/* ==========================================================================
   SITECRAFT360 — PREMIUM DESIGN SYSTEM
   Vibe: Ethereal Glass (OLED Black + Emerald)
   Layout: Asymmetrical Bento
   Typography: Clash Display + Plus Jakarta Sans
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@200;300;400;500;600;700&display=swap');

/* --- DESIGN TOKENS --- */
:root {
  /* Palette — OLED Black + Emerald + Cyan */
  --bg-deep: #050505;
  --bg-surface: #0a0a0a;
  --bg-elevated: rgba(255, 255, 255, 0.03);
  --bg-card: rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --bg-glass: rgba(10, 10, 10, 0.7);

  --accent-primary: #10b981;
  --accent-primary-rgb: 16, 185, 129;
  --accent-secondary: #06b6d4;
  --accent-secondary-rgb: 6, 182, 212;
  --accent-glow: rgba(16, 185, 129, 0.12);

  --text-primary: #f0f0f0;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --text-inverse: #050505;

  --border-hairline: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(16, 185, 129, 0.25);

  /* Typography */
  --font-display: 'Clash Display', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 10rem;

  /* Radii — Squircle scale */
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-pill: 100px;

  /* Motion — Spring Physics */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration-fast: 250ms;
  --duration-normal: 500ms;
  --duration-slow: 800ms;
  --duration-reveal: 1000ms;

  /* Layout */
  --max-width: 1320px;
  --nav-height: 64px;
}


/* --- RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Ambient Mesh Gradient Orbs (fixed, GPU-safe) */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 65%);
  pointer-events: none;
  z-index: -2;
}

/* Film Grain Noise Overlay (fixed, performance-safe) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}


/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.75rem, 5.5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: 1.125rem; }

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-expo);
}

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

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}


/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}


/* --- LAYOUT --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2.5rem;
}

.section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-2xl) auto;
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: 1.125rem;
}


/* --- EYEBROW TAGS --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
}


/* --- GRADIENT TEXT --- */
.text-gradient {
  background: linear-gradient(135deg, var(--text-primary) 20%, var(--accent-primary) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-accent {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* --- PAGE HERO --- */
.page-hero {
  padding: 12rem 0 var(--space-2xl) 0;
  position: relative;
  text-align: center;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  margin-bottom: var(--space-md);
}

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

/* Subtle dot-grid background */
.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Radial glow behind hero text */
.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}


/* --- SCROLL REVEAL ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  transition:
    opacity var(--duration-reveal) var(--ease-spring),
    transform var(--duration-reveal) var(--ease-spring),
    filter var(--duration-reveal) var(--ease-spring);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 500ms; }


/* --- UTILITY --- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Two-column split layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

/* Bento grid */
.bento-grid {
  display: grid;
  gap: var(--space-md);
}

.bento-3 {
  grid-template-columns: repeat(3, 1fr);
}

.bento-2 {
  grid-template-columns: repeat(2, 1fr);
}


/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  html { font-size: 15px; }

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

  .split {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

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

@media (max-width: 768px) {
  html { font-size: 14px; }

  .container { padding: 0 1.25rem; }

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

  .page-hero {
    padding: 9rem 0 var(--space-xl) 0;
    min-height: auto;
  }

  .bento-3,
  .bento-2 {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}
