/* ==========================================================================
   CSPRO Engenharia — stylesheet
   ========================================================================== */

:root {
  --red: #E2231A;
  --red-dark: #B91C14;
  --gray-900: #1A1A1D;
  --gray-800: #232327;
  --gray-700: #45464B;
  --gray-500: #75767B;
  --gray-300: #B7B8BC;
  --gray-200: #E4E4E7;
  --gray-100: #F5F5F6;
  --white: #FFFFFF;

  --font-head: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

  --container: 1160px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(26, 26, 29, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--gray-900);
}

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.section {
  padding: 96px 0;
}
.section--tight { padding: 72px 0; }
.section--alt { background: var(--gray-100); }
.section--dark {
  background: var(--gray-900);
  color: var(--gray-300);
}
.section--dark h2, .section--dark h3 { color: var(--white); }

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.lead {
  font-size: 18px;
  color: var(--gray-700);
}
.section--dark .lead { color: var(--gray-300); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--red);
  color: var(--white);
}
.btn--primary:hover { background: var(--red-dark); }
.btn--outline {
  border-color: currentColor;
  color: var(--white);
}
.btn--outline:hover { background: rgba(255,255,255,.1); }
.btn--dark {
  border-color: var(--gray-900);
  color: var(--gray-900);
}
.btn--dark:hover { background: var(--gray-900); color: var(--white); }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 24px rgba(26,26,29,.08); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
}
.logo img { height: 51px; }

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__links {
  display: flex;
  gap: 32px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  color: var(--gray-700);
  transition: color .2s ease;
}
.nav__links a:hover { color: var(--red); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
}
.lang-toggle button {
  background: none;
  border: none;
  padding: 7px 12px;
  color: var(--gray-500);
}
.lang-toggle button.is-active {
  background: var(--gray-900);
  color: var(--white);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--gray-900);
}

/* Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 180px 0 110px;
  background: var(--gray-900);
  color: var(--white);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(226,35,26,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 75% 30%, black, transparent 70%);
}
.hero__inner {
  position: relative;
  max-width: 720px;
}
.hero .eyebrow { color: var(--red); }
.hero h1 {
  color: var(--white);
  font-size: clamp(34px, 5vw, 54px);
}
.hero p.lead { color: var(--gray-300); max-width: 560px; }
.hero__actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero__stats {
  position: relative;
  display: flex;
  gap: 48px;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.12);
  flex-wrap: wrap;
}
.hero__stats div strong {
  display: block;
  font-family: var(--font-head);
  font-size: 30px;
  color: var(--white);
}
.hero__stats div span {
  font-size: 13px;
  color: var(--gray-300);
}

/* Differentiators strip ------------------------------------------------ */
.diff-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--gray-200);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}
.diff-strip__item {
  background: var(--white);
  padding: 32px 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.diff-strip__item svg {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: var(--red);
}
.diff-strip__item h4 {
  font-size: 15px;
  margin-bottom: 4px;
}
.diff-strip__item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--gray-500);
}

/* Services --------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.service-card:hover {
  box-shadow: var(--shadow);
  border-color: transparent;
  transform: translateY(-3px);
}
.service-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(226,35,26,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--red);
}
.service-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.service-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--gray-700);
}

/* About / team ------------------------------------------------------------ */
.about-text {
  max-width: 760px;
  margin: 0 auto;
}
.about-text .lead { margin-bottom: 16px; }
.about-text p + p { margin-top: 14px; color: var(--gray-700); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.team-card__avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--gray-900);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 20px;
}
.team-card h3 { font-size: 20px; margin-bottom: 2px; }
.team-card .role {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
  display: block;
}
.team-card p {
  font-size: 14.5px;
  color: var(--gray-700);
  margin: 0 0 12px;
}
.team-card p:last-child { margin-bottom: 0; }

/* Contact ------------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 64px;
}
.contact-info__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.contact-info__item svg {
  width: 22px;
  height: 22px;
  color: var(--red);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-info__item h4 {
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--white);
}
.contact-info__item a, .contact-info__item span {
  color: var(--gray-300);
  font-size: 14.5px;
}
.contact-info__item a:hover { color: var(--white); }

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  color: var(--gray-900);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  background: var(--gray-100);
  transition: border-color .2s ease, background .2s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  background: var(--white);
}
.field textarea { min-height: 120px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }

.form-msg {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}
.form-msg.is-visible { display: block; }
.form-msg--ok { background: #E6F6EC; color: #1E7A3D; }
.form-msg--err { background: #FCE9E8; color: var(--red-dark); }

/* Footer -------------------------------------------------------------------- */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 56px 0 28px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-grid .logo img { height: 45px; margin-bottom: 12px; }
.footer-grid p { max-width: 320px; font-size: 14px; color: var(--gray-500); }
.footer-links {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}
.footer-links h5 {
  font-family: var(--font-head);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  margin-bottom: 14px;
}
.footer-links li { margin-bottom: 10px; font-size: 14px; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 13px;
  color: var(--gray-500);
  flex-wrap: wrap;
  gap: 8px;
}

/* Reveal / i18n helpers ------------------------------------------------------
   Bilingual text blocks are duplicated in the markup, each tagged
   data-i18n-lang="pt"|"en". Only the block matching <html lang="..">
   is shown; display:revert restores each tag's normal default
   (block for <p>/<div>/<h3>, list-item for <li>, inline for <span>/<a>).
   Elements that need a special display (e.g. buttons using flex) should
   keep data-i18n-lang only on an inner <span>, never on the flex element
   itself. ---------------------------------------------------------------- */
[data-i18n-lang] { display: none; }
html[lang="pt"] [data-i18n-lang="pt"] { display: revert; }
html[lang="en"] [data-i18n-lang="en"] { display: revert; }

/* Responsive ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .nav__links, .hero__stats { display: none; }
  .menu-toggle { display: flex; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .diff-strip { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .team-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav.is-open .nav__links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--gray-200);
  }
}

@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .hero { padding: 150px 0 80px; }
  .services-grid { grid-template-columns: 1fr; }
  .diff-strip { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .form-card { padding: 28px 22px; }
}
