:root {
  --bg-base: #0a0a0e;
  --surface-1: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-border: rgba(255, 255, 255, 0.08);
  
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.2);
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.2);
  --rose: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background-color: var(--bg-base); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }

h1, h2, h3, h4, h5 { line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

.text-accent { color: var(--accent); }
.text-emerald { color: var(--emerald); }
.text-purple { color: var(--purple); }
.text-muted { color: var(--text-muted); }
.text-rose { color: var(--rose); }
.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }

.glass { background: var(--surface-1); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--surface-border); }
.glass-badge { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); color: #60a5fa; padding: 0.5rem 1rem; border-radius: 2rem; font-size: 0.875rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; }

.pulse-dot { width: 8px; height: 8px; background: var(--emerald); border-radius: 50%; box-shadow: 0 0 10px var(--emerald-glow); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }

/* Nav */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; border-bottom: 1px solid var(--surface-border); }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem; }
.logo { font-weight: 800; font-size: 1.25rem; display: flex; align-items: center; gap: 0.5rem; }
.nav-links { display: none; gap: 2rem; font-weight: 500; font-size: 0.95rem; color: var(--text-muted); }
.nav-links a:hover { color: var(--text-main); }
@media (min-width: 768px) { .nav-links { display: flex; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6rem 1.2rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.95rem; transition: all 0.2s ease; cursor: pointer; border: none; }
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--text-main); color: var(--bg-base); }
.btn-primary:not(:disabled):hover { background: var(--accent); color: white; box-shadow: 0 0 20px var(--accent-glow); }
.btn-outline { background: transparent; color: var(--text-main); border: 1px solid var(--surface-border); }
.btn-outline:not(:disabled):hover { background: var(--surface-2); }
.btn-outline.active { background: var(--surface-border); border-color: var(--accent); color: var(--accent); }
.btn-large { padding: 0.8rem 1.8rem; font-size: 1rem; border-radius: 0.75rem; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; border-radius: var(--radius-sm); }
.icon-small { width: 1.1rem; height: 1.1rem; }

/* Hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding-top: 5rem; overflow: hidden; }
.glow-orb { position: absolute; border-radius: 50%; filter: blur(100px); z-index: -1; }
.orb-1 { background: var(--accent-glow); width: 500px; height: 500px; top: -10%; left: -10%; }
.orb-2 { background: var(--purple-glow); width: 600px; height: 600px; bottom: 10%; right: -20%; }
.hero-content { text-align: center; max-width: 800px; z-index: 10; padding: 0 1.5rem; }
.hero-title { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 800; margin-bottom: 1.5rem; }
.hero-subtitle { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--text-muted); margin-bottom: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-cta { display: flex; justify-content: center; gap: 1rem; margin-bottom: 4rem; flex-wrap: wrap; }
.hero-mockup-wrapper { perspective: 1000px; position: relative;}
.mockup-panel { padding: 0.5rem; border-radius: var(--radius-lg); transform: rotateX(5deg) scale(0.95); transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
.mockup-panel:hover { transform: rotateX(0deg) scale(1); }
.mockup-img { width: 100%; height: auto; border-radius: var(--radius-md); display: block; }
.admin-dash-overlay { position: absolute; bottom: 10%; right: -5%; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--surface-border); box-shadow: 0 15px 35px rgba(0,0,0,0.5); text-align: left; transform: translateZ(30px); z-index: 20; }
.dash-stat { margin-bottom: 0.5rem; display: flex; flex-direction: column; }
.dash-stat:last-child { margin-bottom: 0; border-top: 1px solid var(--surface-border); padding-top: 0.5rem; }

/* Tech Marquee */
.tech-marquee { padding: 3rem 0; border-top: 1px solid var(--surface-border); border-bottom: 1px solid var(--surface-border); background: rgba(0,0,0,0.2); overflow: hidden; }
.tech-pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.2rem; border-radius: 2rem; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.tech-pill i { width: 1.1rem; height: 1.1rem; color: var(--text-muted); }

/* Layout Blocks */
.split-layout { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 900px) { .split-layout { grid-template-columns: 1fr 1fr; align-items: center; } }
.flex-row-reverse { direction: rtl; }
.flex-row-reverse > * { direction: ltr; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.feature-list li { display: flex; align-items: start; gap: 0.75rem; color: var(--text-muted); }
.feature-list i { margin-top: 0.1rem; flex-shrink: 0; }
.feature-list strong { color: var(--text-main); }
.ring-glow { box-shadow: 0 0 30px rgba(16, 185, 129, 0.15); }
.border-white-10 { border-color: var(--surface-border); }
.section-header { text-align: center; max-width: 700px; margin: 0 auto; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }

/* Bento Grid */
.bento-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; mt-10;}
@media (min-width: 768px) { .bento-grid { grid-template-columns: repeat(2, 1fr); } .col-span-2 { grid-column: span 2; } }
@media (min-width: 1024px) { .bento-grid { grid-template-columns: repeat(3, 1fr); } }
.bento-card { border-radius: var(--radius-lg); padding: 2rem; display: flex; flex-direction: column; transition: transform 0.3s ease, border-color 0.3s ease; position: relative; overflow: hidden; }
.bento-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); }
.icon-box { width: 48px; height: 48px; background: var(--surface-2); border: 1px solid var(--surface-border); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; }
.icon-box i { color: var(--accent); }
.bento-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.bento-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Demo 1: Calculator */
.calc-widget { padding: 2rem; border-radius: var(--radius-lg); border: 1px solid rgba(16, 185, 129, 0.4); background: rgba(0,0,0,0.4); }
.calc-input { background: transparent; border: none; color: white; font-size: 2rem; font-weight: 700; width: 140px; font-family: var(--font-mono); outline: none; border-bottom: 2px dashed rgba(255,255,255,0.2); text-align: center; transition: border-color 0.3s; }
.calc-input:focus { border-color: var(--emerald); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-radius: var(--radius-md); margin-bottom: 0.5rem; cursor: pointer; border: 1px solid var(--surface-border); user-select: none; transition: background 0.2s; }
.toggle-row:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.2); }
.toggle-row input { display: none; }
.toggle-slider { width: 40px; height: 22px; background: rgba(255,255,255,0.1); border-radius: 20px; position: relative; transition: background 0.3s; margin-right: 1rem; }
.toggle-slider::before { content: ""; position: absolute; width: 18px; height: 18px; background: white; border-radius: 50%; top: 2px; left: 2px; transition: transform 0.3s ease; }
.toggle-row input:checked ~ .toggle-slider { background: var(--emerald); box-shadow: 0 0 10px var(--emerald-glow); }
.toggle-row input:checked ~ .toggle-slider::before { transform: translateX(18px); }

/* Demo 2: RBAC Visualizer */
.rbac-demo-container { padding: 2.5rem; border-radius: var(--radius-xl); border: 1px solid var(--surface-border); background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%); }
.rbac-action { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); padding: 1.5rem; border-radius: var(--radius-md); display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; position: relative; overflow: hidden; transition: all 0.4s ease; }
.rbac-action.locked { filter: grayscale(100%); opacity: 0.4; }
.rbac-action.locked .rbac-overlay { display: flex; }
.rbac-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 10; display: none; align-items: center; justify-content: center; color: white; transition: all 0.3s; }

/* Demo 3: Terminal window */
.terminal-window { background: #000; padding: 1.5rem; font-family: var(--font-mono); font-size: 0.85rem; color: #a3e635; border-radius: var(--radius-md); overflow-x: hidden; position: relative; }
.terminal-content span { display: block; margin-bottom: 0.5rem; white-space: pre-wrap; word-wrap: break-word; }
.line-error { color: #f87171; }
.line-warn { color: #facc15; }
.line-success { color: #4ade80; }

/* Phase 3: Leave Validator Calendar */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; background: rgba(0,0,0,0.2); padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--surface-border); }
.cal-day { font-size: 0.875rem; text-align: center; padding: 0.5rem; border-radius: var(--radius-sm); user-select: none; transition: all 0.2s; font-family: var(--font-mono); font-weight: 500;}
.cal-day.header { color: var(--text-muted); font-size: 0.75rem; font-weight: 700; padding-bottom: 0.25rem; }
.cal-day.empty { background: transparent; }
.cal-day.selectable { background: var(--surface-2); border: 1px solid transparent; cursor: pointer; }
.cal-day.selectable:hover { background: var(--surface-border); }
.cal-day.selectable.selected { background: var(--accent); color: white; font-weight: bold; border-color: rgba(255,255,255,0.3); }
.cal-day.approved-leave { background: var(--emerald-glow); color: var(--emerald); border: 1px dashed var(--emerald); cursor: not-allowed; }
.cal-day.shake-error { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; background: rgba(244, 63, 94, 0.2); color: var(--rose); border: 1px solid var(--rose); }

.overlap-alert { position: absolute; top: 1rem; left: 1rem; right: 1rem; background: rgba(244, 63, 94, 0.1); border: 1px solid var(--rose); padding: 1rem; border-radius: var(--radius-md); backdrop-filter: blur(10px); z-index: 50; flex-direction: column; align-items: center; justify-content: center; text-align: center; display: flex; opacity: 1; transition: opacity 0.3s; }
.overlap-alert.hidden { opacity: 0; pointer-events: none; display: none; }

/* Phase 3: Anomaly Graph */
.graph-mock { display: flex; justify-content: space-between; gap: 4px; padding: 0 1rem; }
.graph-bar { width: 14%; border-radius: 4px 4px 0 0; }
.graph-bar.safe { background: var(--surface-order, rgba(255,255,255,0.2)); }
.graph-bar.danger { background: var(--rose); box-shadow: 0 0 20px var(--rose); }
.threshold-line { z-index: 10; pointer-events: none; opacity: 0.5; }

/* Animations */
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.duration-500 { transition-duration: 500ms; }
.duration-300 { transition-duration: 300ms; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.translate-y-4 { transform: translateY(1rem); }
.translate-y-0 { transform: translateY(0); }

/* Overlays */
.blur-backdrop { backdrop-filter: blur(8px); webkit-backdrop-filter: blur(8px); }
.shadow-glow { box-shadow: 0 0 15px rgba(244, 63, 94, 0.2); }

/* Util classes mapping */
.flex { display: flex; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-20 { margin-top: 5rem; }
.ml-2 { margin-left: 0.5rem; }
.pt-0 { padding-top: 0; }
.pt-4 { padding-top: 1rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.w-full { width: 100%; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.h-40 { height: 10rem; }
.h-48 { height: 12rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.rounded-lg { border-radius: var(--radius-md); }
.rounded-xl { border-radius: 1.25rem; }
.rounded-2xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.uppercase { text-transform: uppercase; }
.tracking-widest { letter-spacing: 0.05em; }

.hidden { display: none; }
@media (min-width: 768px) { .md\:flex-row { flex-direction: row; } .md\:justify-start { justify-content: flex-start; } .md\:text-left { text-align: left; } .md\:mb-0 { margin-bottom: 0; } .md\:block { display: block; } }

.absolute { position: absolute; }
.relative { position: relative; }
.top-4 { top: 1rem; }
.left-4 { left: 1rem; }
.right-4 { right: 1rem; }
.bottom-4 { bottom: 1rem; }
.-top-5 { top: -1.25rem; }
.right-2 { right: 0.5rem; }
.top-\[30\%\] { top: 30%; }
.left-0 { left: 0; }

.bg-black { background-color: #000; }
.bg-rose { background-color: var(--rose); }
.bg-amber-500 { background-color: #f59e0b; }
.border-amber-600 { border-color: #d97706; }
.border-rose { border-color: var(--rose); }
.bg-emerald { background-color: var(--emerald); }
.border-emerald { border-color: var(--emerald); }
.opacity-50 { opacity: 0.5; }
.overflow-hidden { overflow: hidden; }
.overflow-y-hidden { overflow-y: hidden; }
.hover\:bg-rose:hover { background-color: var(--rose); }
.hover\:text-white:hover { color: #fff; }
.backdrop-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

.social-link i { padding: 0.5rem; background: var(--surface-2); border-radius: 50%; width: 2.5rem; height: 2.5rem; transition: background 0.2s; }
.social-link i:hover { background: var(--surface-border); }
