/* ===========================================================
   M5 GROUP — Identidade visual
   Concept: Engenharia da Confiança · Premium Industrial
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300;1,9..40,400&display=swap');

:root {
  /* Palette */
  --bone: #f4f0e8;
  --bone-soft: #ebe5d8;
  --paper: #faf7f1;
  --graphite: #1a1a1a;
  --graphite-soft: #2a2a2a;
  --steel: #5a5a5a;
  --steel-soft: #888;
  --amber: #c8841e;
  --amber-deep: #a86d10;
  --line: rgba(26, 26, 26, 0.12);
  --line-soft: rgba(26, 26, 26, 0.06);

  /* Typography */
  --display: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;

  /* Spacing */
  --container: 1280px;
  --gutter: clamp(1.5rem, 4vw, 4rem);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--graphite);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle blueprint grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

main, header, footer { position: relative; z-index: 1; }

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

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

/* ====== HEADER / NAV ====== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 247, 241, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav-links a {
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--amber);
  transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--amber-deep); }

.nav-cta {
  background: var(--graphite);
  color: var(--paper);
  padding: 0.6rem 1.25rem;
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.25s ease;
}
.nav-cta:hover { background: var(--amber-deep); }

.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-mobile { display: none; }
.nav-burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--graphite);
  margin: 5px 0;
  transition: 0.3s;
}

/* ====== CONTAINER UTIL ====== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ====== PAGE HEAD (for inner pages) ====== */
.page-head {
  padding: 10rem var(--gutter) 4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-head-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--amber);
}
.page-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--graphite);
}
.page-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--amber-deep);
}
.page-num {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--line);
  line-height: 1;
}

/* ====== FOOTER ====== */
footer {
  background: var(--graphite);
  color: var(--bone);
  padding: 5rem var(--gutter) 2rem;
  margin-top: 6rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(244, 240, 232, 0.15);
}
.footer-brand-block { max-width: 360px; }
.footer-brand-block .brand { margin-bottom: 1rem; }
.footer-brand-block p {
  font-size: 0.9rem;
  color: rgba(244, 240, 232, 0.7);
  line-height: 1.7;
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; }
.footer-col li {
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
  color: rgba(244, 240, 232, 0.75);
}
.footer-col a { transition: color 0.2s; }
.footer-col a:hover { color: var(--amber); }
.footer-bottom {
  max-width: var(--container);
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(244, 240, 232, 0.5);
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-primary { background: var(--graphite); color: var(--paper); }
.btn-primary:hover { background: var(--amber-deep); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--graphite); border-color: var(--graphite); }
.btn-outline:hover { background: var(--graphite); color: var(--paper); }
.btn-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ====== ANIMATIONS ====== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.reveal-1 { animation-delay: 0.1s; }
.reveal-2 { animation-delay: 0.25s; }
.reveal-3 { animation-delay: 0.4s; }
.reveal-4 { animation-delay: 0.55s; }
.reveal-5 { animation-delay: 0.7s; }

/* ====== TESTIMONIALS ====== */
.testimonials {
  padding: 7rem var(--gutter) 5rem;
  max-width: var(--container);
  margin: 0 auto;
}
.testimonials-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 4rem;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--bone-soft);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 2.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.testimonial-card:hover {
  border-color: var(--amber);
  transform: translateY(-4px);
}
.testimonial-quote-mark {
  font-family: var(--display);
  font-size: 5rem;
  line-height: 0.7;
  color: var(--amber);
  opacity: 0.35;
  margin-bottom: 1rem;
  font-weight: 400;
  user-select: none;
}
.testimonial-text {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--graphite);
  flex: 1;
}
.testimonial-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--graphite);
  color: var(--amber);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.testimonial-author-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--graphite);
  letter-spacing: -0.01em;
}
.testimonial-author-role {
  font-size: 0.75rem;
  color: var(--steel);
  margin-top: 0.15rem;
  letter-spacing: 0.02em;
}
.testimonial-tag {
  margin-left: auto;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber-deep);
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .testimonials-head { grid-template-columns: 1fr; gap: 1.5rem; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ====== WHATSAPP FLOAT ====== */
.whatsapp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.55);
}
.whatsapp-float svg { width: 28px; height: 28px; }

/* ====== MINI FORM (homepage) ====== */
.mini-form-section {
  background: var(--graphite);
  color: var(--bone);
  padding: 5rem var(--gutter);
}
.mini-form-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: center;
}
.mini-form-copy .eyebrow { color: var(--amber); }
.mini-form-copy .eyebrow::before { background: var(--amber); }
.mini-form-copy h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-top: 1rem;
}
.mini-form-copy h2 em { font-style: italic; font-weight: 300; color: var(--amber); }
.mini-form-copy p {
  color: rgba(244, 240, 232, 0.65);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-top: 1rem;
}
.mini-form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.mini-form-fields .field-full { grid-column: 1 / -1; }
.mini-form-fields label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 240, 232, 0.55);
  font-weight: 500;
  margin-bottom: 0.45rem;
}
.mini-form-fields input,
.mini-form-fields select {
  width: 100%;
  padding: 0.8rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(244, 240, 232, 0.2);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 0.97rem;
  transition: border-color 0.25s;
}
.mini-form-fields input:focus,
.mini-form-fields select:focus {
  outline: none;
  border-bottom-color: var(--amber);
}
.mini-form-fields input::placeholder,
.mini-form-fields textarea::placeholder { color: rgba(244, 240, 232, 0.3); }
.mini-form-fields textarea {
  width: 100%;
  padding: 0.8rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(244, 240, 232, 0.2);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 0.97rem;
  resize: none;
  transition: border-color 0.25s;
}
.mini-form-fields textarea:focus {
  outline: none;
  border-bottom-color: var(--amber);
}
.mini-form-success {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  color: var(--amber);
  font-size: 0.95rem;
  padding: 0.5rem 0;
}
.mini-form-fields select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8841e' stroke-width='2'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 16px;
  padding-right: 24px;
}
.mini-form-fields select option { background: var(--graphite); }
.mini-form-submit {
  grid-column: 1 / -1;
  width: 100%;
  padding: 1rem;
  background: var(--amber);
  color: var(--graphite);
  border: none;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.mini-form-submit:hover { background: var(--bone); transform: translateY(-2px); }

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .mini-form-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: block; }
  .nav-burger.open + .nav-mobile { display: flex; }
  .nav-mobile {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 2rem var(--gutter);
    gap: 1.5rem;
    list-style: none;
  }
  .nav-mobile li { font-size: 1rem; }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand-block { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .page-head-inner { grid-template-columns: 1fr; }
  .page-num { display: none; }
}
