/* ==========================================================================
   Julio Ferreira — portfólio dev web
   Sistema visual herdado do print-queue: Satoshi + JetBrains Mono, preto puro.
   Paleta: preto e branco, azul como único acento.
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #000000;
  --surface: #0d0d0f;
  --surface-2: #131315;
  --border: rgba(255, 255, 255, 0.14);
  --border-soft: rgba(255, 255, 255, 0.08);

  --text: #f5f5f5;
  --muted: #9a9a9a;
  --dim: #6b6b6b;

  --accent: #5c8cff;
  --accent-dim: rgba(92, 140, 255, 0.15);

  --font-sans: 'Satoshi', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --wrap: 1160px;
  --pad: 24px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(92, 140, 255, 0.10), transparent 62%),
    radial-gradient(900px 520px at 100% 8%, rgba(255, 255, 255, 0.05), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.mono { font-family: var(--font-mono); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: #000;
  padding: 10px 18px;
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- rótulo monoespaçado reutilizável --- */
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

/* ==========================================================================
   NAV
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav.scrolled {
  border-bottom-color: var(--border-soft);
  background: rgba(0, 0, 0, 0.88);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  height: 26px;
  width: auto;
  filter: invert(1);
  flex: none;
}

.brand-text {
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.nav-cta {
  margin-left: 8px;
  border: 1px solid var(--border);
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.25px) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero { padding: clamp(72px, 12vw, 148px) 0 0; }

.hero-title {
  font-size: clamp(2.5rem, 7.4vw, 5.5rem);
  margin: 0 0 26px;
  max-width: 15ch;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}

.hero-sub {
  font-size: clamp(1.02rem, 1.55vw, 1.22rem);
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 38px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: clamp(72px, 11vw, 128px);
}

/* faixa rolante de clientes */
.hero-strip {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.strip-track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: slide 42s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  text-transform: uppercase;
  white-space: nowrap;
}
.strip-track i { color: var(--accent); font-style: normal; }

@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==========================================================================
   BOTÕES
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease,
              border-color 0.18s ease, color 0.18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-solid {
  background: var(--text);
  color: #000;
}
.btn-solid:hover { background: #fff; }

.btn-outline {
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-whatsapp:hover { background: #25D366; color: #04150a; }

/* ==========================================================================
   SEÇÕES
   ========================================================================== */

.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-line { border-top: 1px solid var(--border-soft); }

.section-head { margin-bottom: clamp(40px, 5vw, 62px); max-width: 62ch; }

.section-title {
  font-size: clamp(1.85rem, 4.2vw, 3.1rem);
  margin: 0 0 16px;
}

.section-lede {
  color: var(--muted);
  font-size: 1.03rem;
  margin: 0;
  max-width: 58ch;
}

/* ==========================================================================
   CARDS — serviços
   ========================================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  position: relative;
  padding: 32px 28px 30px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover { border-color: var(--border); transform: translateY(-3px); }
.card:hover::before { opacity: 0.7; }

.card-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  letter-spacing: 0.12em;
}

.card h3 {
  font-size: 1.28rem;
  margin: 14px 0 12px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

/* ==========================================================================
   PROJETOS
   ========================================================================== */

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.project {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.project:hover { border-color: var(--border); transform: translateY(-4px); }

.p-shot {
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
  aspect-ratio: 16 / 10;
}

.p-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(1) contrast(1.02);
  transition: filter 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.project:hover .p-shot img {
  filter: grayscale(0);
  transform: scale(1.035);
}

/* último projeto ocupa a linha inteira, pra não ficar órfão na grade */
.project-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
}
.project-wide .p-shot {
  flex: 1 1 58%;
  border-bottom: none;
  border-right: 1px solid var(--border-soft);
  aspect-ratio: auto;
}
.project-wide .p-body {
  flex: 1 1 42%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 34px 36px;
}

.p-body { padding: 24px 26px 28px; flex: 1; }

.p-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.p-body h3 { font-size: 1.32rem; }
.p-body h3 a { text-decoration: none; transition: color 0.18s ease; }
.p-body h3 a:hover { color: var(--accent); }

.ext {
  font-size: 0.78em;
  color: var(--dim);
  transition: color 0.18s ease;
}
.p-body h3 a:hover .ext { color: var(--accent); }

.p-index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--dim);
  flex: none;
}

.p-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 12px 0 12px;
}

.p-desc {
  color: var(--muted);
  font-size: 0.96rem;
  margin: 0;
}

.p-role {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text);
}

/* ==========================================================================
   PROCESSO
   ========================================================================== */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
  letter-spacing: 0.12em;
}

.step h3 { font-size: 1.12rem; margin: 0 0 8px; }
.step p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ==========================================================================
   SOBRE
   ========================================================================== */

.about {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(32px, 6vw, 76px);
  align-items: start;
}

.about-mark img {
  width: 100%;
  filter: invert(1);
  opacity: 0.9;
}

.about-text p {
  color: var(--muted);
  font-size: 1.03rem;
  margin: 0 0 16px;
  max-width: 58ch;
}
.about-text strong { color: var(--text); font-weight: 700; }

.about-links { margin-top: 26px !important; }
.about-links a {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease;
}
.about-links a:hover { border-bottom-color: var(--accent); }

/* ==========================================================================
   CONTATO
   ========================================================================== */

.contato {
  border-top: 1px solid var(--border-soft);
  text-align: center;
  padding-bottom: clamp(84px, 11vw, 130px);
}

.contato .mono-label { margin-bottom: 22px; }

.contato-title {
  font-size: clamp(2.2rem, 6.4vw, 4.6rem);
  margin: 0 0 22px;
}

.contato-sub {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 38px;
  font-size: 1.05rem;
}

.contato-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.contato-mail {
  margin: 30px 0 0;
  font-size: 0.86rem;
  color: var(--dim);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border-soft);
  padding: 30px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.92rem;
}

.footer-mark {
  height: 22px;
  width: auto;
  filter: invert(1);
  opacity: 0.75;
}

.footer p {
  margin: 0;
  color: var(--dim);
  font-size: 0.8rem;
}

/* ==========================================================================
   REVEAL ON SCROLL
   ========================================================================== */

/* Só esconde se houver JS ativo para revelar depois (ver <script> no <head>). */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s cubic-bezier(0.2, 0.7, 0.3, 1),
              transform 0.65s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.js .reveal.visible { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */

@media (max-width: 940px) {
  .cards { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }

  .project-wide { flex-direction: column; }
  .project-wide .p-shot {
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    aspect-ratio: 16 / 10;
  }
  .project-wide .p-body { padding: 24px 26px 28px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .about-mark { width: 130px; }
}

@media (max-width: 720px) {
  :root { --pad: 20px; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 22px;
    background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid var(--border-soft);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  .nav-links.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { padding: 13px 12px; font-size: 1rem; }
  .nav-cta { margin: 8px 0 0; text-align: center; }

  .hero-title { max-width: 100%; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .steps { grid-template-columns: 1fr; }
  .contato-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ==========================================================================
   MOVIMENTO REDUZIDO
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .strip-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
