/* =====================================================
   FTECH DIGITAL — style.css (SEO Enterprise Optimized)
   ===================================================== */

/* Fonts carregadas via <link> no HTML (não-blocking) */

:root {
  --bg-color: #050505;
  --bg-secondary: #0a0a0c;
  --bg-card: rgba(255, 255, 255, 0.03);
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --accent-cyan: #00f2fe;
  --accent-purple: #4facfe;
  --accent-gradient: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
  --accent-glow: rgba(0, 242, 254, 0.15);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --section-padding: clamp(4rem, 8vw, 8rem);
  --container-width: 1200px;
  --border-radius: 16px;
  --glass-border: 1px solid rgba(255, 255, 255, 0.05);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}



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

/* ── Acessibilidade: Screen-reader only ─────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Foco visível (acessibilidade de teclado) ───────── */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Tipografia ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.01em; margin-bottom: 2rem; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); margin-bottom: 1rem; }
p  { font-size: clamp(1rem, 1.2vw, 1.125rem); color: var(--text-secondary); margin-bottom: 1.5rem; }

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* ── Layout ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

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

.text-center { text-align: center; }

/* ── Botões ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: none;
  z-index: 1;
  min-height: 48px; /* Touch target mínimo */
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 10px 20px var(--accent-glow);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  z-index: -1;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px var(--accent-glow);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Header & Nav ───────────────────────────────────── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 1.5rem 0;
  z-index: 100;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

header.scrolled {
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 0;
  border-bottom: var(--glass-border);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.5px;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding: 0.25rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-gradient);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: #fff; }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 8px;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 110;
  position: relative;
}

.mobile-menu-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
}

/* Nav overlay (mobile backdrop) */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 80;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
}

/* ── Breadcrumb ─────────────────────────────────────── */
.breadcrumb-nav {
  padding: 1rem 0;
  border-bottom: var(--glass-border);
  margin-top: 80px;
}

.breadcrumb {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  opacity: 0.4;
}

.breadcrumb a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover { text-decoration: underline; }

/* ── Page Header Section ────────────────────────────── */
.page-header-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* ── Hero ───────────────────────────────────────────── */
.hero-scroll-container {
  height: 250vh;
  position: relative;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  /* Reservar espaço para evitar CLS */
  min-height: 100vh;
}

.hero-video-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  /* Poster visível enquanto vídeo carrega */
  background-color: var(--bg-color);
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to right, rgba(5,5,5,0.95) 0%, rgba(5,5,5,0.6) 50%, transparent 100%);
  z-index: -1;
}

.hero-content-left {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-content {
  text-align: left;
  max-width: 650px;
  margin: 0;
}

.hero-content p {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: 0;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* ── Cards / Services Grid ──────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.card {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  /* Performance: conter stacking context */
  will-change: transform;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 60px; height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.card:hover .card-icon {
  background: var(--accent-gradient);
  transform: scale(1.1);
}

.card-link {
  color: var(--accent-cyan);
  text-decoration: none;
  margin-top: auto;
  padding-top: 1rem;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.card-link:hover {
  color: var(--accent-purple);
  gap: 0.6rem;
}

/* ── Fade-up Animation ──────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── FAQ ────────────────────────────────────────────── */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item[open] {
  border-color: rgba(0, 242, 254, 0.2);
}

.faq-question {
  padding: 1.5rem 2rem;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.3s ease;
  min-height: 48px;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-question:hover { color: var(--accent-cyan); }

.faq-answer {
  padding: 0 2rem 1.5rem;
}

.faq-answer p { margin-bottom: 0; }

.faq-answer a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* ── Stats ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: var(--glass-border);
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
  line-height: 1;
}

/* ── CTA Section ────────────────────────────────────── */
.cta-section {
  background: linear-gradient(to right, rgba(5,5,5,1), rgba(79,172,254,0.08));
  border-top: var(--glass-border);
  border-bottom: var(--glass-border);
}

/* ── Contact Form ───────────────────────────────────── */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  padding: 3rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.info-item:last-child { margin-bottom: 0; }

.info-icon {
  width: 50px; height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-label span {
  color: var(--accent-cyan);
}

.form-group { margin-bottom: 1.5rem; }

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: var(--glass-border);
  padding: 0.9rem 1.5rem;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
  min-height: 48px;
}

select.form-control option {
  background: var(--bg-secondary);
  color: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-purple);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.15);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ── Footer ─────────────────────────────────────────── */
footer {
  background: var(--bg-secondary);
  border-top: var(--glass-border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-heading,
.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 0.8rem; }

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

.footer-links a:hover { color: var(--accent-cyan); }

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ── Loader ─────────────────────────────────────────── */
.loader-wrapper {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.loader-wrapper.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader {
  width: 48px; height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  border-top-color: var(--accent-cyan);
  animation: spin 0.9s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* ── Scroll-to-Top ──────────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px; height: 48px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--accent-glow);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

/* ── Contact Links ──────────────────────────────────── */
.contact-email-link:hover,
.maps-link:hover {
  color: var(--accent-cyan) !important;
}

/* ── Images ─────────────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

/* ── Timeline ───────────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 4rem auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: rgba(255,255,255,0.06);
  top: 0; bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  right: -10px;
  background-color: var(--bg-color);
  border: 4px solid var(--accent-cyan);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.left { left: 0; }
.right { left: 50%; }
.right::after { left: -10px; }

.timeline-content {
  padding: 20px 30px;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: var(--glass-border);
}

/* ── RESPONSIVO ─────────────────────────────────────── */
@media (max-width: 992px) {
  .contact-wrapper { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  nav { display: contents; }

  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: min(85%, 320px);
    height: 100vh;
    background: #0d0d10;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 100;
    border-left: var(--glass-border);
    gap: 1rem;
  }

  .nav-links.active { right: 0; }

  .nav-links a {
    font-size: 1.2rem;
    min-height: 52px;
  }

  .mobile-menu-btn { display: flex; }

  .nav-overlay { display: block; }

  .hero-buttons { flex-direction: column; }

  .footer-grid { grid-template-columns: 1fr; }

  /* Mostrar navegação no footer mobile */
  .footer-col { display: block !important; }

  .timeline::after { left: 31px; }
  .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
  .timeline-item::after { left: 21px; right: auto; }
  .right { left: 0%; }

  .breadcrumb-nav { margin-top: 70px; }
}

@media (max-width: 600px) {
  .contact-info { padding: 2rem 1.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .scroll-top-btn { bottom: 1.5rem; right: 1.5rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-content h1 { font-size: 2rem; }
}

/* Acessibilidade: Alto contraste */
@media (forced-colors: active) {
  .gradient-text { -webkit-text-fill-color: unset; background: none; color: ButtonText; }
  .btn-primary { forced-color-adjust: none; }
}
