/* ============================================================
   TACAPP Dev Studio — Landing Page
   Conceito: prancheta técnica / CIANÓTIPO ESCURO (blueprint
   clássico invertido). Grade visível, linhas de cota, tinta
   clara, teal + âmbar como sinais. Sem glow de "SaaS escuro".
   ============================================================ */

:root {
  --bg:        #0B2D45;   /* heliográfica profunda */
  --bg-soft:   #0E3552;   /* painéis / tiles */
  --ink:       #E9F2F6;   /* tinta clara (giz) */
  --ink-dim:   #93B4C4;   /* tinta secundária */
  --teal:      #34C6E4;   /* sinal / linhas / links */
  --amber:     #F0A53C;   /* estado "no ar" / energizado */

  --line:      rgba(150, 200, 220, 0.16);  /* grade fina */
  --line-2:    rgba(150, 200, 220, 0.38);  /* cota / hairline forte */

  --maxw:   1180px;
  --gut:    24px;
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);

  --f-disp: "Archivo", system-ui, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--f-body);
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ===== Grade de prancheta (fundo fixo) ===== */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
  opacity: 0.7;
}
/* leve vinheta para dar profundidade de papel, sem virar glow */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% -10%, transparent 55%, rgba(0,0,0,0.35) 100%);
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
strong { color: var(--ink); font-weight: 600; }

/* ===== Acessibilidade: skip link + foco ===== */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--amber); color: #1a1407; padding: 10px 16px; font-family: var(--f-mono); font-size: 13px;
}
.skip-link:focus { left: 8px; top: 8px; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ===== Tipografia utilitária ===== */
.eyebrow {
  font-family: var(--f-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal);
}
.sec-title {
  font-family: var(--f-disp); font-weight: 700; font-stretch: 125%;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.08;
  letter-spacing: -0.01em; text-transform: uppercase; color: var(--ink);
  margin-top: 12px;
}

/* ===== Botões ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-mono); font-weight: 500; font-size: 0.92rem; letter-spacing: 0.02em;
  padding: 13px 24px; border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
  white-space: nowrap;
}
.btn--sm { padding: 9px 16px; font-size: 0.84rem; }
.btn--block { width: 100%; }
.btn--solid { background: var(--teal); color: #06222f; border-color: var(--teal); }
.btn--solid:hover { background: var(--amber); border-color: var(--amber); color: #1a1407; }
.btn--line { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--line:hover { border-color: var(--teal); color: var(--teal); }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid transparent; transition: background 0.3s, border-color 0.3s;
}
.nav.is-scrolled { background: rgba(11, 45, 69, 0.86); backdrop-filter: blur(8px); border-bottom-color: var(--line-2); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__logo { height: 30px; width: auto; display: block; }
.brand__suffix, .tb__suffix {
  font-family: var(--f-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim);
  padding-left: 12px; border-left: 1px solid var(--line-2);
}

.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links > a:not(.btn) {
  font-family: var(--f-mono); font-size: 0.85rem; letter-spacing: 0.04em; color: var(--ink-dim);
  transition: color 0.2s;
}
.nav__links > a:not(.btn):hover { color: var(--ink); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform 0.3s, opacity 0.3s; }

/* ===== Hero ===== */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }

.hero__title {
  font-family: var(--f-disp); font-weight: 700; font-stretch: 125%;
  font-size: clamp(2.3rem, 5.4vw, 4rem); line-height: 1.04; letter-spacing: -0.015em;
  margin: 22px 0 0;
}
.hero__title .hl { color: var(--amber); }

.hero__sub { max-width: 540px; margin-top: 22px; color: var(--ink-dim); font-size: 1.08rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.microstats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 40px; border-top: 1px solid var(--line-2); }
.microstat { flex: 1 1 140px; padding: 16px 18px 0 0; }
.microstat dt { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal); }
.microstat dd { margin-top: 4px; font-size: 0.95rem; color: var(--ink); }

/* ===== Signature: schematic ===== */
.schematic {
  position: relative; padding: 18px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.015); border-radius: 3px;
}
.schematic::before, .schematic::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid var(--teal);
}
.schematic::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.schematic::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.schematic__cap {
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-dim); padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px dashed var(--line-2);
}
.schematic__ticks {
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: 0.7rem; color: var(--ink-dim); opacity: 0.55; margin-top: 6px;
}
.graph { width: 100%; height: auto; display: block; color: var(--teal); }

/* nós */
.nd { transform-box: fill-box; transform-origin: center; }
.nd__box { fill: var(--bg-soft); stroke: var(--teal); stroke-width: 1.5; }
.nd__box--core { stroke: var(--ink); }
.nd__t {
  font-family: var(--f-mono); font-size: 15px; fill: var(--ink);
  text-anchor: middle; dominant-baseline: middle; letter-spacing: 0.04em;
}
.nd--live .nd__box { stroke: var(--amber); fill: rgba(240, 165, 60, 0.1); }
.nd__t--live { fill: var(--amber); }
.live-dot { fill: var(--amber); }

.wires .wire { stroke-width: 1.5; opacity: 0.9; }
.wire--live { stroke: var(--amber); }

/* animação do grafo */
@keyframes nd-in { from { opacity: 0; transform: translateY(7px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes draw  { to { stroke-dashoffset: 0; } }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.nd { opacity: 0; animation: nd-in 0.5s var(--ease) forwards; animation-delay: var(--d); }
.wire { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.6s var(--ease) forwards; animation-delay: var(--d); }
.live-dot { opacity: 0; animation: live-pulse 1.8s ease-in-out infinite; animation-delay: 2.2s; }

/* ===== Seções ===== */
.section { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.sec-head { max-width: 680px; margin-bottom: 44px; }

/* ===== Serviços: spec tiles ===== */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; border: 1px solid var(--line-2); }
.tile {
  position: relative; padding: 28px 24px 30px;
  border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.012); transition: background 0.25s;
}
.tile:hover, .tile:focus-within { background: rgba(52, 198, 228, 0.06); }
.tile:hover::after, .tile:focus-within::after { border-color: var(--teal); }
.tile__no { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--teal); }
.tile__title { font-family: var(--f-disp); font-stretch: 125%; font-weight: 600; font-size: 1.1rem; line-height: 1.2; margin: 14px 0 10px; color: var(--ink); }
.tile__desc { color: var(--ink-dim); font-size: 0.95rem; }
/* tique de registro no canto */
.tile::after {
  content: ""; position: absolute; top: 14px; right: 14px; width: 8px; height: 8px;
  border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2);
  transition: border-color 0.25s;
}

/* ===== Processo: pipeline cabeada ===== */
.pipe { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.pipe__step { padding-right: 24px; }
.pipe__rail { position: relative; height: 2px; background: var(--line-2); margin-bottom: 22px; }
.pipe__dot {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--teal);
}
.pipe__dot--live { border-color: var(--amber); background: var(--amber); }
.pipe__no { font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.1em; color: var(--teal); }
.pipe__no--live { color: var(--amber); }
.pipe__title { font-family: var(--f-disp); font-stretch: 125%; font-weight: 600; font-size: 1.15rem; margin: 8px 0 8px; color: var(--ink); }
.pipe__desc { color: var(--ink-dim); font-size: 0.93rem; }

/* ===== Diferenciais: spec list ===== */
.spec { border-top: 1px solid var(--line-2); }
.spec__row { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); }
.spec__row dt { font-family: var(--f-mono); font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); }
.spec__row dd { color: var(--ink); font-size: 1.02rem; }

/* ===== Portfólio ===== */
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px; }
.legend__item { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-mono); font-size: 0.8rem; color: var(--ink-dim); }

.stamp {
  font-family: var(--f-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em;
  padding: 3px 8px; border: 1px solid currentColor; border-radius: 2px; white-space: nowrap;
}
.stamp--prod { color: var(--teal); }
.stamp--beta { color: var(--amber); }

.prjs { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }

.prj {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 24px 22px 22px; border: 1px solid var(--line-2); border-radius: 3px;
  background: rgba(255, 255, 255, 0.012); transition: background 0.25s;
}
.prj:hover, .prj:focus-within { background: rgba(52, 198, 228, 0.06); }
.prj:hover::after, .prj:focus-within::after { border-color: var(--teal); }
.prj::after {
  content: ""; position: absolute; bottom: 14px; right: 14px; width: 8px; height: 8px;
  border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2);
  transition: border-color 0.25s;
}
.prj__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prj__no { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--teal); }
.prj__sector { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.03em; color: var(--ink-dim); }
.prj__title { font-family: var(--f-disp); font-stretch: 125%; font-weight: 600; font-size: 1.3rem; line-height: 1.12; color: var(--ink); margin-top: 2px; }
.prj__desc { color: var(--ink-dim); font-size: 0.93rem; flex: 1; }
.prj__spec { font-family: var(--f-mono); font-size: 0.76rem; line-height: 1.65; color: var(--ink); padding-top: 14px; border-top: 1px dashed var(--line-2); }
.prj__spec span { color: var(--teal); }
.prj__link { font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.02em; color: var(--teal); align-self: flex-start; }
a.prj__link:hover { color: var(--amber); }
.prj__link--private { color: var(--ink-dim); }

/* tile de discovery (fantasma) */
.prj--ghost { border-style: dashed; background: transparent; justify-content: center; gap: 8px; }
.prj--ghost:hover { background: transparent; }
.prj--ghost::after { display: none; }
.prj__ghost-main { font-family: var(--f-mono); font-size: 1rem; color: var(--teal); }
.prj__ghost-sub { font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-dim); }

/* ===== Contato ===== */
.cta__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.cta__lead { margin-top: 16px; color: var(--ink-dim); font-size: 1.05rem; max-width: 420px; }
.cta__contacts { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.contact-line { display: inline-flex; align-items: center; gap: 14px; font-size: 1.02rem; color: var(--ink); transition: color 0.2s; }
.contact-line:hover { color: var(--teal); }
.contact-line__k {
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal); border: 1px solid var(--line-2); padding: 3px 8px; border-radius: 2px; min-width: 52px; text-align: center;
}

.cta__form { border: 1px solid var(--line-2); border-radius: 3px; padding: 28px; background: rgba(255, 255, 255, 0.015); }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; font-family: var(--f-body); font-size: 0.98rem; color: var(--ink);
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line-2); border-radius: 2px; padding: 12px 14px;
  transition: border-color 0.2s; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-dim); opacity: 0.7; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); }
.form__status {
  margin-top: 14px; font-family: var(--f-mono); font-size: 0.84rem; line-height: 1.5;
  padding: 10px 12px; border: 1px solid currentColor; border-radius: 2px;
}
.form__status--ok { color: var(--teal); }
.form__status--err { color: var(--amber); }
.form__note { margin-top: 14px; text-align: center; font-family: var(--f-mono); font-size: 0.8rem; color: var(--ink-dim); }
.form__note a { color: var(--teal); }

/* ===== Footer: title block ===== */
.titleblock { padding: 0 0 36px; border-top: 1px solid var(--line-2); }
.tb { display: grid; grid-template-columns: 1.6fr repeat(2, 1fr) 1.2fr 1.6fr 1.8fr; border: 1px solid var(--line-2); border-top: 0; margin-top: 0; }
.tb__cell { padding: 16px 18px; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; justify-content: center; min-height: 76px; }
.tb__cell:last-child { border-right: 0; }
.tb__cell--brand { flex-direction: row; align-items: center; gap: 12px; }
.tb__logo { height: 26px; width: auto; }
.tb__k { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); }
.tb__v { font-family: var(--f-mono); font-size: 0.86rem; color: var(--ink); word-break: break-word; }
a.tb__v:hover { color: var(--teal); }
.tb__copy { margin-top: 20px; font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-dim); }

/* ===== Reveal on scroll (só esconde quando há JS) ===== */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsivo ===== */
@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .schematic { max-width: 460px; }
  .spec__row { grid-template-columns: 140px 1fr; gap: 16px; }
  .tb { grid-template-columns: 1fr 1fr; }
  .tb__cell:nth-child(odd) { border-right: 1px solid var(--line-2); }
  .tb__cell:nth-child(even) { border-right: 0; }
}

/* nav colapsa antes das outras seções: 6 itens não cabem entre 721 e 880px */
@media (max-width: 880px) {
  .nav__toggle { display: flex; padding: 14px 12px; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11, 45, 69, 0.98); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-2);
    padding: 8px var(--gut) 22px; transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links > a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav__links .btn { margin-top: 14px; }
  .nav__links .btn--sm { padding: 13px 20px; }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 720px) {
  /* o <br> do H1 só faz sentido no desktop; no mobile deixa quebrar natural */
  .hero__title br { display: none; }

  /* alvos de toque ≥ ~44px */
  .contact-line { padding: 10px 0; }
  .prj__link { padding: 12px 0; }
  a.tb__v { display: inline-block; padding: 12px 0; }

  .pipe { grid-template-columns: 1fr; gap: 4px; }
  .pipe__step { padding: 0 0 8px; }
  .cta__grid { grid-template-columns: 1fr; gap: 32px; }
  .spec__row { grid-template-columns: 1fr; gap: 4px; }
  .tb { grid-template-columns: 1fr; }
  .tb__cell { border-right: 0 !important; border-bottom: 1px solid var(--line-2); }
  .tb__cell:last-child { border-bottom: 0; }
  .microstat { flex: 1 1 100%; }
}

/* ===== Reduced motion: grafo já montado, sem reveal ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .nd, .wire, .live-dot { animation: none !important; opacity: 1 !important; }
  .nd { transform: none !important; }
  .wire { stroke-dashoffset: 0 !important; }
}
