/* Paleta oficial do manual da marca Trilha do Mercado. */
:root {
  --tm-yellow: #F4A700;
  --tm-orange: #E4541B;
  --tm-charcoal: #101920;
  --tm-gray: #A1AFAF;
  --tm-white: #F4F6F9;
  /* Tom de texto secundário derivado do preto chumbo (8,6:1 sobre o branco da marca). */
  --tm-charcoal-text: #3D4852;
  --tm-divider: rgba(16, 25, 32, .18);
  /* Touvlo e Garet são as fontes do manual; Outfit é o substituto até os arquivos das fontes entrarem no projeto. */
  --tm-font-display: "Touvlo", "Outfit", system-ui, sans-serif;
  --tm-font-text: "Garet", "Outfit", system-ui, sans-serif;
  --tm-ease: cubic-bezier(.2, .7, .2, 1);
  --tm-section-space: clamp(72px, 9vw, 140px);
  /* Altura da diagonal que separa o hero da seção seguinte. */
  --tm-hero-slant: 5vw;
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; background: var(--tm-charcoal); }

body {
  font-family: var(--tm-font-text);
  font-size: 18px;
  line-height: 1.6;
  color: var(--tm-white);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a, a:hover { color: inherit; }

::selection { background: var(--tm-yellow); color: var(--tm-charcoal); }

.on-dark :focus-visible { outline: 3px solid var(--tm-yellow); outline-offset: 4px; }
.on-light :focus-visible,
.on-yellow :focus-visible { outline: 3px solid var(--tm-charcoal); outline-offset: 4px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 12px 18px;
  background: var(--tm-yellow);
  color: var(--tm-charcoal);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* Layout */

.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5.5vw, 88px);
}

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
}
.grid12 > * { grid-column: 1 / -1; min-width: 0; }

/* Componentes compartilhados */

/* Assinatura visual: a faixa inclinada no ângulo do traço do símbolo da marca. */
.trail {
  display: inline-block;
  flex: none;
  width: 28px;
  height: 10px;
  background: currentColor;
  transform: skewX(-31deg);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.section-label {
  align-self: start;
  padding-top: 14px;
  color: var(--tm-charcoal);
}
.section-label .trail { color: var(--tm-yellow); }

.nav-link {
  padding-block: 6px;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .35s var(--tm-ease);
}
.nav-link:hover { background-size: 100% 2px; }

.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 30px;
  color: var(--tm-charcoal);
  font-weight: 700;
  text-decoration: none;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--tm-yellow);
  transform: skewX(-12deg);
  transition: background-color .3s var(--tm-ease);
}
.btn:hover { color: var(--tm-charcoal); }
.btn:hover::before { background: var(--tm-orange); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 100% 1px no-repeat;
  transition: background-size .35s var(--tm-ease);
}
.text-link:hover { background-size: 100% 2px; }

.arrow { transition: transform .35s var(--tm-ease); }
.btn:hover .arrow,
.text-link:hover .arrow { transform: translateX(5px); }
.text-link:hover .arrow-down { transform: translateY(4px); }

/* Cabeçalho */

.site-header { background: var(--tm-charcoal); color: var(--tm-white); }

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 24px;
}

.logo-link { display: inline-flex; text-decoration: none; }
.logo { display: block; width: 168px; height: auto; }

.main-nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  font-weight: 500;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--tm-charcoal);
  color: var(--tm-white);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - var(--tm-hero-slant)));
  padding-bottom: calc(var(--tm-section-space) + var(--tm-hero-slant));
}

.hero-mark {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: min(118vw, 560px);
  right: -38vw;
  bottom: -14%;
}
.hero-mark svg { display: block; overflow: visible; }

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: clamp(48px, 8vw, 120px);
  row-gap: clamp(32px, 4vw, 56px);
}

.hero-eyebrow { color: var(--tm-yellow); }

.hero-title {
  margin: 0;
  font-family: var(--tm-font-display);
  font-weight: 800;
  font-size: clamp(56px, 10.4vw, 168px);
  line-height: .9;
  letter-spacing: -.035em;
  color: var(--tm-white);
}
.hero-title .line { display: block; }
.hero-title .line > span { display: block; }
.hero-title .highlight { font-style: normal; color: var(--tm-yellow); }

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.hero-lead {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  padding-top: 8px;
}

/* Serviços */

.services {
  background: var(--tm-white);
  color: var(--tm-charcoal);
  margin-top: calc(-1 * var(--tm-hero-slant));
  padding-top: calc(var(--tm-hero-slant) + var(--tm-section-space));
  padding-bottom: var(--tm-section-space);
}

.services-intro {
  row-gap: 24px;
  margin-bottom: clamp(48px, 6vw, 96px);
}

.statement {
  margin: 0;
  font-family: var(--tm-font-display);
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 68px);
  line-height: 1.04;
  letter-spacing: -.025em;
}

.service-list { margin: 0; padding: 0; list-style: none; }

.service {
  position: relative;
  row-gap: 16px;
  padding-block: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--tm-divider);
}
.service:last-child { border-bottom: 1px solid var(--tm-divider); }

.service-number {
  position: relative;
  isolation: isolate;
  display: inline-block;
  font-family: var(--tm-font-display);
  font-weight: 800;
  font-size: clamp(44px, 5vw, 76px);
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--tm-orange);
}
.service-number::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 6px;
  z-index: -1;
  width: 0;
  height: 10px;
  background: var(--tm-yellow);
  transform: skewX(-31deg);
  transition: width .45s var(--tm-ease);
}
.service:hover .service-number::after { width: 100%; }

.service-title {
  margin: 0;
  font-family: var(--tm-font-display);
  font-weight: 700;
  font-size: clamp(26px, 2.7vw, 40px);
  line-height: 1.1;
  letter-spacing: -.02em;
  transition: transform .45s var(--tm-ease);
}
.service:hover .service-title { transform: translateX(8px); }

.service-description {
  margin: 0;
  max-width: 46ch;
  color: var(--tm-charcoal-text);
}

/* Clientes */

.clients {
  background: var(--tm-white);
  color: var(--tm-charcoal);
  padding-bottom: var(--tm-section-space);
}

.clients-grid { row-gap: clamp(32px, 4vw, 56px); }

/* Logos de clientes nas cores originais de cada empresa. */
.client-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px clamp(48px, 6vw, 96px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.client { transition: transform .3s var(--tm-ease); }
.client:hover { transform: translateY(-3px); }
.client img { display: block; width: auto; }

/* Alturas equilibram o peso visual entre os logos; os PNGs de Triumf, IAB e Blockchain ficam levemente suaves em telas de alta densidade. */
.client-logo-triumf { height: 112px; }
.client-logo-atre { height: 72px; }
.client-logo-iab { height: 72px; }
.client-logo-bianca { height: 72px; }
.client-logo-blockchain { height: 52px; }

/* Contato */

.contact {
  background: var(--tm-yellow);
  color: var(--tm-charcoal);
  padding-block: var(--tm-section-space);
}

.contact-grid { row-gap: clamp(32px, 4vw, 56px); }

.contact-title {
  margin: 0;
  font-family: var(--tm-font-display);
  font-weight: 800;
  font-size: clamp(48px, 8vw, 128px);
  line-height: .92;
  letter-spacing: -.035em;
}

.contact-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.contact-text {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(18px, 1.5vw, 21px);
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding-bottom: 6px;
  font-family: var(--tm-font-display);
  font-weight: 700;
  font-size: clamp(26px, 5vw, 76px);
  line-height: 1.1;
  letter-spacing: -.025em;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 3px no-repeat;
}
.email-link .arrow { width: .7em; height: .7em; flex: none; }
.email-link:hover .arrow { transform: translate(6px, -6px); }

/* Rodapé */

.site-footer {
  background: var(--tm-charcoal);
  color: var(--tm-gray);
  font-size: 14px;
  line-height: 1.7;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  padding-block: 48px;
}

.footer-address {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-style: normal;
}

.footer-company { color: var(--tm-white); font-weight: 600; }
.footer-address a { color: var(--tm-white); }

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--tm-white);
}

/* Desktop */

@media (min-width: 900px) {
  .hero-title-col { grid-column: 1 / span 10; }
  .hero-text-col { grid-column: 6 / span 6; }
  .hero-mark { width: min(64vw, 900px); right: -14vw; bottom: auto; top: 6%; }
  .head-col { grid-column: 1 / span 4; }
  .statement-col { grid-column: 5 / span 8; }
  .service-number-col { grid-column: 1 / span 2; }
  .service-title-col { grid-column: 3 / span 5; }
  .service-description-col { grid-column: 8 / span 5; }
  .contact-title-col { grid-column: 1 / span 9; }
}

/* Animações */

@keyframes tm-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes tm-line { from { transform: translateY(105%); } to { transform: none; } }
@keyframes tm-turn { from { transform: rotate(-6deg); } to { transform: rotate(10deg); } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-title .line { overflow: hidden; padding-bottom: .06em; }
  .hero-title .line > span { animation: tm-line .9s var(--tm-ease) both; }
  .hero-title .line:nth-child(2) > span { animation-delay: .08s; }
  .hero-title .line:nth-child(3) > span { animation-delay: .16s; }
  .hero-fade { animation: tm-rise .9s .3s var(--tm-ease) both; }

  /* Navegadores sem scroll-driven animations exibem o conteúdo estático. */
  @supports (animation-timeline: view()) {
    .reveal { animation: tm-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
    .hero-mark svg { animation: tm-turn linear both; animation-timeline: view(); animation-range: cover; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
