/* ==========================================================================
   SANVA LABS — Modern Software Studio Design System & Custom CSS
   Color Palette Extracted from SANVA Geometric Tech Logo:
   - Primary Navy: #001840
   - Midnight Navy: #00113A
   - Electric Royal Blue: #0070C8
   - Cyan Glow: #00B0B8
   - Mint Accent: #28B8A0
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Root CSS Variables (Light Theme Default)
   -------------------------------------------------------------------------- */
:root {
  /* Brand Primary Colors */
  --brand-navy: #001840;
  --brand-midnight: #00113a;
  --brand-blue: #0070c8;
  --brand-cyan: #00b0b8;
  --brand-mint: #28b8a0;

  /* Theme Defaults (Pure Light Theme) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #ffffff;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-heading: #001840;
  
  --border-color: rgba(0, 24, 64, 0.1);
  --border-color-glow: rgba(0, 112, 200, 0.3);
  
  --glow-cyan: rgba(0, 176, 184, 0.15);
  --glow-blue: rgba(0, 112, 200, 0.15);
  
  --nav-bg: rgba(248, 250, 252, 0.9);
  
  /* Fonts */
  --font-heading: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Global Resets & Smooth Aesthetics
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Typography Styling */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 3rem);
  line-height: 1.15;
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.25;
}

p.lead-text {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: var(--text-muted);
  font-weight: 400;
}

/* Gradient Text Effect */
.gradient-text {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 60%, var(--brand-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Accent Glow Badge */
.sanva-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(0, 176, 184, 0.1);
  border: 1px solid var(--border-color-glow);
  color: var(--brand-cyan);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* --------------------------------------------------------------------------
   3. Custom Glassmorphism & Card Styles
   -------------------------------------------------------------------------- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.25rem;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.glass-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-color-glow);
  box-shadow: 0 20px 40px -15px var(--glow-cyan);
  background: var(--bg-card-hover);
}

/* Custom Buttons */
.btn-sanva-primary {
  background: linear-gradient(135deg, var(--brand-blue) 0%, #00569e 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 14px 30px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all var(--transition-fast);
  box-shadow: 0 8px 25px var(--glow-blue);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.btn-sanva-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 112, 200, 0.5);
  background: linear-gradient(135deg, #0082ea 0%, var(--brand-blue) 100%);
}

.btn-sanva-outline {
  background: transparent;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 14px 30px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.btn-sanva-outline:hover {
  border-color: var(--brand-cyan);
  color: var(--brand-cyan) !important;
  background: rgba(0, 176, 184, 0.08);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   4. Navbar Styling
   -------------------------------------------------------------------------- */
.sanva-nav {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  transition: all var(--transition-smooth);
}

.sanva-nav .nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 8px 16px !important;
  transition: color var(--transition-fast);
}

.sanva-nav .nav-link:hover,
.sanva-nav .nav-link.active {
  color: var(--text-heading);
}

.nav-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-heading);
}

.nav-brand-logo img {
  height: 42px;
  width: auto;
  border-radius: 8px;
}

/* Theme Toggle Pill */
.theme-toggle-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
}

/* --------------------------------------------------------------------------
   5. Hero & Pentagon Animation Section
   -------------------------------------------------------------------------- */
.hero-wrapper {
  position: relative;
  padding: 130px 0 80px;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-glow-bg {
  position: absolute;
  top: -10%;
  right: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--glow-cyan) 0%, var(--glow-blue) 40%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

/* Interactive Pentagon SVG Visual */
.pentagon-container {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.pentagon-svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px var(--glow-cyan));
}

.pentagon-star {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 1.5;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw-line 2.5s cubic-bezier(0.6, 0, 0.2, 1) forwards 0.5s;
}

.pentagon-ring {
  fill: none;
  stroke: var(--brand-cyan);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw-line 2.5s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

.node-dot {
  fill: var(--bg-surface);
  stroke: var(--brand-cyan);
  stroke-width: 3;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: pop-node 0.4s ease forwards;
}

.node-dot:hover, .node-dot.active {
  fill: var(--brand-cyan);
  stroke: #ffffff;
  r: 15;
  filter: drop-shadow(0 0 12px var(--brand-cyan));
}

.node-dot:nth-child(1) { animation-delay: 0.3s; }
.node-dot:nth-child(2) { animation-delay: 0.6s; }
.node-dot:nth-child(3) { animation-delay: 0.9s; }
.node-dot:nth-child(4) { animation-delay: 1.2s; }
.node-dot:nth-child(5) { animation-delay: 1.5s; }

@keyframes pop-node {
  to { opacity: 1; }
}



/* --------------------------------------------------------------------------
   6. Origin Story Section (S-A-N-V-A Cards)
   -------------------------------------------------------------------------- */
.story-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.75rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.story-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--brand-cyan), var(--brand-blue));
  opacity: 0.4;
  transition: opacity var(--transition-fast);
}

.story-card:hover::before {
  opacity: 1;
}

.story-letter {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand-cyan);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   7. Portfolio & Filter Tabs
   -------------------------------------------------------------------------- */
.portfolio-filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.portfolio-filter-btn:hover,
.portfolio-filter-btn.active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #ffffff;
}

.portfolio-card-img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 220px;
  background-color: var(--bg-surface-elevated);
}

.portfolio-card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.glass-card:hover .portfolio-card-img-wrapper img {
  transform: scale(1.05);
}

.tech-tag {
  display: inline-block;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--brand-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  margin-right: 6px;
  margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   8. Process & Stepper Section
   -------------------------------------------------------------------------- */
.process-step-num {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
  border: 2px solid var(--brand-cyan);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 15px var(--glow-cyan);
}

/* --------------------------------------------------------------------------
   9. Interactive Project Scope Estimator
   -------------------------------------------------------------------------- */
.estimator-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color-glow);
  border-radius: 20px;
  padding: 2.5rem;
}

.option-chip {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  margin-right: 10px;
  margin-bottom: 10px;
}

.option-chip:hover {
  border-color: var(--brand-cyan);
}

.option-chip.selected {
  background: rgba(0, 176, 184, 0.15);
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   10. Footer & Scroll Top Button
   -------------------------------------------------------------------------- */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  color: var(--text-muted);
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 999;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--brand-cyan);
  transform: translateY(-4px);
}

/* Responsive Utilities */
@media (max-width: 991px) {
  .hero-wrapper {
    padding: 110px 0 60px;
    min-height: auto;
  }
  .pentagon-container {
    margin-top: 40px;
  }
}

@media (max-width: 576px) {
  .hero-wrapper {
    padding: 105px 0 45px;
  }
  .sanva-badge {
    font-size: 0.78rem;
    padding: 5px 12px;
    max-width: 100%;
    white-space: normal;
  }
}
