/* ============================================================
   TECHWEB — MÍDIA PROGRAMÁTICA
   Folha de estilos principal
   Estrutura: 1) Reset  2) Variáveis  3) Tipografia  4) Layout
   5) Header/Nav  6) Hero  7) Seções  8) Cards  9) Formatos
   10) FAQ  11) Contato  12) Footer  13) Ad Slots (IAB)  14) Responsivo
   ============================================================ */

/* 1) RESET BÁSICO ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font: inherit; }

/* 2) VARIÁVEIS DE MARCA ------------------------------------------ */
:root {
  --color-purple: #7C3AED;
  --color-purple-dark: #5B21B6;
  --color-blue: #4F46E5;
  --color-gradient: linear-gradient(135deg, #9333EA 0%, #4F46E5 100%);
  --color-amber: #F59E0B;

  --color-ink: #1E1533;
  --color-ink-soft: #4B4160;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F5FC;
  --color-bg-dark: #150C2E;
  --color-border: #E7E1F5;

  --font-display: 'Poppins', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-card: 0 10px 30px -12px rgba(76, 29, 149, 0.25);
  --container-w: 1180px;
}

/* 3) TIPOGRAFIA --------------------------------------------------- */
body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-ink);
  letter-spacing: 0.2px;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { color: var(--color-ink-soft); }
p + p { margin-top: 0.9rem; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-purple);
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--color-ink-soft);
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-purple);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* 4) LAYOUT -------------------------------------------------------- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-dark {
  background: var(--color-bg-dark);
  color: #fff;
}
.section-dark h2, .section-dark .eyebrow { color: #fff; }
.section-dark .eyebrow { color: #C4B5FD; }
.section-dark p { color: #C9C2DC; }

.section-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}

/* Botões ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-gradient);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(124, 58, 237, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -6px rgba(124, 58, 237, 0.65); }
.btn-ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.22); }
.btn-lg { padding: 15px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-nav { margin-left: auto; margin-right: 0; white-space: nowrap; flex-shrink: 0; }

/* 5) HEADER / NAV ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  height: 80px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-icon { height: 38px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--color-purple-dark);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.main-nav ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  margin-left: 12px;
}
.main-nav a {
  display: inline-block;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--color-ink-soft);
  white-space: nowrap;
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--color-purple); }
.main-nav a.is-active { color: var(--color-purple); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 6) HERO -------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 90px;
  color: #fff;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--color-gradient);
  background: url('../assets/hero-poster.jpg') center / cover no-repeat, var(--color-gradient);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(88,28,168,0.78) 0%, rgba(49,46,150,0.78) 100%);
}

.hero-inner { max-width: 780px; }
.hero .eyebrow { color: #E9D5FF; }
.hero h1 { color: #fff; margin-bottom: 22px; }
.hero-sub { color: rgba(255,255,255,0.88); font-size: 1.1rem; max-width: 640px; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.25);
  padding-top: 28px;
}
.hero-stats li { display: flex; flex-direction: column; gap: 4px; }
.hero-stats strong { font-family: var(--font-display); font-size: 1.6rem; }
.hero-stats span { font-size: 0.85rem; color: rgba(255,255,255,0.75); }

/* 7) SEÇÕES GERAIS ------------------------------------------------------- */
.about-cards { display: grid; gap: 20px; }
.mini-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 26px;
}
.mini-card h3 { color: var(--color-purple-dark); }

/* 8) GRIDS DE CARDS ------------------------------------------------------- */
.concept-grid, .services-grid, .diff-grid, .formats-grid {
  display: grid;
  gap: 22px;
}
.concept-grid { grid-template-columns: repeat(3, 1fr); }
.services-grid { grid-template-columns: repeat(3, 1fr); }
.diff-grid { grid-template-columns: repeat(3, 1fr); }

.concept-card, .service-card, .diff-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.concept-card:hover, .service-card:hover, .diff-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.concept-card h3 span {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--color-purple);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}
.service-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--color-gradient);
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.section-dark .diff-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
}
.section-dark .diff-card h3 { color: #fff; }

/* 9) FORMATOS PUBLICITÁRIOS ------------------------------------------------ */
.formats-grid { grid-template-columns: repeat(5, 1fr); align-items: end; }
.format-card { text-align: center; }
.format-visual {
  --scale: 0.32;
  width: calc(var(--fw) * 1px * var(--scale));
  height: calc(var(--fh) * 1px * var(--scale));
  max-width: 100%;
  margin: 0 auto 14px;
  border-radius: 8px;
  border: 2px dashed var(--color-purple);
  background: linear-gradient(135deg, rgba(147,51,234,0.08), rgba(79,70,229,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--color-purple-dark);
  font-weight: 600;
}
.format-card p { font-size: 0.85rem; color: var(--color-ink-soft); }

/* O card 300x600 é um formato exclusivo de desktop — não faz sentido
   mostrá-lo no catálogo em telas de celular. */
@media (max-width: 767px) {
  .format-card--desktop-only { display: none; }
}
.formats-note {
  margin-top: 36px;
  font-size: 0.9rem;
  color: var(--color-ink-soft);
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
}

/* 10) FAQ ------------------------------------------------------------------- */
.faq-list { max-width: 820px; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  padding: 22px 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--color-ink);
}
.faq-icon {
  position: relative;
  width: 18px; height: 18px;
  flex-shrink: 0;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--color-purple);
  transition: transform 0.2s ease;
}
.faq-icon::before { width: 100%; height: 2px; top: 8px; left: 0; }
.faq-icon::after { width: 2px; height: 100%; top: 0; left: 8px; }
.faq-question[aria-expanded="true"] .faq-icon::after { transform: rotate(90deg); opacity: 0; }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-answer p { padding: 0 4px 22px; color: var(--color-ink-soft); }

/* 11) CONTATO ---------------------------------------------------------------- */
.contact-info { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.contact-info li { display: flex; flex-direction: column; gap: 2px; }
.contact-info strong { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--color-ink-soft); }
.contact-info a { color: var(--color-purple); font-weight: 600; }
.contact-info a:hover { text-decoration: underline; }

.contact-form {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 34px;
}
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.85rem; font-weight: 600; color: var(--color-ink-soft); }
.form-row input, .form-row textarea {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #fff;
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--color-purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.form-note { margin-top: 14px; font-size: 0.9rem; color: var(--color-purple-dark); min-height: 1.2em; }

/* 12) FOOTER ------------------------------------------------------------------ */
.site-footer { background: var(--color-bg-dark); color: #C9C2DC; padding: 64px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.3px;
}
.footer-brand p { max-width: 320px; font-size: 0.9rem; }
.footer-col h4 { color: #fff; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding: 22px 0 30px; font-size: 0.82rem; text-align: center; color: #8A80A3; }

/* 13) AD SLOTS — FORMATOS IAB -------------------------------------------------- */
.ad-showcase { padding: 34px 0; background: var(--color-bg-alt); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.ad-inline-wrap { display: flex; justify-content: center; }

.ad-slot {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #C4B5FD;
  border-radius: var(--radius-sm);
  background: repeating-linear-gradient(45deg, #FFFFFF, #FFFFFF 10px, #F3EEFC 10px, #F3EEFC 20px);
  color: var(--color-purple-dark);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
}
.ad-slot__label { padding: 8px 12px; }

/* Dimensões reais por formato IAB */
.ad-slot--leaderboard { width: 728px; height: 90px; max-width: 100%; }
.ad-slot--rectangle { width: 300px; height: 250px; }
.ad-slot--halfpage { width: 300px; height: 600px; }

/* Regra padrão: por segurança, todo slot desktop/mobile nasce oculto e a media query libera */
.ad-desktop-only,
.ad-mobile-only {
  display: none;
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(0,0,0,0.35);
  z-index: 95;
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; color: #fff; }

@media (max-width: 767px) {
  .whatsapp-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .whatsapp-float svg { width: 26px; height: 26px; }
}

/* 14) RESPONSIVO ---------------------------------------------------------------- */

/* Breakpoint IAB: >=768px = desktop, <768px = mobile */
@media (min-width: 768px) {
  .ad-desktop-only { display: flex; }
}

@media (max-width: 767px) {
  .ad-mobile-only { display: flex; }
}

@media (max-width: 1024px) {
  .concept-grid, .services-grid, .diff-grid { grid-template-columns: repeat(2, 1fr); }
  .formats-grid { grid-template-columns: repeat(3, 1fr); row-gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .section-grid { grid-template-columns: 1fr; }
}

/* Menu vira "hambúrguer" bem antes de faltar espaço, evitando qualquer
   quebra de linha nos itens do menu ou no botão do cabeçalho. */
@media (max-width: 1200px) {
  .main-nav { display: none; }
  .btn-nav { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.is-open {
    display: block;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 16px 24px -12px rgba(30,21,51,0.15);
  }
  .main-nav.is-open ul { flex-direction: column; gap: 0; margin-left: 0; }
  .main-nav.is-open a { display: block; padding: 16px 24px; border-bottom: 1px solid var(--color-border); }
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 80px 0 0 0;
  background: rgba(21, 12, 46, 0.45);
  z-index: 90;
}
body.nav-open .nav-backdrop { display: block; }

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .concept-grid, .services-grid, .diff-grid { grid-template-columns: 1fr; }
  .formats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 90px 0 70px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}

/* Reduz movimento para quem prefere */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .hero-video { display: none; }
}

/* Em telas pequenas o vídeo não é carregado (ver js/script.js) — mantemos
   apenas o poster/gradiente para economizar dados no celular. */
@media (max-width: 767px) {
  .hero-video { display: none; }
}
