:root {
  --background: 222 32% 6%;
  --foreground: 42 34% 94%;
  --primary: 43 86% 58%;
  --primary-foreground: 222 32% 7%;
  --secondary: 220 18% 13%;
  --secondary-foreground: 42 34% 94%;
  --muted: 220 11% 67%;
  --destructive: 2 78% 58%;
  --destructive-foreground: 42 34% 94%;
  --border: 43 36% 22%;
  --card: 222 24% 9%;
  --shadow-sm: 0 8px 24px hsl(220 50% 2% / 0.25);
  --shadow-md: 0 18px 55px hsl(220 55% 2% / 0.38);
  --shadow-lg: 0 30px 90px hsl(220 60% 2% / 0.55);
  --transition-fast: 160ms ease;
  --transition-smooth: 280ms cubic-bezier(.2,.8,.2,1);
  --radius-sm: 0.75rem;
  --radius-md: 1.05rem;
  --radius-lg: 1.6rem;
}

.dark {
  --background: 222 32% 6%;
  --foreground: 42 34% 94%;
  --primary: 43 86% 58%;
  --secondary: 220 18% 13%;
  --muted: 220 11% 67%;
  --destructive: 2 78% 58%;
  --border: 43 36% 22%;
  --card: 222 24% 9%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
select { color-scheme: dark; }

.selection-custom ::selection { background: hsl(var(--primary) / 0.35); }
.transition-smooth { transition: all var(--transition-smooth); }
.glass { background: hsl(var(--background) / 0.76); backdrop-filter: blur(18px); }
.focus-ring:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid hsl(var(--primary) / 0.65); outline-offset: 3px; }

.bg-1 { background: hsl(var(--background)); }
.bg-2 { background: hsl(var(--card)); }
.bg-3 { background: hsl(var(--secondary)); }
.bg-4 { background: hsl(var(--primary)); }
.text-primary { color: hsl(var(--foreground)); }
.text-secondary { color: hsl(var(--muted)); }
.text-tertiary { color: hsl(var(--muted) / 0.78); }
.accent { color: hsl(var(--primary)); }

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: hsl(var(--primary-foreground));
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(36 94% 44%));
  font-weight: 950;
  box-shadow: 0 0 0 5px hsl(var(--primary) / 0.10), var(--shadow-sm);
}
.nav-active, .bottom-active {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.12);
}
.hover-token:hover { color: hsl(var(--foreground)); background: hsl(var(--secondary)); }

.btn-primary {
  color: hsl(var(--primary-foreground));
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(36 92% 48%));
  box-shadow: 0 16px 40px hsl(var(--primary) / 0.24);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 54px hsl(var(--primary) / 0.32); }
.btn-secondary {
  color: hsl(var(--foreground));
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.btn-secondary:hover { transform: translateY(-2px); border-color: hsl(var(--primary) / 0.7); background: hsl(var(--primary) / 0.10); }

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(hsl(var(--border) / 0.25) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--border) / 0.25) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at top, black, transparent 72%);
  opacity: 0.45;
}
.hero-orb { position: absolute; border-radius: 999px; filter: blur(40px); opacity: 0.35; pointer-events: none; }
.orb-one { width: 280px; height: 280px; background: hsl(var(--primary)); top: 8%; left: -100px; }
.orb-two { width: 320px; height: 320px; background: hsl(32 92% 38%); bottom: 8%; right: -120px; }
.pill, .section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.12);
  border: 1px solid hsl(var(--primary) / 0.28);
  font-weight: 850;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}
.card-premium, .service-card, .portfolio-card, .product-card, .testimonial-card, .blog-card, .studio-card {
  background: linear-gradient(180deg, hsl(var(--card)), hsl(var(--secondary) / 0.78));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.stat-card {
  min-height: 82px;
  padding: 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  background: hsl(var(--card) / 0.75);
}
.stat-card strong { display: block; font-size: 1.45rem; color: hsl(var(--primary)); line-height: 1; }
.stat-card span { display: block; margin-top: 0.35rem; color: hsl(var(--muted)); font-size: 0.82rem; line-height: 1.2; }

.studio-card { position: relative; padding: 1rem; overflow: hidden; box-shadow: var(--shadow-lg); }
.screen-top { display: flex; align-items: center; gap: 0.45rem; padding: 0.25rem 0.2rem 0.9rem; color: hsl(var(--muted)); font-size: 0.82rem; }
.screen-top span { width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--primary) / 0.85); }
.screen-top p { margin-left: auto; }
.video-preview {
  height: 260px;
  border-radius: calc(var(--radius-lg) - 0.35rem);
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 28% 25%, hsl(var(--primary) / 0.45), transparent 24%), linear-gradient(135deg, hsl(220 24% 12%), hsl(222 40% 4%));
}
.play-button { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; position: absolute; inset: 0; margin: auto; color: hsl(var(--primary-foreground)); background: hsl(var(--primary)); box-shadow: 0 0 0 12px hsl(var(--primary) / 0.16); }
.visual-bar { position: absolute; border-radius: 999px; background: hsl(var(--foreground) / 0.18); }
.bar-a { width: 46%; height: 12px; left: 24px; bottom: 34px; }
.bar-b { width: 30%; height: 12px; left: 24px; bottom: 58px; background: hsl(var(--primary) / 0.72); }
.bar-c { width: 22%; height: 12px; right: 24px; top: 28px; }
.timeline { position: relative; height: 82px; margin-top: 1rem; border-radius: var(--radius-md); background: hsl(var(--background) / 0.72); border: 1px solid hsl(var(--border)); padding: 16px; overflow: hidden; }
.track { height: 10px; border-radius: 999px; margin-bottom: 9px; }
.track-gold { width: 84%; background: hsl(var(--primary)); }
.track-white { width: 62%; background: hsl(var(--foreground) / 0.35); }
.track-muted { width: 74%; background: hsl(var(--muted) / 0.25); }
.playhead { position: absolute; top: 10px; bottom: 10px; left: 58%; width: 2px; background: hsl(var(--primary)); box-shadow: 0 0 16px hsl(var(--primary)); }
.mini-panel { padding: 0.95rem; border-radius: var(--radius-md); background: hsl(var(--background) / 0.62); border: 1px solid hsl(var(--border)); }
.mini-panel span { display: block; color: hsl(var(--muted)); font-size: 0.82rem; }
.mini-panel strong { display: block; margin-top: 0.2rem; }
.floating-card { position: absolute; padding: 0.75rem 1rem; border-radius: 999px; color: hsl(var(--foreground)); background: hsl(var(--card)); border: 1px solid hsl(var(--border)); box-shadow: var(--shadow-md); font-weight: 800; font-size: 0.85rem; }
.fc-one { top: 12%; right: -2%; }
.fc-two { left: -4%; bottom: 12%; }

.about-chip, .tag, .rating {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--primary) / 0.10);
  color: hsl(var(--primary));
  border-radius: 999px;
  padding: 0.48rem 0.72rem;
  font-weight: 800;
  font-size: 0.88rem;
}
.service-card { padding: 1.25rem; min-height: 230px; display: flex; flex-direction: column; gap: 0.85rem; transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth); }
.service-card:hover, .portfolio-card:hover, .product-card:hover, .blog-card:hover { transform: translateY(-4px); border-color: hsl(var(--primary) / 0.62); box-shadow: var(--shadow-md); }
.service-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--radius-md); background: hsl(var(--primary) / 0.12); font-size: 1.45rem; }
.portfolio-card, .product-card, .blog-card { overflow: hidden; transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth); }
.portfolio-visual { height: 230px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.portfolio-visual::before { content: ''; position: absolute; inset: 16px; border: 1px solid hsl(var(--foreground) / 0.16); border-radius: var(--radius-lg); }
.visual-gold { background: linear-gradient(135deg, hsl(42 88% 48%), hsl(222 36% 8%)); }
.visual-carbon { background: radial-gradient(circle at 30% 20%, hsl(var(--primary) / 0.65), transparent 28%), linear-gradient(135deg, hsl(220 20% 14%), hsl(222 40% 4%)); }
.visual-amber { background: linear-gradient(135deg, hsl(28 86% 40%), hsl(222 30% 8%)); }
.visual-slate { background: linear-gradient(135deg, hsl(220 14% 28%), hsl(222 38% 5%)); }
.preview-play { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: hsl(var(--foreground) / 0.16); backdrop-filter: blur(10px); }
.preview-caption { position: absolute; left: 22px; bottom: 22px; padding: 0.5rem 0.7rem; border-radius: 999px; background: hsl(var(--background) / 0.62); color: hsl(var(--foreground)); font-weight: 800; font-size: 0.84rem; }
.product-art { height: 180px; display: grid; place-items: center; background: radial-gradient(circle, hsl(var(--primary) / 0.36), transparent 55%), hsl(var(--secondary)); }
.product-art span { font-size: 4.5rem; filter: drop-shadow(0 18px 30px hsl(var(--background) / 0.7)); }
.product-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-actions { display: grid; gap: 0.75rem; }
.catalog-search { width: 100%; max-width: 430px; display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; align-items: center; }
.loading-card { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.85rem; color: hsl(var(--muted)); }
.loading-inline { display: inline-flex; align-items: center; gap: 0.65rem; color: hsl(var(--muted)); font-weight: 800; }
.loading-inline.small { font-size: 0.82rem; color: hsl(var(--primary)); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid hsl(var(--primary) / 0.22); border-top-color: hsl(var(--primary)); display: inline-block; animation: spin 850ms linear infinite; }
.empty-card { border: 1px dashed hsl(var(--border)); border-radius: var(--radius-lg); background: hsl(var(--card) / 0.55); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.3rem; color: hsl(var(--muted)); }
.empty-card strong { color: hsl(var(--foreground)); }
.empty-card.compact { border-radius: var(--radius-md); padding: 1rem; }
.related-panel { min-height: 270px; }
.mini-recommendation, .db-row { border: 1px solid hsl(var(--border)); border-radius: var(--radius-md); background: hsl(var(--background) / 0.52); padding: 0.9rem; display: flex; flex-direction: column; gap: 0.25rem; }
.mini-recommendation span, .db-row span { color: hsl(var(--muted)); font-size: 0.9rem; }
.mini-recommendation small { color: hsl(var(--primary)); font-weight: 900; }
.db-feed { display: grid; gap: 0.75rem; }
.service-ready { color: hsl(var(--primary)); background: hsl(var(--primary) / 0.12); border: 1px solid hsl(var(--primary) / 0.32); border-radius: 999px; padding: 0.45rem 0.75rem; font-weight: 900; font-size: 0.82rem; }
.testimonial-card, .blog-card { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.quote-mark { color: hsl(var(--primary)); font-size: 3rem; line-height: 0.8; font-weight: 950; }
.form-label { display: block; margin-bottom: 0.45rem; color: hsl(var(--foreground)); font-weight: 800; }
.form-hint { color: hsl(var(--muted)); font-size: 0.92rem; }
.form-input {
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.65);
  color: hsl(var(--foreground));
  padding: 0.85rem 1rem;
  font-size: max(16px, 1rem);
  outline: none;
}
.form-input::placeholder { color: hsl(var(--muted) / 0.72); }
.form-input:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 4px hsl(var(--primary) / 0.12); }
.status-box { padding: 0.9rem 1rem; border-radius: var(--radius-md); font-weight: 800; border: 1px solid hsl(var(--border)); }
.status-success { color: hsl(var(--primary)); background: hsl(var(--primary) / 0.12); }
.status-info { color: hsl(var(--foreground)); background: hsl(var(--secondary)); }
.status-error { color: hsl(var(--destructive-foreground)); background: hsl(var(--destructive) / 0.18); border-color: hsl(var(--destructive) / 0.55); }
.bottom-safe { padding-bottom: max(0.5rem, env(safe-area-inset-bottom)); }
.fade-up { animation: fadeUp 700ms ease both; }
.delay-1 { animation-delay: 120ms; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .fc-one, .fc-two { position: static; margin-top: 0.75rem; display: inline-flex; }
  .video-preview { height: 220px; }
  .catalog-search { grid-template-columns: 1fr; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; scroll-behavior: auto !important; transition-duration: 1ms !important; }
}