/* ==========================================================================
   BRAVI MONTAGEM — design tokens
   Paleta: preto/vermelho da marca + motivo de "marcas de medição" técnicas,
   remetendo à precisão do trabalho de montagem.
   ========================================================================== */
:root {
  --black:      #0A0A0A;
  --surface:    #141414;
  --surface-2:  #1B1B1B;
  --white:      #F2F1ED;
  --steel:      #8F8E8A;
  --steel-dim:  #5C5B58;
  --red:        #C31F2E;
  --red-bright: #E23A46;
  --red-dim:    #5C1119;
  --line:       rgba(242, 241, 237, 0.12);

  --font-display: 'Archivo', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;

  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
}

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

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(10,10,10,0.85), transparent);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  height: 44px;
  width: auto;
}

.main-nav { display: flex; align-items: center; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
  position: relative;
  padding: 4px 0;
}

.nav-list a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--red-bright);
  transition: right 0.25s ease;
}

.nav-list a:not(.nav-cta):hover::after { right: 0; }

.nav-cta {
  border: 1px solid var(--red);
  padding: 8px 18px !important;
  color: var(--white);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-cta:hover {
  background: var(--red);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  width: 100%;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 140px 32px 100px;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.78) 55%, var(--black) 100%),
    linear-gradient(90deg, rgba(10,10,10,0.9) 0%, rgba(10,10,10,0.35) 60%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--red-bright);
  margin: 0 0 18px;
}

.hero-title {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 900;
  line-height: 1.04;
  color: var(--white);
}

.hero-lede {
  margin: 28px 0 40px;
  max-width: 46ch;
  font-size: 1.08rem;
  color: #D9D8D3;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 30px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn-primary:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--white);
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 32px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--steel);
}

.scroll-hint-line {
  width: 36px;
  height: 1px;
  background: var(--steel);
}

/* ==========================================================================
   BANNER DE PÁGINA (usado em páginas internas, ex: portfolio.html)
   ========================================================================== */
.page-banner {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 140px 32px 64px;
}

.page-banner-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.page-banner-title {
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  font-weight: 900;
  color: var(--white);
  margin: 14px 0 18px;
}

/* ==========================================================================
   SERVIÇOS
   ========================================================================== */
.services {
  padding: 120px 0;
  border-bottom: 1px solid var(--line);
}

.services-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap: 80px;
}

.services-intro h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 20px;
}

.services-intro p {
  color: var(--steel);
  max-width: 34ch;
}

.services-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.25s ease;
}

.service-row::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--red);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.service-row:hover::before { opacity: 1; }
.service-row:hover { padding-left: 4px; }

.service-row h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
}

.service-row p {
  margin: 0;
  color: var(--steel);
  font-size: 0.96rem;
}

/* ==========================================================================
   PORTFÓLIO
   ========================================================================== */
.portfolio {
  padding: 120px 0;
  border-bottom: 1px solid var(--line);
}

.portfolio h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 900;
}

.portfolio-lede {
  color: var(--steel);
  margin: 16px 0 56px;
  max-width: 46ch;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 320px);
  gap: 20px;
}

.item-a { grid-column: 1 / 4; grid-row: 1 / 3; }
.item-b { grid-column: 4 / 7; grid-row: 1 / 2; }
.item-c { grid-column: 4 / 6; grid-row: 2 / 3; }
.item-d { grid-column: 6 / 7; grid-row: 2 / 3; }

.portfolio-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: saturate(0.9);
}

.portfolio-item:hover img {
  transform: scale(1.045);
  filter: saturate(1.05);
}

.portfolio-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 22px;
  background: linear-gradient(to top, rgba(10,10,10,0.92), transparent);
  font-size: 0.92rem;
  color: var(--white);
  font-weight: 500;
}

.portfolio-tag {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red-bright);
  margin-bottom: 4px;
}

.frame-mark {
  position: absolute;
  width: 22px;
  height: 22px;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.portfolio-item:hover .frame-mark { opacity: 0.85; }

.mark-tl { top: 14px; left: 14px; }
.mark-br { bottom: 14px; right: 14px; transform: rotate(180deg); }
.mark-br { bottom: 66px; }

.frame-mark svg { width: 100%; height: 100%; }

.portfolio-page {
  padding-top: 90px;
}

/* ==========================================================================
   CTA DO PORTFÓLIO (fim da página portfolio.html)
   ========================================================================== */
.portfolio-cta {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 90px 0;
}

.portfolio-cta-inner {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portfolio-cta h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 14px;
}

.portfolio-cta p {
  color: var(--steel);
  margin: 0 0 32px;
}

.portfolio-cta .btn {
  display: inline-flex;
}

/* ==========================================================================
   CONTATO
   ========================================================================== */
.contact {
  padding: 120px 0 100px;
}

.contact h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 900;
}

.contact-lede {
  color: var(--steel);
  margin: 16px 0 56px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.contact-card {
  background: var(--black);
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: background 0.25s ease;
}

.contact-card:hover {
  background: var(--surface);
}

.contact-icon {
  width: 40px;
  height: 40px;
  color: var(--red-bright);
}

.contact-icon svg { width: 100%; height: 100%; }

.contact-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.contact-value {
  color: var(--steel);
  font-size: 0.94rem;
  word-break: break-word;
}

.contact-card:hover .contact-value {
  color: var(--white);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 32px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-logo {
  height: 34px;
  margin-bottom: 6px;
}

.footer-tagline {
  color: var(--steel);
  margin: 0;
  font-size: 0.92rem;
}

.footer-copy {
  color: var(--steel-dim);
  margin: 0;
  font-size: 0.82rem;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; gap: 40px; }
  .service-row { grid-template-columns: 1fr; gap: 8px; }

  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, 220px);
  }
  .item-a { grid-column: 1 / 3; grid-row: 1 / 2; }
  .item-b { grid-column: 1 / 3; grid-row: 2 / 3; }
  .item-c { grid-column: 1 / 2; grid-row: 3 / 4; }
  .item-d { grid-column: 2 / 3; grid-row: 3 / 4; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav-list {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--black);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-list.open { max-height: 300px; }

  .nav-list li { width: 100%; }

  .nav-list a {
    display: block;
    padding: 16px 32px;
    border-bottom: 1px solid var(--line);
  }

  .nav-cta { border: none !important; }

  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .item-a, .item-b, .item-c, .item-d {
    grid-column: 1 / 2;
    grid-row: auto;
    height: 280px;
  }

  .hero { padding-top: 120px; }
}

/* VISUALIZADOR 3D DA LOGO */
.brand-mark { display: block; padding: 0; border: 0; background: transparent; cursor: pointer; }
.brand-mark:focus-visible { outline-offset: 6px; }
.logo-viewer { width: min(92vw, 680px); max-width: none; max-height: 92svh; padding: 0; border: 1px solid rgba(242,241,237,.18); background: var(--surface); color: var(--white); overflow: auto; }
.logo-viewer::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(8px); }
.logo-viewer-panel { position: relative; padding: 38px clamp(22px,6vw,52px) 34px; }
.logo-viewer-close { position: absolute; top: 18px; right: 20px; width: 42px; height: 42px; border: 1px solid var(--line); background: transparent; color: var(--white); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.logo-stage { position: relative; display: grid; place-items: center; min-height: clamp(240px,48vw,390px); margin: 20px 0 18px; overflow: hidden; background: radial-gradient(ellipse at center,#262626 0%,#111 55%,#0a0a0a 100%); border: 1px solid var(--line); perspective: 1000px; touch-action: pan-y; cursor: grab; user-select: none; }
.logo-stage:active { cursor: grabbing; }
.logo-object { position: relative; width: min(94%,560px); aspect-ratio: 2056 / 765; transform-style: preserve-3d; will-change: transform; pointer-events: none; }
.logo-object::before { content: none; }
.logo-object img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; backface-visibility: hidden; }
.logo-object-front { transform: translateZ(1px); }
.logo-object-back { transform: rotateY(180deg) translateZ(1px); }
.logo-stage-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: var(--steel); font: 700 .65rem var(--font-display); letter-spacing: .16em; white-space: nowrap; pointer-events: none; }
.logo-rotation-label { display: flex; justify-content: space-between; color: var(--white); font-size: .86rem; }
.logo-rotation-label output { color: var(--red-bright); font-variant-numeric: tabular-nums; }
.logo-rotation { width: 100%; margin: 12px 0 0; accent-color: var(--red-bright); cursor: ew-resize; }

.logo-viewer-brand {
  margin: 0 64px 24px 0;
  padding-left: 14px;
  border-left: 4px solid var(--red-bright);
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .025em;
  text-shadow: 0 0 22px rgba(226, 58, 70, .22);
}