/* ============================================
   CJS USINAGEM — Design tokens
   Blueprint técnico: azul-anteprojeto + cotas de desenho
   ============================================ */

:root {
  --ink-navy: #1B2A3D;
  --ink-navy-deep: #131F2E;
  --line-blue: #5B9BD1;
  --line-blue-soft: rgba(91, 155, 209, 0.35);
  --steel: #8B8D8F;
  --paper: #F0EDE4;
  --paper-dim: #C9C4B4;
  --spark-orange: #E8720C;
  --spark-orange-hover: #FF8A2A;

  --font-display: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --wrap-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@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;
  }
}

body {
  margin: 0;
  background: var(--ink-navy);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--paper);
}

p { margin: 0; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--line-blue);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.eyebrow-light { color: var(--spark-orange); }

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--spark-orange);
  color: var(--ink-navy-deep);
  font-weight: 500;
}
.btn-primary:hover { background: var(--spark-orange-hover); }
.btn-primary:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

.btn-ghost {
  background: transparent;
  border-color: var(--line-blue-soft);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--line-blue); }
.btn-ghost:focus-visible { outline: 2px solid var(--line-blue); outline-offset: 3px; }

.btn-block { width: 100%; }

/* ============================================
   Topbar
   ============================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(19, 31, 46, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(91, 155, 209, 0.18);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 34px;
  width: auto;
  display: block;
  background: var(--paper);
  padding: 6px 10px;
  border-radius: 3px;
}

.logo-img-footer { height: 40px; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.nav a {
  color: var(--paper-dim);
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--paper); }

.nav-cta {
  background: var(--spark-orange);
  color: var(--ink-navy-deep) !important;
  padding: 9px 18px;
  border-radius: 2px;
  font-weight: 500;
}
.nav-cta:hover { background: var(--spark-orange-hover); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--paper);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-blue-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-blue-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.12;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08;
  margin-bottom: 22px;
}

.hero h1 span { color: var(--spark-orange); }

.hero-lede {
  font-size: 17px;
  color: var(--paper-dim);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-specs {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(91, 155, 209, 0.25);
  padding-top: 24px;
}

.spec { display: flex; flex-direction: column; gap: 4px; }

.spec-num {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--line-blue);
  font-weight: 500;
}

.spec-label {
  font-size: 12px;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-drawing { display: flex; justify-content: center; }

.tech-svg {
  width: 100%;
  max-width: 420px;
  animation: spin-slow 40s linear infinite;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .tech-svg { animation: none; }
}

/* ============================================
   Dimension-line dividers (signature element)
   ============================================ */

.dim-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 28px 24px;
}

.dim-line {
  flex: 1;
  height: 1px;
  background: var(--line-blue-soft);
  position: relative;
}
.dim-line::before, .dim-line::after {
  content: '';
  position: static;
}
.dim-line::before {
  content: '⊢';
  position: absolute;
  left: -6px;
  top: -9px;
  color: var(--line-blue-soft);
  font-size: 14px;
}

.dim-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--steel);
  white-space: nowrap;
}

/* ============================================
   Sections (shared)
   ============================================ */

.section { padding: 72px 0; }

.section h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  margin-bottom: 12px;
}

.section-lede {
  color: var(--paper-dim);
  font-size: 16px;
  margin-bottom: 44px;
  max-width: 60ch;
}

/* ============================================
   Serviços — cards
   ============================================ */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(91, 155, 209, 0.18);
  border: 1px solid rgba(91, 155, 209, 0.18);
}

.card {
  background: var(--ink-navy);
  transition: background 0.15s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { background: var(--ink-navy-deep); }

.card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-navy-deep);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
  transition: transform 0.3s ease;
}
.card:hover .card-img img { transform: scale(1.04); }

.card-body { padding: 24px 24px 28px; }

.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--spark-orange);
  border: 1px solid rgba(232, 114, 12, 0.4);
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.card p {
  color: var(--paper-dim);
  font-size: 14.5px;
}

/* ============================================
   Diferenciais
   ============================================ */

.diff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.diff-num {
  font-family: var(--font-mono);
  color: var(--line-blue);
  font-size: 15px;
  display: block;
  margin-bottom: 14px;
}

.diff-item h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.diff-item p {
  color: var(--paper-dim);
  font-size: 14px;
}

/* ============================================
   Nossa História
   ============================================ */

.history-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: start;
}

.history-photo {
  position: sticky;
  top: 96px;
}

.history-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(91, 155, 209, 0.3);
  filter: saturate(0.92) contrast(1.05);
}

.history-caption {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--steel);
  text-transform: uppercase;
}

.history-copy p {
  color: var(--paper-dim);
  margin-bottom: 18px;
  max-width: 62ch;
}
.history-copy p:first-of-type {
  color: var(--paper);
  font-size: 17px;
}

/* ============================================
   Depoimentos
   ============================================ */

.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testi {
  margin: 0;
  padding: 28px 24px;
  border-left: 2px solid var(--spark-orange);
  background: rgba(91, 155, 209, 0.05);
}

.testi p {
  font-size: 15px;
  color: var(--paper);
  margin-bottom: 16px;
}

.testi cite {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--steel);
  font-style: normal;
}

/* ============================================
   Contato
   ============================================ */

.contact {
  background: var(--ink-navy-deep);
  border-top: 1px solid rgba(91, 155, 209, 0.18);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-copy h2 { margin-bottom: 18px; }
.contact-copy p { color: var(--paper-dim); max-width: 44ch; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--steel);
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--paper);
  background: rgba(240, 237, 228, 0.04);
  border: 1px solid rgba(91, 155, 209, 0.3);
  border-radius: 2px;
  padding: 12px 14px;
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--steel); }

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--line-blue);
}

.form-note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--line-blue);
  min-height: 18px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(91, 155, 209, 0.18);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-contact {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--paper-dim);
}
.footer-contact a:hover { color: var(--line-blue); }

.footer-copy {
  width: 100%;
  font-size: 12px;
  color: var(--steel);
  margin-top: 8px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-drawing { order: -1; max-width: 260px; margin: 0 auto 24px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .diff-grid { grid-template-columns: 1fr 1fr; }
  .history-grid { grid-template-columns: 1fr; }
  .history-photo { position: static; max-width: 320px; margin: 0 auto 32px; }
  .testi-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--ink-navy-deep);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid rgba(91, 155, 209, 0.18);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav a { padding: 12px 0; width: 100%; }
  .nav-cta { margin-top: 8px; text-align: center; }
  .nav-toggle { display: flex; }
  .cards { grid-template-columns: 1fr; }
  .diff-grid { grid-template-columns: 1fr; }
  .dim-label { font-size: 9.5px; }
}
