/* ==========================================================================
   Mecânica Rami — Design tokens
   ========================================================================== */
:root {
  --color-bg: #f5f2ec;
  --color-surface: #ffffff;
  --color-ink: #211c17;
  --color-ink-soft: #56504a;
  --color-primary: #1e3a52;
  --color-primary-dark: #12283b;
  --color-primary-contrast: #ffffff;
  --color-accent: #a8460c;
  --color-accent-dark: #7e3409;
  --color-accent-contrast: #ffffff;
  --color-accent-on-dark: #f0a868;
  --color-whatsapp: #0f7a3a;
  --color-whatsapp-dark: #0b5c2c;
  --color-border: #e2dbcf;
  --color-focus: #1e88c7;

  --font-heading: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container-w: 1200px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(33, 28, 23, 0.08), 0 1px 2px rgba(33, 28, 23, 0.06);
  --shadow-md: 0 8px 24px rgba(33, 28, 23, 0.1);
  --header-h: 150px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { 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;
    scroll-behavior: auto !important;
  }
}

html, body {
  overflow-x: hidden;
}

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

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.15; margin: 0; color: var(--color-primary); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   Sections & typography helpers
   ========================================================================== */
.section { padding: 64px 0; }
.section--alt { background: var(--color-surface); }

.eyebrow {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
  margin: 0 0 8px;
}

.section-title {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-lead {
  max-width: 65ch;
  color: var(--color-ink-soft);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

#quem-somos .section-lead {
  max-width: none;
}

.subsection-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 40px 0 20px;
}

.tagline {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-primary);
  text-align: center;
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
  padding-top: 32px;
}

.section-cta {
  text-align: center;
  margin: 40px 0;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  min-height: 48px;
  padding: 0 22px;
  font-size: 1rem;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn .icon { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

.btn--lg { min-height: 52px; padding: 0 28px; font-size: 1.05rem; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }

.btn--accent { background: var(--color-accent); color: var(--color-accent-contrast); }
.btn--accent:hover { background: var(--color-accent-dark); }

.btn--whatsapp { background: var(--color-whatsapp); color: #fff; }
.btn--whatsapp:hover { background: var(--color-whatsapp-dark); }

/* ==========================================================================
   Header & Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.brand__logo {
  width: 224px;
  height: 120px;
  object-fit: contain;
}
.brand__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}
.footer-logo {
  width: 224px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 14px;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle__bar {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  margin-inline: auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--color-primary);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}
.nav.is-open { transform: translateX(0); }

.nav__list {
  display: flex;
  flex-direction: column;
  padding: 16px 20px 32px;
}
.nav__link {
  display: block;
  padding: 14px 4px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 48px;
  display: flex;
  align-items: center;
}
.nav__cta { margin-top: 16px; width: 100%; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .nav {
    position: static;
    inset: auto;
    transform: none;
    background: transparent;
    overflow: visible;
  }
  .nav__list {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 4px;
  }
  .nav__link {
    border-bottom: none;
    padding: 8px 14px;
    border-radius: 6px;
    min-height: auto;
  }
  .nav__link:hover { background: rgba(255, 255, 255, 0.1); }
  .nav__cta { margin-top: 0; margin-left: 12px; width: auto; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #fff;
  padding: 32px 0 40px;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
}

.hero__grid {
  display: grid;
  gap: 32px;
  width: 100%;
}
.hero__grid > * { min-width: 0; }
.hero .eyebrow { color: var(--color-accent-on-dark); }

.hero__title {
  color: #fff;
  font-size: clamp(1.7rem, 1.35rem + 2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero__lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 56ch;
  margin-bottom: 18px;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
.hero__actions .btn { width: 100%; }

@media (min-width: 480px) {
  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hero__actions .btn { width: auto; }
}

.hero__facts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}
.hero__facts strong { color: #fff; }

.hero__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (min-width: 1024px) {
  .hero { padding: 44px 0; }
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
  }
}

/* ==========================================================================
   Quem Somos
   ========================================================================== */
.mission-card {
  background: var(--color-bg);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
}
.mission-card__title {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.value-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.value-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.value-card__title {
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}
.value-card p { color: var(--color-ink-soft); font-size: 0.95rem; }

@media (min-width: 768px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .value-grid { grid-template-columns: repeat(5, 1fr); }
}

.diff-list {
  display: grid;
  gap: 20px;
}
.diff-item {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}
.diff-item:last-child { border-bottom: none; }
.diff-item__title {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.diff-item p { color: var(--color-ink-soft); }
.diff-item__list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--color-ink-soft);
}
.diff-item__list li::before {
  content: "—";
  color: var(--color-accent);
  margin-right: 8px;
}

@media (min-width: 1024px) {
  .diff-list { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

/* ==========================================================================
   Serviços
   ========================================================================== */
.service-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.service-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.service-card__title {
  font-size: 1.1rem;
  margin: 16px 20px 8px;
}
.service-card p {
  color: var(--color-ink-soft);
  font-size: 0.95rem;
  margin: 0 20px 20px;
}

@media (min-width: 768px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
}

.location-block {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}
.location-block__address {
  font-weight: 600;
  color: var(--color-ink);
  font-size: 1.05rem;
}

/* ==========================================================================
   Contato
   ========================================================================== */
.contato__grid {
  display: grid;
  gap: 40px;
}
.contato__grid > * { min-width: 0; }

.contact-list {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}
.contact-list__label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 2px;
}
.contact-list a { text-decoration: underline; text-underline-offset: 2px; }

.contact-form {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 18px;
}
.contact-form__note {
  font-size: 0.9rem;
  color: var(--color-ink-soft);
}
.field { display: grid; gap: 6px; }
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-ink);
  min-height: 48px;
}
.field textarea { min-height: 96px; resize: vertical; }
.contact-form__submit { width: 100%; }

@media (min-width: 1024px) {
  .contato__grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Floating WhatsApp button
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  bottom: calc(20px + var(--cookie-banner-h, 0px));
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 400;
  transition: transform 0.2s ease, background-color 0.2s ease, bottom 0.2s ease;
}
.whatsapp-float:hover { background: var(--color-whatsapp-dark); transform: scale(1.06); }
.whatsapp-float .icon { width: 28px; height: 28px; fill: currentColor; }

/* ==========================================================================
   Cookie banner
   ========================================================================== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 700;
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.9);
  padding: 18px 20px;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p {
  margin: 0;
  font-size: 0.92rem;
  max-width: 70ch;
}
.cookie-banner a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner__actions .btn { width: 100%; }

@media (min-width: 700px) {
  .cookie-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
  }
  .cookie-banner__actions .btn { width: auto; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 0 24px;
}
.site-footer a { color: #fff; }
.site-footer__grid {
  display: grid;
  gap: 32px;
  margin-bottom: 32px;
}
.site-footer__heading {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 12px;
}
.site-footer p { margin-bottom: 6px; font-size: 0.95rem; }
.site-footer__credit {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: repeat(3, 1fr); }
}
