/* ================================================
   Eletronaldo Elétrica e Hidráulica
   Tokens: Ink Navy / Circuit Blue / Hazard Yellow / Steel / Paper
   Display: Oswald · Body: IBM Plex Sans · Utility: IBM Plex Mono
================================================ */

:root {
  --ink: #0b1e33;
  --ink-soft: #13314f;
  --blue: #1c6db3;
  --yellow: #f4c21a;
  --yellow-dim: #d9ac0f;
  --steel: #64748b;
  --steel-light: #b6bfc9;
  --paper: #f2f4f9;
  --white: #ffffff;
  --line: rgba(11, 30, 51, 0.12);
  --line-dark: rgba(255, 255, 255, 0.14);

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --container: 1180px;
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  flex-shrink: 0;
  background: var(--yellow-dim);
  display: inline-block;
}

.eyebrow span {
  min-width: 0;
}

.hero .eyebrow,
.contact .eyebrow {
  color: var(--yellow);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.08;
  margin: 0 0 20px;
  color: var(--ink);
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
}

p {
  margin: 0 0 16px;
}

.lede {
  font-size: 1.1rem;
  color: var(--steel);
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--yellow);
  color: var(--ink);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--yellow-dim);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--line-dark);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--white);
}

.btn-ghost.on-light {
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost.on-light:hover {
  border-color: var(--ink);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 30, 51, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-dark);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.brand img {
  height: 44px;
  width: auto;
}

.brand-name {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.brand-name small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--steel-light);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav a {
  position: relative;
  color: var(--steel-light);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding-bottom: 4px;
  transition: color 0.15s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--yellow);
  transition: right 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--white);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  right: 0;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--line-dark);
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--white);
  padding: 168px 0 96px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  max-width: 14ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--yellow);
}

.hero .lede {
  color: var(--steel-light);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy > * {
  animation: hero-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-copy > .eyebrow {
  animation-delay: 0s;
}

.hero-copy > h1 {
  animation-delay: 0.08s;
}

.hero-copy > .lede {
  animation-delay: 0.16s;
}

.hero-copy > .hero-actions {
  animation-delay: 0.24s;
}

@keyframes hero-diagram-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-diagram {
  position: relative;
  z-index: 1;
  animation: hero-diagram-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.hero-diagram svg {
  width: 100%;
  height: auto;
}

.diagram-trace {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.5;
  opacity: 0.85;
}

.diagram-trace.accent {
  stroke: var(--yellow);
}

.diagram-node {
  fill: var(--ink);
  stroke: var(--yellow);
  stroke-width: 2;
}

.diagram-node.blue {
  stroke: var(--blue);
}

.diagram-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--steel-light);
  letter-spacing: 0.06em;
}

.diagram-pulse {
  stroke-dasharray: 6 10;
  animation: dash-flow 3.2s linear infinite;
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -160;
  }
}

.hero-stats {
  position: relative;
  z-index: 2;
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-dark);
  padding-top: 28px;
}

.hero-stats dl {
  margin: 0;
}

.hero-stats dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-light);
  margin-bottom: 6px;
}

.hero-stats dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-transform: uppercase;
  color: var(--white);
}

.hero-stats dd span {
  color: var(--yellow);
}

/* ---------- Sections ---------- */
section {
  padding: 96px 0;
}

.section-alt {
  background: var(--paper);
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

/* ---------- Sobre ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-copy p {
  color: var(--steel);
  font-size: 1.02rem;
}

.badge-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 12px;
}

.badge {
  background: var(--white);
  padding: 22px 24px;
}

.badge .num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--blue);
  display: block;
}

.badge .label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ---------- Serviços ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-card {
  background: var(--white);
  padding: 32px 28px;
  transition: background 0.15s ease;
}

.service-card:hover {
  background: var(--paper);
}

.service-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--blue);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 14px;
}

.service-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  letter-spacing: 0;
}

.service-card p {
  color: var(--steel);
  font-size: 0.94rem;
  margin: 0;
}

/* ---------- Clientes ---------- */
.client-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.client-tile {
  background: var(--white);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.client-tile img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
  opacity: 0.72;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.client-tile:hover img {
  filter: none;
  opacity: 1;
}

/* Logos with a baked-in solid/dark background lose all contrast when
   dimmed by the default opacity — keep them grayscale but at full opacity. */
.client-tile.solid img {
  opacity: 1;
}

.client-tile.solid:hover img {
  filter: none;
}

/* ---------- Contato ---------- */
.contact {
  background: var(--ink);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  position: relative;
  z-index: 1;
}

.contact h2 {
  color: var(--white);
}

.contact .lede {
  color: var(--steel-light);
}

.contact-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--line-dark);
}

.contact-list li {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-dark);
  align-items: baseline;
}

.contact-list .k {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--yellow);
  width: 130px;
  flex-shrink: 0;
}

.contact-list a {
  color: var(--white);
  text-decoration: none;
  font-size: 1.05rem;
}

.contact-list a:hover {
  color: var(--yellow);
}

.contact-card {
  background: var(--ink-soft);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 40px;
}

.contact-card .eyebrow {
  color: var(--yellow);
}

.contact-card h3 {
  color: var(--white);
  font-size: 1.3rem;
}

.contact-card p {
  color: var(--steel-light);
  font-size: 0.95rem;
}

.contact-card .btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--line-dark);
  color: var(--steel-light);
  padding: 28px 0;
  font-size: 0.85rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 32px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-toggle {
    display: block;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-diagram {
    order: -1;
    max-width: 340px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .client-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }

  .brand-name small {
    display: none;
  }

  .nav-cta {
    gap: 10px;
  }

  .nav-cta .btn-ghost {
    padding: 10px 14px;
    font-size: 0.76rem;
  }

  section {
    padding: 72px 0;
  }

  .hero {
    padding: 140px 0 64px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .client-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .badge-row {
    grid-template-columns: 1fr;
  }

  .contact-list li {
    flex-direction: column;
    gap: 4px;
  }

  .contact-list .k {
    width: auto;
  }
}
