/* ============================================
   QUANTUM LEAF SOFTWARE — GLOBAL DESIGN SYSTEM
   Two colors: #0D1520 + #E8EAF0. No exceptions.
   Font: Geist. No exceptions.
   ============================================ */

/* --- 4.1 Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }

/* --- 3.1 Colors --- */
:root {
  --bg-base:          #0D1520;
  --bg-surface:       #1B2333;
  --bg-elevated:      #232D3F;
  --bg-border:        rgba(232, 234, 240, 0.08);
  --bg-border-bright: rgba(232, 234, 240, 0.18);
  --text-primary:     #E8EAF0;
  --text-secondary:   rgba(232, 234, 240, 0.65);
  --text-muted:       rgba(232, 234, 240, 0.35);
  --text-faint:       rgba(232, 234, 240, 0.12);
  --glow-soft:        rgba(232, 234, 240, 0.04);
  --glow-mid:         rgba(232, 234, 240, 0.08);

  --accent:           #4088F5;
  --accent-bright:    #66A3FF;
  --accent-dim:       rgba(64, 136, 245, 0.15);
  --accent-glow:      rgba(64, 136, 245, 0.25);
  --border-accent:    rgba(64, 136, 245, 0.25);
  --status-online:    #4ADE80;

  --gradient-hero:     radial-gradient(ellipse 80% 60% at 50% 0%, rgba(64,136,245,0.08) 0%, transparent 70%);
  --gradient-card:     linear-gradient(145deg, #1B2333 0%, #0D1520 100%);
  --gradient-glow:     radial-gradient(ellipse 60% 40% at 50% 50%, rgba(64,136,245,0.10) 0%, transparent 70%);
  --gradient-section:  linear-gradient(180deg, #0D1520 0%, #1B2333 50%, #0D1520 100%);
}

/* --- 3.2 Typography --- */
:root {
  --font:       'Geist', -apple-system, sans-serif;
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   2rem;
  --text-4xl:   2.75rem;
  --text-5xl:   3.5rem;
  --text-6xl:   4.5rem;
  --text-hero:  clamp(2.8rem, 6vw, 5.5rem);
}

/* --- 3.3 Spacing --- */
:root {
  --sp-2:  0.5rem;   --sp-3:  0.75rem;
  --sp-4:  1rem;     --sp-6:  1.5rem;
  --sp-8:  2rem;     --sp-10: 2.5rem;
  --sp-12: 3rem;     --sp-16: 4rem;
  --sp-20: 5rem;     --sp-24: 6rem;
  --sp-32: 8rem;
}

/* --- 3.4 Radii & Shadows --- */
:root {
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-modal: 0 24px 80px rgba(0,0,0,0.6);
}

/* --- 4.2 Utility Classes --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-6); }
.section { padding: var(--sp-24) 0; background: var(--bg-base); }
.section-alt { background: var(--bg-surface); }
.section-sm { padding: var(--sp-16) 0; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
  display: block;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
}

.section-body {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 560px;
}

.divider {
  height: 1px;
  background: var(--border-accent);
  border: none;
  margin: var(--sp-16) 0;
}

/* --- 4.3 Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 12px 28px;
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-base);
}
.btn-primary:hover {
  background: var(--accent-bright);
  opacity: 0.96;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--bg-border-bright);
}
.btn-outline:hover {
  background: var(--bg-elevated);
  border-color: var(--border-accent);
}

.btn-sm {
  padding: 8px 18px;
  font-size: var(--text-sm);
}

.btn-lg {
  padding: 16px 40px;
  font-size: var(--text-lg);
}

/* Shimmer sweep on all buttons */
.btn-primary, .btn-outline {
  position: relative;
  overflow: hidden;
}
.btn-primary::after, .btn-outline::after {
  content: '';
  position: absolute;
  top: 0; left: -150%;
  width: 50%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmerSweep 2.8s infinite linear;
  pointer-events: none;
}
.btn-outline::after {
  background: linear-gradient(110deg, transparent, var(--accent-glow), transparent);
}
@keyframes shimmerSweep {
  to { left: 150%; }
}

/* --- 4.4 Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.75s cubic-bezier(0.16,1,0.3,1),
              transform 0.75s cubic-bezier(0.16,1,0.3,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.75s cubic-bezier(0.16,1,0.3,1),
              transform 0.75s cubic-bezier(0.16,1,0.3,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* --- 4.5 Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 var(--sp-6);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(13, 21, 32, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--bg-border);
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 38px; width: auto; display: block; background: transparent; }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent-bright); }
.nav-links a.active { color: var(--accent); }
.nav-cta { margin-left: var(--sp-4); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--sp-2);
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.2s;
}
.nav-mobile a:hover { color: var(--accent-bright); }
.nav-mobile a.active { color: var(--accent); }

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}

/* --- 4.6 Footer --- */
.footer {
  background: var(--bg-base);
  border-top: 1px solid var(--bg-border);
  padding: var(--sp-16) 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-12);
}
.footer-brand img { height: 44px; width: auto; margin-bottom: var(--sp-4); background: transparent; }
.footer-brand p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.7;
}
.footer-social {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--bg-border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.footer-social a:hover {
  border-color: var(--border-accent);
  background: var(--accent-dim);
}
.footer-social svg { width: 16px; height: 16px; fill: var(--text-secondary); }
.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
  letter-spacing: 0.05em;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-col ul a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--accent-bright); }
.footer-bottom {
  border-top: 1px solid var(--bg-border);
  padding: var(--sp-6) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p { font-size: var(--text-xs); color: var(--text-muted); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-10); }
  .footer-bottom { flex-direction: column; gap: var(--sp-3); text-align: center; }
}

/* --- 4.7 WhatsApp Floating Bubble --- */
.wa-bubble {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 998;
  width: 56px;
  height: 56px;
  background: var(--bg-elevated);
  border: 1px solid rgba(232,234,240,0.12);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: floatBubble 3s ease-in-out infinite;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.wa-bubble:hover {
  transform: scale(1.1);
  border-color: var(--border-accent);
  animation-play-state: paused;
}
.wa-bubble::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(232,234,240,0.08);
  border-radius: var(--r-full);
  animation: bubblePulse 3s ease-out infinite;
}
.wa-bubble svg { width: 24px; height: 24px; fill: var(--text-primary); }

@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes bubblePulse {
  0%   { opacity: 0.5; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}

@media (max-width: 768px) {
  .wa-bubble { bottom: 20px; right: 20px; width: 48px; height: 48px; }
  .wa-bubble svg { width: 20px; height: 20px; }
}

/* --- 4.8 Quote Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,21,32,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-xl);
  padding: var(--sp-10);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
  box-shadow: var(--shadow-modal);
  position: relative;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-full);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--bg-border-bright); color: var(--text-primary); }
.modal h2 { font-size: var(--text-2xl); font-weight: 600; margin-bottom: var(--sp-2); }
.modal > p { color: var(--text-secondary); font-size: var(--text-sm); margin-bottom: var(--sp-8); }
.form-group { margin-bottom: var(--sp-4); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: var(--text-base);
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-accent);
}
.form-group select { appearance: none; cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group select option { background: var(--bg-elevated); }
.form-submit {
  width: 100%;
  padding: 14px;
  font-size: var(--text-base);
  font-weight: 600;
  margin-top: var(--sp-4);
}

/* --- Mini Hero (shared by inner pages) --- */
.mini-hero {
  position: relative;
  padding-top: 140px;
  padding-bottom: var(--sp-16);
  background: var(--bg-base);
  overflow: hidden;
}
.mini-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  pointer-events: none;
}
.mini-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.mini-hero .eyebrow { text-align: center; }
.mini-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
}
.mini-hero p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* --- Card base (shared) --- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.card:hover {
  border-color: var(--bg-border-bright);
  transform: translateY(-2px);
}

/* --- Service icon container --- */
.service-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
}
.service-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- GSAP hero headline word wrapper --- */
.hero-headline .word { display: inline-block; }
.hero-headline .word-gradient {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --- Spotlight/glow-card pattern (services demos) --- */
.glow-card { position: relative; overflow: hidden; isolation: isolate; }
.glow-card::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(480px circle at var(--gx,50%) var(--gy,-20%), var(--accent-glow), transparent 65%);
  opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.glow-card:hover::before { opacity: 1; }
.glow-card > * { position: relative; z-index: 1; }

/* --- Reduced motion — global --- */
@media (prefers-reduced-motion: reduce) {
  .btn-primary::after, .btn-outline::after { animation: none; display: none; }
  .wa-bubble { animation: none; }
  .wa-bubble::after { animation: none; opacity: 0; }
}
