@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital@1&display=swap');

:root {
  /* Brand Colors */
  --bg-dark: #1E1A15;
  --bg-surface: #27241F;
  --bg-surface-hover: #332f28;
  --brand-red: #D60D14;
  --brand-red-hover: #F5111B;
  --brand-red-dark: #7A070B;
  --text-primary: #FFFFFF;
  --text-secondary: #A6A39F;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(39, 36, 31, 0.6);
  
  /* Typography */
  --font-family: 'Outfit', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 999px;
  
  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(214, 13, 20, 0.25);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Texture Overlay */
.noise-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Background Ambient Glow */
.ambient-glow {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw; height: 80vw;
  background: radial-gradient(circle, rgba(214, 13, 20, 0.03) 0%, rgba(30, 26, 21, 0) 60%);
  z-index: -1;
  pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-red);
}

/* Typography Utilities */
.heading-1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.heading-2 {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.heading-3 {
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 500;
  line-height: 1.3;
}

.paragraph-lg {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-secondary);
}

.paragraph-md {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.paragraph-sm {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.text-gradient {
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-hover) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Layout Utilities */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border-color);
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.gap-sm { gap: 1rem; }
.gap-md { gap: 2rem; }

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--brand-red);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

/* Hover effects moved to media query below */
.btn-secondary {
  background-color: transparent;
  color: var(--brand-red);
  border: 1px solid var(--brand-red);
}

/* Hover effects moved to media query below */
.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.input-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-field {
  width: 100%;
  padding: 1rem 1.25rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-family);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-field::placeholder {
  color: rgba(166, 163, 159, 0.5);
}

.input-field:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(214, 13, 20, 0.2);
  outline: none;
}

.input-field.error {
  border-color: #ff4d4f;
}

/* Cards */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

/* Hover moved to media query below */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(30, 26, 21, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--brand-red);
}

/* Hero DS Specific */
.hero-ds {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 5rem; /* offset for navbar */
}

.hero-ds::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(214, 13, 20, 0.1) 0%, rgba(30, 26, 21, 0) 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.hero-ds-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

/* Animations Engine */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(214, 13, 20, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(214, 13, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(214, 13, 20, 0); }
}

.animate-fade-in-up {
  animation: fadeInUp var(--transition-slow) forwards;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* DS Presentation Specific (Not necessarily for prod code) */
.ds-header {
  margin-bottom: 3rem;
}

.color-swatch {
  height: 100px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  width: 100%;
}

.color-card {
  background: #000; /* to contrast with swatch */
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.color-card-info {
  padding: 1.25rem;
  background: var(--bg-surface);
}

.color-name {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.color-hex {
  font-family: monospace;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.type-row {
  display: flex;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.type-row > div:first-child {
  width: 150px;
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.type-row > div:nth-child(2) {
  flex-grow: 1;
}

.type-row > div:last-child {
  text-align: right;
  color: var(--brand-red);
  font-family: monospace;
  font-size: 0.875rem;
}

.component-demo-box {
  padding: 2rem;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  border: 1px dashed var(--border-color);
}

.motion-box {
  width: 100px;
  height: 100px;
  background: var(--brand-red);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-dark);
  font-weight: 600;
  cursor: pointer;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 1.5rem;
}

.icon-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--brand-red);
  transition: all var(--transition-fast);
}

/* Hover moved to media query */
.icon-wrapper span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ========================================================
   Responsividade: Skill (ajustar-responsividade)
   ======================================================== */

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .hero-ds {
    padding-top: 8rem;
  }

  .nav-links {
    display: none; /* Simplificação focada em Lead Capture/Conversão sem distrações */
  }

  /* Force stack nas colunas da section de form de lead */
  .grid[style*="1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .ds-header { margin-bottom: 2rem; text-align: center; }
  
  .result-header, .result-body {
    padding: 2.5rem 1.25rem;
  }
  
  .glass-card {
    padding: 1.5rem;
  }
}

/* Prevenindo Ghost Hovers em Mobile (Touch Screens) */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background-color: var(--brand-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(245, 17, 27, 0.4);
  }

  .btn-secondary:hover {
    background-color: rgba(214, 13, 20, 0.1);
    transform: translateY(-2px);
  }

  .card:hover {
    transform: translateY(-8px);
    border-color: rgba(214, 13, 20, 0.4);
  }

  .icon-wrapper:hover {
    background: rgba(214, 13, 20, 0.1);
    transform: translateY(-4px);
  }
}
