/* ==========================================================================
   PALMO TECH - Modern High-Performance Design System
   Palmo Group LLC (Delaware, USA)
   ========================================================================== */

:root {
  --bg-dark: #07080b;
  --bg-surface: #0e1117;
  --bg-surface-elevated: #161b24;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-active: rgba(6, 182, 212, 0.4);
  
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --indigo-400: #818cf8;
  --indigo-500: #6366f1;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: #e2e8f0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-dark);
}

/* Ambient Background Lights & Technical Grid */
.glow-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.glow-cyan {
  width: 550px;
  height: 550px;
  top: -150px;
  left: 15%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, rgba(6, 182, 212, 0) 70%);
}

.glow-indigo {
  width: 600px;
  height: 600px;
  top: 30%;
  right: -100px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(99, 102, 241, 0) 70%);
  animation-delay: -5s;
}

.glow-emerald {
  width: 500px;
  height: 500px;
  bottom: 10%;
  left: 5%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0) 70%);
  animation-delay: -10s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 50% 30%, black 40%, transparent 85%);
  pointer-events: none;
}

@keyframes floatOrb {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(40px) scale(1.08); }
  100% { transform: translateY(-30px) scale(0.95); }
}

/* Typography Helpers */
.font-mono {
  font-family: var(--font-mono);
}

/* Nav Links */
.nav-link {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  text-decoration: none;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--cyan-400);
  transition: width 0.2s ease;
  border-radius: 9999px;
}

.nav-link:hover::after {
  width: 100%;
}

/* Language Switcher Buttons */
.lang-btn {
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: rgba(6, 182, 212, 0.2);
  color: var(--cyan-400);
  font-weight: 600;
}

.lang-btn:hover:not(.active) {
  color: #ffffff;
}

/* Service Card Design */
.service-card {
  position: relative;
  padding: 2rem;
  border-radius: 1.25rem;
  background: rgba(14, 17, 23, 0.7);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 20px rgba(6, 182, 212, 0.08);
}

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

/* Venture Card Design */
.venture-card {
  position: relative;
  background: rgba(14, 17, 23, 0.85);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.venture-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(900px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(6, 182, 212, 0.08), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.venture-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(6, 182, 212, 0.12);
}

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

.service-icon-box {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

/* Stack Tabs */
.stack-tab {
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: rgba(14, 17, 23, 0.8);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.stack-tab:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.stack-tab.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cyan-500);
  color: var(--cyan-400);
  font-weight: 600;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

/* Stack Item Card */
.stack-item {
  padding: 1.25rem;
  border-radius: 1rem;
  background: rgba(14, 17, 23, 0.6);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.stack-item:hover {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(14, 17, 23, 0.95);
  transform: translateY(-2px);
}

/* Tailwind Utilities Fallback / Support */
.bg-dark { background-color: var(--bg-dark); }
.text-cyan-400 { color: var(--cyan-400); }
.text-cyan-300 { color: #67e8f9; }
.text-emerald-400 { color: var(--emerald-400); }
.text-indigo-400 { color: var(--indigo-400); }

/* Dialog Modal */
dialog {
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
}

dialog::backdrop {
  background: rgba(3, 4, 7, 0.8);
  backdrop-filter: blur(8px);
}

/* Tailwind CDN or inline responsive grids */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #090a0f;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}
