/* ============================================================
   TG8 ART — estilos do site
   Paleta e tipografia centralizadas em :root
   ============================================================ */

:root {
  --bg:            #0d0722;   /* fundo principal (indigo quase preto) */
  --bg-2:          #130a2e;   /* fundo de seção alternativo */
  --ink:           #f1efff;   /* texto claro */
  --muted:         rgba(241, 239, 255, .58);
  --line:          rgba(241, 239, 255, .12);
  --periwinkle:    #8b7cf6;   /* roxo suave (acento e seção clientes) */
  --purple:        #7b3ff5;   /* roxo vivo (destaques) */
  --client-bg:     #8b83f8;   /* fundo da faixa de clientes */
  --ink-dark:      #14092e;   /* texto escuro sobre fundo claro */

  --radius: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --maxw: 1400px;
  --pad: clamp(20px, 5vw, 64px);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font);
}

/* ---------- reset base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3, p { margin: 0; }

/* fonte de display (Space Grotesk) em títulos, slogan e navegação */
h1, h2, h3,
.hero-copy p,
.menu-panel nav a,
.modal-card h3,
.projeto .meta h3,
.sobre .destaque { font-family: var(--font-display); }

/* ---------- utilidades ---------- */
.section {
  position: relative;
  padding: clamp(72px, 12vh, 140px) var(--pad);
  scroll-margin-top: 0;
}
.wrap { max-width: var(--maxw); margin-inline: auto; width: 100%; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   CHROME FIXO — socials, menu, dots
   ============================================================ */
.social {
  position: fixed; top: 26px; right: var(--pad); z-index: 40;
  display: flex; gap: 18px; align-items: center;
}
.social a { opacity: .85; transition: opacity .25s, transform .25s var(--ease); }
.social a:hover { opacity: 1; transform: translateY(-2px); }
.social svg { width: 22px; height: 22px; fill: var(--ink); }

.menu-btn {
  position: fixed; top: 22px; left: var(--pad); z-index: 45;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); transition: color .25s;
}
.menu-btn:hover { color: var(--ink); }
.menu-btn .bars { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-btn .bars i { width: 22px; height: 2px; background: currentColor; display: block; transition: transform .3s var(--ease); }

/* dots de progresso de scroll */
.dots {
  position: fixed; left: 22px; top: 50%; transform: translateY(-50%);
  z-index: 40; display: flex; flex-direction: column; gap: 16px;
}
.dots button {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid rgba(241,239,255,.5);
  background: transparent; padding: 0;
  transition: background .3s, border-color .3s, transform .3s var(--ease);
}
.dots button.active { background: var(--ink); border-color: var(--ink); transform: scale(1.15); }
.dots button:hover { border-color: var(--ink); }

/* ============================================================
   MENU OVERLAY
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 4, 22, .78);
  backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.overlay.open { opacity: 1; visibility: visible; }

.menu-panel {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pad);
  gap: 6px;
}
.menu-panel nav { display: flex; flex-direction: column; gap: 2px; }
.menu-panel nav a {
  font-size: clamp(34px, 7vw, 76px);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.06;
  color: var(--ink); width: max-content; max-width: 100%;
  transition: color .25s, transform .3s var(--ease); transform-origin: left;
}
.menu-panel nav a:hover { color: var(--periwinkle); transform: translateX(10px); }

/* link discreto da área do cliente */
.menu-secondary {
  margin-top: clamp(28px, 5vh, 56px);
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.menu-secondary a { transition: color .25s; }
.menu-secondary a:hover { color: var(--periwinkle); }
.menu-secondary .dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

.menu-close {
  position: absolute; top: 24px; right: var(--pad);
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.menu-close:hover { color: var(--ink); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 620px) 1fr;
  align-items: center;
  padding: 0 var(--pad);
  position: relative;
  overflow: hidden;
}
/* aneis concêntricos de fundo */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    repeating-radial-gradient(circle at 50% 50%,
      transparent 0 78px,
      rgba(139,124,246,.05) 78px 79px);
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 72%);
}
.hero > * { position: relative; z-index: 1; }

.hero-mark { justify-self: end; padding-right: clamp(12px, 3vw, 48px); }
.hero-mark svg { width: clamp(150px, 18vw, 260px); height: auto; }

.hero-center { justify-self: center; width: 100%; }
.hero-center .brain { width: 100%; max-width: 420px; margin-inline: auto; }
.hero-center .brain img,
.hero-center .brain svg { width: 100%; height: auto; }

.hero-copy { justify-self: start; max-width: 340px; }
.hero-copy p {
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 700; letter-spacing: -.01em; line-height: 1.25;
}
.hero-copy .accent { color: var(--periwinkle); }

/* rodapé do hero: Sobre / Contato */
.hero-foot {
  position: absolute; left: 0; right: 0; bottom: clamp(24px, 5vh, 46px);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 var(--pad); z-index: 2;
  font-size: clamp(16px, 1.6vw, 20px);
}
.hero-foot a, .hero-foot button {
  font-size: inherit; position: relative; padding-bottom: 3px;
}
.hero-foot a::after, .hero-foot button::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--periwinkle); transition: width .3s var(--ease);
}
.hero-foot a:hover::after, .hero-foot button:hover::after { width: 100%; }

/* ============================================================
   CLIENTES (faixa clara)
   ============================================================ */
.clientes { background: var(--client-bg); color: var(--ink-dark); text-align: center; }
.clientes h2 {
  font-size: clamp(30px, 4vw, 46px); font-weight: 400; letter-spacing: -.01em;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.clientes-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(28px, 4vw, 56px); align-items: center; justify-items: center;
}
.cliente-logo {
  height: 46px; display: flex; align-items: center; justify-content: center;
  filter: none; opacity: .92; transition: opacity .3s, transform .3s var(--ease);
}
.cliente-logo:hover { opacity: 1; transform: scale(1.04); }
.cliente-logo img { max-height: 46px; width: auto; object-fit: contain; }
.cliente-logo .fallback {
  font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--ink-dark);
}

/* ============================================================
   PROJETOS
   ============================================================ */
.projetos h2, .sobre h2 {
  font-size: clamp(30px, 4.5vw, 58px); font-weight: 700; letter-spacing: -.02em;
  margin-bottom: clamp(32px, 6vh, 60px);
}
.projetos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(18px, 2vw, 28px);
}
.projeto {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--bg-2);
  border: 1px solid var(--line);
  cursor: pointer;
}
.projeto .thumb {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .6s var(--ease);
}
.projeto .thumb.placeholder {
  background: radial-gradient(120% 120% at 20% 10%, rgba(139,124,246,.35), transparent 60%),
              linear-gradient(135deg, #201146, #130a2e);
  display: flex; align-items: center; justify-content: center;
}
.projeto .thumb.placeholder span {
  font-weight: 800; font-size: clamp(22px, 3vw, 34px);
  color: rgba(241,239,255,.35); letter-spacing: -.02em; text-align: center; padding: 12px;
}
.projeto:hover .thumb { transform: scale(1.05); }
.projeto .meta {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 20px; background: linear-gradient(transparent, rgba(8,4,22,.9));
  transform: translateY(8px); opacity: .96; transition: transform .4s var(--ease);
}
.projeto:hover .meta { transform: none; }
.projeto .meta .cat {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--periwinkle);
}
.projeto .meta h3 { font-size: 22px; font-weight: 700; margin-top: 4px; }
.projeto .meta p { font-size: 14px; color: var(--muted); margin-top: 6px; max-height: 0; overflow: hidden; transition: max-height .45s var(--ease); }
.projeto:hover .meta p { max-height: 120px; }

/* ============================================================
   SOBRE
   ============================================================ */
.sobre { background: var(--bg-2); }
.sobre-inner { max-width: 760px; }
.sobre p { font-size: clamp(18px, 2vw, 24px); color: var(--muted); line-height: 1.6; }
.sobre .destaque {
  color: var(--ink); font-weight: 700; margin-top: 26px;
  font-size: clamp(20px, 2.4vw, 30px); line-height: 1.35;
}

/* ============================================================
   MODAL CONTATO
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center; padding: 20px;
  background: rgba(8, 4, 22, .82); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-card {
  width: min(520px, 100%);
  background: linear-gradient(180deg, #1a0f3d, #130a2e);
  border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(28px, 5vw, 44px); position: relative;
  transform: translateY(16px) scale(.98); transition: transform .4s var(--ease);
}
.modal.open .modal-card { transform: none; }
.modal-card h3 { font-size: clamp(26px, 4vw, 36px); font-weight: 700; letter-spacing: -.02em; }
.modal-card .sub { color: var(--muted); margin-top: 8px; }
.modal-card .links { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.contact-link {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.contact-link:hover { border-color: var(--periwinkle); background: rgba(139,124,246,.08); transform: translateY(-2px); }
.contact-link svg { width: 22px; height: 22px; fill: var(--periwinkle); flex: none; }
.contact-link .t { font-weight: 600; }
.contact-link .s { font-size: 13px; color: var(--muted); }
.modal-close {
  position: absolute; top: 16px; right: 18px; width: 38px; height: 38px;
  border-radius: 50%; display: grid; place-items: center; color: var(--muted);
  transition: color .25s, background .25s;
}
.modal-close:hover { color: var(--ink); background: rgba(241,239,255,.06); }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "mark" "brain" "copy";
    gap: 30px; padding-top: 96px; padding-bottom: 120px; text-align: center;
    min-height: auto;
  }
  .hero-mark { grid-area: mark; justify-self: center; padding: 0; }
  .hero-center { grid-area: brain; }
  .hero-center .brain { max-width: 260px; }
  .hero-copy { grid-area: copy; justify-self: center; text-align: center; }
  .dots { display: none; }
  .social { top: 20px; }
  .menu-btn span.label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
