:root {
  --bg: #0b0d10;
  --bg-2: #101216;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  --panel: rgba(22, 24, 28, 0.6);
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);

  --text-main: #e1e3e6;
  --text-muted: #a0a6b0;
  --text-dark: #0b0d10;

  --accent: #ff7a18;
  --accent-hover: #ff9040;
  --accent-glow: rgba(255, 122, 24, 0.25);

  --radius: 12px;
  --font-sans:
    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;

  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --section-padding: 5rem;
  --section-padding-mobile: 3.5rem;
}

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

body {
  margin: 0;
  color: var(--text-main);
  background: var(--bg);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
  pointer-events: none;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.navbar,
.navbar-collapse {
  max-width: 100%;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
  color: #fff;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.text-balance {
  text-wrap: balance;
}
.tracking-wide {
  letter-spacing: 0.05em;
}
.lh-tight {
  line-height: 1.1;
}

.text-gradient {
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.5) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-accent {
  color: var(--accent) !important;
}
.text-muted {
  color: var(--text-muted) !important;
}

.section {
  padding: var(--section-padding) 0;
}
.section-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.bg-darker {
  background: rgba(0, 0, 0, 0.4);
}

.btn {
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  font-weight: 600;
  border-width: 1px;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
  color: #000;
}

.btn-outline-light {
  border-color: var(--border-light);
  color: rgba(255, 255, 255, 0.9);
}
.btn-outline-light:hover {
  background: var(--bg-glass);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

.link-fancy {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.link-fancy:hover {
  color: #fff;
  gap: 10px;
}

.nav-blur {
  background: rgba(11, 13, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding-block: 0.8rem;
  transition: padding 0.3s;
}
.navbar-brand {
  font-size: 1.25rem;
}
.brand-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}
.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted) !important;
  transition: color 0.2s;
}
.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: #fff !important;
}
.navbar-toggler {
  border: none;
  padding: 0;
}
.navbar-toggler:focus {
  box-shadow: none;
  outline: 2px solid var(--accent);
}

.glass-card,
.service-card,
.panel-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  height: 100%;
  backdrop-filter: blur(10px);
}

.hover-lift {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s;
}
.hover-lift:hover {
  transform: translateY(-5px);
  border-color: var(--border-light);
  background: var(--bg-glass-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.border-custom {
  border: 1px solid var(--border);
}
.border-custom-light {
  border: 1px solid var(--border-light);
}

.hero {
  min-height: 90vh;
  position: relative;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(255, 122, 24, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: -1;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.8);
}
.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.badge-tech {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  padding: 0.4em 0.8em;
  border-radius: 6px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
}

.hero-panel {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.design-layer {
  border: 1px dashed var(--accent);
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255, 122, 24, 0.05);
}
.skeleton-btn {
  height: 36px;
  background: var(--border);
  border-radius: 6px;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 122, 24, 0.1);
  color: var(--accent);
  border-radius: 12px;
  font-size: 1.2rem;
  border: 1px solid rgba(255, 122, 24, 0.15);
}

.form-control,
.form-select {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 8px;
}
.form-control:focus {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.15);
  color: #fff;
  outline: none;
}

.input-group-text {
  background-color: rgba(0, 0, 0, 0.2);
  border-color: var(--border);
  color: var(--text-muted);
}

.form-select-dark {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid var(--border) !important;
  color: #fff !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ff7a18' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 16px 12px !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.form-select-dark:focus {
  background-color: rgba(0, 0, 0, 0.5) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 0.25rem rgba(255, 122, 24, 0.25) !important;
  outline: none;
}

.form-select-dark option {
  background-color: #121418;
  color: #fff;
  padding: 10px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.contact-card {
  background: rgba(22, 24, 28, 0.85);
}

.btn-whatsapp {
  letter-spacing: 0.01em;
}

#contato .form-control,
#contato .form-select {
  background: rgba(0, 0, 0, 0.28);
}

#contato .form-control:focus,
#contato .form-select:focus {
  background: rgba(0, 0, 0, 0.45);
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.2s;
  display: block;
  margin-bottom: 0.5rem;
}
.footer-link:hover {
  color: var(--accent);
  padding-left: 5px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(11, 13, 16, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-card {
  width: min(360px, 90vw);
  padding: 2rem 1.75rem;
  border-radius: var(--radius);
  background: rgba(22, 24, 28, 0.85);
  border: 1px solid rgba(255, 122, 24, 0.22);
  text-align: center;
  position: relative;
}

.preloader-dot {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 122, 24, 0.6);
}

.preloader-spinner {
  width: 54px;
  height: 54px;
  margin: 0.5rem auto 1rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  box-shadow: 0 0 18px rgba(255, 122, 24, 0.25);
  animation: preloader-spin 0.9s linear infinite;
}

.preloader-text {
  margin: 0;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.02em;
  font-size: 0.95rem;
}

@keyframes preloader-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 991px) {
  nav {
    height: auto;
  }

  nav .navbar-brand {
    display: none !important;
  }

  nav .container {
    display: flex !important;
    flex-direction: column;
  }

  nav .nav-back-btn {
    width: 100%;
    text-align: center;
  }

  nav .nav-back-btn a {
    width: 100%;
  }

  .section {
    padding: var(--section-padding-mobile) 0;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .display-4 {
    font-size: 2.5rem;
  }

  .hero {
    text-align: center;
    padding-top: 100px;
    height: auto;
  }

  .hero .d-flex.flex-wrap,
  .hero .status-badge {
    justify-content: center;
  }

  .btn-mobile-full {
    width: 100%;
    display: block;
    margin-top: 10px;
  }

  .navbar-collapse {
    background: var(--bg-2);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }

  .navbar .container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
  }

  .hero-panel {
    display: none;
  }
}
