/* =========================================================
   ELECTRO TECH — design tokens
   Personalidade: "afiado" — preciso, direto, sem enrolar.
   Sinal de assinatura: traços de circuito (fio de cobre) como
   divisores de secção, que "ligam" ao entrar no ecrã.
   ========================================================= */
:root{
  /* cor — branco, azul e cinza, derivados diretamente do logótipo */
  --bg:        #16191B;
  --bg-alt:    #101315;
  --surface:   #1F2325;
  --surface-2: #262B2D;
  --text:      #F5F6F7;
  --text-muted:#9AA0A6;
  --blue:    #2F5FE0;
  --blue-br: #5B8CFF;
  --gray-accent:    #C7CCD1;
  --line:      #33383A;

  /* tipo */
  --f-display: 'Space Grotesk', sans-serif;
  --f-body:    'Inter', sans-serif;
  --f-mono:    'IBM Plex Mono', monospace;

  /* escala */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --r-xl: 16px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

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

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

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

.wrap{
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link{
  position:absolute; left:-9999px; top:0;
  background:var(--blue); color:var(--bg); padding:10px 16px; z-index:200;
  border-radius: var(--r-md);
}
.skip-link:focus{ left:16px; top:16px; }

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

/* ---------- eyebrow / headings ---------- */
.eyebrow{
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-br);
  margin: 0 0 14px;
}
.h2{
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 18ch;
}
.body-lg{
  font-size: 18px;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 0 8px;
}

/* ---------- header ---------- */
.site-header{
  position: sticky; top:0; z-index: 100;
  background: rgba(22,25,27,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display:flex; align-items:center; gap: 28px;
  height: 68px;
}
.logo{
  display:flex; align-items:center; gap:8px;
  font-family: var(--f-display); font-weight:600; font-size: 17px;
  color: var(--text); margin-right:auto;
}
.logo svg{ color: var(--blue); }
.logo strong{ color: var(--blue-br); font-weight: 600; }

.main-nav{ display:flex; gap: 28px; }
.main-nav a{
  font-size: 14.5px; color: var(--text-muted);
  transition: color .2s var(--ease);
}
.main-nav a:hover{ color: var(--text); }

.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--f-body); font-weight: 600; font-size: 14.5px;
  padding: 11px 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{
  background: var(--blue);
  color: var(--text);
}
.btn-primary:hover{ background: var(--blue-br); }
.btn-ghost{
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover{ border-color: var(--blue-br); color: var(--blue-br); }
.btn-lg{ padding: 14px 26px; font-size: 15.5px; }
.btn-nav{ display:inline-flex; }

.nav-toggle{
  display:none;
  flex-direction:column; justify-content:center; gap:5px;
  width: 36px; height:36px;
  background:none; border:none; cursor:pointer;
}
.nav-toggle span{
  display:block; height:2px; width:100%;
  background: var(--text);
  border-radius: 2px;
}
.mobile-nav{
  display:none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 24px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.mobile-nav a{
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 15px;
}
.mobile-nav .btn{ margin-top: 14px; justify-content:center; }
.mobile-nav.open{ display:flex; }

@media (max-width: 860px){
  .main-nav, .btn-nav{ display:none; }
  .nav-toggle{ display:flex; }
}

/* ---------- hero ---------- */
.hero{
  position: relative;
  padding: 108px 0 96px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 82% 0%, rgba(47,95,224,.14), transparent 60%),
    var(--bg);
}
.hero-circuit{
  position:absolute; inset:0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%232F5FE0' stroke-width='1'%3E%3Cpath d='M0 60H120L150 90H400'/%3E%3Cpath d='M0 220H80L110 250H260L290 220H400'/%3E%3Cpath d='M40 0V90'/%3E%3Cpath d='M340 0V150L370 180V400'/%3E%3Ccircle cx='150' cy='90' r='3' fill='%232F5FE0'/%3E%3Ccircle cx='40' cy='90' r='3' fill='%232F5FE0'/%3E%3Ccircle cx='110' cy='250' r='3' fill='%232F5FE0'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 400px 400px;
  opacity: .18;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.hero-inner{ position:relative; }
.hero-title{
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 5.6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 16ch;
  margin: 0 0 24px;
}
.hero-sub{
  font-size: 19px;
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 36px;
}
.hero-cta{ display:flex; gap: 14px; flex-wrap: wrap; }

/* ---------- circuit trace dividers (signature element) ---------- */
.trace-divider{
  width:100%; height:40px; overflow:hidden;
  background: var(--bg);
}
.trace-divider svg{ width:100%; height:100%; display:block; }
.trace-path{
  fill:none; stroke: var(--line); stroke-width:1.5;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  transition: stroke-dashoffset 1.1s var(--ease), stroke 1.1s var(--ease);
}
.trace-node{
  fill: var(--line);
  transition: fill .4s var(--ease) .6s, r .4s var(--ease) .6s;
}
.trace-divider.in-view .trace-path{ stroke-dashoffset:0; stroke: var(--blue); }
.trace-divider.in-view .trace-node{ fill: var(--text); }
.trace-divider-flip{ transform: scaleX(-1); }

/* ---------- sections ---------- */
.section{ padding: 88px 0; }
.section-alt{ background: var(--bg-alt); }
.section .h2{ max-width: 22ch; }

.split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 860px){
  .split{ grid-template-columns: 1fr; gap: 40px; }
}

.proof-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:22px; }
.proof-list li{ display:flex; gap:14px; }
.proof-mark{
  flex: none;
  width: 26px; height:26px;
  display:flex; align-items:center; justify-content:center;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--blue-br);
  font-size: 14px;
  margin-top: 2px;
}
.proof-title{ font-weight:600; margin:0 0 4px; }
.proof-body{ color: var(--text-muted); margin:0; font-size: 14.5px; }
.proof-placeholder .proof-title,
.proof-placeholder .proof-body{ color: var(--blue-br); opacity: .9; }
.proof-placeholder .proof-mark{ color: var(--blue-br); border: 1px dashed var(--blue-br); background: transparent; }

/* ---------- cards ---------- */
.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
@media (max-width: 860px){ .cards{ grid-template-columns: 1fr; } }

.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover{ border-color: var(--blue); transform: translateY(-3px); }
.card-icon{ color: var(--blue-br); margin-bottom: 18px; }
.card-title{
  font-family: var(--f-display); font-weight:600; font-size: 18px;
  margin: 0 0 10px;
}
.card-body{ color: var(--text-muted); font-size: 14.5px; margin:0; }

/* ---------- process (real sequence -> numbered) ---------- */
.process-list{
  list-style:none; margin: 44px 0 0; padding:0;
  display:grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
@media (max-width: 860px){ .process-list{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .process-list{ grid-template-columns: 1fr; } }

.process-item{
  border-top: 2px solid var(--blue);
  padding-top: 16px;
}
.process-num{
  font-family: var(--f-mono);
  color: var(--blue-br);
  font-size: 13px;
  display:block; margin-bottom: 10px;
}
.process-title{ font-weight:600; margin:0 0 6px; }
.process-body{ color: var(--text-muted); font-size: 14.5px; margin:0; }

/* ---------- contact ---------- */
.contact{
  background:
    radial-gradient(ellipse 60% 80% at 10% 100%, rgba(47,95,224,.12), transparent 60%),
    var(--bg);
  text-align:center;
}
.contact-inner{ display:flex; flex-direction:column; align-items:center; }
.contact .eyebrow, .contact .h2, .contact .body-lg{ max-width: 40ch; }
.contact .body-lg{ margin-bottom: 32px; }
.contact-location{
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--text-muted);
  font-family: var(--f-mono);
}

/* ---------- footer ---------- */
.site-footer{
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 32px 0;
}
.footer-inner{
  display:flex; align-items:center; gap: 24px; flex-wrap:wrap;
}
.logo-footer{ margin-right:auto; }
.footer-meta{ color: var(--text-muted); font-size: 13px; margin:0; font-family: var(--f-mono); }
.footer-credit{
  color: var(--blue-br);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.footer-credit:hover{ border-color: var(--blue-br); color: var(--text); }

/* ---------- reveal on scroll ---------- */
.reveal{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.in-view{ opacity: 1; transform: translateY(0); }
