:root {
  /* High-end SaaS Dark Theme Palette */
  --bg-color: #050505;
  --bg-surface: rgba(22, 22, 24, 0.6);
  --bg-surface-hover: rgba(32, 32, 36, 0.8);
  
  --text-main: #ffffff;
  --text-muted: #88888f;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 255, 255, 0.15);
  
  --accent-1: #6E56FF;
  --accent-2: #FF56A5;
  --accent-3: #00F4E2;
  
  --safe-color: #00F4E2;
  --hazard-color: #FF56A5;
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body.saas-theme {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Lenis Wrapper */
#lenis-wrapper {
  position: relative;
  z-index: 1;
}

/* Typography Base */
h1, h2, h3, .m-title, .hero-badge {
  font-family: var(--font-display);
}

/* Abstract Background Orbs */
.bg-orbs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg-color);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.4;
  animation: orbFloat 20s infinite alternate ease-in-out;
}

.orb-1 {
  top: -10%; left: -10%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
}

.orb-2 {
  bottom: 10%; right: -20%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
  animation-delay: -5s;
}

.orb-3 {
  top: 40%; left: 40%;
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, var(--accent-3) 0%, transparent 70%);
  animation-delay: -10s;
  opacity: 0.2;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(100px, -50px) scale(1.1); }
}

/* Floating Navigation */
.floating-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 900px;
  background: rgba(10, 10, 12, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  padding: 12px 24px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.logo-mark {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

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

/* Glowing Primary Button */
.btn-primary-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 100px;
  text-decoration: none;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glow);
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.2s;
  cursor: pointer;
}

.btn-primary-glow span, .btn-primary-glow .spinner {
  position: relative;
  z-index: 2;
}

.btn-primary-glow .glow-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-3), var(--accent-2));
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary-glow:hover {
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(110, 86, 255, 0.3);
}

.btn-primary-glow:hover .glow-bg {
  opacity: 1;
}

.btn-primary-glow.lg {
  padding: 16px 40px;
  font-size: 1.1rem;
}

.btn-primary-glow.full-w {
  width: 100%;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  border-radius: 100px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.btn-secondary:hover {
  color: var(--text-main);
}

/* Main Layout & Hero */
main {
  display: flex;
  flex-direction: column;
  gap: 120px;
  padding-top: 180px;
  padding-bottom: 80px;
}

section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 70vh;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-3);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 244, 226, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 244, 226, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 244, 226, 0); }
}

.hero-title {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 0%, #888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title .gradient-text {
  background: linear-gradient(90deg, var(--accent-3), #fff, var(--accent-1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 48px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

@media (max-width: 600px) {
  .hero-actions { flex-direction: column; }
  .btn-secondary { padding: 12px 24px; }
}

/* Abstract 3D Hero Visual */
.hero-visual {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
}

.glass-sphere {
  position: absolute;
  top: 20%; left: 70%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 20px rgba(255,255,255,0.1);
  animation: floatObj 8s infinite alternate ease-in-out;
}

.glass-sphere.sm {
  top: 60%; left: 20%;
  width: 100px; height: 100px;
  animation-delay: -4s;
  animation-duration: 6s;
}

@keyframes floatObj {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-30px) rotate(10deg); }
}

/* Bento Grid Features */
.features-section {
  padding-top: 40px;
}

.section-header {
  margin-bottom: 64px;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(300px, auto);
  gap: 24px;
}

.bento-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.4s;
  /* Required for vanilla-tilt */
  transform-style: preserve-3d;
}

.bento-card:hover { border-color: var(--border-glow); }

.span-2 { grid-column: span 2; }
@media (max-width: 900px) {
  .bento-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
}

.card-glow {
  position: absolute;
  top: -50px; left: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(110,86,255,0.4), transparent 70%);
  filter: blur(30px);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.bento-card:hover .card-glow { opacity: 1; }

.card-content {
  position: relative;
  z-index: 2;
  transform: translateZ(20px); /* 3D pop effect */
}

.icon-box {
  font-size: 2.5rem;
  margin-bottom: 24px;
}

.bento-card h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.bento-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

.model-visual-row {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.m-tag {
  padding: 6px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.m-tag.active {
  background: rgba(110, 86, 255, 0.1);
  border-color: var(--accent-1);
  color: var(--accent-1);
}

/* Assessment Section (Form) */
.assessment-header {
  text-align: center;
  margin-bottom: 64px;
}

.assessment-header h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.assessment-header p {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.assessment-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.assessment-card {
  width: 100%;
  max-width: 900px;
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-light);
  border-radius: 32px;
  padding: 60px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
  .assessment-card { padding: 32px; }
}

.saas-form { display: flex; flex-direction: column; gap: 48px; }

.label-heading {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

/* Glowing Model Tiles */
.model-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .model-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .model-tiles { grid-template-columns: 1fr; }
}

.model-tile input { display: none; }

.tile-inner {
  position: relative;
  padding: 24px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  transition: transform 0.2s;
}

.tile-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at center, rgba(0,244,226,0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.tile-inner:hover {
  background: rgba(255,255,255,0.06);
}

.model-tile input:checked + .tile-inner {
  border-color: var(--accent-3);
  box-shadow: 0 0 20px rgba(0,244,226,0.1);
}

.model-tile input:checked + .tile-inner .tile-bg {
  opacity: 1;
}

.m-title {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.model-tile input:checked + .tile-inner .m-title {
  color: var(--accent-3);
}

.m-sub {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Glowing Inputs */
.inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.inputs-grid .full { grid-column: 1 / -1; }

@media (max-width: 768px) {
  .inputs-grid { grid-template-columns: 1fr; }
}

.input-wrapper {
  position: relative;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 8px 16px;
  transition: background 0.3s;
}

.input-wrapper:hover {
  background: rgba(255,255,255,0.05);
}

.input-border {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1.1rem;
  padding: 24px 0 8px;
  outline: none;
  apperance: none;
}

/* Remove default number arrows */
.input-wrapper input::-webkit-outer-spin-button,
.input-wrapper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-wrapper label {
  position: absolute;
  top: 20px; left: 16px;
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1) all;
}

.input-wrapper input:focus ~ label,
.input-wrapper input:not(:placeholder-shown) ~ label {
  top: 10px;
  font-size: 0.75rem;
  color: var(--accent-1);
}

.input-wrapper input:focus ~ .input-border {
  transform: scaleX(1);
}

/* Submit Area */
.submit-wrapper { margin-top: 16px; }

.hidden { display: none !important; }

/* Dynamic Result Expansion */
.result-expansion {
  width: 100%;
  max-width: 900px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 32px;
}

.result-content {
  padding: 40px;
  background: rgba(22, 22, 24, 0.8);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-light);
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: expandIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dynamic glow based on status */
.result-hazard {
  box-shadow: inset 0 6px 40px rgba(255, 86, 165, 0.1);
  border-top: 2px solid var(--hazard-color);
}
.result-safe {
  box-shadow: inset 0 6px 40px rgba(0, 244, 226, 0.1);
  border-top: 2px solid var(--safe-color);
}

.res-icon { font-size: 48px; margin-bottom: 16px; }

.res-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.result-hazard .res-title { color: var(--hazard-color); }
.result-safe .res-title { color: var(--safe-color); }

.res-stats {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-family: var(--font-display);
}

@keyframes expandIn {
  0% { transform: translateY(-20px) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Footer */
.saas-footer {
  border-top: 1px solid var(--border-light);
  padding: 40px 24px;
  margin-top: 80px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.f-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; }
.f-legal { color: var(--text-muted); font-size: 0.9rem; text-align: right; line-height: 1.6; }

@media (max-width: 768px) {
  .footer-grid { flex-direction: column; gap: 24px; text-align: center; }
  .f-legal { text-align: center; }
}

/* Smooth Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Initial GSAP Hidden States */
.reveal-up { opacity: 0; transform: translateY(40px); }
.reveal-scale { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
.slide-in-right { opacity: 0; transform: translateX(40px); }
.slide-in-left { opacity: 0; transform: translateX(-40px); }
.slide-in-up { opacity: 0; transform: translateY(20px); }
