/* ==========================================================================
   TRX Nexus Studio Tech — Design system
   Identidade preservada: off-white / grafite / roxo (já usada nos materiais
   institucionais da marca: carrosséis, proposta comercial).
   Tipografia: Plus Jakarta Sans (títulos) + Inter (corpo)
   ========================================================================== */

:root{
  --bg:         #FAF6F3;
  --bg-dim:     #F0EAE2;
  --ink:        #27252A;
  --ink-soft:   #423F45;
  --accent:     #5424E8;
  --accent-tint:#8B6FF0;
  --accent-dark:#3D1AB0;
  --muted:      #6B6870;
  --muted-on-dark: #C6BFE0;
  --line:       rgba(39,37,42,0.14);
  --line-on-dark: rgba(250,246,243,0.18);
  --white:      #FFFFFF;
  --forest-dark:#1B1730; /* fundo escuro com leve tom roxo, não neutro puro */

  --ff-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --ff-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --container: 1200px;
}

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

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4{
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1{ font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
h2{ font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3{ font-size: 1.25rem; }
h4{ font-size: 1.02rem; }

p{ margin: 0 0 1em; max-width: 62ch; }
p.lede{ font-size: 1.14rem; color: var(--muted); max-width: 54ch; }

a{ color: inherit; }
img{ max-width: 100%; display: block; }

.on-dark{ color: var(--bg); }
.on-dark .muted, .on-dark p{ color: var(--muted-on-dark); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4{ color: var(--bg); }
.on-dark .brand__name, .brand__name.on-dark{ color: var(--bg); }

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

.container{ max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 900px){ .container{ padding: 0 2.5rem; } }

.section{ padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section--dark{ background: var(--forest-dark); }
.section--accent{ background: var(--accent); }
.section--dim{ background: var(--bg-dim); }

.eyebrow{
  font-family: var(--ff-display); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.01em; color: var(--accent-dark); margin-bottom: 0.9rem;
}
.on-dark .eyebrow{ color: var(--accent-tint); }

.skip-link{
  position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--bg);
  padding: 0.8rem 1.2rem; z-index: 1000; font-weight: 600;
}
.skip-link:focus{ left: 0; }
:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header{
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,246,243,0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar{ display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand{ display: flex; flex-direction: column; text-decoration: none; line-height: 1.05; }
.brand__name{ font-family: var(--ff-display); font-weight: 800; font-size: 1.1rem; color: var(--ink); letter-spacing: 0.01em; }
.brand__name span{ color: var(--accent); }
.brand__tag{ font-size: 0.62rem; letter-spacing: 0.1em; color: var(--muted); margin-top: 0.2rem; font-weight: 600; }

.nav-desktop{ display: none; }
@media (min-width: 960px){
  .nav-desktop{ display: flex; align-items: center; gap: 2rem; }
  .nav-desktop a{ text-decoration: none; font-size: 0.94rem; color: var(--ink-soft); position: relative; padding: 0.3rem 0; transition: color 0.2s ease; }
  .nav-desktop a:hover{ color: var(--accent); }
  .nav-desktop a[aria-current="page"]{ color: var(--accent); font-weight: 600; }
  .nav-desktop a[aria-current="page"]::after{ content:""; position:absolute; left:0; right:0; bottom:-4px; height:2px; background: var(--accent); }
}

.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--ff-display); font-weight: 600; font-size: 0.92rem;
  padding: 0.85rem 1.5rem; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  min-height: 44px;
}
.btn:active{ transform: translateY(1px); }
.btn--primary{ background: var(--accent); color: var(--bg); }
.btn--primary:hover{ background: var(--accent-dark); }
.btn--outline{ background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover{ border-color: var(--accent); color: var(--accent); }
.btn--on-dark{ background: var(--accent-tint); color: var(--forest-dark); }
.btn--on-dark:hover{ background: var(--bg); color: var(--forest-dark); }
.btn--ghost-on-dark{ background: transparent; color: var(--bg); border-color: var(--line-on-dark); }
.btn--ghost-on-dark:hover{ border-color: var(--accent-tint); color: var(--accent-tint); }

.header-cta{ display: none; }
@media (min-width: 960px){ .header-cta{ display: inline-flex; } }

.menu-toggle{
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: transparent; border: 1px solid var(--line); cursor: pointer;
}
@media (min-width: 960px){ .menu-toggle{ display: none; } }
.menu-toggle svg{ width: 20px; height: 20px; }

.mobile-nav{
  position: fixed; inset: 0; background: var(--forest-dark);
  transform: translateX(100%); transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  z-index: 200; display: flex; flex-direction: column; padding: 1.5rem; overflow-y: auto;
}
.mobile-nav.is-open{ transform: translateX(0); }
.mobile-nav__top{ display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; }
.mobile-nav__close{ width: 44px; height: 44px; display:flex; align-items:center; justify-content:center; background: transparent; border: 1px solid var(--line-on-dark); color: var(--bg); cursor: pointer; }
.mobile-nav a{ display: block; text-decoration: none; color: var(--bg); font-family: var(--ff-display); font-size: 1.55rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line-on-dark); }
.mobile-nav__cta{ margin-top: 2rem; }
body.menu-open{ overflow: hidden; }

/* ---------- Hero ---------- */
.hero{ padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem); position: relative; overflow: hidden; }
.hero__grid{ display: grid; gap: 2.5rem; }
@media (min-width: 900px){ .hero__grid{ grid-template-columns: 1.3fr 0.8fr; gap: 4rem; align-items: end; } }
.hero__kicker{ font-family: var(--ff-display); font-size: 0.85rem; letter-spacing: 0.01em; color: var(--accent-dark); font-weight: 600; margin-bottom: 1.2rem; }
.hero__title{ max-width: 16ch; }
.hero__lede{ font-size: 1.15rem; color: var(--muted); max-width: 48ch; margin-top: 1.2rem; }
.hero__actions{ display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero__stats{ display:flex; flex-direction:column; gap: 1.4rem; border-left: 1px solid var(--line); padding-left: 2rem; }
.hero__stat-num{ font-family: var(--ff-display); font-weight: 800; font-size: 2rem; color: var(--accent); line-height: 1; }
.hero__stat-label{ font-size: 0.85rem; color: var(--muted); margin-top: 0.3rem; }
.hero__node{ position:absolute; opacity: 0.9; right: 2vw; bottom: 0.5rem; display: none; }
@media (min-width: 1100px){ .hero__node{ display: block; } }

/* ---------- Connection motif (marca) ---------- */
.mark{ width: 30px; height: 30px; }

/* ---------- Cards / grid ---------- */
.grid{ display: grid; gap: 1.6rem; }
@media (min-width: 700px){ .grid--2{ grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 800px){ .grid--3{ grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px){ .grid--4{ grid-template-columns: repeat(4, 1fr); } }

.card{ padding: 1.9rem; background: var(--bg); border: 1px solid var(--line); transition: border-color 0.2s ease, transform 0.2s ease; }
.card:hover{ border-color: var(--accent); transform: translateY(-2px); }
.card--dark{ background: transparent; border-color: var(--line-on-dark); }
.card--dark:hover{ border-color: var(--accent-tint); }
.card__title{ margin-bottom: 0.5rem; }
.card__link{ display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1rem; text-decoration: none; font-weight: 600; font-size: 0.92rem; color: var(--accent); border-bottom: 1px solid transparent; }
.on-dark .card__link{ color: var(--accent-tint); }
.card__link:hover{ border-bottom-color: currentColor; }

/* Service rows (servicos.html) */
.service-row{ display: grid; gap: 1.2rem; padding: 2.1rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 800px){ .service-row{ grid-template-columns: 0.9fr 1.6fr; gap: 3rem; } }
.service-row:first-of-type{ padding-top: 0; }
.service-row__list{ list-style: none; margin: 1rem 0 0; padding: 0; columns: 1; }
@media (min-width: 600px){ .service-row__list{ columns: 2; column-gap: 1.5rem; } }
.service-row__list li{ font-size: 0.96rem; color: var(--ink-soft); padding: 0.4rem 0 0.4rem 1.1rem; position: relative; break-inside: avoid; }
.service-row__list li::before{ content: ""; position: absolute; left: 0; top: 0.85rem; width: 6px; height: 1px; background: var(--accent); }

/* ---------- Process steps (sequência real) ---------- */
.steps{ display: grid; gap: 0; margin-top: 2.5rem; }
@media (min-width: 800px){ .steps{ grid-template-columns: repeat(3, 1fr); gap: 1.75rem 1.5rem; } }
.step{ padding: 1.6rem 0; border-top: 1px solid var(--line-on-dark); }
@media (min-width: 800px){ .step{ padding: 0 1.6rem 0 0; border-top: none; border-left: 1px solid var(--line-on-dark); padding-left: 1.6rem; } }
.step:nth-child(-n+1){ border-top: none; }
@media (min-width: 800px){ .step:nth-child(3n+1){ border-left: none; padding-left: 0; } }
.step__num{ font-family: var(--ff-display); color: var(--accent-tint); font-size: 1.3rem; font-weight: 700; }

/* ---------- Team profile ---------- */
.profile{ display: grid; gap: 2rem; padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.profile:last-child{ border-bottom: none; }
@media (min-width: 820px){ .profile{ grid-template-columns: 280px 1fr; gap: 3.5rem; } }
.profile__photo{
  aspect-ratio: 4/5; background: linear-gradient(160deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center; color: var(--bg);
  font-family: var(--ff-display); font-size: 3rem; font-weight: 700; border: 1px solid var(--line);
}
.profile__name{ margin-bottom: 0.15rem; }
.profile__role{ color: var(--accent-dark); font-weight: 600; font-size: 0.95rem; margin-bottom: 1.2rem; }
.profile__section{ margin-top: 1.3rem; }
.profile__section h4{ font-size: 0.85rem; letter-spacing: 0.01em; color: var(--muted); margin-bottom: 0.6rem; font-family: var(--ff-body); font-weight: 600; }
.profile__tags{ display: flex; flex-wrap: wrap; gap: 0.6rem; }
.profile__tag{ font-size: 0.85rem; border: 1px solid var(--line); padding: 0.4rem 0.8rem; }

.team-building{
  border: 1px dashed var(--line); padding: 2rem; margin-top: 1rem;
}
.team-building__grid{ display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 700px){ .team-building__grid{ grid-template-columns: repeat(2, 1fr); } }
.team-building__person{ display: flex; gap: 1rem; align-items: flex-start; }
.team-building__avatar{
  width: 52px; height: 52px; flex: 0 0 auto; background: var(--bg-dim); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-family: var(--ff-display); font-weight: 700; color: var(--accent);
}
.team-building__person h4{ margin-bottom: 0.2rem; }
.team-building__person p{ font-size: 0.9rem; margin: 0; }

/* ---------- Projects ---------- */
.project-card{ border: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.project-card__frame{ border-bottom: 1px solid var(--line); background: #fff; }
.project-card__bar{ height: 24px; background: var(--bg-dim); }
.project-card__bar span{ display:inline-block; width:6px; height:6px; margin: 9px 0 0 10px; border-radius:50%; background:#C9C3BC; }
.project-card img{ width: 100%; height: auto; display: block; }
.project-card__body{ padding: 1.6rem; }
.project-card__tag{ font-size: 0.78rem; color: var(--accent-dark); font-weight: 600; margin-bottom: 0.5rem; }
.project-card--placeholder{ display:flex; flex-direction:column; align-items:flex-start; justify-content:center; min-height: 320px; padding: 2rem; border-style: dashed; }

/* ---------- Content / articles ---------- */
.article-card{ border: 1px solid var(--line); padding: 1.7rem; display: flex; flex-direction: column; height: 100%; }
.article-card__tag{ font-size: 0.78rem; color: var(--accent-dark); font-weight: 600; margin-bottom: 0.7rem; }
.article-card p{ font-size: 0.95rem; }
.placeholder-note{ font-size: 0.82rem; color: var(--muted); border-top: 1px dashed var(--line); margin-top: auto; padding-top: 0.8rem; font-style: italic; }

/* ---------- CTA band ---------- */
.cta-band__inner{ display: flex; flex-direction: column; gap: 1.6rem; align-items: flex-start; }
@media (min-width: 760px){ .cta-band__inner{ flex-direction: row; align-items: center; justify-content: space-between; } }

/* ---------- Form ---------- */
.form{ display: grid; gap: 1.3rem; max-width: 640px; }
.form-row{ display: grid; gap: 1.3rem; }
@media (min-width: 620px){ .form-row--2{ grid-template-columns: 1fr 1fr; } }
.field label{ display: block; font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.45rem; }
.field input, .field textarea, .field select{
  width: 100%; padding: 0.85rem 1rem; font-family: var(--ff-body); font-size: 0.98rem;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus{ border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(84,36,232,0.12); }
.field small{ display:block; margin-top:0.35rem; color: var(--muted); font-size: 0.8rem; }
.field--honey{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.form__status{ font-size: 0.92rem; padding: 0.9rem 1rem; border: 1px solid var(--line); display:none; }
.form__status.is-visible{ display:block; }
.form__status.is-success{ border-color: var(--accent); color: var(--accent-dark); }
.form__status.is-error{ border-color: #8a3b2c; color: #8a3b2c; }
.consent{ display:flex; gap:0.6rem; align-items:flex-start; font-size:0.85rem; color: var(--muted); }
.consent input{ margin-top: 0.25rem; }

/* ---------- Footer ---------- */
.site-footer{ background: var(--forest-dark); color: var(--bg); padding: 4rem 0 2rem; }
.footer-grid{ display: grid; gap: 2.5rem; }
@media (min-width: 800px){ .footer-grid{ grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-grid h4{ color: var(--bg); font-family: var(--ff-body); font-size: 0.85rem; letter-spacing: 0.01em; margin-bottom: 1rem; }
.footer-grid ul{ list-style: none; margin: 0; padding: 0; }
.footer-grid li{ margin-bottom: 0.6rem; }
.footer-grid a{ text-decoration: none; color: var(--muted-on-dark); font-size: 0.93rem; }
.footer-grid a:hover{ color: var(--accent-tint); }
.footer-brand__name{ font-family: var(--ff-display); font-weight: 800; font-size: 1.25rem; color: var(--bg); }
.footer-brand__name span{ color: var(--accent-tint); }
.footer-brand p{ color: var(--muted-on-dark); font-size: 0.92rem; margin-top: 0.8rem; max-width: 40ch; }
.footer-bottom{ margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line-on-dark); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; color: var(--muted-on-dark); font-size: 0.82rem; }
.footer-bottom a{ color: var(--muted-on-dark); text-decoration: none; }
.footer-bottom a:hover{ color: var(--accent-tint); }
.footer-legal-links{ display: flex; gap: 1.2rem; flex-wrap: wrap; }

.divider{ height:1px; background: var(--line); border:0; margin: 2.5rem 0; }
.on-dark .divider{ background: var(--line-on-dark); }

.reveal{ opacity:0; transform: translateY(10px); animation: reveal 0.7s ease forwards; }
@keyframes reveal{ to{ opacity:1; transform:none; } }
