:root {
  --color-primary: #066aab;
  --color-primary-dark: #044c7d;
  --color-accent: #0ea5e9;
  --color-dark: #1a2332;
  --color-text: #333;
  --color-muted: #666;
  --color-bg-alt: #f4f6f9;
  --max-width: 1140px;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--color-text);
  line-height: 1.6;
  background: #fff;
}

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

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

.container.narrow { max-width: 820px; }

#solucoes .container {
  max-width: min(94vw, 2560px);
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(26, 35, 50, 0.95);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

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

.brand-logo { height: 36px; filter: brightness(0) invert(1); }

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.nav-link {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border-radius: 4px;
  transition: background 0.2s, transform 0.2s;
}

.nav-link:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.12);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  display: block;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-dark);
}

.hero-bg {
  position: absolute;
  inset: -5%;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  animation: hero-bg-pan 22s ease-in-out infinite alternate;
}

@keyframes hero-bg-pan {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 72px;
}

.hero-slides {
  position: relative;
  min-height: 60vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.hero-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5vw;
  flex-wrap: wrap;
  text-align: center;
  width: min(94%, 1100px);
  padding: 7vh 6vw;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-card::before {
  top: 0;
  left: 0;
  transform-origin: top left;
  border-radius: 16px 0 0 0;
  background:
    linear-gradient(to right, rgba(226, 232, 240, 0.9), rgba(226, 232, 240, 0.35) 55%, transparent) top left / 100% 4px no-repeat,
    linear-gradient(to bottom, rgba(226, 232, 240, 0.9), rgba(226, 232, 240, 0.35) 55%, transparent) top left / 4px 100% no-repeat;
}

.hero-card::after {
  bottom: 0;
  right: 0;
  transform-origin: bottom right;
  border-radius: 0 0 16px 0;
  background:
    linear-gradient(to left, rgba(226, 232, 240, 0.9), rgba(226, 232, 240, 0.35) 55%, transparent) bottom right / 100% 4px no-repeat,
    linear-gradient(to top, rgba(226, 232, 240, 0.9), rgba(226, 232, 240, 0.35) 55%, transparent) bottom right / 4px 100% no-repeat;
}

.hero-slide.is-active .hero-card::before,
.hero-slide.is-active .hero-card::after {
  animation: hero-corner-in 0.6s 0.1s cubic-bezier(.22,.9,.3,1) forwards;
}

@keyframes hero-corner-in {
  to { opacity: 1; transform: scale(1); }
}

.hero-slide img {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  opacity: 0;
  transform: scale(0.88);
}

.hero-slide.is-active img {
  animation: hero-image-in 0.8s 0.1s cubic-bezier(.22,.9,.3,1) forwards;
}

.hero-text {
  max-width: 480px;
}

.hero-text h1 {
  color: #fff;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 700;
  margin: 0 0 14px;
  opacity: 0;
  transform: translateY(24px);
}

.hero-text p {
  color: #cfd8e3;
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  margin: 0;
  opacity: 0;
  transform: translateY(24px);
}

.hero-slide.is-active .hero-text h1 {
  animation: hero-text-in 0.7s 0.25s ease forwards;
}

.hero-slide.is-active .hero-text p {
  animation: hero-text-in 0.7s 0.4s ease forwards;
}

@keyframes hero-image-in {
  to { opacity: 1; transform: scale(1); }
}

@keyframes hero-text-in {
  to { opacity: 1; transform: translateY(0); }
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
}

.hero-dots button.is-active { background: var(--color-accent); }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--color-bg-alt); }

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0 0 50px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 14px auto 0;
}

/* Cards */
.cards-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.card {
  box-sizing: border-box;
  flex: 0 0 calc(20% - 22.4px);
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.card:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.card:hover .card-body h3 { color: #fff; }

.card:hover .card-sub { color: var(--color-accent); }

.card:hover .card-body p:last-child { color: rgba(255,255,255,0.9); }

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body { padding: 20px; }

.card-body h3 {
  margin: 0 0 6px;
  color: var(--color-primary);
  font-size: 1.3rem;
  transition: color 0.25s ease;
}

.card-sub {
  font-weight: 500;
  color: var(--color-dark);
  margin: 0 0 10px;
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

.card-body p:last-child {
  color: var(--color-muted);
  font-size: 0.92rem;
  margin: 0;
  transition: color 0.25s ease;
}

/* Clients carousel (auto-scrolling, pure CSS) */
.clients-carousel {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.clients-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 60px;
  animation: clients-scroll 30s linear infinite;
}

.clients-carousel:hover .clients-track { animation-play-state: paused; }

@keyframes clients-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.clients-track img {
  max-height: 70px;
  max-width: 140px;
  width: auto;
  flex: 0 0 auto;
  object-fit: contain;
  filter: grayscale(20%);
  opacity: 0.9;
  transition: opacity 0.2s, filter 0.2s;
}

.clients-track img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* About - KLIT (brand background) */
.section-brand {
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 100%);
}

.section-brand .section-title { color: #fff; }

.about-intro {
  max-width: 760px;
  margin: 0 auto 56px;
}

.about-intro h3 {
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 16px;
  text-align: center;
}

.about-intro p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
  line-height: 1.75;
  margin: 0;
  text-align: left;
}

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

.about-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 32px 28px;
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.about-card:hover {
  transform: translateY(-6px);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.about-card:hover h3 { color: var(--color-accent); }

.about-card:hover p,
.about-card:hover .values-list { color: rgba(255,255,255,0.9); }

.about-card h3 {
  color: #fff;
  font-size: 1.25rem;
  margin: 0 0 12px;
  transition: color 0.25s ease;
}

.about-card p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
  margin: 0;
  transition: color 0.25s ease;
}

.values-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.values-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.values-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Contact (brand background, distinct from .section-brand) */
.section-contact {
  background: radial-gradient(circle at 15% 15%, var(--color-accent) 0%, var(--color-primary) 35%, var(--color-dark) 85%);
}

.section-contact .section-title { color: #fff; }

.section-contact .address { color: rgba(255,255,255,0.85); }

.section-contact .form-feedback:not(.is-success):not(.is-error) { color: var(--color-muted); }

.phone-highlight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 40px;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #25d366;
  background: transparent;
  transition: transform 0.2s ease;
}

.whatsapp-link:hover { transform: scale(1.1); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}

.map-wrapper, .contact-form {
  height: 560px;
}

.map-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.map-wrapper iframe { display: block; width: 100%; height: 100%; border: 0; }

.contact-form {
  background: var(--color-bg-alt);
  padding: 36px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-form h3 {
  margin: 0 0 20px;
  color: var(--color-dark);
}

.form-group { margin-bottom: 16px; }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccd3dc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.btn-submit {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover { background: var(--color-primary-dark); }

.honeypot {
  display: none;
}

.form-feedback {
  font-size: 0.85rem;
  margin: 10px 0 0;
  min-height: 1.2em;
}

.form-feedback.is-success { color: #1a7f37; }
.form-feedback.is-error { color: #cf2e2e; }

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.address {
  text-align: center;
  color: var(--color-muted);
  margin-top: 50px;
}

/* Footer */
.site-footer {
  background: var(--color-dark);
  color: #cfd8e3;
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
}

.site-footer a { color: var(--color-accent); }

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 900;
}

.scroll-top.is-visible { opacity: 1; visibility: visible; }

/* Responsive */
@media (max-width: 900px) {
  .card { flex-basis: calc(50% - 14px); }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .contact-grid { grid-template-columns: 1fr; }
  .map-wrapper, .contact-form { height: 420px; }
}

@media (max-width: 680px) {
  .card { flex-basis: 100%; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.is-open { max-height: 400px; }
  .main-nav ul {
    flex-direction: column;
    padding: 10px 20px 20px;
    gap: 2px;
  }
  .hero-card { gap: 24px; padding: 32px 24px; width: 100%; }
  .hero-card::before, .hero-card::after { width: 70px; height: 70px; }
  .hero-slide img { max-width: 220px; }
  .section { padding: 56px 0; }
}
