/* ===== RizVer Global Design System ===== */

/* --- CSS Variables --- */
:root {
  --purple: #9B72CF;
  --sky: #5BC0EB;
  --pink: #E84393;
  --peach: #F8A5A5;
  --orange: #F39C12;
  --gold: #F1C40F;
  --dark: #0B0E17;
  --dark-2: #121728;
  --dark-3: #1A2035;
  --dark-card: #161B2E;
  --text: #E8ECF4;
  --text-dim: #8892A8;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: .32s cubic-bezier(.4,0,.2,1);
  --gradient-brand: linear-gradient(135deg, var(--purple), var(--sky), var(--pink), var(--orange), var(--gold));
  --gradient-accent: linear-gradient(135deg, var(--purple), var(--pink));
  --gradient-warm: linear-gradient(135deg, var(--pink), var(--orange), var(--gold));
  --max-w: 1200px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--dark);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 700; color: #fff; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { color: var(--text-dim); }

/* --- Layout --- */
.container { width: 90%; max-width: var(--max-w); margin: 0 auto; }
section { padding: 100px 0; position: relative; }

/* --- Gradient Text --- */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Section Header --- */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header .label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 50px;
  background: rgba(91, 192, 235, .1);
  color: var(--sky);
  margin-bottom: 16px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p { max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 24px rgba(155, 114, 207, .3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(155, 114, 207, .45);
}
.btn-outline {
  border: 2px solid rgba(255,255,255,.15);
  color: #fff;
  backdrop-filter: blur(4px);
}
.btn-outline:hover {
  border-color: var(--sky);
  color: var(--sky);
  transform: translateY(-2px);
}
.btn svg, .btn i { width: 18px; height: 18px; }

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(11, 14, 23, .92);
  backdrop-filter: blur(20px);
  padding: 12px 0;
  box-shadow: 0 2px 30px rgba(0,0,0,.3);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img { height: 38px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient-brand);
  transition: var(--transition);
  border-radius: 2px;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { margin-left: 8px; }
.nav-cta .btn { padding: 10px 24px; font-size: .85rem; }

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  z-index: 1001;
}
.menu-toggle span {
  display: block;
  height: 2.5px;
  border-radius: 4px;
  background: #fff;
  transition: var(--transition);
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav-links, .nav-cta {
    position: fixed;
    top: 0; right: -100%;
    width: 75%; height: 100vh;
    flex-direction: column;
    background: var(--dark-2);
    padding: 100px 40px 40px;
    gap: 24px;
    transition: var(--transition);
    box-shadow: -10px 0 40px rgba(0,0,0,.5);
  }
  .nav-links.open, .nav-cta.open { right: 0; }
  .nav-cta { top: auto; bottom: 0; height: auto; padding: 24px 40px; }
  .nav-cta.open { right: 0; }
  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }
  .mobile-overlay.open { opacity: 1; pointer-events: all; }
}

/* --- Cards --- */
.card {
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-brand);
  opacity: 0;
  transition: var(--transition);
  z-index: 0;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(155, 114, 207, .25);
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.card:hover::before { opacity: .05; }
.card > * { position: relative; z-index: 1; }

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale {
  opacity: 0;
  transform: scale(.9);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 100ms); }

/* --- Footer --- */
.site-footer {
  background: var(--dark-2);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand img { height: 36px; margin-bottom: 16px; }
.footer-brand p { font-size: .9rem; max-width: 280px; }
.footer-col h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  font-size: .9rem;
  color: var(--text-dim);
  padding: 4px 0;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--sky); transform: translateX(4px); }
.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.footer-socials a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  padding: 0;
}
.footer-socials a:hover {
  background: var(--gradient-brand);
  transform: translateY(-3px);
}
.footer-socials svg { width: 18px; height: 18px; fill: var(--text-dim); }
.footer-socials a:hover svg { fill: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 24px 0;
  text-align: center;
  font-size: .85rem;
  color: var(--text-dim);
}
.footer-bottom a { color: var(--sky); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}

/* --- Floating Orbs Background --- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .15;
  pointer-events: none;
  z-index: 0;
}

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s ease;
}
.preloader.done { opacity: 0; pointer-events: none; }
.preloader-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: var(--sky);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Skip link for accessibility --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 12px 24px;
  background: var(--sky);
  color: var(--dark);
  border-radius: 8px;
  font-weight: 600;
  z-index: 10000;
}
.skip-link:focus { top: 16px; }

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(155,114,207,.3);
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(155,114,207,.5); }
.back-to-top svg { width: 20px; height: 20px; }

/* --- Utility --- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* --- Page Header (for inner pages) --- */
.page-header {
  padding: 140px 0 80px;
  text-align: center;
  background: var(--dark-2);
  position: relative;
  overflow: hidden;
}
.page-header .orb { opacity: .1; }
.page-header h1 { margin-bottom: 16px; }
.page-header p { font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: .85rem;
  color: var(--text-dim);
}
.breadcrumb a { color: var(--sky); }
.breadcrumb span { color: var(--text-dim); }
