:root {
  --bg: #111417;
  --surface: #171b20;
  --surface-soft: #1d232a;
  --text: #e8edf2;
  --muted: #a7b1bc;
  /* Verde abacate */
  --primary: #65ca07;
  --primary-strong: #65ca07;
  --primary-muted: rgba(143, 176, 111, 0.35);
  --border: #2b333d;
  --accent-text: #1a2214;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top right, #1a1f25 0%, var(--bg) 45%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(17, 20, 23, 0.85);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 72px;
  gap: clamp(8px, 2vw, 18px);
}

.site-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.header-trailing {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.lang-switcher {
  position: relative;
  flex-shrink: 0;
  z-index: 120;
}

.lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  box-shadow: none;
}

.lang-switcher__toggle:hover {
  filter: brightness(1.12);
}

.lang-switcher__toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.lang-switcher__flag {
  display: block;
  border-radius: 2px;
  object-fit: cover;
}

.lang-switcher__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  margin: 2px 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.lang-switcher__option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lang-switcher__option--active {
  background: rgba(101, 202, 7, 0.12);
  outline: 1px solid var(--primary-muted);
}

.lang-switcher__option img {
  border-radius: 2px;
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.brand__logo {
  display: block;
  width: auto;
  height: 32px;
  max-width: min(120px, 34vw);
  object-fit: contain;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-weight: 500;
}

/* Espaço reservado + círculo verde na secção ativa (LED: 2 piscadas + ~2s aceso) */
@keyframes nav-led-cycle {
  0%,
  2% {
    opacity: 1;
    filter: brightness(1.2);
    box-shadow:
      0 0 0 1px rgba(101, 202, 7, 0.55),
      0 0 6px 2px rgba(101, 202, 7, 0.5);
  }
  2.01%,
  8% {
    opacity: 0.2;
    filter: brightness(0.48);
    box-shadow:
      0 0 0 1px rgba(101, 202, 7, 0.14),
      0 0 2px rgba(101, 202, 7, 0.1);
  }
  8.01%,
  10% {
    opacity: 1;
    filter: brightness(1.2);
    box-shadow:
      0 0 0 1px rgba(101, 202, 7, 0.55),
      0 0 6px 2px rgba(101, 202, 7, 0.5);
  }
  10.01%,
  16% {
    opacity: 0.2;
    filter: brightness(0.48);
    box-shadow:
      0 0 0 1px rgba(101, 202, 7, 0.14),
      0 0 2px rgba(101, 202, 7, 0.1);
  }
  16.01%,
  100% {
    opacity: 1;
    filter: brightness(1.2);
    box-shadow:
      0 0 0 1px rgba(101, 202, 7, 0.55),
      0 0 6px 2px rgba(101, 202, 7, 0.5);
  }
}

.nav-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: transparent;
  box-shadow: none;
}

.nav-link.active::before {
  background: var(--primary);
  animation: nav-led-cycle 2.4s linear infinite;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--text);
  outline: none;
}

.nav-link:focus-visible {
  box-shadow: 0 0 0 2px var(--primary-muted);
  border-radius: 4px;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-link.active::before {
    animation: none;
    opacity: 1;
    filter: none;
    box-shadow: 0 0 0 1px rgba(101, 202, 7, 0.55), 0 0 6px 2px rgba(101, 202, 7, 0.45);
  }
}

/* Home: vídeo de fundo */
#home.section-home {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video-wrap .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.hero-video-wrap .hero-video:not(.hero-video--active) {
  opacity: 0;
  visibility: hidden;
}

.hero-video-wrap .hero-video.hero-video--active {
  opacity: 1;
  visibility: visible;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
      180deg,
      rgba(17, 20, 23, 0.55) 0%,
      rgba(17, 20, 23, 0.82) 55%,
      rgba(17, 20, 23, 0.95) 100%
    ),
    radial-gradient(ellipse at 50% 20%, rgba(143, 176, 111, 0.12), transparent 55%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1120px, 92%);
  padding: 100px 0 80px;
  text-align: center;
}

.hero-inner h1 {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 5vw, 2.85rem);
  line-height: 1.15;
  text-wrap: balance;
}

.hero-inner .subtitle {
  color: rgba(232, 237, 242, 0.9);
  max-width: 42rem;
  margin: 0 auto;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
}

.hero-heading,
.hero-subtitle {
  min-height: 2.8em;
}

.hero-subtitle {
  min-height: 6.5em;
}

.hero-type-target {
  display: inline;
}

@keyframes hero-cursor-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.hero-cursor {
  display: inline-block;
  width: 3px;
  height: 0.95em;
  margin-left: 4px;
  background-color: var(--primary);
  vertical-align: -0.12em;
  animation: hero-cursor-blink 0.55s step-end infinite;
}

.hero-cursor--muted {
  width: 0;
  margin: 0;
  opacity: 0;
  animation: none;
  overflow: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-cursor {
    animation: none;
    opacity: 1;
  }
}

/* Faixa de logos (entre Home e Projetos) */
.clients-marquee {
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
  padding: 0.55rem 0;
  margin: 0;
}

.clients-marquee__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.clients-marquee__viewport {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.clients-marquee__track {
  display: flex;
  width: max-content;
  animation: clients-marquee-scroll 38s linear infinite;
}

.clients-marquee__track:has(.clients-marquee__logo:hover) {
  animation-play-state: paused;
}

@keyframes clients-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.clients-marquee__row {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding: 0 clamp(1rem, 3vw, 2rem);
  flex-shrink: 0;
}

.clients-marquee__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  cursor: default;
}

.clients-marquee__logo svg {
  display: block;
  height: 30px;
  width: auto;
  max-width: min(150px, 28vw);
  filter: grayscale(1);
  opacity: 0.72;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

.clients-marquee__logo:hover svg {
  filter: grayscale(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .clients-marquee__track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    row-gap: 0.5rem;
  }

  .clients-marquee__row[aria-hidden="true"] {
    display: none;
  }

  .clients-marquee__logo svg {
    filter: none;
    opacity: 1;
  }
}

.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-inner .cta-row--hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 4vw, 2rem);
  width: min(22rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

.hero-inner .cta-row--hero .btn {
  width: 100%;
  min-width: 0;
}

@media (max-width: 360px) {
  .hero-inner .cta-row--hero {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

.cta-row--start {
  margin-top: 24px;
  justify-content: flex-start;
}

.cta-row--form {
  margin-top: 16px;
  justify-content: flex-start;
}

.btn {
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: var(--accent-text);
}

.btn-primary:hover {
  background: var(--primary-strong);
  color: #f4f9ef;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
  background: rgba(23, 27, 32, 0.5);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

h2,
h3 {
  line-height: 1.2;
}

.section-block-title {
  margin-top: 36px;
  margin-bottom: 12px;
}

section:not(#home) {
  padding: 56px 0 64px;
}

.section-head {
  margin-bottom: 20px;
}

@keyframes section-head-float {
  0%,
  100% {
    transform: translateX(0);
  }
  33% {
    transform: translateX(5px);
  }
  66% {
    transform: translateX(-4px);
  }
}

@keyframes section-head-cursor-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.section-head h2 {
  position: relative;
  display: inline-block;
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--primary);
  animation: section-head-float 5.5s ease-in-out infinite;
}

.section-head h2::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.82em;
  margin-left: 5px;
  background-color: var(--primary);
  vertical-align: -0.08em;
  border-radius: 1px;
  animation: section-head-cursor-blink 0.55s step-end infinite;
}

@media (prefers-reduced-motion: reduce) {
  .section-head h2 {
    animation: none;
  }

  .section-head h2::after {
    animation: none;
    opacity: 1;
  }
}

.section-head p {
  color: var(--muted);
  max-width: min(65ch, 100%);
  width: 100%;
  margin: 0;
  font-size: clamp(0.95rem, 0.88rem + 0.3vw, 1.05rem);
  line-height: 1.65;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

#sobre .section-head p {
  max-width: 100%;
}

#projetos .section-head p {
  max-width: 100%;
}

@media (max-width: 860px) {
  #sobre .section-head p {
    font-size: clamp(0.92rem, 0.85rem + 0.4vw, 1rem);
    line-height: 1.6;
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.card p {
  color: var(--muted);
}

.about-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.about-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin: 0;
  border-radius: 8px;
  color: var(--primary);
  background: rgba(101, 202, 7, 0.1);
  border: 1px solid var(--primary-muted);
}

.about-card__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--primary);
  border: 1px solid var(--primary-muted);
  padding: 4px 8px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.highlight {
  color: var(--primary);
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #12171d;
  color: var(--text);
  font-family: inherit;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

.form-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 10px;
}

/* Contato: mais compacto + formulário em duas colunas (campos curtos) */
#contato {
  padding: 40px 0 48px;
}

#contato .section-head {
  margin-bottom: 14px;
}

#contato .section-head p {
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 58ch;
}

.contact-panel .card {
  padding: 14px;
}

.contact-panel .card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.contact-panel .card p {
  font-size: 0.88rem;
  margin: 0.4em 0;
}

.contact-form {
  padding: 12px 14px;
}

.contact-form h3 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.contact-form__row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.contact-panel .contact-form label {
  margin: 5px 0 3px;
  font-size: 0.86rem;
}

.contact-panel .contact-form input,
.contact-panel .contact-form textarea {
  padding: 7px 9px;
  font-size: 0.92rem;
}

.contact-panel .contact-form textarea {
  min-height: 88px;
}

.contact-panel .contact-form .form-note {
  font-size: 0.82rem;
  margin-top: 6px;
  line-height: 1.45;
}

.contact-panel .cta-row--form {
  margin-top: 10px;
}

.contact-panel .cta-row--form .btn {
  padding: 9px 18px;
  font-size: 0.92rem;
}

.contact-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.contact-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.contact-social__link:hover {
  color: var(--primary);
}

.contact-social__link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.contact-social__icon {
  width: 26px;
  height: 26px;
  display: block;
}

@media (max-width: 560px) {
  .contact-form__row2 {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  margin-top: 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* -- Carrossel de produtos (largura total; fora do .container no HTML) -- */
.products-carousel {
  width: 100%;
  max-width: none;
  margin: 8px 0 28px;
  box-sizing: border-box;
}

.products-carousel__viewport {
  width: 100%;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.products-carousel__track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}

.products-carousel__track.is-reduced {
  transition: none;
}

.products-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  min-height: clamp(320px, 52vh, 520px);
  overflow: hidden;
}

.products-slide__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: #0d1014;
  background-image: var(--products-slide-bg);
  background-size: cover;
  background-position: center;
}

.products-slide--1 {
  --products-slide-bg: url("../imagens/gdx44.png");
}

.products-slide--2 {
  --products-slide-bg: url("../imagens/tdx9.png");
}

.products-slide--3 {
  --products-slide-bg: url("../imagens/cdx32.png");
}

.products-slide__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(35, 36, 37, 0.78) 0%,
    rgba(17, 20, 23, 0.52) 42%,
    rgba(17, 20, 23, 0.22) 100%
  );
}

.products-slide__grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  min-height: clamp(320px, 52vh, 520px);
  width: min(1180px, 92%);
  margin: 0 auto;
  padding: clamp(16px, 5.5vh, 48px) 0 clamp(20px, 3vw, 36px);
}

.products-slide__body {
  width: 100%;
  max-width: min(640px, 100%);
  margin: 0;
  padding: clamp(8px, 1.5vw, 14px) 0 clamp(8px, 1.5vw, 14px) clamp(10px, 2vw, 22px);
  text-align: left;
}

.products-slide__body h3 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  color: var(--primary);
  line-height: 1.22;
  text-align: left;
}

.products-slide__body p {
  margin: 0;
  color: var(--text);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.72;
  text-align: left;
  word-spacing: normal;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.65);
}

.products-carousel__chrome {
  margin-top: 14px;
}

.products-carousel__toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.products-carousel__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.85rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.products-carousel__btn:hover {
  color: var(--primary);
}

.products-carousel__btn:active {
  opacity: 0.85;
}

.products-carousel__btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.products-carousel__dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.products-carousel__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
}

.products-carousel__dot:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.products-carousel__dot-inner {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.55;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.products-carousel__dot[aria-current="true"] .products-carousel__dot-inner {
  background: var(--primary);
  opacity: 1;
  transform: scale(1.35);
}

@media (max-width: 720px) {
  .products-slide__grid {
    min-height: 0;
    padding-top: clamp(14px, 5vh, 36px);
  }

  .products-slide__body {
    max-width: none;
    padding-left: clamp(10px, 2.5vw, 18px);
    padding-right: clamp(10px, 2.5vw, 18px);
  }

  .products-slide {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .products-carousel__track {
    transition: none;
  }
}

@media (max-width: 860px) {
  .grid-3,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
  }

  .site-nav.open {
    display: block;
    position: absolute;
    top: 72px;
    right: 4%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
  }

  .site-nav .nav-list {
    flex-direction: column;
    min-width: 180px;
  }
}
