/* ============================================================
   NIKO CENTER — Precision Automotive Design System
   Crafted with Emil Kowalski Motion & Anti-Slop Art Direction
   ============================================================ */

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

:root {
  /* Brand Palette */
  --brand: #FFCC00;
  --brand-hover: #F0BE00;
  --brand-glow: rgba(255, 204, 0, 0.22);
  --brand-muted: rgba(255, 204, 0, 0.12);
  --brand-subtle: rgba(255, 204, 0, 0.05);

  /* Deep Carbon Dark Surfaces */
  --bg-main: #090a0d;
  --bg-surface: #101217;
  --bg-card: #141720;
  --bg-card-hover: #1a1e2a;
  --bg-elevated: #1e2230;

  /* Borders & Accents */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-brand: rgba(255, 204, 0, 0.35);

  /* Status */
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --error: #ef4444;

  /* Motion & Spring Physics */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 160ms;
  --duration-norm: 280ms;
  --duration-slow: 450ms;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: #f1f3f7;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

/* Typography tokens */
.font-display {
  font-family: 'Bebas Neue', 'Syne', sans-serif;
  letter-spacing: 0.03em;
}

.font-accent {
  font-family: 'Syne', sans-serif;
}

/* Carbon Mesh Subtle Texture */
.carbon-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ============================================================
   NAVBAR — Refined Floating Glass Header
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: padding var(--duration-norm) var(--ease-spring),
              background-color var(--duration-norm) var(--ease-spring),
              backdrop-filter var(--duration-norm) var(--ease-spring),
              border-color var(--duration-norm) var(--ease-spring);
  padding: 1.1rem 0;
}

#navbar.nav-scrolled {
  padding: 0.6rem 0;
  background-color: rgba(9, 10, 13, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
}

.nav-link {
  position: relative;
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0;
  transition: color var(--duration-fast) ease;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--brand);
  transition: width var(--duration-fast) var(--ease-spring), left var(--duration-fast) var(--ease-spring);
}

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

/* Live workshop pulse indicator */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #34d399;
  letter-spacing: 0.02em;
}

.live-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  position: relative;
}

.live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background-color: #10b981;
  opacity: 0.75;
  animation: pulseRipple 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulseRipple {
  0% { transform: scale(0.9); opacity: 0.8; }
  70% { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ============================================================
   BUTTONS — Physical Elastic Press (Emil Kowalski Craft)
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--brand);
  color: #090a0d;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.85rem 1.6rem;
  border-radius: 0.65rem;
  text-decoration: none;
  border: 1px solid rgba(255, 204, 0, 0.8);
  box-shadow: 0 4px 18px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background-color var(--duration-fast) ease,
              transform var(--duration-fast) var(--ease-spring),
              box-shadow var(--duration-fast) ease;
  will-change: transform;
}

.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 204, 0, 0.35);
}

.btn-primary:active {
  transform: scale(0.97) translateY(0);
  box-shadow: 0 2px 8px var(--brand-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  color: #f1f3f7;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.85rem 1.5rem;
  border-radius: 0.65rem;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background-color var(--duration-fast) ease,
              border-color var(--duration-fast) ease,
              transform var(--duration-fast) var(--ease-spring),
              color var(--duration-fast) ease;
  will-change: transform;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-brand);
  color: var(--brand);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: scale(0.97) translateY(0);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: #25d366;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.85rem 1.5rem;
  border-radius: 0.65rem;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.28);
  cursor: pointer;
  transition: background-color var(--duration-fast) ease,
              transform var(--duration-fast) var(--ease-spring),
              box-shadow var(--duration-fast) ease;
  will-change: transform;
}

.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:active {
  transform: scale(0.97);
}

/* ============================================================
   HERO — Automotive Precision & Depth
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 6.5rem;
  padding-bottom: 4rem;
  overflow: hidden;
  background-color: var(--bg-main);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.24) saturate(1.1);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 204, 0, 0.07) 0%, transparent 60%),
              linear-gradient(to bottom, rgba(9, 10, 13, 0.7) 0%, rgba(9, 10, 13, 0.95) 80%, var(--bg-main) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.speed-accent {
  width: 42px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.6rem;
  box-shadow: 0 0 12px var(--brand);
}

/* ============================================================
   CARDS & SHOWCASE
   ============================================================ */
.craft-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-norm) var(--ease-spring),
              border-color var(--duration-norm) ease,
              box-shadow var(--duration-norm) ease,
              background-color var(--duration-norm) ease;
  will-change: transform;
}

.craft-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-brand);
  background-color: var(--bg-card-hover);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.7),
              0 0 24px -6px var(--brand-subtle);
}

.craft-card-flagship {
  background: linear-gradient(145deg, rgba(255, 204, 0, 0.05) 0%, var(--bg-card) 60%);
  border: 1px solid rgba(255, 204, 0, 0.22);
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.6);
}

.craft-card-flagship:hover {
  border-color: rgba(255, 204, 0, 0.5);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8),
              0 0 30px -4px var(--brand-glow);
}

.icon-badge {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.8rem;
  background: var(--brand-muted);
  border: 1px solid rgba(255, 204, 0, 0.25);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: transform var(--duration-fast) var(--ease-spring),
              background-color var(--duration-fast) ease;
}

.craft-card:hover .icon-badge {
  transform: scale(1.08) rotate(-2deg);
  background: rgba(255, 204, 0, 0.2);
}

.symptom-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 0.4rem;
  margin-top: 0.4rem;
  margin-right: 0.35rem;
}

/* ============================================================
   DIAGNOSTIC & CONTACT FORM
   ============================================================ */
.interactive-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  color: #d1d5db;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  cursor: pointer;
  user-select: none;
  transition: all var(--duration-fast) var(--ease-spring);
}

.interactive-chip:hover {
  background: rgba(255, 204, 0, 0.1);
  border-color: var(--brand);
  color: #ffffff;
  transform: translateY(-1px);
}

.interactive-chip:active {
  transform: scale(0.96);
}

.interactive-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #090a0d;
  font-weight: 700;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.form-control-input {
  width: 100%;
  background-color: #0d0f14;
  border: 1px solid var(--border-strong);
  border-radius: 0.65rem;
  padding: 0.85rem 1.1rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease,
              background-color var(--duration-fast) ease;
}

.form-control-input:focus {
  outline: none;
  border-color: var(--brand);
  background-color: #12141c;
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.15);
}

.form-control-input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  animation: shakeInput 0.35s var(--ease-spring);
}

@keyframes shakeInput {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.form-error-msg {
  display: none;
  color: #f87171;
  font-size: 0.76rem;
  font-weight: 500;
  margin-top: 0.35rem;
}

.form-error-msg.visible {
  display: block;
}

/* ============================================================
   STATS COUNTER & PROOF
   ============================================================ */
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color var(--duration-fast) ease;
}

.stat-box:hover {
  border-color: var(--border-brand);
}

.stat-number {
  font-family: 'Bebas Neue', 'Syne', sans-serif;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--brand);
  text-shadow: 0 4px 16px var(--brand-glow);
}

/* ============================================================
   SCROLL REVEAL MOTION (IntersectionObserver)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s var(--ease-out),
              transform 0.55s var(--ease-spring);
  will-change: opacity, transform;
}

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

.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }

/* ============================================================
   MOBILE NATIVE BOTTOM BAR (One-Tap Emergency Action)
   ============================================================ */
.mobile-bottom-dock {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-dock {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(13, 15, 20, 0.94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-strong);
    padding: 0.65rem 1rem env(safe-area-inset-bottom, 0.65rem);
    gap: 0.65rem;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6);
  }

  body {
    padding-bottom: 4.5rem;
  }

  .wa-float {
    bottom: 5.2rem;
    right: 1rem;
    width: 52px;
    height: 52px;
  }
}

/* Floating WhatsApp Button */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 95;
  width: 58px;
  height: 58px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
  transition: transform var(--duration-fast) var(--ease-spring),
              box-shadow var(--duration-fast) ease;
  text-decoration: none;
}

.wa-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 10px 32px rgba(37, 211, 102, 0.6);
}

.wa-float:active {
  transform: scale(0.95);
}

/* Mobile Menu Drawer */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-spring), opacity 0.25s ease;
  opacity: 0;
}

#mobile-menu.open {
  max-height: 380px;
  opacity: 1;
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
