/* ══════════════════════════════════════════════
   42.dev
   Regra tipográfica do site:
   --font-sys   (IBM Plex Mono)  = voz do sistema
                nav, labels, serviços, dados, código
   --font-human (Tenor Sans)     = voz humana
                manifesto, citações, números grandes
   ══════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* marca */
  --orange: #ec7a37;
  --orange-2: #dd8800;
  --orange-3: #ffb949;
  --red: #d14700;
  --white: #ffffff;

  /* camadas */
  --bg: #0e0e0e;
  --bg-2: #121212;
  --bg-3: #171717;
  --bg-4: #0b0b0b;

  /* linhas */
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);
  --line-hot: rgba(236, 122, 55, 0.34);

  /* texto */
  --t1: #ffffff;
  --t2: rgba(255, 255, 255, 0.62);
  --t3: rgba(255, 255, 255, 0.42);

  /* tipografia */
  --font-sys: 'IBM Plex Mono', ui-monospace, monospace;
  --font-human: 'Tenor Sans', Georgia, serif;
  /* aliases antigos, mantidos por compatibilidade */
  --font-title: var(--font-sys);
  --font-mono: var(--font-human);

  --fs-display: clamp(38px, 6.2vw, 76px);
  --fs-h2: clamp(30px, 4.2vw, 52px);
  --fs-h3: 19px;
  --fs-lead: clamp(15px, 1.35vw, 18px);
  --fs-body: 15px;
  --fs-label: 11px;

  /* layout */
  --max-w: 1180px;
  --px: 24px;
  --nav-h: 64px;
  --sec-pad: clamp(84px, 9.5vw, 138px);
  --r: 14px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--font-sys);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: rgba(236, 122, 55, 0.28);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ══════════════ CONTAINER ══════════════ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
  width: 100%;
}

section {
  padding: var(--sec-pad) 0;
  position: relative;
}

#projetos,
#sobre {
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* ══════════════ BOTÕES ══════════════ */
.btn-primary,
.btn-ghost {
  font-family: var(--font-sys);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.18s, box-shadow 0.22s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--orange);
  color: #120a04;
  box-shadow: 0 6px 24px rgba(236, 122, 55, 0.18);
}

.btn-primary:hover {
  background: var(--orange-3);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(236, 122, 55, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--t1);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--line-hot);
  background: rgba(236, 122, 55, 0.06);
  transform: translateY(-1px);
}

/* ══════════════ NAV ══════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(14, 14, 14, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.3s, border-color 0.3s;
}

nav.scrolled {
  background: rgba(11, 11, 11, 0.92);
  border-bottom-color: var(--line);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-family: var(--font-sys);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--t1);
  text-decoration: none;
}

.nav-logo span {
  color: var(--orange);
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--t2);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  transition: color 0.22s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}

.nav-links a:hover {
  color: var(--t1);
}

.nav-links a.active {
  color: var(--orange);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-cta {
  margin-left: 8px;
  padding: 11px 20px;
  font-size: 11px;
}

.nav-progress {
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--orange-3));
  transition: width 0.1s linear;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-hamburger span {
  width: 22px;
  height: 1.5px;
  background: var(--t1);
  border-radius: 2px;
  transition: transform 0.28s, opacity 0.2s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 0 var(--px);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  border-top: 1px solid transparent;
}

.nav-mobile.open {
  max-height: 420px;
  padding: 10px var(--px) 22px;
  border-top-color: var(--line-soft);
}

.nav-mobile a {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t2);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.nav-mobile a:hover {
  color: var(--orange);
}

.nav-mobile-cta {
  margin-top: 18px;
}

.nav-mobile-cta .btn-primary {
  width: 100%;
}

/* ══════════════ HERO ══════════════ */
.hero {
  position: relative;
  padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 5vw, 64px);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(880px 520px at 76% 16%, rgba(236, 122, 55, 0.11), transparent 62%),
    radial-gradient(600px 400px at 8% 88%, rgba(209, 71, 0, 0.07), transparent 65%),
    linear-gradient(to right, rgba(255, 255, 255, 0.026) 1px, transparent 1px) 0 0 / 76px 76px,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.026) 1px, transparent 1px) 0 0 / 76px 76px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 30%, #000 35%, transparent 100%);
  mask-image: radial-gradient(120% 90% at 50% 30%, #000 35%, transparent 100%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-3);
  background: rgba(236, 122, 55, 0.08);
  border: 1px solid rgba(236, 122, 55, 0.22);
  border-radius: 100px;
  padding: 7px 15px;
  margin-bottom: 26px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(236, 122, 55, 0.55);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(236, 122, 55, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(236, 122, 55, 0);
  }
}

.hero-tagline {
  font-family: var(--font-human);
  font-size: 12.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--t2);
  margin-bottom: 14px;
}

.hero-title {
  font-family: var(--font-sys);
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--t1);
  margin-bottom: 22px;
}

.hero-title em {
  font-style: normal;
  color: var(--orange);
  position: relative;
  background-image: linear-gradient(var(--line-hot), var(--line-hot));
  background-repeat: no-repeat;
  background-position: 0 96%;
  background-size: 100% 2px;
}

.hero-sub {
  font-size: var(--fs-lead);
  color: var(--t2);
  line-height: 1.75;
  max-width: 460px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── assinatura: terminal ── */
.terminal {
  background: var(--bg-4);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(236, 122, 55, 0.05);
}

.terminal-bar {
  background: #151515;
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.terminal-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.terminal-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.terminal-dots i:first-child {
  background: rgba(236, 122, 55, 0.55);
}

.terminal-path {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--t3);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-body {
  padding: 20px 18px 22px;
  height: 344px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
}

.terminal-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.t-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.t-cmd {
  color: var(--t1);
}

.t-cmd .t-prompt {
  color: var(--orange);
  margin-right: 8px;
}

.t-out {
  color: var(--t2);
  padding-left: 18px;
}

.t-ok {
  color: var(--orange-3);
  padding-left: 18px;
}

.t-answer {
  color: var(--orange);
  font-size: 15px;
  letter-spacing: 0.04em;
  padding-top: 6px;
}

.t-gap {
  height: 10px;
}

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--orange);
  vertical-align: -3px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* ── faixa de dados ── */
.hero-stats {
  position: relative;
  z-index: 1;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.hero-stat {
  padding-left: 22px;
  border-left: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stat:first-child {
  padding-left: 0;
  border-left: none;
}

.stat-num,
.stat-place {
  font-family: var(--font-human);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1;
  color: var(--orange);
}

.stat-place {
  font-size: clamp(17px, 1.8vw, 24px);
  color: var(--t1);
  padding-top: 6px;
}

.stat-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t3);
}

.hero-scroll-indicator {
  position: relative;
  z-index: 1;
  margin: 34px auto 0;
  width: 26px;
  color: var(--t3);
  transition: opacity 0.4s;
  animation: bob 2.6s ease-in-out infinite;
}

.hero-scroll-indicator svg {
  width: 100%;
}

@keyframes bob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(7px);
  }
}

/* ══════════════ CABEÇALHO DE SEÇÃO ══════════════ */
.sec-head {
  margin-bottom: clamp(40px, 5vw, 64px);
  max-width: 720px;
}

.sec-label {
  font-size: var(--fs-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sec-label::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--line-hot);
  flex-shrink: 0;
}

.sec-title {
  font-family: var(--font-sys);
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--t1);
  margin-bottom: 16px;
}

.sec-sub {
  font-size: var(--fs-lead);
  color: var(--t2);
  line-height: 1.7;
  max-width: 560px;
}

/* ══════════════ SERVIÇOS ══════════════ */
.svc-index {
  border-top: 1px solid var(--line);
}

.svc-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1.35fr) 40px;
  align-items: center;
  gap: 26px;
  padding: 26px 22px 26px 22px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  position: relative;
  transition: background 0.28s;
}

.svc-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: -1px;
  bottom: -1px;
  width: 2px;
  background: var(--orange);
  transform: scaleY(0);
  transform-origin: bottom center;
  transition: transform 0.34s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.svc-row:hover {
  background: rgba(236, 122, 55, 0.035);
}

.svc-row:hover::before {
  transform: scaleY(1);
  transform-origin: top center;
}

.svc-key {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--t3);
  transition: color 0.28s;
}

.svc-key::before {
  content: '/';
  color: var(--line-hot);
  margin-right: 4px;
}

.svc-row:hover .svc-key {
  color: var(--orange);
}

.svc-name {
  font-size: var(--fs-h3);
  letter-spacing: -0.015em;
  color: var(--t1);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.svc-row:hover .svc-name {
  transform: translateX(7px);
}

.svc-desc {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.6;
}

.svc-mark {
  justify-self: end;
  color: var(--t3);
  opacity: 0.55;
  transition: color 0.28s, opacity 0.28s, transform 0.28s;
}

.svc-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.svc-row:hover .svc-mark {
  color: var(--orange);
  opacity: 1;
  transform: translateX(3px);
}

/* ══════════════ PROJETOS ══════════════ */
.portfolio {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project {
  background: var(--bg-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.project:hover {
  border-color: var(--line-hot);
  transform: translateY(-3px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

/* Destaque automatico: quando o total de projetos e impar, o primeiro
   (o mais recente) ocupa a linha inteira. Com total par, grade limpa.
   Nao precisa de classe: basta adicionar ou remover .project. */
.project:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
  flex-direction: row;
}

.project:first-child:nth-last-child(odd) .project-thumb {
  flex: 1.12;
  aspect-ratio: auto;
  min-height: 340px;
}

.project:first-child:nth-last-child(odd) .project-body {
  flex: 0.88;
  justify-content: center;
  padding: clamp(26px, 3vw, 42px);
}

.project:first-child:nth-last-child(odd) .project-name {
  font-size: clamp(21px, 2.2vw, 29px);
}

.project-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-4);
  border-bottom: 1px solid var(--line-soft);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.project:hover .project-thumb img {
  transform: scale(1.035);
}

.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.project-tag {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}

.project-name {
  font-family: var(--font-sys);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--t1);
}

.project-desc {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.65;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 6px;
}

.tech-pill {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--t2);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 5px 11px;
  white-space: nowrap;
}

.btn-ver-projeto {
  align-self: flex-start;
  margin-top: 8px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line-hot);
  color: var(--orange);
  font-family: var(--font-sys);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 4px 0;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  transition: color 0.22s, border-color 0.22s, gap 0.22s;
}

.btn-ver-projeto:hover {
  color: var(--orange-3);
  border-color: var(--orange-3);
  gap: 13px;
}

.project-slot {
  margin-top: 20px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: 30px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  text-decoration: none;
  transition: border-color 0.28s, background 0.28s;
}

.project-slot:hover {
  border-color: var(--line-hot);
  background: rgba(236, 122, 55, 0.03);
}

.project-slot-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t3);
}

.project-slot-cta {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
}

/* ══════════════ PROCESSO ══════════════ */
.proc {
  list-style: none;
  max-width: 860px;
}

.proc-step {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  position: relative;
}

.proc-num {
  font-family: var(--font-human);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.11);
  padding-top: 2px;
  transition: color 0.35s;
}

.proc-step:hover .proc-num {
  color: rgba(236, 122, 55, 0.42);
}

.proc-body {
  border-left: 1px solid var(--line);
  padding: 0 0 46px 34px;
}

.proc-step:last-child .proc-body {
  border-left-color: transparent;
  padding-bottom: 0;
}

.proc-node {
  position: absolute;
  left: 70px;
  top: 7px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-hot);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.proc-node::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}

.proc-step.revealed .proc-node::after {
  opacity: 1;
  transform: scale(1);
}

.proc-step:hover .proc-node {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(236, 122, 55, 0.12);
}

.proc-name {
  font-family: var(--font-sys);
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--t1);
  margin-bottom: 8px;
}

.proc-desc {
  font-size: 14.5px;
  color: var(--t2);
  line-height: 1.72;
  max-width: 560px;
}

/* ══════════════ SOBRE ══════════════ */
.about-lead {
  font-family: var(--font-human);
  font-size: clamp(21px, 2.9vw, 36px);
  line-height: 1.38;
  color: var(--t2);
  border-left: 2px solid var(--orange);
  padding-left: clamp(20px, 3vw, 32px);
  max-width: 880px;
  margin-bottom: clamp(48px, 6vw, 76px);
}

.about-lead em {
  display: block;
  font-style: normal;
  color: var(--t1);
  margin-top: 6px;
}

.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.75fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.about-text p {
  font-size: 15.5px;
  color: var(--t2);
  line-height: 1.85;
  margin-bottom: 18px;
  max-width: 620px;
}

.about-values {
  margin-top: 42px;
  border-top: 1px solid var(--line);
}

.about-value {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 22px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}

.about-value dt {
  font-size: 11px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--orange);
  padding-top: 3px;
}

.about-value dd {
  font-size: 14.5px;
  color: var(--t2);
  line-height: 1.72;
}

.founder {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.founder-photo {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-bottom: 18px;
  border: 1px solid var(--line-soft);
}

.founder-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.03);
  transition: filter 0.4s, transform 0.6s;
}

.founder:hover .founder-photo img {
  filter: saturate(1) contrast(1.03);
  transform: scale(1.02);
}

.founder-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 6px;
}

.founder-name {
  font-family: var(--font-human);
  font-size: 26px;
  line-height: 1.1;
  color: var(--t1);
  margin-bottom: 4px;
}

.founder-role {
  font-size: 12.5px;
  color: var(--t3);
  margin-bottom: 18px;
}

.founder-quote {
  font-family: var(--font-human);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--t2);
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}

/* ══════════════ CONTATO ══════════════ */
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.form-group {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 10px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--t3);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 11px 2px;
  color: var(--t1);
  font-family: var(--font-sys);
  font-size: 15px;
  transition: border-color 0.25s, background 0.25s;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--t3) 50%),
    linear-gradient(135deg, var(--t3) 50%, transparent 50%);
  background-position: calc(100% - 13px) 20px, calc(100% - 8px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.form-group select option {
  background: var(--bg-3);
  color: var(--t1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.26);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--orange);
  background: rgba(236, 122, 55, 0.03);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.form-note {
  font-size: 12px;
  color: var(--t3);
  max-width: 300px;
  line-height: 1.55;
}

.contact-aside {
  border-top: 1px solid var(--line);
}

.contact-info-block {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.contact-info-label {
  font-size: 10px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 6px;
}

.contact-info-value {
  font-family: var(--font-human);
  font-size: 19px;
  color: var(--t1);
  text-decoration: none;
  transition: color 0.22s;
  display: inline-block;
}

a.contact-info-value:hover {
  color: var(--orange);
}

.contact-promise {
  margin-top: 24px;
  background: var(--bg-3);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--orange);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.contact-promise-icon {
  color: var(--orange);
  flex-shrink: 0;
  margin-top: 1px;
}

.contact-promise-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.contact-promise p {
  font-size: 13.5px;
  color: var(--t2);
  line-height: 1.6;
}

.contact-promise strong {
  color: var(--t1);
  font-weight: 500;
}

/* ══════════════ CTA ══════════════ */
.cta-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-4) 100%);
  border-top: 1px solid var(--line);
  padding: clamp(60px, 8vw, 96px) 0;
}

.cta-ghost {
  position: absolute;
  right: 1vw;
  top: 50%;
  transform: translateY(-48%);
  font-family: var(--font-human);
  font-size: clamp(170px, 27vw, 320px);
  line-height: 0.78;
  color: rgba(255, 255, 255, 0.03);
  pointer-events: none;
  user-select: none;
}

.cta-section .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-title {
  font-family: var(--font-sys);
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--t1);
  margin-bottom: 10px;
}

.cta-sub {
  font-size: 14.5px;
  color: var(--t2);
}

.cta-section .btn-primary {
  padding: 16px 30px;
}

/* ══════════════ FOOTER ══════════════ */
footer {
  background: var(--bg-4);
  border-top: 1px solid var(--line-soft);
  padding: 32px 0;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--t1);
}

.footer-logo span {
  color: var(--orange);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 12px;
  color: var(--t3);
  text-decoration: none;
  transition: color 0.22s;
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-copy {
  font-size: 11.5px;
  color: var(--t3);
}

/* ══════════════ BACK TO TOP ══════════════ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid var(--line);
  color: var(--t2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, border-color 0.25s, color 0.25s;
  z-index: 130;
  backdrop-filter: blur(8px);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--line-hot);
  color: var(--orange);
}

.back-to-top svg {
  width: 17px;
  height: 17px;
}

/* ══════════════ TOAST ══════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-left: 2px solid var(--orange);
  border-radius: 10px;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--t1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 300;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
  max-width: calc(100vw - 40px);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast svg {
  width: 17px;
  height: 17px;
  color: var(--orange);
  flex-shrink: 0;
}

/* ══════════════ MODAL ══════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.25s ease;
  grid-template-rows: minmax(0, 1fr);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal::-webkit-scrollbar {
  width: 4px;
}

.modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, border-color 0.2s;
}

.modal-close:hover {
  background: rgba(236, 122, 55, 0.16);
  border-color: var(--line-hot);
}

.modal-close svg {
  width: 16px;
  height: 16px;
  stroke: rgba(255, 255, 255, 0.75);
}

.modal-gallery {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-soft);
  overflow: hidden;
  border-radius: var(--r) 0 0 var(--r);
  min-height: 0; 
}

.modal-media-main {
  flex: 1;
  aspect-ratio: 16/9;
  background: var(--bg-4);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: aspect-ratio 0.25s ease;
  min-height: 0;
}

.modal-media-main.is-vertical {
  aspect-ratio: auto;
  min-height: 0;
}

.modal-media-main img,
.modal-media-main video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--t3);
}

.media-placeholder svg {
  width: 34px;
  height: 34px;
}

.media-placeholder span {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-thumbs {
  display: flex;
  border-top: 1px solid var(--line-soft);
  overflow-x: auto;
  flex-shrink: 0;
}

.modal-thumbs::-webkit-scrollbar {
  height: 3px;
}

.modal-thumbs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
}

.modal-thumb {
  flex: 1;
  min-width: 118px;
  background: none;
  border: none;
  border-right: 1px solid var(--line-soft);
  padding: 15px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--t3);
  transition: background 0.22s, color 0.22s;
}

.modal-thumb:last-child {
  border-right: none;
}

.modal-thumb:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--t2);
}

.modal-thumb.active {
  background: rgba(236, 122, 55, 0.1);
  color: var(--orange);
  box-shadow: inset 0 2px 0 var(--orange);
}

.modal-thumb svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
}

.modal-thumb span {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.35;
}

.modal-info {
  padding: clamp(26px, 3vw, 40px);
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
}

.modal-info-header {
  margin-bottom: 16px;
}

.modal-tag {
  font-size: 10.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}

.modal-title {
  font-family: var(--font-sys);
  font-size: clamp(21px, 2.2vw, 29px);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.2;
  color: var(--t1);
}

.modal-desc {
  font-size: 14.5px;
  color: var(--t2);
  line-height: 1.75;
  margin-bottom: 24px;
}

.modal-detail-block {
  margin-bottom: 20px;
}

.modal-detail-label {
  font-size: 10px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}

.modal-detail-text {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.75;
}

.modal-cta {
  margin-top: 10px;
  display: inline-flex;
}

/* ══════════════ MOVIMENTO ══════════════ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.svc-row:nth-child(2) {
  transition-delay: 0.05s;
}

.svc-row:nth-child(3) {
  transition-delay: 0.1s;
}

.svc-row:nth-child(4) {
  transition-delay: 0.15s;
}

.svc-row:nth-child(5) {
  transition-delay: 0.2s;
}

.svc-row:nth-child(6) {
  transition-delay: 0.25s;
}

.stagger {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: calc(var(--d, 0) * 90ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════ RESPONSIVO ══════════════ */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-sub {
    max-width: 620px;
  }

  .terminal {
    max-width: 620px;
  }

  .svc-row {
    grid-template-columns: 120px minmax(0, 1fr) 36px;
    gap: 18px;
  }

  .svc-desc {
    grid-column: 2 / -1;
    margin-top: 4px;
  }

  .about-inner,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .founder {
    position: static;
    max-width: 420px;
  }

  .project--feature .project-thumb {
    min-height: 280px;
  }
}

@media (max-width: 900px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-hamburger,
  .nav-mobile {
    display: flex;
  }

  .hero {
    min-height: auto;
  }

  .portfolio {
    grid-template-columns: 1fr;
  }

  .project:first-child:nth-last-child(odd) {
    flex-direction: column;
  }

  .project:first-child:nth-last-child(odd) .project-thumb {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .modal {
    grid-template-columns: 1fr;
    max-height: 95vh;
  }

  .modal-gallery {
    border-right: none;
    border-radius: var(--r) var(--r) 0 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .modal-media-main.is-vertical {
    aspect-ratio: 9/16;
    min-height: auto;
    max-height: 55vh;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
  }

  .toast {
    bottom: 20px;
  }
}

@media (max-width: 700px) {
  :root {
    --px: 20px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 24px 0;
  }

  .hero-stat:nth-child(odd) {
    padding-left: 0;
    border-left: none;
  }

  .hero-stat:nth-child(even) {
    padding-left: 20px;
  }

  .svc-row {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 6px 14px;
    padding: 22px 18px 22px 18px;
  }

  .svc-key {
    grid-column: 1 / -1;
    margin-bottom: 2px;
  }

  .svc-name {
    grid-column: 1;
    font-size: 17px;
  }

  .svc-mark {
    grid-column: 2;
    grid-row: 2;
  }

  .svc-desc {
    grid-column: 1 / -1;
    font-size: 13.5px;
  }

  .svc-row:hover .svc-name {
    transform: none;
  }

  .proc-step {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .proc-node {
    left: 46px;
  }

  .proc-body {
    padding: 0 0 38px 24px;
  }

  .about-value {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-actions .btn-primary {
    width: 100%;
  }

  .form-note {
    max-width: none;
  }

  footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .footer-links {
    gap: 16px;
  }

  .modal {
  grid-template-rows: auto auto;   /* NOVO: desfaz a trava do desktop */
  overflow-y: auto;                /* NOVO: no mobile o modal rola inteiro */
}

.modal-info { overflow: visible; } /* NOVO */

}

@media (max-width: 560px) {
  .hero-title {
    letter-spacing: -0.028em;
  }

  .terminal-body {
    height: 356px;
    font-size: 12px;
    padding: 16px 14px 18px;
  }

  .cta-section .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-section .btn-primary {
    width: 100%;
  }

  .project-body {
    padding: 20px;
  }
}

/* ══════════════ MOVIMENTO REDUZIDO ══════════════ */
@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .stagger {
    opacity: 1;
    transform: none;
  }
}