/* ── SOBRE ──────────────────────────────── */
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.about-h {
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.04em; color: var(--white);
}
.about-h .dim { color: var(--gray); }
.about-p { font-size: 0.88rem; font-weight: 300; color: var(--gray); line-height: 1.85; margin-bottom: 16px; }
.about-p:last-of-type { margin-bottom: 40px; }
.stats-row { display: flex; gap: 0; border-top: 1px solid var(--border); padding-top: 32px; }
.stat { flex: 1; padding-right: 24px; border-right: 1px solid var(--border); margin-right: 24px; }
.stat:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.stat-n { font-family: var(--font-h); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.04em; color: var(--white); margin-bottom: 5px; }
.stat-l { font-size: 0.7rem; font-weight: 300; color: var(--muted); line-height: 1.45; }

/* ── PARA QUEM ──────────────────────────── */
.pq-h {
  font-family: var(--font-h);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.18;
  color: var(--white); margin-bottom: 48px; max-width: 620px;
}
.pq-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
}
.pq-card {
  background: var(--black); padding: 36px 32px;
  transition: background .35s, transform .35s;
}
.pq-card:hover { background: #16161a; transform: translateY(-4px); }
.pq-card-h {
  font-family: var(--font-h); font-size: 1rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--white); margin-bottom: 12px;
}
.pq-card-p { font-size: 0.82rem; font-weight: 300; line-height: 1.75; color: var(--gray); }

/* ── STACK ──────────────────────────────── */
.stack-bg { background: #1a1a1e; position: relative; z-index: 1; }
.stack-lead {
  font-family: var(--font-h);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.18;
  color: var(--white); margin-bottom: 48px; max-width: 620px;
}
.stack-benefits {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--border); margin-bottom: 64px;
}
.sb-item { padding: 28px 28px 0 0; }
.sb-item + .sb-item { padding-left: 28px; border-left: 1px solid var(--border); }
.sb-h {
  font-family: var(--font-h); font-size: 0.98rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--white); margin-bottom: 10px;
}
.sb-p { font-size: 0.8rem; font-weight: 300; line-height: 1.7; color: var(--gray); }
.stack-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack-col {
  position: relative; padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.07) 100%);
  transition: background .5s;
}
.stack-col::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.26) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.16) 100%);
  opacity: 0; transition: opacity .5s;
}
.stack-col:hover::before { opacity: 1; }
.stack-col-inner {
  position: relative; overflow: hidden;
  background: rgba(8,8,12,0.9);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 44px 40px; height: 100%; box-sizing: border-box;
}
.stack-col-inner::after {
  content: ''; position: absolute; top: -80%; left: -80%;
  width: 260%; height: 260%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.042) 0%, transparent 55%);
  opacity: 0; transition: opacity .6s; pointer-events: none;
}
.stack-col:hover .stack-col-inner::after { opacity: 1; }
.spark {
  position: absolute; width: 2px; height: 2px;
  border-radius: 50%; background: rgba(255,255,255,0.5);
  pointer-events: none; animation: sparkFloat 5s ease-in-out infinite;
}
@keyframes sparkFloat {
  0%,100% { transform: translateY(0) scale(1); opacity: 0; }
  15%      { opacity: 0.6; }
  50%      { transform: translateY(-26px) scale(0.55); opacity: 0.2; }
  85%      { opacity: 0.04; }
}
.stack-col-h {
  font-family: var(--font-m); font-size: 0.58rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(255,255,255,0.28); margin-bottom: 28px;
}
.stack-list { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.stack-list li {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.88rem; font-weight: 400; color: rgba(255,255,255,0.55); transition: color .3s;
}
.stack-col:hover .stack-list li { color: rgba(255,255,255,0.82); }
.stack-list li::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255,255,255,0.18); flex-shrink: 0; transition: background .3s;
}
.stack-col:hover .stack-list li::before { background: rgba(255,255,255,0.52); }

/* ── PROJETOS ───────────────────────────── */
.projects-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 52px; }
.projects-header .sec-label { margin-bottom: 0; flex: 1; }
.projects-count { font-family: var(--font-m); font-size: 0.58rem; letter-spacing: 0.14em; color: var(--muted); white-space: nowrap; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.pcard {
  background: var(--black); position: relative; overflow: hidden;
  display: flex; flex-direction: column; transition: background .35s;
}
.pcard:hover { background: #0c0c10; }
.pcard::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.22), transparent);
  transform: scaleX(0); transition: transform .5s ease; z-index: 1;
}
.pcard:hover::before { transform: scaleX(1); }
.pthumb { height: 280px; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; }
.pthumb-inner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform .8s cubic-bezier(.16,1,.3,1);
}
.pcard:hover .pthumb-inner { transform: scale(1.055); }
.pt1 { background: radial-gradient(ellipse at 40% 35%, #0d1540 0%, #04040f 65%); }
.pt2 { background: radial-gradient(ellipse at 60% 40%, #120d1e 0%, #060608 65%); }
.pt3 { background: radial-gradient(ellipse at 40% 60%, #1a0d10 0%, #070405 65%); }
.pnum {
  font-family: var(--font-h); font-size: 8rem; font-weight: 800;
  color: rgba(255,255,255,0.032); letter-spacing: -0.06em; line-height: 1;
  user-select: none; transition: color .4s;
}
.pcard:hover .pnum { color: rgba(255,255,255,0.052); }
.pcat-thumb {
  position: absolute; top: 20px; left: 22px;
  font-family: var(--font-m); font-size: 0.55rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.2);
}
.pbody { padding: 24px 24px 18px; flex: 1; display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.ptitle { font-family: var(--font-h); font-size: 1rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 10px; color: var(--white); }
.pdesc { font-size: 0.78rem; font-weight: 300; line-height: 1.72; color: var(--gray); flex: 1; }
.pfoot { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.pfoot-tags { display: flex; gap: 6px; }
.ptag { font-family: var(--font-m); font-size: 0.54rem; letter-spacing: 0.06em; color: var(--muted); padding: 4px 9px; border: 1px solid rgba(255,255,255,0.06); }
.parrow { font-size: 0.95rem; color: var(--muted); opacity: 0; transform: translate(-4px,4px); transition: opacity .3s, transform .3s; }
.pcard:hover .parrow { opacity: 1; transform: translate(0,0); }

/* ── PROCESSO ───────────────────────────── */
.processo-bg { background: #1a1a1e; position: relative; z-index: 1; }
.processo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.processo-intro-h {
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.04em; color: var(--white); margin-bottom: 20px;
}
.processo-intro-h .dim { color: var(--gray); }
.processo-intro-p { font-size: 0.88rem; font-weight: 300; color: var(--gray); line-height: 1.8; }
.processo-steps { display: flex; flex-direction: column; }
.pstep { display: flex; gap: 24px; align-items: flex-start; padding: 26px 0; border-bottom: 1px solid var(--border); }
.pstep:first-child { border-top: 1px solid var(--border); }
.pstep-num { font-family: var(--font-m); font-size: 0.56rem; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); padding-top: 3px; flex-shrink: 0; }
.pstep-content { flex: 1; }
.pstep-title { font-family: var(--font-h); font-size: 0.92rem; font-weight: 700; letter-spacing: -0.02em; color: var(--white); margin-bottom: 5px; transition: color .25s; }
.pstep:hover .pstep-title { color: rgba(255,255,255,1); }
.pstep-desc { font-size: 0.76rem; font-weight: 300; color: var(--muted); line-height: 1.65; }
.pstep-arrow { font-size: 0.88rem; color: var(--muted); opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .3s; padding-top: 2px; }
.pstep:hover .pstep-arrow { opacity: 1; transform: translateX(0); }

/* ── AUTOMAÇÃO ──────────────────────────── */
.auto-bg { background: #131315; position: relative; z-index: 1; }
.auto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.auto-h { font-family: var(--font-h); font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.04em; color: var(--white); margin-bottom: 20px; }
.auto-h span { color: var(--gray); }
.auto-p { font-size: 0.88rem; font-weight: 300; color: var(--gray); line-height: 1.8; margin-bottom: 36px; }
.auto-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.auto-list li { font-size: 0.84rem; font-weight: 400; color: rgba(255,255,255,0.5); display: flex; align-items: center; gap: 12px; }
.auto-list li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.2); flex-shrink: 0; }

/* ── MAC WINDOW ─────────────────────────── */
.mac-window { background: rgba(16,16,22,0.96); border: 1px solid rgba(255,255,255,0.09); border-radius: 10px; overflow: hidden; }
.mac-titlebar { display: flex; align-items: center; gap: 6px; padding: 11px 16px; background: rgba(255,255,255,0.018); border-bottom: 1px solid rgba(255,255,255,0.06); }
.mac-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.mac-dot.r { background: #ff5f57; }
.mac-dot.y { background: #febc2e; }
.mac-dot.g { background: #28c840; }
.mac-title { font-family: var(--font-m); font-size: 0.58rem; letter-spacing: 0.08em; color: var(--muted); margin-left: 10px; }
.mac-badge { margin-left: auto; font-family: var(--font-m); font-size: 0.5rem; letter-spacing: 0.12em; color: rgba(40,200,64,0.75); }
.mac-body { padding: 28px 24px 22px; }
.wf-row { display: flex; align-items: flex-start; gap: 0; }
.wf-node { display: flex; flex-direction: column; align-items: center; gap: 7px; flex-shrink: 0; width: 68px; }
.wf-node-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-m); font-size: 0.56rem; letter-spacing: 0.03em; color: rgba(255,255,255,0.55);
}
.wf-node-icon.active { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8); }
.wf-node-name { font-family: var(--font-m); font-size: 0.54rem; letter-spacing: 0.04em; color: rgba(255,255,255,0.45); text-align: center; line-height: 1.3; }
.wf-conn { flex: 1; height: 1px; min-width: 12px; margin-top: 19px; background: linear-gradient(to right, rgba(255,255,255,0.18), rgba(255,255,255,0.06)); position: relative; }
.wf-conn::after { content: ''; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left-color: rgba(255,255,255,0.14); }
.mac-log { border-top: 1px solid rgba(255,255,255,0.055); padding: 14px 24px; display: flex; flex-direction: column; gap: 11px; }
.mac-log-row { display: flex; align-items: center; gap: 10px; }
.mac-log-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.mac-log-dot.ok  { background: rgba(40,200,64,0.7); }
.mac-log-dot.run { background: rgba(255,255,255,0.45); animation: tpulse 1.6s ease-in-out infinite; }
.mac-log-id   { font-family: var(--font-m); font-size: 0.56rem; letter-spacing: 0.06em; color: rgba(255,255,255,0.45); min-width: 44px; }
.mac-log-time { font-family: var(--font-m); font-size: 0.52rem; letter-spacing: 0.04em; color: var(--muted); min-width: 68px; }
.mac-log-bar  { flex: 1; height: 2px; background: rgba(255,255,255,0.06); border-radius: 1px; overflow: hidden; }
.mac-log-bar span { display: block; height: 100%; background: rgba(255,255,255,0.28); }
.mac-log-st   { font-family: var(--font-m); font-size: 0.5rem; letter-spacing: 0.08em; color: var(--muted); min-width: 72px; text-align: right; }
.mac-log-st.ok-text { color: rgba(40,200,64,0.6); }

/* ── TERMINAL ───────────────────────────── */
.terminal { background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.08); overflow: hidden; }
.terminal-header { padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; gap: 7px; }
.t-dot   { width: 10px; height: 10px; border-radius: 50%; }
.t-dot.r { background: rgba(255,95,86,.45); }
.t-dot.y { background: rgba(255,189,46,.45); }
.t-dot.g { background: rgba(40,200,64,.45); }
.t-title { font-family: var(--font-m); font-size: 0.56rem; letter-spacing: 0.12em; color: var(--muted); margin-left: 8px; }
.terminal-body { padding: 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.t-row { display: flex; align-items: center; gap: 14px; }
.t-icon { font-family: var(--font-m); font-size: 0.6rem; width: 14px; flex-shrink: 0; }
.t-icon.done { color: rgba(40,200,64,.65); }
.t-icon.run  { color: rgba(255,255,255,.4); animation: tpulse 1.6s ease-in-out infinite; }
@keyframes tpulse { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
.t-name { font-family: var(--font-m); font-size: 0.68rem; letter-spacing: 0.04em; color: rgba(255,255,255,.5); flex: 1; }
.t-row.active .t-name { color: rgba(255,255,255,.82); }
.t-time { font-family: var(--font-m); font-size: 0.58rem; letter-spacing: 0.06em; color: var(--muted); }
.terminal-footer { padding: 10px 22px; border-top: 1px solid rgba(255,255,255,0.06); font-family: var(--font-m); font-size: 0.54rem; letter-spacing: 0.1em; color: rgba(40,200,64,.5); }

/* ══════════════════════════════════════════
   SECTIONS RESPONSIVE
   (must be after all non-responsive rules
    so these media queries win the cascade)
══════════════════════════════════════════ */

/* ── 1100px — tablet ────────────────────── */
@media (max-width: 1100px) {
  /* About */
  .about-layout   { gap: 56px; }

  /* Para quem */
  .pq-grid        { grid-template-columns: 1fr; }

  /* Stack */
  .stack-benefits { grid-template-columns: 1fr; gap: 20px; }
  .sb-item        { padding: 0; }
  .sb-item + .sb-item { padding-left: 0; border-left: none; padding-top: 20px; border-top: 1px solid var(--border); }
  .stack-cols     { grid-template-columns: repeat(2, 1fr); }
  .stack-col-inner { padding: 36px 32px; }

  /* Projects */
  .projects       { grid-template-columns: repeat(2, 1fr); }

  /* Processo / Auto */
  .processo-grid  { gap: 60px; }
  .auto-grid      { gap: 48px; }
  .auto-h         { font-size: clamp(1.7rem, 3vw, 2.4rem); }

  /* n8n Mac window */
  .wf-node        { width: 58px; }
  .mac-body       { padding: 20px 16px 16px; }
}

/* ── 768px — mobile ─────────────────────── */
@media (max-width: 768px) {
  /* About */
  .about-layout     { grid-template-columns: 1fr; gap: 40px; }
  .about-h          { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .stats-row        { flex-wrap: wrap; gap: 0; }
  .stat             { flex: 0 0 50%; border-right: none; margin-right: 0; padding-right: 0;
                      border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 20px; }
  .stat:last-child  { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

  /* Para quem */
  .pq-grid          { grid-template-columns: 1fr; }
  .pq-card          { padding: 28px 24px; }

  /* Stack */
  .stack-benefits   { grid-template-columns: 1fr; gap: 20px; margin-bottom: 44px; }
  .sb-item          { padding: 0; }
  .sb-item + .sb-item { padding-left: 0; border-left: none; padding-top: 20px; border-top: 1px solid var(--border); }
  .stack-cols       { grid-template-columns: 1fr; gap: 12px; }
  .stack-col-inner  { padding: 36px 28px; }

  /* Projects */
  .projects         { grid-template-columns: 1fr; }
  .projects-header  { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 36px; }
  .projects-count   { align-self: flex-end; }
  .pthumb           { height: 240px; }
  .pcard-hint       { opacity: 0.85; transform: translateY(0); }

  /* Processo */
  .processo-grid    { grid-template-columns: 1fr; gap: 44px; }
  .processo-intro-h { font-size: clamp(1.6rem, 5.5vw, 2.2rem); }
  .pstep            { gap: 16px; padding: 20px 0; }

  /* Automação */
  .auto-grid        { grid-template-columns: 1fr; gap: 44px; }
  .auto-h           { font-size: clamp(1.6rem, 5.5vw, 2.2rem); }
  .auto-p           { margin-bottom: 24px; }
  .wf-row           { flex-wrap: wrap; gap: 8px; justify-content: center; }
  .wf-conn          { display: none; }
  .wf-node          { width: 52px; }
  .wf-node-icon     { width: 32px; height: 32px; font-size: 0.48rem; }
  .mac-body         { padding: 16px; }

  /* Terminal */
  .terminal-body    { padding: 16px; gap: 10px; }
}

/* ── 480px — small phone ────────────────── */
@media (max-width: 480px) {
  /* About */
  .about-h          { font-size: clamp(1.5rem, 7vw, 2rem); }
  .about-p          { font-size: 0.84rem; }
  .stat             { flex: 0 0 100%; }
  .stat:nth-child(2) { border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 20px; }

  /* Stack */
  .stack-col-inner  { padding: 28px 20px; }
  .stack-col-h      { margin-bottom: 18px; }
  .stack-list li    { font-size: 0.82rem; }

  /* Projects */
  .projects         { grid-template-columns: 1fr; }
  .pthumb           { height: 200px; }
  .pbody            { padding: 20px 18px 14px; }
  .pfoot            { padding: 12px 18px; }
  .ptag             { display: none; }
  .pfoot-tags       { gap: 4px; }

  /* Processo */
  .pstep-title      { font-size: 0.86rem; }
  .pstep-desc       { font-size: 0.72rem; }

  /* Automação */
  .auto-list li     { font-size: 0.8rem; }
  .mac-titlebar     { padding: 9px 12px; }
  .mac-title        { font-size: 0.52rem; }
}
