/*
Theme Name: Estúdios Nexus
Theme URI: https://estudiosnexus.com.br
Author: Estúdios Nexus
Description: Tema cinematográfico premium para portfólio audiovisual. Preto absoluto, verde esmeralda e branco, com biblioteca de cases filtrável, vídeos em autoplay silencioso e microinterações suaves.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: estudios-nexus
*/

/* ---------- Tokens ---------- */
:root {
  --nx-bg: #050505;
  --nx-surface: #0c0c0d;
  --nx-fg: #f5f6f5;
  --nx-muted: #9aa0a0;
  --nx-primary: #00c853;
  --nx-primary-ink: #041006;
  --nx-border: rgba(255, 255, 255, 0.1);
  --nx-glass: rgba(255, 255, 255, 0.045);
  --nx-radius: 24px;
  --nx-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nx-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --nx-glow: 0 0 40px rgba(0, 200, 83, 0.25);
  --nx-wrap: min(1280px, 92vw);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--nx-bg);
  color: var(--nx-fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.nx-wrap { width: var(--nx-wrap); margin-inline: auto; }
.nx-eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--nx-primary);
  margin: 0;
}
.nx-muted { color: var(--nx-muted); }
.nx-gradient {
  background: linear-gradient(100deg, #ffffff 10%, var(--nx-primary) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nx-glass {
  background: var(--nx-glass);
  border: 1px solid var(--nx-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* ---------- Botões ---------- */
.nx-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 15px 28px;
  font-size: 15px;
  font-weight: 500;
  background: var(--nx-primary);
  color: var(--nx-primary-ink);
  box-shadow: var(--nx-glow);
  transition: transform 0.5s var(--nx-ease), filter 0.5s var(--nx-ease);
}
.nx-btn:hover { transform: scale(1.035); filter: brightness(1.05); }
.nx-btn--ghost {
  background: transparent;
  color: var(--nx-fg);
  border: 1px solid var(--nx-border);
  box-shadow: none;
}
.nx-btn--ghost:hover { border-color: rgba(0, 200, 83, 0.5); }

/* ---------- Header ---------- */
.nx-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  padding: 24px 0;
  transition: padding 0.5s var(--nx-ease);
}
.nx-header.is-scrolled { padding: 12px 0; }
.nx-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.5s var(--nx-ease);
}
.nx-header.is-scrolled .nx-header__inner {
  background: var(--nx-glass);
  border-color: var(--nx-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--nx-shadow);
}
.nx-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nx-brand__dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--nx-primary);
  box-shadow: 0 0 16px var(--nx-primary);
  flex: none;
}
.nx-brand__name {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nx-nav { display: flex; align-items: center; gap: 4px; }
.nx-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nx-nav a {
  display: block; padding: 9px 16px; border-radius: 999px;
  font-size: 14px; color: var(--nx-muted);
  transition: color 0.35s var(--nx-ease);
}
.nx-nav a:hover, .nx-nav .current-menu-item > a { color: var(--nx-fg); }
.nx-nav__cta {
  background: var(--nx-primary); color: var(--nx-primary-ink) !important;
  font-weight: 500;
  transition: transform 0.4s var(--nx-ease);
}
.nx-nav__cta:hover { transform: scale(1.04); }
@media (max-width: 720px) {
  .nx-nav ul { display: none; }
}

/* ---------- Hero ---------- */
.nx-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.nx-hero__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  animation: nx-kenburns 24s var(--nx-ease) infinite alternate;
}
.nx-hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,5,5,0.55) 0%, rgba(5,5,5,0.25) 40%, var(--nx-bg) 100%);
}
.nx-hero__content { position: relative; padding-bottom: 96px; }
.nx-hero h1 {
  margin-top: 24px;
  max-width: 18ch;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 0.92;
}
.nx-hero p { max-width: 46ch; margin-top: 26px; color: var(--nx-muted); font-size: clamp(1rem, 1.4vw, 1.125rem); }
.nx-hero__tag {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--nx-primary);
}

@keyframes nx-kenburns {
  from { transform: scale(1) translate3d(0,0,0); }
  to { transform: scale(1.12) translate3d(-1.5%, -1.5%, 0); }
}

/* ---------- Reveal ---------- */
.nx-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--nx-ease), transform 0.9s var(--nx-ease);
}
.nx-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .nx-reveal { opacity: 1; transform: none; transition: none; }
  .nx-hero__media { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Seções ---------- */
.nx-section { padding: 96px 0; }
.nx-section h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-top: 16px; }
.nx-section__lead { max-width: 52ch; margin-top: 16px; color: var(--nx-muted); }

/* ---------- Grid de segmentos ---------- */
.nx-segments {
  display: grid; gap: 18px; margin-top: 48px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.nx-segment {
  position: relative; overflow: hidden;
  border-radius: var(--nx-radius);
  border: 1px solid var(--nx-border);
  min-height: 320px;
  display: flex; align-items: flex-end;
  transition: transform 0.6s var(--nx-ease), border-color 0.6s var(--nx-ease);
}
.nx-segment:hover { transform: translateY(-6px); border-color: rgba(0,200,83,0.45); }
.nx-segment img, .nx-segment video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--nx-ease), opacity 0.6s var(--nx-ease);
}
.nx-segment video { opacity: 0; }
.nx-segment:hover video { opacity: 1; }
.nx-segment:hover img { transform: scale(1.06); }
.nx-segment__body {
  position: relative; padding: 28px;
  background: linear-gradient(180deg, transparent, rgba(5,5,5,0.85));
  width: 100%;
}
.nx-segment__body h3 { font-size: 1.4rem; }

/* ---------- Contadores ---------- */
.nx-counters {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.nx-counter { border-radius: var(--nx-radius); padding: 28px; }
.nx-counter__value {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.nx-counter__value span { color: var(--nx-primary); }
.nx-counter p { margin: 12px 0 0; font-size: 14px; color: var(--nx-muted); }

/* ---------- Biblioteca ---------- */
.nx-library { padding: 128px 0 96px; }
.nx-breadcrumbs {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--nx-muted);
}
.nx-breadcrumbs a:hover { color: var(--nx-primary); }

.nx-filters { border-radius: 28px; padding: 22px; margin-top: 56px; }
.nx-filters__top { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; }
.nx-search { position: relative; display: flex; align-items: center; min-width: 0; }
.nx-search svg { position: absolute; left: 16px; width: 16px; height: 16px; color: var(--nx-muted); transition: color 0.5s var(--nx-ease); }
.nx-search:focus-within svg { color: var(--nx-primary); }
.nx-search input {
  width: 100%; height: 48px;
  border-radius: 999px; padding: 0 18px 0 44px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--nx-border);
  color: var(--nx-fg); font-size: 14px; outline: none;
  transition: border-color 0.5s var(--nx-ease), box-shadow 0.5s var(--nx-ease), background 0.5s var(--nx-ease);
}
.nx-search input::placeholder { color: var(--nx-muted); }
.nx-search input:focus {
  border-color: rgba(0,200,83,0.6);
  background: rgba(255,255,255,0.06);
  box-shadow: var(--nx-glow);
}
.nx-view { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--nx-border); border-radius: 999px; }
.nx-view button {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--nx-muted); cursor: pointer;
  transition: all 0.45s var(--nx-ease);
}
.nx-view button.is-active { background: var(--nx-primary); color: var(--nx-primary-ink); }

.nx-chips { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; }
.nx-chips__label { width: 88px; flex: none; margin-top: 10px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--nx-muted); }
.nx-chips__list { display: flex; flex-wrap: wrap; gap: 8px; }
.nx-chip {
  border-radius: 999px; padding: 8px 16px; font-size: 14px; white-space: nowrap;
  border: 1px solid var(--nx-border); color: var(--nx-muted);
  transition: all 0.5s var(--nx-ease);
}
.nx-chip:hover { color: var(--nx-fg); border-color: rgba(0,200,83,0.4); }
.nx-chip.is-active {
  background: var(--nx-primary); color: var(--nx-primary-ink);
  border-color: var(--nx-primary); box-shadow: var(--nx-glow);
}
@media (max-width: 720px) {
  .nx-chips { flex-direction: column; gap: 8px; }
  .nx-chips__label { width: auto; margin-top: 0; }
}

.nx-results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; font-size: 14px; color: var(--nx-muted); }

.nx-grid { display: grid; gap: 20px; margin-top: 24px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.nx-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }

/* ---------- Cards ---------- */
.nx-card {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--nx-radius);
  border: 1px solid var(--nx-border);
  background: var(--nx-surface);
  opacity: 0; transform: translateY(20px);
  animation: nx-fade-in 0.7s var(--nx-ease) both;
  transition: transform 0.6s var(--nx-ease), border-color 0.6s var(--nx-ease), box-shadow 0.6s var(--nx-ease);
}
.nx-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(0,200,83,0.45);
  box-shadow: var(--nx-shadow);
}
@keyframes nx-fade-in { to { opacity: 1; transform: none; } }

.nx-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0a0a0a; }
.nx-card__media img, .nx-card__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.6s var(--nx-ease), transform 1.2s var(--nx-ease);
}
.nx-card__media video { opacity: 0; }
.nx-card.is-playing .nx-card__media video { opacity: 1; }
.nx-card:hover .nx-card__media img { transform: scale(1.05); }

.nx-card__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(5,5,5,0) 30%, rgba(5,5,5,0.92));
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.5s var(--nx-ease), transform 0.5s var(--nx-ease);
}
.nx-card:hover .nx-card__overlay, .nx-card:focus-within .nx-card__overlay { opacity: 1; transform: none; }
.nx-card__overlay p { margin: 0; font-size: 13px; color: #d6d9d6; }
.nx-card__overlay .nx-btn { padding: 10px 18px; font-size: 13px; align-self: flex-start; }

.nx-card__body { padding: 20px 22px 24px; }
.nx-card__client { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--nx-primary); }
.nx-card__body h3 { margin-top: 8px; font-size: 1.25rem; }
.nx-card__body p { margin: 10px 0 0; font-size: 14px; color: var(--nx-muted); }
.nx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.nx-tag {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--nx-border); color: var(--nx-muted);
}

.nx-row {
  display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 20px;
  border: 1px solid var(--nx-border); border-radius: var(--nx-radius);
  overflow: hidden; background: var(--nx-surface);
  animation: nx-fade-in 0.7s var(--nx-ease) both;
  transition: border-color 0.5s var(--nx-ease), transform 0.5s var(--nx-ease);
}
.nx-row:hover { border-color: rgba(0,200,83,0.45); transform: translateX(4px); }
.nx-row__media { position: relative; min-height: 160px; }
.nx-row__media img, .nx-row__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nx-row__body { padding: 22px 24px 22px 0; }
@media (max-width: 720px) {
  .nx-row { grid-template-columns: 1fr; }
  .nx-row__media { aspect-ratio: 16/9; }
  .nx-row__body { padding: 0 20px 22px; }
}

.nx-empty { margin-top: 64px; padding: 56px 24px; text-align: center; border: 1px solid var(--nx-border); border-radius: var(--nx-radius); }

/* ---------- Carrossel ---------- */
.nx-rail {
  display: flex; gap: 16px; margin-top: 24px;
  overflow-x: auto; padding-bottom: 16px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.nx-rail::-webkit-scrollbar { display: none; }
.nx-rail > * { flex: none; width: min(80vw, 420px); scroll-snap-align: start; }

/* ---------- Case single ---------- */
.nx-case-hero { position: relative; min-height: 78svh; display: flex; align-items: flex-end; overflow: hidden; }
.nx-case-hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nx-case-hero__content { position: relative; padding: 0 0 72px; }
.nx-case-hero h1 { font-size: clamp(2.2rem, 6vw, 4.6rem); max-width: 20ch; margin-top: 18px; }

.nx-case-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 48px; }
.nx-block { border-radius: var(--nx-radius); padding: 28px; border: 1px solid var(--nx-border); }
.nx-block h3 { font-size: 1.05rem; letter-spacing: 0.02em; }
.nx-block p { margin: 12px 0 0; color: var(--nx-muted); font-size: 15px; }

.nx-metrics { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 32px; }
.nx-metric { border-radius: 20px; padding: 24px; text-align: left; }
.nx-metric strong { display: block; font-size: 2.1rem; letter-spacing: -0.03em; color: var(--nx-primary); }
.nx-metric span { font-size: 13px; color: var(--nx-muted); }

.nx-player { border-radius: var(--nx-radius); overflow: hidden; border: 1px solid var(--nx-border); margin-top: 32px; }
.nx-player video, .nx-player iframe { width: 100%; aspect-ratio: 16/9; display: block; border: 0; }

/* ---------- WhatsApp depoimentos ---------- */
.nx-chat { max-width: 520px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 12px; }
.nx-bubble {
  max-width: 82%; padding: 12px 16px; border-radius: 18px;
  font-size: 14.5px; line-height: 1.5;
  background: #141615; border: 1px solid var(--nx-border);
  border-bottom-left-radius: 6px; align-self: flex-start;
}
.nx-bubble--me {
  align-self: flex-end; background: rgba(0, 200, 83, 0.16);
  border-color: rgba(0, 200, 83, 0.32);
  border-bottom-left-radius: 18px; border-bottom-right-radius: 6px;
}
.nx-bubble small { display: block; margin-top: 6px; font-size: 11px; color: var(--nx-muted); }

/* ---------- Antes / depois ---------- */
.nx-ba { position: relative; overflow: hidden; border-radius: var(--nx-radius); border: 1px solid var(--nx-border); user-select: none; touch-action: none; }
.nx-ba img { width: 100%; display: block; }
.nx-ba__after { position: absolute; inset: 0; width: 50%; overflow: hidden; }
.nx-ba__after img { width: 100vw; max-width: none; height: 100%; object-fit: cover; }
.nx-ba__handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: var(--nx-primary); box-shadow: var(--nx-glow); cursor: ew-resize;
}
.nx-ba__handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 42px; height: 42px; transform: translate(-50%, -50%);
  border-radius: 999px; background: var(--nx-primary); box-shadow: var(--nx-glow);
}

/* ---------- FAB + rodapé ---------- */
.nx-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  width: 58px; height: 58px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--nx-primary); color: var(--nx-primary-ink);
  box-shadow: var(--nx-glow);
  transition: transform 0.5s var(--nx-ease);
}
.nx-fab:hover { transform: scale(1.08); }

.nx-footer { border-top: 1px solid var(--nx-border); padding: 48px 0; font-size: 14px; color: var(--nx-muted); }
.nx-footer__inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.nx-footer a:hover { color: var(--nx-fg); }

/* ---------- Paginação / conteúdo ---------- */
.nx-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; }
.nx-pagination .page-numbers {
  padding: 9px 15px; border-radius: 999px; border: 1px solid var(--nx-border); color: var(--nx-muted);
}
.nx-pagination .page-numbers.current { background: var(--nx-primary); color: var(--nx-primary-ink); border-color: var(--nx-primary); }

.nx-entry { padding: 128px 0 96px; }
.nx-entry__content { max-width: 72ch; margin-top: 28px; color: #dfe2df; }
.nx-entry__content a { color: var(--nx-primary); }
.nx-entry__content img { border-radius: var(--nx-radius); margin: 24px 0; }