/* =========================================================
   CLEANCODE — LANDING PAGE STYLESHEET (ATUALIZADO)
   Índice:
   1. Reset & Variáveis
   2. Tipografia base
   3. Utilitários (secções, botões)
   4. Cabeçalho Flutuante (Glassmorphism)
   5. Hero (secção 1)
   6. Bento Grid (Design de Cartões)
   7. Portfólio / mockup de laptop
   8. Formulário de orçamento multi-step
   9. Rodapé
   10. Responsividade
   11. Acessibilidade (motion / focus)
========================================================= */



/* ---------- 1. RESET & VARIÁVEIS ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Cores */
  --bg-primary: #121212;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #0a0a0a;
  --accent: #175E9B;
  --accent-hover: #2278c4;
  --accent-soft: rgba(23, 94, 155, 0.15);
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #7a7a7a;
  --border-color: rgba(255, 255, 255, 0.09);
  --border-color-strong: rgba(255, 255, 255, 0.18);
  --success: #2fbf71;
  --danger: #e0554f;

  /* Tipografia */
  --font-main: 'Inter', 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Espaçamento / forma */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --max-width: 1180px;
  --transition-fast: 0.2s ease;
  --transition-med: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html {
  scroll-behavior: smooth;
}

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

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, iframe { max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

.accent { color: var(--accent); }

/* ---------- ECRÃ DE CARREGAMENTO (LOADER) ---------- */
#page-loader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-container {
  perspective: 1000px;
  width: 200px;
  height: 200px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hex-svg {
  position: absolute;
  fill: transparent;
  stroke-linecap: butt;
  stroke-linejoin: miter;
  transform-style: preserve-3d;
}

.hex-outer {
  width: 140px;
  height: 140px;
  stroke: #333333;
  stroke-width: 6;
  animation: spinOuter 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.hex-inner {
  width: 90px;
  height: 90px;
  stroke: var(--accent);
  stroke-width: 6;
  animation: spinInner 3s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse;
}

@keyframes spinOuter {
  0% { transform: rotateY(0deg) rotateZ(30deg); }
  50% { transform: rotateY(180deg) rotateZ(30deg); }
  100% { transform: rotateY(360deg) rotateZ(30deg); }
}

@keyframes spinInner {
  0% { transform: rotateY(0deg) rotateZ(-30deg); }
  50% { transform: rotateY(180deg) rotateZ(-30deg); }
  100% { transform: rotateY(360deg) rotateZ(-30deg); }
}

.loading-text {
  margin-top: 40px;
  font-size: 1.2rem;
  letter-spacing: 4px;
  font-weight: 300;
  text-transform: uppercase;
  color: var(--text-primary);
  animation: pulse 1.5s ease-in-out infinite;
}

.loading-text span {
  font-weight: 700;
  color: var(--accent);
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ---------- 2. TIPOGRAFIA BASE ---------- */
h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ---------- 3. UTILITÁRIOS ---------- */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-inner--narrow {
  max-width: 720px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

/* Botões base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.9rem;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
              background var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(23, 94, 155, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(23, 94, 155, 0.5);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color-strong);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-large { padding: 1.1rem 2.6rem; font-size: 1.05rem; }
.btn-small { padding: 0.6rem 1.3rem; font-size: 0.9rem; }

/* ---------- 4. CABEÇALHO FLUTUANTE (PILL NAV / GLASSMORPHISM) ---------- */
.pill-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 1000px;
  padding: 12px 24px;
  
  /* Glassmorphism */
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  z-index: 1000;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.pill-nav.is-scrolled {
  background: rgba(10, 10, 10, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* --- LOGOTIPO NA NAVBAR (ÍCONE + TEXTO) --- */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px; /* Espaço entre o ícone e as letras */
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.logo-link:hover {
  transform: scale(1.02); /* Efeito suave no conjunto todo */
}

.logo-img {
  height: 28px; /* Altura do hexágono */
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-link:hover .logo-img {
  transform: scale(1.05); /* Pequeno efeito ao passar o rato */
}

/* Novo Botão Estilo Interactive Studio */
.btn-primary-pill {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  padding: 10px 24px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.btn-primary-pill:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* ---------- 5. HERO ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, var(--bg-secondary) 0%, var(--bg-primary) 70%);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 760px;
  pointer-events: none;
}

.hero-content > * {
  pointer-events: auto;
}

.hero-title {
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  margin-bottom: 1.2rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 2.2rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid var(--border-color-strong);
  border-radius: 20px;
  pointer-events: none;
}

.scroll-hint span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 20px; }
  100% { opacity: 0; top: 8px; }
}

/* ---------- 6. BENTO GRID (ESTRUTURA DE CARTÕES) ---------- */
.bento-section {
  padding: 40px 5% 100px;
  display: flex;
  justify-content: center;
  background-color: var(--bg-primary);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
  max-width: var(--max-width);
}

.bento-card {
  background: linear-gradient(145deg, #121212 0%, #080808 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-med);
}

.bento-card:hover {
  border-color: var(--border-color-strong);
}

.card-large {
  grid-column: span 2;
}

/* ---------- 7. PORTFÓLIO / MOCKUP DE LAPTOP ---------- */
.laptop-mockup {
  max-width: 880px;
  margin: 0 auto;
}

.laptop-screen-frame {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-md) var(--radius-md) 4px 4px;
  padding: 1.1rem 1.1rem 0.6rem;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.65);
}

.laptop-camera-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  margin: 0 auto 0.7rem;
}

.laptop-screen {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* proporção 16:9 */
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

.laptop-screen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.laptop-hinge {
  height: 8px;
  background: linear-gradient(#0d0d0d, #050505);
  margin: 0 -2%;
  border-radius: 2px;
}

.laptop-base {
  position: relative;
  width: 104%;
  margin-left: -2%;
  height: 20px;
  background: linear-gradient(180deg, #2b2b2b 0%, #161616 100%);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 14px 24px -8px rgba(0, 0, 0, 0.6);
}

.laptop-trackpad {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 8px;
  background: #0c0c0c;
  border-radius: 6px;
}

.portfolio-caption {
  text-align: center;
  color: var(--text-muted);
  margin-top: 1.8rem;
  font-size: 0.95rem;
}

/* ---------- 8. FORMULÁRIO DE ORÇAMENTO MULTI-STEP ---------- */
/* Contentor sem fundo para encaixar no Bento Card */
.quote-card-transparent {
  background: transparent;
  border: none;
  padding: 0;
}

/* Barra de progresso */
.progress-track {
  position: relative;
  height: 4px;
  background: var(--border-color);
  border-radius: 4px;
  margin-bottom: 0.9rem;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 33.333%;
  background: var(--accent);
  border-radius: 4px;
  transition: width var(--transition-med);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress-labels li {
  position: relative;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.progress-labels li.is-active,
.progress-labels li.is-done {
  color: var(--text-primary);
}

.progress-labels li.is-done { color: var(--accent); }

/* Passos do formulário */
fieldset.form-step {
  border: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--transition-med), transform var(--transition-med);
}

fieldset.form-step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

fieldset.form-step legend {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.6rem;
  padding: 0;
}

/* Cartões clicáveis (radio escondido + label estilizada) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
}

.card-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.card-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 64px;
  padding: 1rem;
  border: 1.5px solid var(--border-color-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast),
              color var(--transition-fast), transform var(--transition-fast);
}

.card-label:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.card-input:checked + .card-label {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.card-input:focus-visible + .card-label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Campo "Outro" */
.other-field {
  margin-top: 1.1rem;
  overflow: hidden;
  max-height: 100px;
  opacity: 1;
  transition: max-height var(--transition-med), opacity var(--transition-med), margin-top var(--transition-med);
}

.other-field[hidden] {
  display: block; 
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

.other-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

/* Campos de texto */
.text-fields {
  display: grid;
  gap: 1.1rem;
}

.text-field {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

input[type="text"],
input[type="email"] {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

input[type="text"]::placeholder { color: var(--text-muted); }

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* Erros */
.field-error {
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: 1rem;
  font-weight: 600;
}

.form-step.has-error .card-label {
  animation: shake 0.4s ease;
}

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* Navegação do formulário */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.2rem;
}

/* Estado de sucesso */
.form-success {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.3rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--success);
  border: 2px solid var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
}

.form-success h3 {
  font-size: 1.4rem;
  margin-bottom: 0.7rem;
}

.form-success p {
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto 1.6rem;
}

/* ---------- 9. RODAPÉ ---------- */
.site-footer {
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  padding: 2.4rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- 10. RESPONSIVIDADE ---------- */
@media (max-width: 768px) {
  .pill-nav {
    width: 95%;
    padding: 10px 16px;
  }
  .nav-links {
    display: none; /* Esconde os links no mobile para não sobrecarregar a pill nav */
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .card-large {
    grid-column: span 1;
  }
  .section-inner { padding: 0 1.2rem; }
  .laptop-trackpad { width: 90px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .form-nav .btn { padding: 0.8rem 1.3rem; font-size: 0.92rem; }
}

@media (max-width: 480px) {
  .bento-card {
    padding: 40px 15px;
  }
  .card-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .card-label { min-height: 54px; font-size: 0.86rem; padding: 0.7rem; }
  .hero-subtitle { font-size: 1rem; }
  .laptop-screen-frame { padding: 0.7rem 0.7rem 0.4rem; }
  .btn-large { padding: 0.95rem 2rem; }
}

/* ---------- 11. ACESSIBILIDADE ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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