@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* Matte Black / Warm Premium Accents (Dark Mode - Default) */
  --bg-primary: #0A0A0A;
  --bg-secondary: #121212;
  --card-bg: #181818;
  --glass-effect: rgba(255, 255, 255, 0.04);

  --accent-primary: #C6FF00;
  /* Electric Lime */
  --accent-secondary: #FF6B35;
  /* Burnt Orange */
  --accent-highlight: #F5F5F5;
  /* Soft White */

  --text-primary: #FFFFFF;
  --text-secondary: #B3B3B3;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(198, 255, 0, 0.25);

  --gradient-primary: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  --gradient-bg: linear-gradient(135deg, #111111 0%, #1E1E1E 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(198, 255, 0, 0.08), rgba(255, 107, 53, 0.08));

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --transition-smooth: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  --shadow-premium: 0 30px 60px rgba(0, 0, 0, 0.6);
  --selection-bg: var(--accent-primary);
  --selection-text: #0A0A0A;
}

.light-mode {
  --bg-primary: #F7F6F2;
  --bg-secondary: #FFFFFF;
  --card-bg: #FAFAFA;
  --glass-effect: rgba(255, 255, 255, 0.55);

  --accent-primary: #111111;
  --accent-secondary: #C6FF00;
  --accent-highlight: #FF6B35;

  --text-primary: #111111;
  --text-secondary: #5F5F5F;

  --border-color: rgba(0, 0, 0, 0.06);
  --border-glow: rgba(0, 0, 0, 0.1);

  --gradient-primary: linear-gradient(135deg, var(--accent-primary) 0%, #333333 100%);
  --gradient-bg: linear-gradient(135deg, #F7F6F2 0%, #EAE9E4 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.01));

  --shadow-premium: 0 30px 60px rgba(17, 17, 17, 0.05);
  --selection-bg: #C6FF00;
  --selection-text: #0A0A0A;
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background-color: var(--selection-bg);
  color: var(--selection-text);
}

::-moz-selection {
  background-color: var(--selection-bg);
  color: var(--selection-text);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

/* Tech Lines Overlay */
.tech-lines-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: linear-gradient(rgba(255, 255, 255, 1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 1) 1px, transparent 1px);
  background-size: 40px 40px;
}

.light-mode .tech-lines-overlay {
  opacity: 0.03;
  background-image: linear-gradient(rgba(0, 0, 0, 1) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 1) 1px, transparent 1px);
}

/* Typography - Editorial Feel */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
}

h2 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.section-padding {
  padding: 8rem 0;
}

.text-center {
  text-align: center;
}

/* Buttons - Minimal Luxury */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 2.5rem;
  border-radius: 4px;
  /* Sharper, more editorial */
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: var(--accent-primary);
  color: #0A0A0A;
  /* Always dark text on lime */
}

.light-mode .btn-primary {
  color: #FFFFFF;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--accent-secondary);
  color: #FFFFFF;
  box-shadow: 0 10px 20px var(--border-glow);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover,
.nav-links a.btn-outline:hover {
  border-color: var(--text-primary);
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 0;
  z-index: 100;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  padding: 1.2rem 0;
  background: var(--glass-effect);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-color);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text-primary);
}

.logo.text-gradient {
  /* Overriding old neon gradient on logo to solid or new gradient */
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: var(--transition-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  /* Keeping round for contrast against sharp buttons */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.theme-toggle:hover {
  background: var(--glass-effect);
  border-color: var(--text-primary);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 2rem;
    clip-path: circle(0% at top right);
    transition: all 0.5s ease-out;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    clip-path: circle(150% at top right);
  }

  .mobile-toggle {
    display: block;
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 10rem;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(circle at 50% 0%, var(--gradient-subtle) 0%, transparent 70%);
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: var(--glass-effect);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 3rem;
}

@media (max-width: 600px) {
  .hero-btns {
    flex-direction: column;
  }
}

/* Service Cards & Grids */
.grid-3, .grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

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

.card {
  background: var(--border-color); /* Acts as the static border color */
  border: none;
  border-radius: 8px;
  /* Sharp editorial feel */
  padding: 3rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  z-index: 1; /* Establishes stacking context */
}

.card::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: conic-gradient(
    transparent,
    rgba(255, 255, 255, 0.8) 15deg,
    transparent 30deg
  );
  animation: borderLight 4s linear infinite;
  z-index: -2;
  pointer-events: none;
}

.card::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  background: var(--card-bg);
  border-radius: 7px;
  z-index: -1;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  background: var(--text-secondary); /* Border color on hover */
  box-shadow: var(--shadow-premium);
}

@keyframes borderLight {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.card-icon {
  width: 50px;
  height: 50px;
  background: transparent;
  border-bottom: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding-bottom: 10px;
}

/* Case Study Cards */
.cs-card {
  padding: 0;
  border-radius: 8px;
}

.cs-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
  filter: grayscale(20%) contrast(1.1);
  transition: var(--transition-smooth);
}

.cs-card:hover .cs-img {
  filter: grayscale(0%) contrast(1);
}

.cs-content {
  padding: 2.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 2rem;
}

.form-control {
  width: 100%;
  padding: 1.2rem 1.5rem;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  background-color: var(--glass-effect);
  box-shadow: 0 0 20px var(--border-glow);
}

select.form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 1.5rem center;
  background-size: 1.2rem;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg fill='%23FFFFFF' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
  cursor: pointer;
  background-color: var(--glass-effect);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.light-mode select.form-control {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg fill='%23111111' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
}

select.form-control option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 180px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 5rem 0 2rem;
  background: var(--bg-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

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

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text-primary);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Floating Elements (Subdued) */
.float {
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* Cyberpunk Tech Line Divider */
.cyber-divider {
  position: relative;
  width: 100%;
  max-width: 350px;
  height: 8px;
  margin: 2rem auto;
}

.cyber-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 1px;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--border-glow);
  z-index: 1;
  animation: cyberLineGlow 2.5s infinite ease-in-out;
}

.cyber-divider .cyber-chunk {
  position: absolute;
  top: 0;
  left: 15%;
  height: 100%;
  width: 80px;
  background: var(--accent-primary);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  z-index: 2;
  animation: cyberPulse 3s infinite ease-in-out;
}

.cyber-divider .cyber-stripes {
  position: absolute;
  top: 0;
  left: calc(15% + 90px);
  height: 100%;
  width: 50px;
  background: repeating-linear-gradient(45deg, var(--accent-primary) 0, var(--accent-primary) 2px, transparent 2px, transparent 6px);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  z-index: 2;
  animation: cyberPulse 3s infinite ease-in-out 1.5s;
}

.cyber-divider .cyber-node {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-primary);
  z-index: 2;
  animation: cyberNodeGlow 2s infinite ease-in-out 0.5s;
}

.cyber-divider.left {
  margin: 2rem 0;
}
.cyber-divider.left::before {
  background: linear-gradient(90deg, var(--accent-primary) 0%, transparent 100%);
}

/* Secondary variant (Burnt Orange) */
.cyber-divider.secondary::before,
.cyber-divider.secondary .cyber-chunk,
.cyber-divider.secondary .cyber-node {
  background: var(--accent-secondary);
}
.cyber-divider.secondary .cyber-stripes {
  background: repeating-linear-gradient(45deg, var(--accent-secondary) 0, var(--accent-secondary) 2px, transparent 2px, transparent 6px);
}
.cyber-divider.secondary::before {
  box-shadow: 0 0 8px rgba(255, 107, 53, 0.4);
}
.cyber-divider.secondary.left::before {
  background: linear-gradient(90deg, var(--accent-secondary) 0%, transparent 100%);
}

@keyframes cyberLineGlow {
  0%, 100% { opacity: 0.4; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.5); }
}

@keyframes cyberPulse {
  0%, 100% { opacity: 0.6; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.3); }
}

@keyframes cyberNodeGlow {
  0%, 100% { opacity: 0.5; transform: translateY(-50%) scale(0.9); filter: brightness(1); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.4); filter: brightness(1.5); }
}